]> Git Repo - J-u-boot.git/commitdiff
drivers: ata: Rename ahci_mvebu
authorPatrick Rudolph <[email protected]>
Wed, 23 Oct 2024 13:20:00 +0000 (15:20 +0200)
committerTom Rini <[email protected]>
Sun, 27 Oct 2024 23:24:13 +0000 (17:24 -0600)
Rename 'ahci_mvebu' to 'ahci_generic' and select it by default.
The AHCI driver contains no SoC specific code and only expects the
base address to be passed, thus rename it to ahci_generic and add the
DT compatible string "generic-ahci".

Update existing defconfigs to use the new Kconfig name as well.

TEST: Booted on QEMU sbsa using the generic-ahci node.

Signed-off-by: Patrick Rudolph <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: Stefan Roese <[email protected]>
Acked-by: Tony Dinh <[email protected]>
23 files changed:
MAINTAINERS
configs/clearfog_defconfig
configs/clearfog_gt_8k_defconfig
configs/clearfog_sata_defconfig
configs/clearfog_spi_defconfig
configs/db-88f6820-gp_defconfig
configs/ds116_defconfig
configs/helios4_defconfig
configs/mvebu_crb_cn9130_defconfig
configs/mvebu_db-88f3720_defconfig
configs/mvebu_db_armada8k_defconfig
configs/mvebu_db_cn9130_defconfig
configs/mvebu_espressobin-88f3720_defconfig
configs/mvebu_espressobin_ultra-88f3720_defconfig
configs/mvebu_mcbin-88f8040_defconfig
configs/mvebu_puzzle-m801-88f8040_defconfig
configs/n2350_defconfig
configs/octeon_nic23_defconfig
configs/turris_omnia_defconfig
drivers/ata/Kconfig
drivers/ata/Makefile
drivers/ata/ahci_generic.c [new file with mode: 0644]
drivers/ata/ahci_mvebu.c [deleted file]

index 7aefda93d017f07d616f0f6d191129914fbeb484..7fbc87b93f551b195bf8913245398259aa4ec3f3 100644 (file)
@@ -356,7 +356,7 @@ S:  Maintained
 T:     git https://source.denx.de/u-boot/custodians/u-boot-marvell.git
 F:     arch/arm/mach-kirkwood/
 F:     arch/arm/mach-mvebu/
-F:     drivers/ata/ahci_mvebu.c
+F:     drivers/ata/ahci_generic.c
 F:     drivers/clk/mvebu/
 F:     drivers/ddr/marvell/
 F:     drivers/gpio/mvebu_gpio.c
index 62dbf2aa48f97d271892590f3501d7e8d1514ee1..9cb475368512bb84b5c8538d65556a27fa1c72e7 100644 (file)
@@ -52,7 +52,7 @@ CONFIG_ARP_TIMEOUT=200
 CONFIG_NET_RETRY_COUNT=50
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_OF_TRANSLATE=y
-CONFIG_AHCI_MVEBU=y
+CONFIG_AHCI_GENERIC=y
 CONFIG_DM_PCA953X=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_MVTWSI=y
index df7e04a75bbd32fd07afeb9e8fb7730124e7d589..66eb5e2407c42429fd28e121986a78162db02504 100644 (file)
@@ -46,7 +46,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
 CONFIG_NET_RETRY_COUNT=50
 CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_AHCI_MVEBU=y
+CONFIG_AHCI_GENERIC=y
 CONFIG_LBA48=y
 CONFIG_SYS_64BIT_LBA=y
 CONFIG_DM_I2C=y
index 41382f995d354c32265533455b6fb48335b5a654..b1e1fc75dd9fa8bdf8d383ae723e46004f307400 100644 (file)
@@ -52,7 +52,7 @@ CONFIG_ARP_TIMEOUT=200
 CONFIG_NET_RETRY_COUNT=50
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_OF_TRANSLATE=y
-CONFIG_AHCI_MVEBU=y
+CONFIG_AHCI_GENERIC=y
 CONFIG_DM_PCA953X=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_MVTWSI=y
index f345b12e6c78d90da4d8117c1b7f3074176a448a..64f862d298759dfd80ceaaf5c8f376cb6332295a 100644 (file)
@@ -52,7 +52,7 @@ CONFIG_ARP_TIMEOUT=200
 CONFIG_NET_RETRY_COUNT=50
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_OF_TRANSLATE=y
-CONFIG_AHCI_MVEBU=y
+CONFIG_AHCI_GENERIC=y
 CONFIG_DM_PCA953X=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_MVTWSI=y
