summaryrefslogtreecommitdiff
path: root/drivers/ata
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-08-12 04:34:59 +0300
committerTom Rini <trini@konsulko.com>2022-09-16 18:05:16 +0300
commite33a5c6be55e7c012b2851f9bdf90e7f607e72bf (patch)
tree19041e9f1b54a5d2811c96e88132ba44fe31243b /drivers/ata
parentadbfe8edc3389ba635229195a95217d8b0dfa182 (diff)
downloadu-boot-e33a5c6be55e7c012b2851f9bdf90e7f607e72bf.tar.xz
blk: Switch over to using uclass IDs
We currently have an if_type (interface type) and a uclass id. These are closely related and we don't need to have both. Drop the if_type values and use the uclass ones instead. Maintain the existing, subtle, one-way conversion between UCLASS_USB and UCLASS_MASS_STORAGE for now, and add a comment. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/dwc_ahsata.c2
-rw-r--r--drivers/ata/fsl_sata.c2
-rw-r--r--drivers/ata/sata.c2
-rw-r--r--drivers/ata/sata_mv.c2
-rw-r--r--drivers/ata/sata_sil.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/drivers/ata/dwc_ahsata.c b/drivers/ata/dwc_ahsata.c
index 1a2c3c2fe7..167b5a395f 100644
--- a/drivers/ata/dwc_ahsata.c
+++ b/drivers/ata/dwc_ahsata.c
@@ -880,7 +880,7 @@ int dwc_ahsata_scan(struct udevice *dev)
device_find_first_child(dev, &blk);
if (!blk) {
ret = blk_create_devicef(dev, "dwc_ahsata_blk", "blk",
- IF_TYPE_SATA, -1, 512, 0, &blk);
+ UCLASS_AHCI, -1, 512, 0, &blk);
if (ret) {
debug("Can't create device\n");
return ret;
diff --git a/drivers/ata/fsl_sata.c b/drivers/ata/fsl_sata.c
index 6db4247368..972101b29c 100644
--- a/drivers/ata/fsl_sata.c
+++ b/drivers/ata/fsl_sata.c
@@ -888,7 +888,7 @@ static int fsl_ata_probe(struct udevice *dev)
for (i = 0; i < nr_ports; i++) {
snprintf(sata_name, sizeof(sata_name), "fsl_sata%d", i);
ret = blk_create_devicef(dev, "sata_fsl_blk", sata_name,
- IF_TYPE_SATA, -1, 512, 0, &blk);
+ UCLASS_AHCI, -1, 512, 0, &blk);
if (ret) {
debug("Can't create device\n");
return ret;
diff --git a/drivers/ata/sata.c b/drivers/ata/sata.c
index 0e6c8cdd42..604c721cfd 100644
--- a/drivers/ata/sata.c
+++ b/drivers/ata/sata.c
@@ -79,7 +79,7 @@ int __sata_initialize(void)
for (i = 0; i < CONFIG_SYS_SATA_MAX_DEVICE; i++) {
memset(&sata_dev_desc[i], 0, sizeof(struct blk_desc));
- sata_dev_desc[i].if_type = IF_TYPE_SATA;
+ sata_dev_desc[i].if_type = UCLASS_AHCI;
sata_dev_desc[i].devnum = i;
sata_dev_desc[i].part_type = PART_TYPE_UNKNOWN;
sata_dev_desc[i].type = DEV_TYPE_HARDDISK;
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index a187796dfc..18c7a66db1 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -1076,7 +1076,7 @@ static int sata_mv_probe(struct udevice *dev)
for (i = 0; i < nr_ports; i++) {
ret = blk_create_devicef(dev, "sata_mv_blk", "blk",
- IF_TYPE_SATA, -1, 512, 0, &blk);
+ UCLASS_AHCI, -1, 512, 0, &blk);
if (ret) {
debug("Can't create device\n");
continue;
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
index 7065154572..b5e150d568 100644
--- a/drivers/ata/sata_sil.c
+++ b/drivers/ata/sata_sil.c
@@ -730,7 +730,7 @@ static int sil_pci_probe(struct udevice *dev)
for (i = sata_info.portbase; i < sata_info.maxport; i++) {
snprintf(sata_name, sizeof(sata_name), "sil_sata%d", i);
ret = blk_create_devicef(dev, "sata_sil_blk", sata_name,
- IF_TYPE_SATA, -1, 512, 0, &blk);
+ UCLASS_AHCI, -1, 512, 0, &blk);
if (ret) {
debug("Can't create device\n");
return ret;