ata: ahci: Don't cap AHCI port count under CONFIG_DM_SCSI
authorTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Wed, 12 Sep 2018 22:28:55 +0000 (01:28 +0300)
committerTom Rini <trini@konsulko.com>
Wed, 26 Sep 2018 01:49:18 +0000 (21:49 -0400)
When using device model this sort of hardcoded limits aren't used or
necessary.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/ata/ahci.c

index 333f0457f6fb4d9031f9782d1d138b679fb2e8fd..5fafb63aeb304b2f575d0feae4d3beb194454e43 100644 (file)
@@ -230,8 +230,10 @@ static int ahci_host_init(struct ahci_uc_priv *uc_priv)
        debug("cap 0x%x  port_map 0x%x  n_ports %d\n",
              uc_priv->cap, uc_priv->port_map, uc_priv->n_ports);
 
+#if !defined(CONFIG_DM_SCSI)
        if (uc_priv->n_ports > CONFIG_SYS_SCSI_MAX_SCSI_ID)
                uc_priv->n_ports = CONFIG_SYS_SCSI_MAX_SCSI_ID;
+#endif
 
        for (i = 0; i < uc_priv->n_ports; i++) {
                if (!(port_map & (1 << i)))