index ee8cb8ae66cb58b4f0c7d3d7af5e2818802fe7a9..16417a4e125dc0cf480c592216e9f171eea58341 100644 (file)
@@ -58,7 +58,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
 CONFIG_NET_RETRY_COUNT=50
 CONFIG_SPL_OF_TRANSLATE=y
-CONFIG_AHCI_MVEBU=y
+CONFIG_AHCI_GENERIC=y
 CONFIG_SYS_I2C_LEGACY=y
 CONFIG_SPL_SYS_I2C_LEGACY=y
 CONFIG_SYS_I2C_MVTWSI=y
index 1173e3a0f6a215914ac58ec498c03a8b0b080a7e..d687be2d5bfd24afe95a8de10acaa10f2bdbd8a9 100644 (file)
@@ -65,7 +65,7 @@ CONFIG_NET_RETRY_COUNT=50
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_NETCONSOLE=y
 CONFIG_SPL_OF_TRANSLATE=y
-CONFIG_AHCI_MVEBU=y
+CONFIG_AHCI_GENERIC=y
 CONFIG_LBA48=y
 CONFIG_SYS_64BIT_LBA=y
 CONFIG_DM_I2C=y
index 29b6230e9014afc9be1b401a2a3064c5712ea471..c0ae1de2646609c186044b16964282c45bd5a30a 100644 (file)
@@ -52,7 +52,7 @@ CONFIG_ARP_TIMEOUT=200
 CONFIG_NET_RETRY_COUNT=50
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_OF_TRANSLATE=y
-CONFIG_AHCI_MVEBU=y
+CONFIG_AHCI_GENERIC=y
 CONFIG_DM_PCA953X=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_MVTWSI=y
index 4d5f575b0381f719c58cef75040dd2263a8cc40c..d253fe88d6d164a2cfa46bb23fb6ec5d107426ad 100644 (file)
@@ -46,7 +46,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_DEV=1
 CONFIG_ARP_TIMEOUT=200
 CONFIG_NET_RETRY_COUNT=50
-CONFIG_AHCI_MVEBU=y
+CONFIG_AHCI_GENERIC=y
 CONFIG_LBA48=y
 CONFIG_SYS_64BIT_LBA=y
 CONFIG_DM_I2C=y
index b955abb31e6729567926e97b6743200138cf8b27..1e9332c845b82e63303f96e712475bfe6a75d134 100644 (file)
@@ -43,7 +43,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
 CONFIG_NET_RETRY_COUNT=50
-CONFIG_AHCI_MVEBU=y
+CONFIG_AHCI_GENERIC=y
 CONFIG_LBA48=y
 CONFIG_SYS_64BIT_LBA=y
 CONFIG_CLK=y
index 6913796c010675bc7e64316e8c8f5eb1498ace88..a9b76a38430e504ef12786e4aff32bc91e67bc39 100644 (file)
@@ -42,7 +42,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
 CONFIG_NET_RETRY_COUNT=50
-CONFIG_AHCI_MVEBU=y
+CONFIG_AHCI_GENERIC=y
 CONFIG_LBA48=y
 CONFIG_SYS_64BIT_LBA=y
 CONFIG_DM_I2C=y
index 9133e25b2418ff69a1179329a72a8d4f483afdbe..2c345f743603abdd935b0491721afc77a9c661e8 100644 (file)
@@ -47,7 +47,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_DEV=1
 CONFIG_ARP_TIMEOUT=200
 CONFIG_NET_RETRY_COUNT=50
-CONFIG_AHCI_MVEBU=y
+CONFIG_AHCI_GENERIC=y
 CONFIG_LBA48=y
 CONFIG_SYS_64BIT_LBA=y
 CONFIG_DM_GPIO_LOOKUP_LABEL=y
index 7ecf5ab0d643c825126809de9c84ded38d2aada3..c7015c9b1393e0a29bbf58363e1b80602315d566 100644 (file)
@@ -54,7 +54,7 @@ CONFIG_ARP_TIMEOUT=200
 CONFIG_NET_RETRY_COUNT=50
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_AHCI_PCI=y
-CONFIG_AHCI_MVEBU=y
+CONFIG_AHCI_GENERIC=y
 CONFIG_LBA48=y
 CONFIG_SYS_64BIT_LBA=y
 CONFIG_CLK=y
