dm: Rename disk uclass to ahci

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>
This commit is contained in:
Simon Glass 2016-05-01 11:35:52 -06:00
parent cf63084492
commit a219639d42
9 changed files with 14 additions and 12 deletions

View file

@ -47,6 +47,9 @@ source "arch/x86/cpu/queensbay/Kconfig"
# architecture-specific options below # architecture-specific options below
config AHCI
default y
config SYS_MALLOC_F_LEN config SYS_MALLOC_F_LEN
default 0x800 default 0x800

View file

@ -261,7 +261,7 @@ static const struct udevice_id broadwell_ahci_ids[] = {
U_BOOT_DRIVER(ahci_broadwell_drv) = { U_BOOT_DRIVER(ahci_broadwell_drv) = {
.name = "ahci_broadwell", .name = "ahci_broadwell",
.id = UCLASS_DISK, .id = UCLASS_AHCI,
.of_match = broadwell_ahci_ids, .of_match = broadwell_ahci_ids,
.ofdata_to_platdata = broadwell_sata_ofdata_to_platdata, .ofdata_to_platdata = broadwell_sata_ofdata_to_platdata,
.probe = broadwell_sata_probe, .probe = broadwell_sata_probe,

View file

@ -58,7 +58,7 @@ int cpu_common_init(void)
return -ENODEV; return -ENODEV;
/* Cause the SATA device to do its early init */ /* Cause the SATA device to do its early init */
uclass_first_device(UCLASS_DISK, &dev); uclass_first_device(UCLASS_AHCI, &dev);
return 0; return 0;
} }

View file

@ -162,7 +162,7 @@ static int bd82x6x_probe(struct udevice *dev)
return 0; return 0;
/* Cause the SATA device to do its init */ /* 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); ret = syscon_get_by_driver_data(X86_SYSCON_GMA, &gma_dev);
if (ret) if (ret)

View file

@ -233,7 +233,7 @@ static const struct udevice_id bd82x6x_ahci_ids[] = {
U_BOOT_DRIVER(ahci_ivybridge_drv) = { U_BOOT_DRIVER(ahci_ivybridge_drv) = {
.name = "ahci_ivybridge", .name = "ahci_ivybridge",
.id = UCLASS_DISK, .id = UCLASS_AHCI,
.of_match = bd82x6x_ahci_ids, .of_match = bd82x6x_ahci_ids,
.probe = bd82x6x_sata_probe, .probe = bd82x6x_sata_probe,
}; };

View file

@ -9,10 +9,9 @@ config BLK
be partitioned into several areas, called 'partitions' in U-Boot. be partitioned into several areas, called 'partitions' in U-Boot.
A filesystem can be placed in each partition. A filesystem can be placed in each partition.
config DISK config AHCI
bool "Support disk controllers with driver model" bool "Support SATA controllers with driver model"
depends on DM depends on DM
default y if DM
help help
This enables a uclass for disk controllers in U-Boot. Various driver 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 types can use this, such as AHCI/SATA. It does not provide any standard

View file

@ -7,7 +7,7 @@
obj-$(CONFIG_BLK) += blk-uclass.o 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_SCSI_AHCI) += ahci.o
obj-$(CONFIG_DWC_AHSATA) += dwc_ahsata.o obj-$(CONFIG_DWC_AHSATA) += dwc_ahsata.o
obj-$(CONFIG_FSL_SATA) += fsl_sata.o obj-$(CONFIG_FSL_SATA) += fsl_sata.o

View file

@ -8,7 +8,7 @@
#include <common.h> #include <common.h>
#include <dm.h> #include <dm.h>
UCLASS_DRIVER(disk) = { UCLASS_DRIVER(ahci) = {
.id = UCLASS_DISK, .id = UCLASS_AHCI,
.name = "disk", .name = "ahci",
}; };

View file

@ -26,11 +26,11 @@ enum uclass_id {
/* U-Boot uclasses start here - in alphabetical order */ /* U-Boot uclasses start here - in alphabetical order */
UCLASS_ADC, /* Analog-to-digital converter */ UCLASS_ADC, /* Analog-to-digital converter */
UCLASS_AHCI, /* SATA disk controller */
UCLASS_BLK, /* Block device */ UCLASS_BLK, /* Block device */
UCLASS_CLK, /* Clock source, e.g. used by peripherals */ UCLASS_CLK, /* Clock source, e.g. used by peripherals */
UCLASS_CPU, /* CPU, typically part of an SoC */ UCLASS_CPU, /* CPU, typically part of an SoC */
UCLASS_CROS_EC, /* Chrome OS EC */ UCLASS_CROS_EC, /* Chrome OS EC */
UCLASS_DISK, /* Disk controller, e.g. SATA */
UCLASS_DISPLAY, /* Display (e.g. DisplayPort, HDMI) */ UCLASS_DISPLAY, /* Display (e.g. DisplayPort, HDMI) */
UCLASS_DMA, /* Direct Memory Access */ UCLASS_DMA, /* Direct Memory Access */
UCLASS_RAM, /* RAM controller */ UCLASS_RAM, /* RAM controller */