aboutsummaryrefslogtreecommitdiff
path: root/drivers/ata
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/Kconfig9
-rw-r--r--drivers/ata/ahci.c4
2 files changed, 11 insertions, 2 deletions
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 3fe53d6d4f..049f7efd10 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -20,6 +20,14 @@ config SATA
See also CMD_SATA which provides command-line support.
+config SYS_SATA_MAX_PORTS
+ int "Maximum supported SATA ports"
+ depends on SCSI_AHCI && !DM_SCSI
+ default 1
+ help
+ Sets the maximum number of ports to scan when looking for devices.
+ Ports from 0 to (this value - 1) are scanned.
+
config LIBATA
bool
help
@@ -37,6 +45,7 @@ config AHCI_PCI
bool "Support for PCI-based AHCI controller"
depends on PCI
depends on DM_SCSI
+ depends on SCSI_AHCI
help
Enables support for the PCI-based AHCI controller.
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 272c48b8e5..6998b82aa5 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -211,8 +211,8 @@ static int ahci_host_init(struct ahci_uc_priv *uc_priv)
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;
+ if (uc_priv->n_ports > CONFIG_SYS_SATA_MAX_PORTS)
+ uc_priv->n_ports = CONFIG_SYS_SATA_MAX_PORTS;
#endif
for (i = 0; i < uc_priv->n_ports; i++) {