]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ata: don't use SYS_SCSI_MAX_SCSI_ID for SATA
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 26 Mar 2023 16:58:26 +0000 (18:58 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 6 Apr 2023 23:10:08 +0000 (19:10 -0400)
CONFIG_SYS_SCSI_MAX_SCSI_ID is not defined if CONFIG_SCSI=n.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
configs/controlcenterdc_defconfig
configs/highbank_defconfig
drivers/ata/Kconfig
drivers/ata/ahci.c

index 9c906edf1ef3e76f5fe623db4dfbef139a9db376..99402588818b8a4d1945398b423bc7f038f17730 100644 (file)
@@ -72,6 +72,7 @@ CONFIG_ARP_TIMEOUT=200
 CONFIG_NET_RETRY_COUNT=50
 CONFIG_USE_ROOTPATH=y
 CONFIG_SPL_OF_TRANSLATE=y
+CONFIG_SYS_SATA_MAX_PORTS=2
 CONFIG_SCSI_AHCI=y
 CONFIG_DM_PCA953X=y
 CONFIG_DM_I2C=y
index f0457575a71a7103a64d9adb3b5ad371d1901ea7..4eac7b29faddd9632b794e8beb95607a86695c2b 100644 (file)
@@ -30,6 +30,7 @@ CONFIG_RESET_TO_RETRY=y
 CONFIG_MISC_INIT_R=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_ENV_IS_IN_NVRAM=y
+CONFIG_SYS_SATA_MAX_PORTS=5
 CONFIG_SCSI_AHCI=y
 CONFIG_SYS_64BIT_LBA=y
 CONFIG_BOOTCOUNT_LIMIT=y
index 2ab502c26072cf4dc551e5d0d9ea88b1ec8e499e..049f7efd10b85875ee9a8d761fd318a59a7493f2 100644 (file)
@@ -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
index 272c48b8e57faa5323df8191c763cddd336db5d9..6998b82aa5100a66da1bfe77f5b787087f0fc97d 100644 (file)
@@ -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++) {