]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dm: Rename disk uclass to ahci
authorSimon Glass <sjg@chromium.org>
Sun, 1 May 2016 17:35:52 +0000 (11:35 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 17 May 2016 15:54:43 +0000 (09:54 -0600)
This started as 'ahci' and was renamed to 'disk' during code review. But it
seems that this is too generic. Now that we have a 'blk' uclass, we can use
that as the generic piece, and revert to ahci for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/x86/Kconfig
arch/x86/cpu/broadwell/sata.c
arch/x86/cpu/intel_common/cpu.c
arch/x86/cpu/ivybridge/bd82x6x.c
arch/x86/cpu/ivybridge/sata.c
drivers/block/Kconfig
drivers/block/Makefile
drivers/block/ahci-uclass.c [moved from drivers/block/disk-uclass.c with 72% similarity]
include/dm/uclass-id.h

index 4ef27dc87a38f1fbf421f40735292fcba7d3c833..396023eee8deaf057027cc291d1f284da69536c4 100644 (file)
@@ -47,6 +47,9 @@ source "arch/x86/cpu/queensbay/Kconfig"
 
 # architecture-specific options below
 
+config AHCI
+       default y
+
 config SYS_MALLOC_F_LEN
        default 0x800
 
index dfb8486d0621e2b663bc1cad219f2834745fc8a4..2e4708262c1daa41411a7acc9b3b1e37778d3fbe 100644 (file)
@@ -261,7 +261,7 @@ static const struct udevice_id broadwell_ahci_ids[] = {
 
 U_BOOT_DRIVER(ahci_broadwell_drv) = {
        .name           = "ahci_broadwell",
-       .id             = UCLASS_DISK,
+       .id             = UCLASS_AHCI,
        .of_match       = broadwell_ahci_ids,
        .ofdata_to_platdata     = broadwell_sata_ofdata_to_platdata,
        .probe          = broadwell_sata_probe,
index 93e4505e4de50d635e2e7dd2353437d9115f86fa..0fdef6f3690b50ef1c472fa07fd4b7d8de771634 100644 (file)
@@ -58,7 +58,7 @@ int cpu_common_init(void)
                return -ENODEV;
 
        /* Cause the SATA device to do its early init */
-       uclass_first_device(UCLASS_DISK, &dev);
+       uclass_first_device(UCLASS_AHCI, &dev);
 
        return 0;
 }
index 4c039ac9c67317f50acb2e25440968de8e8958b1..5b58d6c427e9a1547798b867cb4f363840dc522b 100644 (file)
@@ -162,7 +162,7 @@ static int bd82x6x_probe(struct udevice *dev)
                return 0;
 
        /* Cause the SATA device to do its init */
-       uclass_first_device(UCLASS_DISK, &dev);
+       uclass_first_device(UCLASS_AHCI, &dev);
 
        ret = syscon_get_by_driver_data(X86_SYSCON_GMA, &gma_dev);
        if (ret)
index c3d1057c291d5b9aaf022b275b520e00c673b7cd..1ce81959e3ff1ece17ea69855895acb3eff4571c 100644 (file)
@@ -233,7 +233,7 @@ static const struct udevice_id bd82x6x_ahci_ids[] = {
 
 U_BOOT_DRIVER(ahci_ivybridge_drv) = {
        .name           = "ahci_ivybridge",
-       .id             = UCLASS_DISK,
+       .id             = UCLASS_AHCI,
        .of_match       = bd82x6x_ahci_ids,
        .probe          = bd82x6x_sata_probe,
 };
index fcc9ccdd7f85e159a8886ce258db80d54e7f3c44..80eea84dc29731c96a48a2fd8814cd511375806b 100644 (file)
@@ -9,10 +9,9 @@ config BLK
          be partitioned into several areas, called 'partitions' in U-Boot.
          A filesystem can be placed in each partition.
 
-config DISK
-       bool "Support disk controllers with driver model"
+config AHCI
+       bool "Support SATA controllers with driver model"
        depends on DM
-       default y if DM
        help
          This enables a uclass for disk controllers in U-Boot. Various driver
          types can use this, such as AHCI/SATA. It does not provide any standard
index a43492f208207c915692a87206ea97b4ce8c24e8..b832ae18ac1b8bc3c54e4bbf93dc10a68173acff 100644 (file)
@@ -7,7 +7,7 @@
 
 obj-$(CONFIG_BLK) += blk-uclass.o
 
-obj-$(CONFIG_DISK) += disk-uclass.o
+obj-$(CONFIG_AHCI) += ahci-uclass.o
 obj-$(CONFIG_SCSI_AHCI) += ahci.o
 obj-$(CONFIG_DWC_AHSATA) += dwc_ahsata.o
 obj-$(CONFIG_FSL_SATA) += fsl_sata.o
similarity index 72%
rename from drivers/block/disk-uclass.c
rename to drivers/block/ahci-uclass.c
index d665b3505adfa37d10b7e7fc7124a4860f1257f3..7b8c32699f534abd1c626dac18dfa796aabcdc52 100644 (file)
@@ -8,7 +8,7 @@
 #include <common.h>
 #include <dm.h>
 
-UCLASS_DRIVER(disk) = {
-       .id             = UCLASS_DISK,
-       .name           = "disk",
+UCLASS_DRIVER(ahci) = {
+       .id             = UCLASS_AHCI,
+       .name           = "ahci",
 };
index cbf9b2ca235190714b81fc1c07460d997e5e95d5..a5cf6e201c0b1f1de0d74f3de004eef2c1f0db98 100644 (file)
@@ -26,11 +26,11 @@ enum uclass_id {
 
        /* U-Boot uclasses start here - in alphabetical order */
        UCLASS_ADC,             /* Analog-to-digital converter */
+       UCLASS_AHCI,            /* SATA disk controller */
        UCLASS_BLK,             /* Block device */
        UCLASS_CLK,             /* Clock source, e.g. used by peripherals */
        UCLASS_CPU,             /* CPU, typically part of an SoC */
        UCLASS_CROS_EC,         /* Chrome OS EC */
-       UCLASS_DISK,            /* Disk controller, e.g. SATA */
        UCLASS_DISPLAY,         /* Display (e.g. DisplayPort, HDMI) */
        UCLASS_DMA,             /* Direct Memory Access */
        UCLASS_RAM,             /* RAM controller */