From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Harvey Date: Fri, 22 Feb 2019 10:03:15 -0800 Subject: [U-Boot] [RFC 18/22] ahci: set n_ports from host caps In-Reply-To: <20190222180319.32221-1-tharvey@gateworks.com> References: <20190222180319.32221-1-tharvey@gateworks.com> Message-ID: <20190222180319.32221-19-tharvey@gateworks.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Instead of assuming 2 devices, get the max from the host controller. Signed-off-by: Tim Harvey --- 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