index 974b6df165a9f1405f6ad585470742e2279e4cf6..0a4329d786c69a6e169798453fe86a12085b31e7 100644 (file)
@@ -53,7 +53,7 @@ CONFIG_ARP_TIMEOUT=200
 CONFIG_NET_RETRY_COUNT=50
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_AHCI_PCI=y
-CONFIG_AHCI_MVEBU=y
+CONFIG_AHCI_GENERIC=y
 CONFIG_LBA48=y
 CONFIG_SYS_64BIT_LBA=y
 CONFIG_CLK=y
index eef612a261e2e4e239217f975d2520082e0358ff..8bb26bd3d64d9e42ba8998b8a6e64191aa8628a3 100644 (file)
@@ -46,7 +46,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
 CONFIG_NET_RETRY_COUNT=50
 CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_AHCI_MVEBU=y
+CONFIG_AHCI_GENERIC=y
 CONFIG_LBA48=y
 CONFIG_SYS_64BIT_LBA=y
 CONFIG_DM_I2C=y
index b00e92908b3ec6d7d8c0f730ed7826486558a4c3..db7881c3fc897358675e9389e99ed663ad308c1e 100644 (file)
@@ -49,7 +49,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ARP_TIMEOUT=200
 CONFIG_NET_RETRY_COUNT=50
 CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_AHCI_MVEBU=y
+CONFIG_AHCI_GENERIC=y
 CONFIG_LBA48=y
 CONFIG_SYS_64BIT_LBA=y
 CONFIG_DM_PCA953X=y
index e7d7deabfe6da8bf653f485271ad893a5693906f..b6fc3339065ab3ecad780bc1fe6e088d8f6303f6 100644 (file)
@@ -65,7 +65,7 @@ CONFIG_NET_RETRY_COUNT=50
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_NETCONSOLE=y
 CONFIG_SPL_OF_TRANSLATE=y
-CONFIG_AHCI_MVEBU=y
+CONFIG_AHCI_GENERIC=y
 CONFIG_LBA48=y
 CONFIG_SYS_64BIT_LBA=y
 CONFIG_DM_I2C=y
index 5a8db5a0876bac1e7107f945e2613abf967d718c..d19d459555927bf2c78d8afb155f3d39618af69e 100644 (file)
@@ -46,7 +46,7 @@ CONFIG_EFI_PARTITION=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_TFTP_TSIZE=y
 CONFIG_SATA=y
-CONFIG_AHCI_MVEBU=y
+CONFIG_AHCI_GENERIC=y
 CONFIG_LBA48=y
 CONFIG_SYS_64BIT_LBA=y
 CONFIG_CLK=y
index 93f0bc53f9eeb1aaa8eb0eca9b7244d929984565..85c71f2eefc8b14d6ffba7bdda5a13af96d4664d 100644 (file)
@@ -90,7 +90,7 @@ CONFIG_NET_RETRY_COUNT=50
 CONFIG_NETCONSOLE=y
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_AHCI_PCI=y
-CONFIG_AHCI_MVEBU=y
+CONFIG_AHCI_GENERIC=y
 CONFIG_DM_PCA953X=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_MV=y
index 6cca561f974f95e51e3626a87f40198f34f36f5d..4fbb63a148acc6d2cee636cf45100792872cd5c7 100644 (file)
@@ -78,14 +78,16 @@ config MTK_AHCI
          Enable this driver to support Sata devices through
          Mediatek AHCI controller (e.g. MT7622).
 
-config AHCI_MVEBU
-       bool "Marvell EBU AHCI SATA support"
-       depends on ARCH_MVEBU || ARCH_OCTEON
+config AHCI_GENERIC
+       bool "Generic AHCI SATA support"
+       depends on OF_CONTROL
        select SCSI_AHCI
        select SCSI
        help
-         This option enables support for the Marvell EBU SoC's
-         onboard AHCI SATA.
+         This option enables support for generic onboard AHCI SATA controller
+         that do not need platform specific quirks, like emulated devices,
+         Marvell EBU SoC's onboard AHCI SATA controllers or Cavium's Octeon
+         7130 AHCI controllers.
 
          If unsure, say N.
 
index af6f0bf2780c196b6294994c5b2ac02fce12e1e2..507bf84c14c5d80763611ae285bdf7e8f1ac85a3 100644 (file)
@@ -14,6 +14,6 @@ obj-$(CONFIG_SATA) += sata.o sata_bootdev.o
 obj-$(CONFIG_SATA_CEVA) += sata_ceva.o
 obj-$(CONFIG_SATA_MV) += sata_mv.o
 obj-$(CONFIG_SATA_SIL) += sata_sil.o
