[U-Boot] [RFC/RESEND 18/22] ahci: set n_ports from host caps
Tim Harvey
tharvey at gateworks.com
Mon Mar 4 17:34:33 UTC 2019
Instead of assuming 2 devices, get the max from the host controller.
Signed-off-by: Tim Harvey <tharvey at gateworks.com>
---
drivers/ata/ahci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 81d16925dd..e7d590f69a 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1181,12 +1181,12 @@ int ahci_probe_scsi(struct udevice *ahci_dev, ulong base)
uc_plat = dev_get_uclass_platdata(dev);
uc_plat->base = base;
uc_plat->max_lun = 1;
- uc_plat->max_id = 2;
uc_priv = dev_get_uclass_priv(ahci_dev);
ret = ahci_init_one(uc_priv, dev);
if (ret)
return ret;
+ uc_plat->max_id = uc_priv->n_ports;
ret = ahci_start_ports(uc_priv);
if (ret)
return ret;
--
2.17.1
More information about the U-Boot
mailing list