-obj-$(CONFIG_AHCI_MVEBU) += ahci_mvebu.o
+obj-$(CONFIG_AHCI_GENERIC) += ahci_generic.o
 obj-$(CONFIG_SUNXI_AHCI) += ahci_sunxi.o
 obj-$(CONFIG_MTK_AHCI) += mtk_ahci.o
diff --git a/drivers/ata/ahci_generic.c b/drivers/ata/ahci_generic.c
new file mode 100644 (file)
index 0000000..6e5a6cb
--- /dev/null
@@ -0,0 +1,61 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2016 Stefan Roese <[email protected]>
+ */
+
+#include <ahci.h>
+#include <dm.h>
+#include <log.h>
+
+/*
+ * Dummy implementation that can be overwritten by a board
+ * specific function
+ */
+__weak int board_ahci_enable(void)
+{
+       return 0;
+}
+
+static int generic_ahci_bind(struct udevice *dev)
+{
+       struct udevice *scsi_dev;
+       int ret;
+
+       ret = ahci_bind_scsi(dev, &scsi_dev);
+       if (ret) {
+               debug("%s: Failed to bind (err=%d\n)", __func__, ret);
+               return ret;
+       }
+
+       return 0;
+}
+
+static int generic_ahci_probe(struct udevice *dev)
+{
+       /*
+        * Board specific SATA / AHCI enable code, e.g. enable the
+        * AHCI power or deassert reset
+        */
+       board_ahci_enable();
+
+       ahci_probe_scsi(dev, (ulong)dev_remap_addr(dev));
+
+       return 0;
+}
+
+static const struct udevice_id generic_ahci_ids[] = {
+       { .compatible = "marvell,armada-380-ahci" },
+       { .compatible = "marvell,armada-3700-ahci" },
+       { .compatible = "marvell,armada-8k-ahci" },
+       { .compatible = "cavium,octeon-7130-ahci" },
+       { .compatible = "generic-ahci" },
+       { }
+};
+
+U_BOOT_DRIVER(ahci_generic_drv) = {
+       .name           = "ahci_generic",
+       .id             = UCLASS_AHCI,
+       .of_match       = generic_ahci_ids,
+       .bind           = generic_ahci_bind,
+       .probe          = generic_ahci_probe,
+};
diff --git a/drivers/ata/ahci_mvebu.c b/drivers/ata/ahci_mvebu.c
deleted file mode 100644 (file)
index f6e2d6b..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright (C) 2016 Stefan Roese <[email protected]>
- */
-
-#include <ahci.h>
-#include <dm.h>
-#include <log.h>
-
-/*
- * Dummy implementation that can be overwritten by a board
- * specific function
- */
-__weak int board_ahci_enable(void)
-{
-       return 0;
-}
-
-static int mvebu_ahci_bind(struct udevice *dev)
-{
-       struct udevice *scsi_dev;
-       int ret;
-
-       ret = ahci_bind_scsi(dev, &scsi_dev);
-       if (ret) {
-               debug("%s: Failed to bind (err=%d\n)", __func__, ret);
-               return ret;
-       }
-
-       return 0;
-}
-
-static int mvebu_ahci_probe(struct udevice *dev)
-{
-       /*
-        * Board specific SATA / AHCI enable code, e.g. enable the
-        * AHCI power or deassert reset
-        */
-       board_ahci_enable();
-
-       ahci_probe_scsi(dev, (ulong)dev_remap_addr(dev));
-
-       return 0;
-}
-
-static const struct udevice_id mvebu_ahci_ids[] = {
-       { .compatible = "marvell,armada-380-ahci" },
-       { .compatible = "marvell,armada-3700-ahci" },
-       { .compatible = "marvell,armada-8k-ahci" },
-       { .compatible = "cavium,octeon-7130-ahci" },
-       { }
-};
-
-U_BOOT_DRIVER(ahci_mvebu_drv) = {
-       .name           = "ahci_mvebu",
-       .id             = UCLASS_AHCI,
-       .of_match       = mvebu_ahci_ids,
-       .bind           = mvebu_ahci_bind,
-       .probe          = mvebu_ahci_probe,
-};
This page took 0.056459 seconds and 4 git commands to generate.