[PATCH 7/8] Convert CONFIG_SCSI_AHCI_PLAT et al to Kconfig

Simon Glass sjg at chromium.org
Mon Jan 31 15:49:37 CET 2022


This converts the following to Kconfig:
   CONFIG_SCSI_AHCI_PLAT
   CONFIG_SYS_SCSI_MAX_SCSI_ID
   CONFIG_SYS_SCSI_MAX_LUN
   CONFIG_SYS_SATA_MAX_DEVICE

Drop CONFIG_SCSI for everything except the sandbox build. We only need
one build for tests.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 README                                        |  8 -----
 arch/Kconfig                                  |  1 -
 arch/arm/include/asm/arch-ls102xa/config.h    |  3 --
 configs/MPC837XERDB_defconfig                 |  1 +
 configs/P1010RDB-PA_36BIT_NAND_defconfig      |  1 +
 configs/P1010RDB-PA_36BIT_NOR_defconfig       |  1 +
 configs/P1010RDB-PA_36BIT_SDCARD_defconfig    |  1 +
 configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig  |  1 +
 configs/P1010RDB-PA_NAND_defconfig            |  1 +
 configs/P1010RDB-PA_NOR_defconfig             |  1 +
 configs/P1010RDB-PA_SDCARD_defconfig          |  1 +
 configs/P1010RDB-PA_SPIFLASH_defconfig        |  1 +
 configs/P1010RDB-PB_36BIT_NAND_defconfig      |  1 +
 configs/P1010RDB-PB_36BIT_NOR_defconfig       |  1 +
 configs/P1010RDB-PB_36BIT_SDCARD_defconfig    |  1 +
 configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig  |  1 +
 configs/P1010RDB-PB_NAND_defconfig            |  1 +
 configs/P1010RDB-PB_NOR_defconfig             |  1 +
 configs/P1010RDB-PB_SDCARD_defconfig          |  1 +
 configs/P1010RDB-PB_SPIFLASH_defconfig        |  1 +
 configs/P1020RDB-PC_36BIT_NAND_defconfig      |  1 +
 configs/P1020RDB-PC_36BIT_SDCARD_defconfig    |  1 +
 configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig  |  1 +
 configs/P1020RDB-PC_36BIT_defconfig           |  1 +
 configs/P1020RDB-PC_NAND_defconfig            |  1 +
 configs/P1020RDB-PC_SDCARD_defconfig          |  1 +
 configs/P1020RDB-PC_SPIFLASH_defconfig        |  1 +
 configs/P1020RDB-PC_defconfig                 |  1 +
 configs/P1020RDB-PD_NAND_defconfig            |  1 +
 configs/P1020RDB-PD_SDCARD_defconfig          |  1 +
 configs/P1020RDB-PD_SPIFLASH_defconfig        |  1 +
 configs/P1020RDB-PD_defconfig                 |  1 +
 configs/P2020RDB-PC_36BIT_NAND_defconfig      |  1 +
 configs/P2020RDB-PC_36BIT_SDCARD_defconfig    |  1 +
 configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig  |  1 +
 configs/P2020RDB-PC_36BIT_defconfig           |  1 +
 configs/P2020RDB-PC_NAND_defconfig            |  1 +
 configs/P2020RDB-PC_SDCARD_defconfig          |  1 +
 configs/P2020RDB-PC_SPIFLASH_defconfig        |  1 +
 configs/P2020RDB-PC_defconfig                 |  1 +
 configs/P2041RDB_NAND_defconfig               |  1 +
 configs/P2041RDB_SDCARD_defconfig             |  1 +
 configs/P2041RDB_SPIFLASH_defconfig           |  1 +
 configs/P2041RDB_defconfig                    |  1 +
 configs/P3041DS_NAND_defconfig                |  1 +
 configs/P3041DS_SDCARD_defconfig              |  1 +
 configs/P3041DS_SPIFLASH_defconfig            |  1 +
 configs/P3041DS_defconfig                     |  1 +
 configs/P4080DS_SDCARD_defconfig              |  1 +
 configs/P4080DS_SPIFLASH_defconfig            |  1 +
 configs/P4080DS_defconfig                     |  1 +
 configs/P5040DS_NAND_defconfig                |  1 +
 configs/P5040DS_SDCARD_defconfig              |  1 +
 configs/P5040DS_SPIFLASH_defconfig            |  1 +
 configs/P5040DS_defconfig                     |  1 +
 configs/T2080QDS_NAND_defconfig               |  1 +
 configs/T2080QDS_SDCARD_defconfig             |  1 +
 configs/T2080QDS_SECURE_BOOT_defconfig        |  1 +
 configs/T2080QDS_SPIFLASH_defconfig           |  1 +
 configs/T2080QDS_SRIO_PCIE_BOOT_defconfig     |  1 +
 configs/T2080QDS_defconfig                    |  1 +
 configs/T2080RDB_NAND_defconfig               |  1 +
 configs/T2080RDB_SDCARD_defconfig             |  1 +
 configs/T2080RDB_SPIFLASH_defconfig           |  1 +
 configs/T2080RDB_defconfig                    |  1 +
 configs/T2080RDB_revD_NAND_defconfig          |  1 +
 configs/T2080RDB_revD_SDCARD_defconfig        |  1 +
 configs/T2080RDB_revD_SPIFLASH_defconfig      |  1 +
 configs/T2080RDB_revD_defconfig               |  1 +
 configs/T4240RDB_SDCARD_defconfig             |  1 +
 configs/T4240RDB_defconfig                    |  1 +
 configs/am57xx_hs_evm_usb_defconfig           |  3 ++
 configs/cm_fx6_defconfig                      |  1 +
 configs/controlcenterdc_defconfig             |  3 ++
 configs/d2net_v2_defconfig                    |  1 +
 configs/db-mv784mp-gp_defconfig               |  1 +
 configs/dreamplug_defconfig                   |  1 +
 configs/goflexhome_defconfig                  |  1 +
 configs/gwventana_emmc_defconfig              |  1 +
 configs/gwventana_gw5904_defconfig            |  1 +
 configs/gwventana_nand_defconfig              |  1 +
 configs/highbank_defconfig                    |  3 ++
 configs/inetspace_v2_defconfig                |  1 +
 configs/ls1021atsn_qspi_defconfig             |  3 ++
 configs/ls1021atsn_sdcard_defconfig           |  3 ++
 ...s1021atwr_sdcard_ifc_SECURE_BOOT_defconfig |  3 ++
 .../ls1046ardb_sdcard_SECURE_BOOT_defconfig   |  3 ++
 ...1088ardb_sdcard_qspi_SECURE_BOOT_defconfig |  3 ++
 configs/lschlv2_defconfig                     |  1 +
 configs/lsxhl_defconfig                       |  1 +
 configs/mx6cuboxi_defconfig                   |  1 +
 configs/mx6qsabrelite_defconfig               |  1 +
 configs/net2big_v2_defconfig                  |  1 +
 configs/netspace_lite_v2_defconfig            |  1 +
 configs/netspace_max_v2_defconfig             |  1 +
 configs/netspace_mini_v2_defconfig            |  1 +
 configs/netspace_v2_defconfig                 |  1 +
 configs/nitrogen6q2g_defconfig                |  1 +
 configs/nitrogen6q_defconfig                  |  1 +
 configs/nsa310s_defconfig                     |  1 +
 configs/omap5_uevm_defconfig                  |  3 ++
 configs/pg_wcom_expu1_defconfig               |  3 ++
 configs/pg_wcom_seli8_defconfig               |  3 ++
 configs/sandbox64_defconfig                   |  1 +
 configs/sandbox_defconfig                     |  7 ++++-
 configs/sheevaplug_defconfig                  |  1 +
 configs/tbs2910_defconfig                     |  1 +
 configs/theadorable_debug_defconfig           |  1 +
 configs/tools-only_defconfig                  |  3 +-
 configs/wandboard_defconfig                   |  1 +
 drivers/ata/Kconfig                           | 10 +++++++
 drivers/scsi/Kconfig                          | 30 +++++++++++++++++++
 drivers/scsi/Makefile                         |  2 ++
 include/configs/MPC837XERDB.h                 |  1 -
 include/configs/P1010RDB.h                    |  1 -
 include/configs/P2041RDB.h                    |  1 -
 include/configs/P4080DS.h                     |  1 -
 include/configs/T104xRDB.h                    |  1 -
 include/configs/T208xQDS.h                    |  1 -
 include/configs/T208xRDB.h                    |  1 -
 include/configs/T4240RDB.h                    |  2 --
 include/configs/am57xx_evm.h                  |  3 --
 include/configs/clearfog.h                    |  5 ----
 include/configs/cm_fx6.h                      |  1 -
 include/configs/controlcenterdc.h             |  3 --
 include/configs/corenet_ds.h                  |  1 -
 include/configs/db-88f6820-gp.h               |  3 --
 include/configs/db-mv784mp-gp.h               |  1 -
 include/configs/dra7xx_evm.h                  |  1 -
 include/configs/dreamplug.h                   |  1 -
 include/configs/durian.h                      |  4 ---
 include/configs/ge_bx50v3.h                   |  1 -
 include/configs/goflexhome.h                  |  1 -
 include/configs/gw_ventana.h                  |  1 -
 include/configs/helios4.h                     |  5 ----
 include/configs/highbank.h                    |  4 ---
 include/configs/lacie_kw.h                    |  3 --
 include/configs/ls1012a2g5rdb.h               |  4 ---
 include/configs/ls1012a_common.h              |  4 ---
 include/configs/ls1021aiot.h                  |  4 ---
 include/configs/ls1028aqds.h                  |  3 --
 include/configs/ls1028ardb.h                  |  3 --
 include/configs/ls1043aqds.h                  |  4 ---
 include/configs/ls1043ardb.h                  |  2 --
 include/configs/ls1046a_common.h              |  5 ----
 include/configs/ls1088a_common.h              |  4 ---
 include/configs/ls2080aqds.h                  |  4 ---
 include/configs/ls2080ardb.h                  |  4 ---
 include/configs/lsxl.h                        |  1 -
 include/configs/lx2160a_common.h              |  3 --
 include/configs/m53menlo.h                    |  1 -
 include/configs/mvebu_armada-37xx.h           |  4 ---
 include/configs/mvebu_armada-8k.h             |  4 ---
 include/configs/mx53loco.h                    |  1 -
 include/configs/mx6cuboxi.h                   |  1 -
 include/configs/nitrogen6x.h                  |  1 -
 include/configs/nsa310s.h                     |  1 -
 include/configs/omap5_uevm.h                  |  4 ---
 include/configs/p1_p2_rdb_pc.h                |  1 -
 include/configs/sandbox.h                     |  6 ----
 include/configs/sheevaplug.h                  |  1 -
 include/configs/sifive-unmatched.h            |  2 --
 include/configs/tbs2910.h                     |  1 -
 include/configs/theadorable.h                 |  1 -
 include/configs/wandboard.h                   |  1 -
 scripts/config_whitelist.txt                  |  4 ---
 166 files changed, 177 insertions(+), 140 deletions(-)

diff --git a/README b/README
index 48a3f5ca610..6e99789d5b4 100644
--- a/README
+++ b/README
@@ -743,14 +743,6 @@ The following options need to be configured:
 			When enabled, makes the IDE subsystem use 64bit sector addresses.
 			Default is 32bit.
 
-- SCSI Support:
-		CONFIG_SYS_SCSI_MAX_LUN [8] and CONFIG_SYS_SCSI_MAX_SCSI_ID [7]
-		can be adjusted to define the maximum numbers of LUNs and SCSI
-		IDs.
-
-		The environment variable 'scsidevs' is set to the number of
-		SCSI devices found during the last scan.
-
 - NETWORK Support (PCI):
 		CONFIG_E1000_SPI
 		Utility code for direct access to the SPI bus on Intel 8257x.
diff --git a/arch/Kconfig b/arch/Kconfig
index bea8ead5617..e6191446a35 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -172,7 +172,6 @@ config SANDBOX
 	imply FIRMWARE
 	imply HASH_VERIFY
 	imply LZMA
-	imply SCSI
 	imply TEE
 	imply AVB_VERIFY
 	imply LIBAVB
diff --git a/arch/arm/include/asm/arch-ls102xa/config.h b/arch/arm/include/asm/arch-ls102xa/config.h
index 489286ed8d1..86a4e1f6bf3 100644
--- a/arch/arm/include/asm/arch-ls102xa/config.h
+++ b/arch/arm/include/asm/arch-ls102xa/config.h
@@ -78,9 +78,6 @@
 
 /* SATA */
 #define AHCI_BASE_ADDR				(CONFIG_SYS_IMMR + 0x02200000)
-#define CONFIG_SCSI_AHCI_PLAT
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID		1
-#define CONFIG_SYS_SCSI_MAX_LUN		1
 #ifdef CONFIG_DDR_SPD
 #define CONFIG_VERY_BIG_RAM
 #define CONFIG_SYS_LS1_DDR_BLOCK1_SIZE		((phys_size_t)2 << 30)
diff --git a/configs/MPC837XERDB_defconfig b/configs/MPC837XERDB_defconfig
index 192bcae704e..eac5b74147c 100644
--- a/configs/MPC837XERDB_defconfig
+++ b/configs/MPC837XERDB_defconfig
@@ -170,6 +170,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_ADDR=0xFE080000
 CONFIG_DM=y
 CONFIG_FSL_SATA=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xFE001001
 CONFIG_SYS_OR0_PRELIM=0xFF800193
diff --git a/configs/P1010RDB-PA_36BIT_NAND_defconfig b/configs/P1010RDB-PA_36BIT_NAND_defconfig
index ef7f24b85fa..61fd2a78a4e 100644
--- a/configs/P1010RDB-PA_36BIT_NAND_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NAND_defconfig
@@ -54,6 +54,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_DM_I2C=y
diff --git a/configs/P1010RDB-PA_36BIT_NOR_defconfig b/configs/P1010RDB-PA_36BIT_NOR_defconfig
index 892a8a6e056..0e537ebb521 100644
--- a/configs/P1010RDB-PA_36BIT_NOR_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NOR_defconfig
@@ -36,6 +36,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_ENV_ADDR=0xEFF20000
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_DM_I2C=y
diff --git a/configs/P1010RDB-PA_36BIT_SDCARD_defconfig b/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
index 705d0dad62f..dc113be28d9 100644
--- a/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
+++ b/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
@@ -48,6 +48,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_DM_I2C=y
diff --git a/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig b/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
index e4ad50fc7bb..cd5c80c6346 100644
--- a/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
@@ -50,6 +50,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_DM_I2C=y
diff --git a/configs/P1010RDB-PA_NAND_defconfig b/configs/P1010RDB-PA_NAND_defconfig
index b303c4c46c0..f80a0d929c1 100644
--- a/configs/P1010RDB-PA_NAND_defconfig
+++ b/configs/P1010RDB-PA_NAND_defconfig
@@ -53,6 +53,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_DM_I2C=y
diff --git a/configs/P1010RDB-PA_NOR_defconfig b/configs/P1010RDB-PA_NOR_defconfig
index 8db09ba2b83..035aac226bb 100644
--- a/configs/P1010RDB-PA_NOR_defconfig
+++ b/configs/P1010RDB-PA_NOR_defconfig
@@ -35,6 +35,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_ENV_ADDR=0xEFF20000
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_DM_I2C=y
diff --git a/configs/P1010RDB-PA_SDCARD_defconfig b/configs/P1010RDB-PA_SDCARD_defconfig
index f02757dd6b4..cd031d218c3 100644
--- a/configs/P1010RDB-PA_SDCARD_defconfig
+++ b/configs/P1010RDB-PA_SDCARD_defconfig
@@ -47,6 +47,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_DM_I2C=y
diff --git a/configs/P1010RDB-PA_SPIFLASH_defconfig b/configs/P1010RDB-PA_SPIFLASH_defconfig
index 9a09473ad41..f339502637b 100644
--- a/configs/P1010RDB-PA_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PA_SPIFLASH_defconfig
@@ -49,6 +49,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_DM_I2C=y
diff --git a/configs/P1010RDB-PB_36BIT_NAND_defconfig b/configs/P1010RDB-PB_36BIT_NAND_defconfig
index 85828682837..ba64f8818fb 100644
--- a/configs/P1010RDB-PB_36BIT_NAND_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NAND_defconfig
@@ -55,6 +55,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_DM_I2C=y
diff --git a/configs/P1010RDB-PB_36BIT_NOR_defconfig b/configs/P1010RDB-PB_36BIT_NOR_defconfig
index 84173e2d60f..a8e95568714 100644
--- a/configs/P1010RDB-PB_36BIT_NOR_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NOR_defconfig
@@ -37,6 +37,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_ENV_ADDR=0xEFF20000
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_DM_I2C=y
diff --git a/configs/P1010RDB-PB_36BIT_SDCARD_defconfig b/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
index 4b0a1ab53b7..871996711db 100644
--- a/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
+++ b/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
@@ -49,6 +49,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_DM_I2C=y
diff --git a/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig b/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
index 986b992e6b9..2d646f9f54d 100644
--- a/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
@@ -51,6 +51,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_DM_I2C=y
diff --git a/configs/P1010RDB-PB_NAND_defconfig b/configs/P1010RDB-PB_NAND_defconfig
index e4364769f9f..f8437ff032f 100644
--- a/configs/P1010RDB-PB_NAND_defconfig
+++ b/configs/P1010RDB-PB_NAND_defconfig
@@ -54,6 +54,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_DM_I2C=y
diff --git a/configs/P1010RDB-PB_NOR_defconfig b/configs/P1010RDB-PB_NOR_defconfig
index 62f4c892709..b99531c4cd9 100644
--- a/configs/P1010RDB-PB_NOR_defconfig
+++ b/configs/P1010RDB-PB_NOR_defconfig
@@ -36,6 +36,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_ENV_ADDR=0xEFF20000
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_DM_I2C=y
diff --git a/configs/P1010RDB-PB_SDCARD_defconfig b/configs/P1010RDB-PB_SDCARD_defconfig
index 9cdb3599f76..ebe2af6f4a1 100644
--- a/configs/P1010RDB-PB_SDCARD_defconfig
+++ b/configs/P1010RDB-PB_SDCARD_defconfig
@@ -48,6 +48,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_DM_I2C=y
diff --git a/configs/P1010RDB-PB_SPIFLASH_defconfig b/configs/P1010RDB-PB_SPIFLASH_defconfig
index 299564c9caf..7893782fa44 100644
--- a/configs/P1010RDB-PB_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PB_SPIFLASH_defconfig
@@ -50,6 +50,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_DM_I2C=y
diff --git a/configs/P1020RDB-PC_36BIT_NAND_defconfig b/configs/P1020RDB-PC_36BIT_NAND_defconfig
index 30b841d691b..525bb54fcb8 100644
--- a/configs/P1020RDB-PC_36BIT_NAND_defconfig
+++ b/configs/P1020RDB-PC_36BIT_NAND_defconfig
@@ -54,6 +54,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xFF800C21
diff --git a/configs/P1020RDB-PC_36BIT_SDCARD_defconfig b/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
index 79edbf388d4..384a4d0c7ff 100644
--- a/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
+++ b/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
@@ -49,6 +49,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xEF001001
diff --git a/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig b/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
index c5a64de98e0..12bf5d1a698 100644
--- a/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
+++ b/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
@@ -51,6 +51,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xEF001001
diff --git a/configs/P1020RDB-PC_36BIT_defconfig b/configs/P1020RDB-PC_36BIT_defconfig
index 9671a6d3300..0e535cf91bb 100644
--- a/configs/P1020RDB-PC_36BIT_defconfig
+++ b/configs/P1020RDB-PC_36BIT_defconfig
@@ -38,6 +38,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_ENV_ADDR=0xEFF20000
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xEF001001
diff --git a/configs/P1020RDB-PC_NAND_defconfig b/configs/P1020RDB-PC_NAND_defconfig
index 0201c51a5d0..f042f25428b 100644
--- a/configs/P1020RDB-PC_NAND_defconfig
+++ b/configs/P1020RDB-PC_NAND_defconfig
@@ -53,6 +53,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xFF800C21
diff --git a/configs/P1020RDB-PC_SDCARD_defconfig b/configs/P1020RDB-PC_SDCARD_defconfig
index 371a8b5f8b8..d4a531eff90 100644
--- a/configs/P1020RDB-PC_SDCARD_defconfig
+++ b/configs/P1020RDB-PC_SDCARD_defconfig
@@ -48,6 +48,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xEF001001
diff --git a/configs/P1020RDB-PC_SPIFLASH_defconfig b/configs/P1020RDB-PC_SPIFLASH_defconfig
index 7c8b3c826cd..4e17f71da8d 100644
--- a/configs/P1020RDB-PC_SPIFLASH_defconfig
+++ b/configs/P1020RDB-PC_SPIFLASH_defconfig
@@ -50,6 +50,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xEF001001
diff --git a/configs/P1020RDB-PC_defconfig b/configs/P1020RDB-PC_defconfig
index 01b4fd363c4..e8c889eae9a 100644
--- a/configs/P1020RDB-PC_defconfig
+++ b/configs/P1020RDB-PC_defconfig
@@ -37,6 +37,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_ENV_ADDR=0xEFF20000
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xEF001001
diff --git a/configs/P1020RDB-PD_NAND_defconfig b/configs/P1020RDB-PD_NAND_defconfig
index e70c1a7cbae..6618d8bd0d5 100644
--- a/configs/P1020RDB-PD_NAND_defconfig
+++ b/configs/P1020RDB-PD_NAND_defconfig
@@ -56,6 +56,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xFF800C21
diff --git a/configs/P1020RDB-PD_SDCARD_defconfig b/configs/P1020RDB-PD_SDCARD_defconfig
index 2596b5255d3..eb6a335db2b 100644
--- a/configs/P1020RDB-PD_SDCARD_defconfig
+++ b/configs/P1020RDB-PD_SDCARD_defconfig
@@ -51,6 +51,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xEC001001
diff --git a/configs/P1020RDB-PD_SPIFLASH_defconfig b/configs/P1020RDB-PD_SPIFLASH_defconfig
index f6f8888c82a..ee5a164b53c 100644
--- a/configs/P1020RDB-PD_SPIFLASH_defconfig
+++ b/configs/P1020RDB-PD_SPIFLASH_defconfig
@@ -53,6 +53,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xEC001001
diff --git a/configs/P1020RDB-PD_defconfig b/configs/P1020RDB-PD_defconfig
index e1a4965caae..51d9fb147d0 100644
--- a/configs/P1020RDB-PD_defconfig
+++ b/configs/P1020RDB-PD_defconfig
@@ -40,6 +40,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_ENV_ADDR=0xEFF20000
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xEC001001
diff --git a/configs/P2020RDB-PC_36BIT_NAND_defconfig b/configs/P2020RDB-PC_36BIT_NAND_defconfig
index 2c302b68216..d25894c13c6 100644
--- a/configs/P2020RDB-PC_36BIT_NAND_defconfig
+++ b/configs/P2020RDB-PC_36BIT_NAND_defconfig
@@ -58,6 +58,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xFF800C21
diff --git a/configs/P2020RDB-PC_36BIT_SDCARD_defconfig b/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
index 2d080713e7a..a0c86272287 100644
--- a/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
+++ b/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
@@ -53,6 +53,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xEF001001
diff --git a/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig b/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
index 7b53b025171..302038247b0 100644
--- a/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
+++ b/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
@@ -55,6 +55,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xEF001001
diff --git a/configs/P2020RDB-PC_36BIT_defconfig b/configs/P2020RDB-PC_36BIT_defconfig
index 5e8a474c905..1242bf53085 100644
--- a/configs/P2020RDB-PC_36BIT_defconfig
+++ b/configs/P2020RDB-PC_36BIT_defconfig
@@ -42,6 +42,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_ENV_ADDR=0xEFF20000
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xEF001001
diff --git a/configs/P2020RDB-PC_NAND_defconfig b/configs/P2020RDB-PC_NAND_defconfig
index 74165dc60aa..981a6d34c48 100644
--- a/configs/P2020RDB-PC_NAND_defconfig
+++ b/configs/P2020RDB-PC_NAND_defconfig
@@ -57,6 +57,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xFF800C21
diff --git a/configs/P2020RDB-PC_SDCARD_defconfig b/configs/P2020RDB-PC_SDCARD_defconfig
index 0505f40a814..7d65e76aaea 100644
--- a/configs/P2020RDB-PC_SDCARD_defconfig
+++ b/configs/P2020RDB-PC_SDCARD_defconfig
@@ -52,6 +52,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xEF001001
diff --git a/configs/P2020RDB-PC_SPIFLASH_defconfig b/configs/P2020RDB-PC_SPIFLASH_defconfig
index f1085fde470..0001c80e5cd 100644
--- a/configs/P2020RDB-PC_SPIFLASH_defconfig
+++ b/configs/P2020RDB-PC_SPIFLASH_defconfig
@@ -54,6 +54,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xEF001001
diff --git a/configs/P2020RDB-PC_defconfig b/configs/P2020RDB-PC_defconfig
index f933ed42fce..8c4d8e56802 100644
--- a/configs/P2020RDB-PC_defconfig
+++ b/configs/P2020RDB-PC_defconfig
@@ -41,6 +41,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_ENV_ADDR=0xEFF20000
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xEF001001
diff --git a/configs/P2041RDB_NAND_defconfig b/configs/P2041RDB_NAND_defconfig
index 9dc72573c17..01d61928a3d 100644
--- a/configs/P2041RDB_NAND_defconfig
+++ b/configs/P2041RDB_NAND_defconfig
@@ -40,6 +40,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xFFA00C21
diff --git a/configs/P2041RDB_SDCARD_defconfig b/configs/P2041RDB_SDCARD_defconfig
index 997f4619762..dc56c791d1f 100644
--- a/configs/P2041RDB_SDCARD_defconfig
+++ b/configs/P2041RDB_SDCARD_defconfig
@@ -41,6 +41,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xE8001001
diff --git a/configs/P2041RDB_SPIFLASH_defconfig b/configs/P2041RDB_SPIFLASH_defconfig
index d54d6218366..78a24503a49 100644
--- a/configs/P2041RDB_SPIFLASH_defconfig
+++ b/configs/P2041RDB_SPIFLASH_defconfig
@@ -42,6 +42,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xE8001001
diff --git a/configs/P2041RDB_defconfig b/configs/P2041RDB_defconfig
index b2fb18c552c..f6bf4daf23b 100644
--- a/configs/P2041RDB_defconfig
+++ b/configs/P2041RDB_defconfig
@@ -37,6 +37,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_ENV_ADDR=0xEFF20000
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xE8001001
diff --git a/configs/P3041DS_NAND_defconfig b/configs/P3041DS_NAND_defconfig
index 971254ac061..ec5850017d6 100644
--- a/configs/P3041DS_NAND_defconfig
+++ b/configs/P3041DS_NAND_defconfig
@@ -38,6 +38,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
diff --git a/configs/P3041DS_SDCARD_defconfig b/configs/P3041DS_SDCARD_defconfig
index 7cf3c2240cd..58a3eaea72f 100644
--- a/configs/P3041DS_SDCARD_defconfig
+++ b/configs/P3041DS_SDCARD_defconfig
@@ -39,6 +39,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
diff --git a/configs/P3041DS_SPIFLASH_defconfig b/configs/P3041DS_SPIFLASH_defconfig
index 0e810f8ca90..c48976b3d07 100644
--- a/configs/P3041DS_SPIFLASH_defconfig
+++ b/configs/P3041DS_SPIFLASH_defconfig
@@ -40,6 +40,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
diff --git a/configs/P3041DS_defconfig b/configs/P3041DS_defconfig
index db1b5fb1691..fcc73610af8 100644
--- a/configs/P3041DS_defconfig
+++ b/configs/P3041DS_defconfig
@@ -35,6 +35,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_ENV_ADDR=0xEFF20000
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
diff --git a/configs/P4080DS_SDCARD_defconfig b/configs/P4080DS_SDCARD_defconfig
index 25f7861791d..044bf9c734f 100644
--- a/configs/P4080DS_SDCARD_defconfig
+++ b/configs/P4080DS_SDCARD_defconfig
@@ -39,6 +39,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
diff --git a/configs/P4080DS_SPIFLASH_defconfig b/configs/P4080DS_SPIFLASH_defconfig
index c32c394530b..b33bc16d0d3 100644
--- a/configs/P4080DS_SPIFLASH_defconfig
+++ b/configs/P4080DS_SPIFLASH_defconfig
@@ -40,6 +40,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
diff --git a/configs/P4080DS_defconfig b/configs/P4080DS_defconfig
index e3c41c316f2..14df6f22c1b 100644
--- a/configs/P4080DS_defconfig
+++ b/configs/P4080DS_defconfig
@@ -35,6 +35,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_ENV_ADDR=0xEFF20000
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
diff --git a/configs/P5040DS_NAND_defconfig b/configs/P5040DS_NAND_defconfig
index 90503b63a27..279976c04d4 100644
--- a/configs/P5040DS_NAND_defconfig
+++ b/configs/P5040DS_NAND_defconfig
@@ -39,6 +39,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
diff --git a/configs/P5040DS_SDCARD_defconfig b/configs/P5040DS_SDCARD_defconfig
index 90216f6c7a3..34ebc51922e 100644
--- a/configs/P5040DS_SDCARD_defconfig
+++ b/configs/P5040DS_SDCARD_defconfig
@@ -39,6 +39,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
diff --git a/configs/P5040DS_SPIFLASH_defconfig b/configs/P5040DS_SPIFLASH_defconfig
index 8b1781268e8..ea8b6733040 100644
--- a/configs/P5040DS_SPIFLASH_defconfig
+++ b/configs/P5040DS_SPIFLASH_defconfig
@@ -40,6 +40,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
diff --git a/configs/P5040DS_defconfig b/configs/P5040DS_defconfig
index 6836fcfe4d0..e9bf7ff0144 100644
--- a/configs/P5040DS_defconfig
+++ b/configs/P5040DS_defconfig
@@ -35,6 +35,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_ENV_ADDR=0xEFF20000
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
diff --git a/configs/T2080QDS_NAND_defconfig b/configs/T2080QDS_NAND_defconfig
index 521b0cf6084..1b6ef8aaa1f 100644
--- a/configs/T2080QDS_NAND_defconfig
+++ b/configs/T2080QDS_NAND_defconfig
@@ -56,6 +56,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DYNAMIC_DDR_CLK_FREQ=y
 CONFIG_DDR_ECC=y
diff --git a/configs/T2080QDS_SDCARD_defconfig b/configs/T2080QDS_SDCARD_defconfig
index eb0b341e5c3..8ab1c5d6809 100644
--- a/configs/T2080QDS_SDCARD_defconfig
+++ b/configs/T2080QDS_SDCARD_defconfig
@@ -55,6 +55,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DYNAMIC_DDR_CLK_FREQ=y
 CONFIG_DDR_ECC=y
diff --git a/configs/T2080QDS_SECURE_BOOT_defconfig b/configs/T2080QDS_SECURE_BOOT_defconfig
index 97bfbd951ac..a84b7adab01 100644
--- a/configs/T2080QDS_SECURE_BOOT_defconfig
+++ b/configs/T2080QDS_SECURE_BOOT_defconfig
@@ -40,6 +40,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_DYNAMIC_DDR_CLK_FREQ=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
diff --git a/configs/T2080QDS_SPIFLASH_defconfig b/configs/T2080QDS_SPIFLASH_defconfig
index a09d1470a6d..8fd024848ad 100644
--- a/configs/T2080QDS_SPIFLASH_defconfig
+++ b/configs/T2080QDS_SPIFLASH_defconfig
@@ -57,6 +57,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DYNAMIC_DDR_CLK_FREQ=y
 CONFIG_DDR_ECC=y
diff --git a/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig b/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig
index db09d3b92e3..f9dbc84f922 100644
--- a/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig
@@ -37,6 +37,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_REMOTE=y
 CONFIG_ENV_ADDR=0xFFE20000
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DYNAMIC_DDR_CLK_FREQ=y
 CONFIG_DDR_ECC=y
diff --git a/configs/T2080QDS_defconfig b/configs/T2080QDS_defconfig
index c036d5dfedc..424b3f2cdb8 100644
--- a/configs/T2080QDS_defconfig
+++ b/configs/T2080QDS_defconfig
@@ -40,6 +40,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_ENV_ADDR=0xEFF20000
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DYNAMIC_DDR_CLK_FREQ=y
 CONFIG_DDR_ECC=y
diff --git a/configs/T2080RDB_NAND_defconfig b/configs/T2080RDB_NAND_defconfig
index 17558d421da..1c55d30b5e1 100644
--- a/configs/T2080RDB_NAND_defconfig
+++ b/configs/T2080RDB_NAND_defconfig
@@ -60,6 +60,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=133330000
 CONFIG_DDR_ECC=y
diff --git a/configs/T2080RDB_SDCARD_defconfig b/configs/T2080RDB_SDCARD_defconfig
index 949976b2aff..ea9c479825c 100644
--- a/configs/T2080RDB_SDCARD_defconfig
+++ b/configs/T2080RDB_SDCARD_defconfig
@@ -59,6 +59,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=133330000
 CONFIG_DDR_ECC=y
diff --git a/configs/T2080RDB_SPIFLASH_defconfig b/configs/T2080RDB_SPIFLASH_defconfig
index 66ca339e4d4..5e08b82406a 100644
--- a/configs/T2080RDB_SPIFLASH_defconfig
+++ b/configs/T2080RDB_SPIFLASH_defconfig
@@ -61,6 +61,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=133330000
 CONFIG_DDR_ECC=y
diff --git a/configs/T2080RDB_defconfig b/configs/T2080RDB_defconfig
index f03440312b7..0515007ef35 100644
--- a/configs/T2080RDB_defconfig
+++ b/configs/T2080RDB_defconfig
@@ -44,6 +44,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_ENV_ADDR=0xEFF20000
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=133330000
 CONFIG_DDR_ECC=y
diff --git a/configs/T2080RDB_revD_NAND_defconfig b/configs/T2080RDB_revD_NAND_defconfig
index 33591c2a65d..ae924b18173 100644
--- a/configs/T2080RDB_revD_NAND_defconfig
+++ b/configs/T2080RDB_revD_NAND_defconfig
@@ -61,6 +61,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=133330000
 CONFIG_DDR_ECC=y
diff --git a/configs/T2080RDB_revD_SDCARD_defconfig b/configs/T2080RDB_revD_SDCARD_defconfig
index 82f6c96acb5..fef08931d0d 100644
--- a/configs/T2080RDB_revD_SDCARD_defconfig
+++ b/configs/T2080RDB_revD_SDCARD_defconfig
@@ -60,6 +60,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=133330000
 CONFIG_DDR_ECC=y
diff --git a/configs/T2080RDB_revD_SPIFLASH_defconfig b/configs/T2080RDB_revD_SPIFLASH_defconfig
index 075691fefe1..0b7e71567da 100644
--- a/configs/T2080RDB_revD_SPIFLASH_defconfig
+++ b/configs/T2080RDB_revD_SPIFLASH_defconfig
@@ -62,6 +62,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=133330000
 CONFIG_DDR_ECC=y
diff --git a/configs/T2080RDB_revD_defconfig b/configs/T2080RDB_revD_defconfig
index 1d5628f559b..c78b21dd245 100644
--- a/configs/T2080RDB_revD_defconfig
+++ b/configs/T2080RDB_revD_defconfig
@@ -45,6 +45,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_ENV_ADDR=0xEFF20000
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=133330000
 CONFIG_DDR_ECC=y
diff --git a/configs/T4240RDB_SDCARD_defconfig b/configs/T4240RDB_SDCARD_defconfig
index ef2d1d749db..ea6a5284959 100644
--- a/configs/T4240RDB_SDCARD_defconfig
+++ b/configs/T4240RDB_SDCARD_defconfig
@@ -51,6 +51,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=133333333
 CONFIG_DDR_ECC=y
diff --git a/configs/T4240RDB_defconfig b/configs/T4240RDB_defconfig
index 6784dd7c201..e17e8b129ff 100644
--- a/configs/T4240RDB_defconfig
+++ b/configs/T4240RDB_defconfig
@@ -36,6 +36,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_ENV_ADDR=0xEFF20000
 CONFIG_DM=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
 CONFIG_DDR_CLK_FREQ=133333333
 CONFIG_DDR_ECC=y
diff --git a/configs/am57xx_hs_evm_usb_defconfig b/configs/am57xx_hs_evm_usb_defconfig
index 7f19d991c55..02e770b15c4 100644
--- a/configs/am57xx_hs_evm_usb_defconfig
+++ b/configs/am57xx_hs_evm_usb_defconfig
@@ -102,6 +102,9 @@ CONFIG_DM_PMIC=y
 CONFIG_PMIC_PALMAS=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_PALMAS=y
+CONFIG_SCSI_AHCI_PLAT=y
+CONFIG_SYS_SCSI_MAX_SCSI_ID=1
+CONFIG_SYS_SCSI_MAX_LUN=1
 CONFIG_DM_SERIAL=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig
index 61067940cc4..1291f915225 100644
--- a/configs/cm_fx6_defconfig
+++ b/configs/cm_fx6_defconfig
@@ -69,6 +69,7 @@ CONFIG_SPL_DM=y
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_DWC_AHSATA=y
 # CONFIG_DWC_AHSATA_AHCI is not set
+CONFIG_SYS_SATA_MAX_DEVICE=1
 CONFIG_SYS_I2C_LEGACY=y
 CONFIG_SPL_SYS_I2C_LEGACY=y
 CONFIG_SYS_I2C_MXC=y
diff --git a/configs/controlcenterdc_defconfig b/configs/controlcenterdc_defconfig
index b6eb9550869..5245a33666b 100644
--- a/configs/controlcenterdc_defconfig
+++ b/configs/controlcenterdc_defconfig
@@ -77,6 +77,9 @@ CONFIG_PCI=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCI_MVEBU=y
 CONFIG_SCSI=y
+CONFIG_SCSI_AHCI_PLAT=y
+CONFIG_SYS_SCSI_MAX_SCSI_ID=2
+CONFIG_SYS_SCSI_MAX_LUN=1
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYS_NS16550=y
 CONFIG_KIRKWOOD_SPI=y
diff --git a/configs/d2net_v2_defconfig b/configs/d2net_v2_defconfig
index a856202d110..5e2122a4c6c 100644
--- a/configs/d2net_v2_defconfig
+++ b/configs/d2net_v2_defconfig
@@ -47,6 +47,7 @@ CONFIG_ENV_ADDR=0x70000
 CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SATA_MV=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_KIRKWOOD_GPIO=y
 CONFIG_SYS_I2C_LEGACY=y
 CONFIG_SYS_I2C_MVTWSI=y
diff --git a/configs/db-mv784mp-gp_defconfig b/configs/db-mv784mp-gp_defconfig
index 3d0b06fbc61..c42bda292d0 100644
--- a/configs/db-mv784mp-gp_defconfig
+++ b/configs/db-mv784mp-gp_defconfig
@@ -49,6 +49,7 @@ CONFIG_ENV_SPI_MAX_HZ=50000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_SATA_MV=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_MVTWSI=y
 # CONFIG_MMC is not set
diff --git a/configs/dreamplug_defconfig b/configs/dreamplug_defconfig
index 557013dbacd..af73c9be5f7 100644
--- a/configs/dreamplug_defconfig
+++ b/configs/dreamplug_defconfig
@@ -41,6 +41,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SATA_MV=y
+CONFIG_SYS_SATA_MAX_DEVICE=1
 # CONFIG_MMC is not set
 CONFIG_MTD=y
 CONFIG_DM_SPI_FLASH=y
diff --git a/configs/goflexhome_defconfig b/configs/goflexhome_defconfig
index ec8b7398d0a..243116b6d38 100644
--- a/configs/goflexhome_defconfig
+++ b/configs/goflexhome_defconfig
@@ -44,6 +44,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SATA_MV=y
+CONFIG_SYS_SATA_MAX_DEVICE=1
 # CONFIG_MMC is not set
 CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
diff --git a/configs/gwventana_emmc_defconfig b/configs/gwventana_emmc_defconfig
index 4371a144f27..b33b90e9159 100644
--- a/configs/gwventana_emmc_defconfig
+++ b/configs/gwventana_emmc_defconfig
@@ -90,6 +90,7 @@ CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_DWC_AHSATA=y
+CONFIG_SYS_SATA_MAX_DEVICE=1
 CONFIG_SYS_I2C_LEGACY=y
 CONFIG_SPL_SYS_I2C_LEGACY=y
 CONFIG_SYS_I2C_MXC=y
diff --git a/configs/gwventana_gw5904_defconfig b/configs/gwventana_gw5904_defconfig
index 8a5050667b6..00e357d8f1d 100644
--- a/configs/gwventana_gw5904_defconfig
+++ b/configs/gwventana_gw5904_defconfig
@@ -90,6 +90,7 @@ CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_DWC_AHSATA=y
+CONFIG_SYS_SATA_MAX_DEVICE=1
 CONFIG_SYS_I2C_LEGACY=y
 CONFIG_SPL_SYS_I2C_LEGACY=y
 CONFIG_SYS_I2C_MXC=y
diff --git a/configs/gwventana_nand_defconfig b/configs/gwventana_nand_defconfig
index 9fadc014a2c..ab1fe835c84 100644
--- a/configs/gwventana_nand_defconfig
+++ b/configs/gwventana_nand_defconfig
@@ -92,6 +92,7 @@ CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_DWC_AHSATA=y
+CONFIG_SYS_SATA_MAX_DEVICE=1
 CONFIG_SYS_I2C_LEGACY=y
 CONFIG_SPL_SYS_I2C_LEGACY=y
 CONFIG_SYS_I2C_MXC=y
diff --git a/configs/highbank_defconfig b/configs/highbank_defconfig
index 3e8bfcf73a6..df36b4167cd 100644
--- a/configs/highbank_defconfig
+++ b/configs/highbank_defconfig
@@ -29,3 +29,6 @@ CONFIG_BOOTCOUNT_LIMIT=y
 # CONFIG_MMC is not set
 CONFIG_CALXEDA_XGMAC=y
 CONFIG_SCSI=y
+CONFIG_SCSI_AHCI_PLAT=y
+CONFIG_SYS_SCSI_MAX_SCSI_ID=5
+CONFIG_SYS_SCSI_MAX_LUN=1
diff --git a/configs/inetspace_v2_defconfig b/configs/inetspace_v2_defconfig
index 8779e58b932..c45156c8513 100644
--- a/configs/inetspace_v2_defconfig
+++ b/configs/inetspace_v2_defconfig
@@ -47,6 +47,7 @@ CONFIG_ENV_ADDR=0x70000
 CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SATA_MV=y
+CONFIG_SYS_SATA_MAX_DEVICE=1
 CONFIG_KIRKWOOD_GPIO=y
 CONFIG_SYS_I2C_LEGACY=y
 CONFIG_SYS_I2C_MVTWSI=y
diff --git a/configs/ls1021atsn_qspi_defconfig b/configs/ls1021atsn_qspi_defconfig
index 5c8cee3ea91..e7e8d58e244 100644
--- a/configs/ls1021atsn_qspi_defconfig
+++ b/configs/ls1021atsn_qspi_defconfig
@@ -62,6 +62,9 @@ CONFIG_TSEC_ENET=y
 CONFIG_NVME=y
 CONFIG_PCI=y
 CONFIG_PCIE_LAYERSCAPE_RC=y
+CONFIG_SCSI_AHCI_PLAT=y
+CONFIG_SYS_SCSI_MAX_SCSI_ID=1
+CONFIG_SYS_SCSI_MAX_LUN=1
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/ls1021atsn_sdcard_defconfig b/configs/ls1021atsn_sdcard_defconfig
index a3b8f248c7d..7158fdd256d 100644
--- a/configs/ls1021atsn_sdcard_defconfig
+++ b/configs/ls1021atsn_sdcard_defconfig
@@ -78,6 +78,9 @@ CONFIG_TSEC_ENET=y
 CONFIG_NVME=y
 CONFIG_PCI=y
 CONFIG_PCIE_LAYERSCAPE_RC=y
+CONFIG_SCSI_AHCI_PLAT=y
+CONFIG_SYS_SCSI_MAX_SCSI_ID=1
+CONFIG_SYS_SCSI_MAX_LUN=1
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig b/configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig
index 756e072f9cb..ec20ceb86a5 100644
--- a/configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig
+++ b/configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig
@@ -87,6 +87,9 @@ CONFIG_PCI=y
 CONFIG_PCIE_LAYERSCAPE_RC=y
 CONFIG_U_QE=y
 CONFIG_SYS_QE_FW_ADDR=0x940000
+CONFIG_SCSI_AHCI_PLAT=y
+CONFIG_SYS_SCSI_MAX_SCSI_ID=1
+CONFIG_SYS_SCSI_MAX_LUN=1
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
diff --git a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig b/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig
index 4c55777b9c9..c4c0655703e 100644
--- a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig
+++ b/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig
@@ -86,6 +86,9 @@ CONFIG_PCIE_LAYERSCAPE_EP=y
 CONFIG_POWER_LEGACY=y
 CONFIG_POWER_I2C=y
 CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
+CONFIG_SCSI_AHCI_PLAT=y
+CONFIG_SYS_SCSI_MAX_SCSI_ID=1
+CONFIG_SYS_SCSI_MAX_LUN=1
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig b/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig
index 048b10fb7b9..f634eda43c6 100644
--- a/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig
@@ -90,6 +90,9 @@ CONFIG_MII=y
 CONFIG_FSL_LS_MDIO=y
 CONFIG_PCI=y
 CONFIG_PCIE_LAYERSCAPE_RC=y
+CONFIG_SCSI_AHCI_PLAT=y
+CONFIG_SYS_SCSI_MAX_SCSI_ID=1
+CONFIG_SYS_SCSI_MAX_LUN=1
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/lschlv2_defconfig b/configs/lschlv2_defconfig
index 497da09d439..df214b323f7 100644
--- a/configs/lschlv2_defconfig
+++ b/configs/lschlv2_defconfig
@@ -39,6 +39,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SATA_MV=y
+CONFIG_SYS_SATA_MAX_DEVICE=1
 CONFIG_KIRKWOOD_GPIO=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
diff --git a/configs/lsxhl_defconfig b/configs/lsxhl_defconfig
index cadeb9afd3c..6ccc0e775e5 100644
--- a/configs/lsxhl_defconfig
+++ b/configs/lsxhl_defconfig
@@ -39,6 +39,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SATA_MV=y
+CONFIG_SYS_SATA_MAX_DEVICE=1
 CONFIG_KIRKWOOD_GPIO=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
diff --git a/configs/mx6cuboxi_defconfig b/configs/mx6cuboxi_defconfig
index 6422ac50e03..94fcabefaa4 100644
--- a/configs/mx6cuboxi_defconfig
+++ b/configs/mx6cuboxi_defconfig
@@ -52,6 +52,7 @@ CONFIG_DM=y
 CONFIG_SPL_DM=y
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_DWC_AHSATA=y
+CONFIG_SYS_SATA_MAX_DEVICE=1
 CONFIG_SPL_SYS_I2C_LEGACY=y
 CONFIG_FSL_USDHC=y
 CONFIG_PHYLIB=y
diff --git a/configs/mx6qsabrelite_defconfig b/configs/mx6qsabrelite_defconfig
index 2b77a46badd..107172b62ef 100644
--- a/configs/mx6qsabrelite_defconfig
+++ b/configs/mx6qsabrelite_defconfig
@@ -50,6 +50,7 @@ CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_DWC_AHSATA=y
+CONFIG_SYS_SATA_MAX_DEVICE=1
 CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_FASTBOOT_BUF_ADDR=0x12000000
 CONFIG_SYS_I2C_LEGACY=y
diff --git a/configs/net2big_v2_defconfig b/configs/net2big_v2_defconfig
index 985f530fb87..f55ca673539 100644
--- a/configs/net2big_v2_defconfig
+++ b/configs/net2big_v2_defconfig
@@ -48,6 +48,7 @@ CONFIG_ENV_ADDR=0x70000
 CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SATA_MV=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_KIRKWOOD_GPIO=y
 CONFIG_SYS_I2C_LEGACY=y
 CONFIG_SYS_I2C_MVTWSI=y
diff --git a/configs/netspace_lite_v2_defconfig b/configs/netspace_lite_v2_defconfig
index 668f4ea291d..53ff4e21775 100644
--- a/configs/netspace_lite_v2_defconfig
+++ b/configs/netspace_lite_v2_defconfig
@@ -48,6 +48,7 @@ CONFIG_ENV_ADDR=0x70000
 CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SATA_MV=y
+CONFIG_SYS_SATA_MAX_DEVICE=1
 CONFIG_KIRKWOOD_GPIO=y
 CONFIG_SYS_I2C_LEGACY=y
 CONFIG_SYS_I2C_MVTWSI=y
diff --git a/configs/netspace_max_v2_defconfig b/configs/netspace_max_v2_defconfig
index 25ce3c61a1f..1195cc779b3 100644
--- a/configs/netspace_max_v2_defconfig
+++ b/configs/netspace_max_v2_defconfig
@@ -48,6 +48,7 @@ CONFIG_ENV_ADDR=0x70000
 CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SATA_MV=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_KIRKWOOD_GPIO=y
 CONFIG_SYS_I2C_LEGACY=y
 CONFIG_SYS_I2C_MVTWSI=y
diff --git a/configs/netspace_mini_v2_defconfig b/configs/netspace_mini_v2_defconfig
index 0c9a3036eb1..47ca1bdfae9 100644
--- a/configs/netspace_mini_v2_defconfig
+++ b/configs/netspace_mini_v2_defconfig
@@ -46,6 +46,7 @@ CONFIG_ENV_ADDR=0x70000
 CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SATA_MV=y
+CONFIG_SYS_SATA_MAX_DEVICE=1
 CONFIG_BLK=y
 CONFIG_KIRKWOOD_GPIO=y
 CONFIG_SYS_I2C_LEGACY=y
diff --git a/configs/netspace_v2_defconfig b/configs/netspace_v2_defconfig
index 8f662edd168..2d920ab1d17 100644
--- a/configs/netspace_v2_defconfig
+++ b/configs/netspace_v2_defconfig
@@ -48,6 +48,7 @@ CONFIG_ENV_ADDR=0x70000
 CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SATA_MV=y
+CONFIG_SYS_SATA_MAX_DEVICE=1
 CONFIG_KIRKWOOD_GPIO=y
 CONFIG_SYS_I2C_LEGACY=y
 CONFIG_SYS_I2C_MVTWSI=y
diff --git a/configs/nitrogen6q2g_defconfig b/configs/nitrogen6q2g_defconfig
index dbc1818caa4..313187845bb 100644
--- a/configs/nitrogen6q2g_defconfig
+++ b/configs/nitrogen6q2g_defconfig
@@ -58,6 +58,7 @@ CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_DWC_AHSATA=y
+CONFIG_SYS_SATA_MAX_DEVICE=1
 CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_FASTBOOT_BUF_ADDR=0x12000000
 CONFIG_SYS_I2C_LEGACY=y
diff --git a/configs/nitrogen6q_defconfig b/configs/nitrogen6q_defconfig
index d88d0719407..51626c14952 100644
--- a/configs/nitrogen6q_defconfig
+++ b/configs/nitrogen6q_defconfig
@@ -58,6 +58,7 @@ CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_DWC_AHSATA=y
+CONFIG_SYS_SATA_MAX_DEVICE=1
 CONFIG_USB_FUNCTION_FASTBOOT=y
 CONFIG_FASTBOOT_BUF_ADDR=0x12000000
 CONFIG_SYS_I2C_LEGACY=y
diff --git a/configs/nsa310s_defconfig b/configs/nsa310s_defconfig
index 46ca3bac479..05a6761854b 100644
--- a/configs/nsa310s_defconfig
+++ b/configs/nsa310s_defconfig
@@ -43,6 +43,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SATA_MV=y
+CONFIG_SYS_SATA_MAX_DEVICE=1
 # CONFIG_MMC is not set
 CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
diff --git a/configs/omap5_uevm_defconfig b/configs/omap5_uevm_defconfig
index c43418a0224..2908bf5d364 100644
--- a/configs/omap5_uevm_defconfig
+++ b/configs/omap5_uevm_defconfig
@@ -47,6 +47,9 @@ CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_DM_ETH=y
 CONFIG_SCSI=y
+CONFIG_SCSI_AHCI_PLAT=y
+CONFIG_SYS_SCSI_MAX_SCSI_ID=1
+CONFIG_SYS_SCSI_MAX_LUN=1
 CONFIG_CONS_INDEX=3
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
diff --git a/configs/pg_wcom_expu1_defconfig b/configs/pg_wcom_expu1_defconfig
index 53d57e0ba20..a97616ad777 100644
--- a/configs/pg_wcom_expu1_defconfig
+++ b/configs/pg_wcom_expu1_defconfig
@@ -73,6 +73,9 @@ CONFIG_PHY_GIGE=y
 CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_SYS_QE_FW_ADDR=0x60020000
+CONFIG_SCSI_AHCI_PLAT=y
+CONFIG_SYS_SCSI_MAX_SCSI_ID=1
+CONFIG_SYS_SCSI_MAX_LUN=1
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/pg_wcom_seli8_defconfig b/configs/pg_wcom_seli8_defconfig
index 3eaf7fde9c9..65d7b852f49 100644
--- a/configs/pg_wcom_seli8_defconfig
+++ b/configs/pg_wcom_seli8_defconfig
@@ -73,6 +73,9 @@ CONFIG_PHY_GIGE=y
 CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_SYS_QE_FW_ADDR=0x60020000
+CONFIG_SCSI_AHCI_PLAT=y
+CONFIG_SYS_SCSI_MAX_SCSI_ID=1
+CONFIG_SYS_SCSI_MAX_LUN=1
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/sandbox64_defconfig b/configs/sandbox64_defconfig
index c9afe4c8408..04a1b26a07a 100644
--- a/configs/sandbox64_defconfig
+++ b/configs/sandbox64_defconfig
@@ -104,6 +104,7 @@ CONFIG_DEVRES=y
 CONFIG_DEBUG_DEVRES=y
 CONFIG_ADC=y
 CONFIG_ADC_SANDBOX=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_AXI=y
 CONFIG_AXI_SANDBOX=y
 CONFIG_BUTTON=y
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index d0886b7071f..5a7978adeb0 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -128,6 +128,7 @@ CONFIG_DEBUG_DEVRES=y
 CONFIG_SIMPLE_PM_BUS=y
 CONFIG_ADC=y
 CONFIG_ADC_SANDBOX=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_AXI=y
 CONFIG_AXI_SANDBOX=y
 CONFIG_BOOTCOUNT_LIMIT=y
@@ -249,6 +250,9 @@ CONFIG_RESET_SCMI=y
 CONFIG_DM_RNG=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_RV8803=y
+CONFIG_SCSI_AHCI_PLAT=y
+CONFIG_SYS_SCSI_MAX_SCSI_ID=8
+CONFIG_SYS_SCSI_MAX_LUN=4
 CONFIG_SANDBOX_SERIAL=y
 CONFIG_SMEM=y
 CONFIG_SANDBOX_SMEM=y
@@ -258,6 +262,7 @@ CONFIG_SOUND_MAX98357A=y
 CONFIG_SOUND_SANDBOX=y
 CONFIG_SOC_DEVICE=y
 CONFIG_SANDBOX_SPI=y
+CONFIG_SCSI=y
 CONFIG_SPMI=y
 CONFIG_SPMI_SANDBOX=y
 CONFIG_SYSINFO=y
@@ -301,6 +306,7 @@ CONFIG_CMD_DHRYSTONE=y
 CONFIG_ECDSA=y
 CONFIG_ECDSA_VERIFY=y
 CONFIG_TPM=y
+CONFIG_SHA384=y
 CONFIG_LZ4=y
 CONFIG_ERRNO_STR=y
 CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y
@@ -312,4 +318,3 @@ CONFIG_TEST_FDTDEC=y
 CONFIG_UNIT_TEST=y
 CONFIG_UT_TIME=y
 CONFIG_UT_DM=y
-CONFIG_SHA384=y
diff --git a/configs/sheevaplug_defconfig b/configs/sheevaplug_defconfig
index 6e39aa178a6..0c5031b2d22 100644
--- a/configs/sheevaplug_defconfig
+++ b/configs/sheevaplug_defconfig
@@ -46,6 +46,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_NETCONSOLE=y
 CONFIG_DM=y
 CONFIG_SATA_MV=y
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_MVEBU_MMC=y
 CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig
index e1278f2e70a..bde063438f1 100644
--- a/configs/tbs2910_defconfig
+++ b/configs/tbs2910_defconfig
@@ -66,6 +66,7 @@ CONFIG_SYS_MMC_ENV_PART=1
 CONFIG_DM=y
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_DWC_AHSATA=y
+CONFIG_SYS_SATA_MAX_DEVICE=1
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_MXC=y
 CONFIG_FSL_USDHC=y
diff --git a/configs/theadorable_debug_defconfig b/configs/theadorable_debug_defconfig
index a781f150e48..1c3dbe4a557 100644
--- a/configs/theadorable_debug_defconfig
+++ b/configs/theadorable_debug_defconfig
@@ -54,6 +54,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_SATA_MV=y
+CONFIG_SYS_SATA_MAX_DEVICE=1
 CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_RAM=y
 CONFIG_FPGA_ALTERA=y
diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig
index b78e5099f56..054e008b2a9 100644
--- a/configs/tools-only_defconfig
+++ b/configs/tools-only_defconfig
@@ -18,8 +18,8 @@ CONFIG_MISC_INIT_F=y
 CONFIG_OF_CONTROL=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 # CONFIG_NET is not set
-# CONFIG_GENERATE_ACPI_TABLE is not set
 # CONFIG_ACPIGEN is not set
+CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_AXI=y
 CONFIG_AXI_SANDBOX=y
 CONFIG_SANDBOX_GPIO=y
@@ -33,4 +33,5 @@ CONFIG_I2C_EDID=y
 # CONFIG_VIRTIO_MMIO is not set
 # CONFIG_VIRTIO_PCI is not set
 # CONFIG_VIRTIO_SANDBOX is not set
+# CONFIG_GENERATE_ACPI_TABLE is not set
 # CONFIG_EFI_LOADER is not set
diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig
index 90fce5ab4f7..6e8cb68e18a 100644
--- a/configs/wandboard_defconfig
+++ b/configs/wandboard_defconfig
@@ -56,6 +56,7 @@ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_DM=y
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_DWC_AHSATA=y
+CONFIG_SYS_SATA_MAX_DEVICE=1
 CONFIG_DM_I2C=y
 CONFIG_SPL_SYS_I2C_LEGACY=y
 CONFIG_SYS_I2C_MXC=y
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 1adf4dc8e2d..afc679421b7 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -135,6 +135,16 @@ config SATA_SIL
 	  Enable this driver to support the SIL3131, SIL3132 and SIL3124
 	  SATA controllers.
 
+config SYS_SATA_MAX_DEVICE
+	hex "Maximum number of SATA devices"
+	default 0x8
+	help
+	  Sets the maximum number of SATA devices which can be supported
+	  by U-Boot.
+
+	  This is only partially converted to driver model. See sata_bread()
+	  for example, which shows where the conversion needs to be completed.
+
 endif # SATA
 
 endmenu
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 3c826c95b78..2bee67d2e1a 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -16,3 +16,33 @@ config DM_SCSI
 	  which supports SCSI and SATA HDDs. For every device configuration
 	  (IDs/LUNs) a block device is created with RAW read/write and
 	  filesystem support.
+
+if SCSI && !DM_SCSI
+
+config SCSI_AHCI_PLAT
+	bool "Platform-specific init of AHCI"
+	help
+	  This enables a way for boards to set up an AHCI device manually, by
+	  called ahci_init() and providing an ahci_reset() mechanism.
+
+	  This is deprecated. An AHCI driver should be provided instead.
+
+config SYS_SCSI_MAX_SCSI_ID
+	hex "Maximum supporedt SCSI ID"
+	default 0x1
+	help
+	  Sets the maximum number of SCSI IDs to scan when looking for devices.
+	  IDs from 0 to (this value - 1) are scanned.
+
+	  This is deprecated and is not needed when BLK is enabled.
+
+config SYS_SCSI_MAX_LUN
+	hex "Maximum support SCSI LUN"
+	default 0x1
+	help
+	  Sets the maximum number of SCSI Logical Unit Numbers (LUNs) to scan on
+	  devices. LUNs from 0 to (this value - 1) are scanned.
+
+	  This is deprecated and is not needed when CONFIG_DM_SCSI is enabled.
+
+endif
diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile
index e9f848636c6..25194eeec11 100644
--- a/drivers/scsi/Makefile
+++ b/drivers/scsi/Makefile
@@ -15,4 +15,6 @@ obj-$(CONFIG_SCSI) += scsi.o
 endif
 endif
 
+ifdef CONFIG_SCSI
 obj-$(CONFIG_SANDBOX) += sandbox_scsi.o
+endif
diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h
index 977d96a5a76..538d9c21978 100644
--- a/include/configs/MPC837XERDB.h
+++ b/include/configs/MPC837XERDB.h
@@ -275,7 +275,6 @@
 /*
  * SATA
  */
-#define CONFIG_SYS_SATA_MAX_DEVICE	2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1_OFFSET	0x18000
 #define CONFIG_SYS_SATA1	(CONFIG_SYS_IMMR + CONFIG_SYS_SATA1_OFFSET)
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index 23b9969f84b..106d1e6a4b7 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -544,7 +544,6 @@ extern unsigned long get_sdram_size(void);
 #define CONFIG_FSL_SATA_V2
 
 #ifdef CONFIG_FSL_SATA
-#define CONFIG_SYS_SATA_MAX_DEVICE	2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1		CONFIG_SYS_MPC85xx_SATA1_ADDR
 #define CONFIG_SYS_SATA1_FLAGS		FLAGS_DMA
diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h
index ceaed464fe0..e6d5321070b 100644
--- a/include/configs/P2041RDB.h
+++ b/include/configs/P2041RDB.h
@@ -349,7 +349,6 @@
 #define CONFIG_FSL_SATA_V2
 
 #ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_SYS_SATA_MAX_DEVICE	2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1		CONFIG_SYS_MPC85xx_SATA1_ADDR
 #define CONFIG_SYS_SATA1_FLAGS		FLAGS_DMA
diff --git a/include/configs/P4080DS.h b/include/configs/P4080DS.h
index ed88b418441..8a0c7039f66 100644
--- a/include/configs/P4080DS.h
+++ b/include/configs/P4080DS.h
@@ -11,7 +11,6 @@
 
 #define CONFIG_PCIE3
 
-#define CONFIG_SYS_SATA_MAX_DEVICE  2
 #define CONFIG_LBA48
 
 #define CONFIG_SYS_SRIO
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h
index f60010f7876..9433f14227b 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -438,7 +438,6 @@
 /* SATA */
 #define CONFIG_FSL_SATA_V2
 #ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_SYS_SATA_MAX_DEVICE	1
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1		CONFIG_SYS_MPC85xx_SATA1_ADDR
 #define CONFIG_SYS_SATA1_FLAGS		FLAGS_DMA
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index f0bdcbae630..a41f9f0d9b8 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -488,7 +488,6 @@
  * SATA
  */
 #ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_SYS_SATA_MAX_DEVICE	2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1		CONFIG_SYS_MPC85xx_SATA1_ADDR
 #define CONFIG_SYS_SATA1_FLAGS		FLAGS_DMA
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index 86dc5bfe82a..7165ba08283 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -443,7 +443,6 @@
  * SATA
  */
 #ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_SYS_SATA_MAX_DEVICE	2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1		CONFIG_SYS_MPC85xx_SATA1_ADDR
 #define CONFIG_SYS_SATA1_FLAGS		FLAGS_DMA
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h
index 6923774a16f..daccd816c10 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -180,7 +180,6 @@
 
 /* SATA */
 #ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_SYS_SATA_MAX_DEVICE	2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1		CONFIG_SYS_MPC85xx_SATA1_ADDR
 #define CONFIG_SYS_SATA1_FLAGS		FLAGS_DMA
@@ -466,7 +465,6 @@
 
 /* SATA */
 #ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_SYS_SATA_MAX_DEVICE	2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1		CONFIG_SYS_MPC85xx_SATA1_ADDR
 #define CONFIG_SYS_SATA1_FLAGS		FLAGS_DMA
diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h
index e4e3872d1ca..1f017d13a72 100644
--- a/include/configs/am57xx_evm.h
+++ b/include/configs/am57xx_evm.h
@@ -49,9 +49,6 @@
 #define PHY_ANEG_TIMEOUT	8000	/* PHY needs longer aneg time at 1G */
 
 /* SATA */
-#define CONFIG_SCSI_AHCI_PLAT
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID	1
-#define CONFIG_SYS_SCSI_MAX_LUN		1
 
 /*
  * Default to using SPI for environment, etc.
diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h
index d5eacf1ec71..896b636cf11 100644
--- a/include/configs/clearfog.h
+++ b/include/configs/clearfog.h
@@ -36,11 +36,6 @@
 #endif
 
 /* SATA support */
-#ifdef CONFIG_SCSI
-#define CONFIG_SCSI_AHCI_PLAT
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID	1
-#define CONFIG_SYS_SCSI_MAX_LUN		1
-#endif
 
 /* Keep device tree and initrd in lower memory so the kernel can access them */
 #define RELOCATION_LIMITS_ENV_SETTINGS	\
diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
index 40bc8215480..c19aaaccb10 100644
--- a/include/configs/cm_fx6.h
+++ b/include/configs/cm_fx6.h
@@ -160,7 +160,6 @@
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET	/* For OTG port */
 
 /* SATA */
-#define CONFIG_SYS_SATA_MAX_DEVICE	1
 #define CONFIG_LBA48
 #define CONFIG_DWC_AHSATA_PORT_ID	0
 #define CONFIG_DWC_AHSATA_BASE_ADDR	SATA_ARB_BASE_ADDR
diff --git a/include/configs/controlcenterdc.h b/include/configs/controlcenterdc.h
index 2c27a003b3d..43f8fdd1656 100644
--- a/include/configs/controlcenterdc.h
+++ b/include/configs/controlcenterdc.h
@@ -21,9 +21,6 @@
 /*
  * SATA/SCSI/AHCI configuration
  */
-#define CONFIG_SCSI_AHCI_PLAT
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID	2
-#define CONFIG_SYS_SCSI_MAX_LUN		1
 
 /* Environment in SPI NOR flash */
 
diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h
index 6d272c6d880..bd264122da7 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -347,7 +347,6 @@
 
 /* SATA */
 #ifdef CONFIG_FSL_SATA_V2
-#define CONFIG_SYS_SATA_MAX_DEVICE	2
 #define CONFIG_SATA1
 #define CONFIG_SYS_SATA1		CONFIG_SYS_MPC85xx_SATA1_ADDR
 #define CONFIG_SYS_SATA1_FLAGS		FLAGS_DMA
diff --git a/include/configs/db-88f6820-gp.h b/include/configs/db-88f6820-gp.h
index f5ea3657a4a..a81f1eea4d6 100644
--- a/include/configs/db-88f6820-gp.h
+++ b/include/configs/db-88f6820-gp.h
@@ -16,9 +16,6 @@
 /*
  * SATA/SCSI/AHCI configuration
  */
-#define CONFIG_SCSI_AHCI_PLAT
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID	2
-#define CONFIG_SYS_SCSI_MAX_LUN		1
 
 /* Environment in SPI NOR flash */
 
diff --git a/include/configs/db-mv784mp-gp.h b/include/configs/db-mv784mp-gp.h
index 449a56753b1..7baae3b090d 100644
--- a/include/configs/db-mv784mp-gp.h
+++ b/include/configs/db-mv784mp-gp.h
@@ -28,7 +28,6 @@
 #define PHY_ANEG_TIMEOUT	8000	/* PHY needs a longer aneg time */
 
 /* SATA support */
-#define CONFIG_SYS_SATA_MAX_DEVICE	2
 #define CONFIG_LBA48
 
 /* PCIe support */
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index aec30c461de..cb54abaecd4 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -75,7 +75,6 @@
 /* SPI SPL */
 
 /* SATA */
-#define CONFIG_SCSI_AHCI_PLAT
 
 /* NAND support */
 #ifdef CONFIG_MTD_RAW_NAND
diff --git a/include/configs/dreamplug.h b/include/configs/dreamplug.h
index beea234d8dc..0b3ee131ae6 100644
--- a/include/configs/dreamplug.h
+++ b/include/configs/dreamplug.h
@@ -45,7 +45,6 @@
  * SATA Driver configuration
  */
 #ifdef CONFIG_SATA
-#define CONFIG_SYS_SATA_MAX_DEVICE	1
 #define CONFIG_LBA48
 #endif /* CONFIG_SATA */
 
diff --git a/include/configs/durian.h b/include/configs/durian.h
index ce9e57c64be..d912da0bd00 100644
--- a/include/configs/durian.h
+++ b/include/configs/durian.h
@@ -19,10 +19,6 @@
 #define CONFIG_PCI_SCAN_SHOW
 
 /* SCSI */
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID 4
-#define CONFIG_SYS_SCSI_MAX_LUN 1
-#define CONFIG_SCSI_AHCI_PLAT
-#define CONFIG_SYS_SATA_MAX_DEVICE 4
 
 /* BOOT */
 #define CONFIG_SYS_BOOTM_LEN	(60 * 1024 * 1024)
diff --git a/include/configs/ge_bx50v3.h b/include/configs/ge_bx50v3.h
index bde14a7b3da..402c5bfacbe 100644
--- a/include/configs/ge_bx50v3.h
+++ b/include/configs/ge_bx50v3.h
@@ -21,7 +21,6 @@
 
 /* SATA Configs */
 #ifdef CONFIG_CMD_SATA
-#define CONFIG_SYS_SATA_MAX_DEVICE	1
 #define CONFIG_DWC_AHSATA_PORT_ID	0
 #define CONFIG_DWC_AHSATA_BASE_ADDR	SATA_ARB_BASE_ADDR
 #define CONFIG_LBA48
diff --git a/include/configs/goflexhome.h b/include/configs/goflexhome.h
index 90e37d98535..85b220ffb9a 100644
--- a/include/configs/goflexhome.h
+++ b/include/configs/goflexhome.h
@@ -61,7 +61,6 @@
 
 /* SATA driver configuration */
 #ifdef CONFIG_SATA
-#define CONFIG_SYS_SATA_MAX_DEVICE	1
 #define CONFIG_LBA48
 #endif /* CONFIG_SATA */
 
diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
index 2853d75a163..29d538c0f9d 100644
--- a/include/configs/gw_ventana.h
+++ b/include/configs/gw_ventana.h
@@ -41,7 +41,6 @@
  * SATA Configs
  */
 #ifdef CONFIG_CMD_SATA
-  #define CONFIG_SYS_SATA_MAX_DEVICE	1
   #define CONFIG_DWC_AHSATA_PORT_ID	0
   #define CONFIG_DWC_AHSATA_BASE_ADDR	SATA_ARB_BASE_ADDR
   #define CONFIG_LBA48
diff --git a/include/configs/helios4.h b/include/configs/helios4.h
index c1d42f17ca6..56fa135a3fc 100644
--- a/include/configs/helios4.h
+++ b/include/configs/helios4.h
@@ -36,11 +36,6 @@
 #endif
 
 /* SATA support */
-#ifdef CONFIG_SCSI
-#define CONFIG_SCSI_AHCI_PLAT
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID	1
-#define CONFIG_SYS_SCSI_MAX_LUN		1
-#endif
 
 /* Keep device tree and initrd in lower memory so the kernel can access them */
 #define RELOCATION_LIMITS_ENV_SETTINGS	\
diff --git a/include/configs/highbank.h b/include/configs/highbank.h
index 6d559746ab0..55c874bf619 100644
--- a/include/configs/highbank.h
+++ b/include/configs/highbank.h
@@ -16,10 +16,6 @@
 
 #define CONFIG_SYS_BOOTCOUNT_LE		/* Use little-endian accessors */
 
-#define CONFIG_SCSI_AHCI_PLAT
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID	5
-#define CONFIG_SYS_SCSI_MAX_LUN		1
-
 #define CONFIG_BOOT_RETRY_TIME		-1
 #define CONFIG_RESET_TO_RETRY
 
diff --git a/include/configs/lacie_kw.h b/include/configs/lacie_kw.h
index 046f1888cb1..a39f786d572 100644
--- a/include/configs/lacie_kw.h
+++ b/include/configs/lacie_kw.h
@@ -32,9 +32,6 @@
 #define CONFIG_LBA48
 #if defined(CONFIG_NETSPACE_MAX_V2) || defined(CONFIG_D2NET_V2) || \
 	defined(CONFIG_NET2BIG_V2)
-#define CONFIG_SYS_SATA_MAX_DEVICE	2
-#else
-#define CONFIG_SYS_SATA_MAX_DEVICE	1
 #endif
 #endif /* CONFIG_SATA */
 
diff --git a/include/configs/ls1012a2g5rdb.h b/include/configs/ls1012a2g5rdb.h
index 10274317cf8..0263bb82893 100644
--- a/include/configs/ls1012a2g5rdb.h
+++ b/include/configs/ls1012a2g5rdb.h
@@ -14,13 +14,9 @@
 #define CONFIG_SYS_SDRAM_SIZE		0x40000000
 
 /* SATA */
-#define CONFIG_SCSI_AHCI_PLAT
 
 #define CONFIG_SYS_SATA				AHCI_BASE_ADDR
 
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID		1
-#define CONFIG_SYS_SCSI_MAX_LUN			1
-
 #undef CONFIG_EXTRA_ENV_SETTINGS
 #define CONFIG_EXTRA_ENV_SETTINGS		\
 	"verify=no\0"				\
diff --git a/include/configs/ls1012a_common.h b/include/configs/ls1012a_common.h
index e33bafac61b..f92ff17eeb8 100644
--- a/include/configs/ls1012a_common.h
+++ b/include/configs/ls1012a_common.h
@@ -31,13 +31,9 @@
 #define CONFIG_SYS_FSL_QSPI_BASE	0x40000000
 
 /* SATA */
-#define CONFIG_SCSI_AHCI_PLAT
 
 #define CONFIG_SYS_SATA				AHCI_BASE_ADDR
 
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID		1
-#define CONFIG_SYS_SCSI_MAX_LUN			1
-
 /* I2C */
 
 /* GPIO */
diff --git a/include/configs/ls1021aiot.h b/include/configs/ls1021aiot.h
index c02be10c6fa..2e5b804a4cb 100644
--- a/include/configs/ls1021aiot.h
+++ b/include/configs/ls1021aiot.h
@@ -81,16 +81,12 @@
  */
 
 /* SATA */
-#define CONFIG_SCSI_AHCI_PLAT
 #ifndef PCI_DEVICE_ID_FREESCALE_AHCI
 #define PCI_DEVICE_ID_FREESCALE_AHCI	0x0440
 #endif
 #define CONFIG_SCSI_DEV_LIST		{PCI_VENDOR_ID_FREESCALE, \
 	PCI_DEVICE_ID_FREESCALE_AHCI}
 
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID	1
-#define CONFIG_SYS_SCSI_MAX_LUN		1
-
 /* SPI */
 
 /*
diff --git a/include/configs/ls1028aqds.h b/include/configs/ls1028aqds.h
index 2c50490b9c6..1b4d181310f 100644
--- a/include/configs/ls1028aqds.h
+++ b/include/configs/ls1028aqds.h
@@ -72,11 +72,8 @@
 #endif
 
 /* SATA */
-#define CONFIG_SCSI_AHCI_PLAT
 
 #define CONFIG_SYS_SATA1			AHCI_BASE_ADDR1
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID		1
-#define CONFIG_SYS_SCSI_MAX_LUN			1
 #ifndef SPL_NO_ENV
 #undef CONFIG_EXTRA_ENV_SETTINGS
 #define CONFIG_EXTRA_ENV_SETTINGS \
diff --git a/include/configs/ls1028ardb.h b/include/configs/ls1028ardb.h
index 653d2ac678a..0770f4e268a 100644
--- a/include/configs/ls1028ardb.h
+++ b/include/configs/ls1028ardb.h
@@ -57,12 +57,9 @@
 #endif
 
 /* SATA */
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID		1
-#define CONFIG_SYS_SCSI_MAX_LUN			1
 #define SCSI_VEND_ID 0x1b4b
 #define SCSI_DEV_ID  0x9170
 #define CONFIG_SCSI_DEV_LIST {SCSI_VEND_ID, SCSI_DEV_ID}
-#define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SATA1                        AHCI_BASE_ADDR1
 
 /* Initial environment variables */
diff --git a/include/configs/ls1043aqds.h b/include/configs/ls1043aqds.h
index 083e2e65605..ea6831bb827 100644
--- a/include/configs/ls1043aqds.h
+++ b/include/configs/ls1043aqds.h
@@ -46,7 +46,6 @@
 #endif
 
 /* SATA */
-#define CONFIG_SCSI_AHCI_PLAT
 
 /* EEPROM */
 #define CONFIG_SYS_I2C_EEPROM_NXID
@@ -54,9 +53,6 @@
 
 #define CONFIG_SYS_SATA				AHCI_BASE_ADDR
 
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID		1
-#define CONFIG_SYS_SCSI_MAX_LUN			1
-
 /*
  * IFC Definitions
  */
diff --git a/include/configs/ls1043ardb.h b/include/configs/ls1043ardb.h
index 507d770f176..31b578ae33b 100644
--- a/include/configs/ls1043ardb.h
+++ b/include/configs/ls1043ardb.h
@@ -234,8 +234,6 @@
 
 /* SATA */
 #ifndef SPL_NO_SATA
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID		2
-#define CONFIG_SYS_SCSI_MAX_LUN			2
 #define SCSI_VEND_ID 0x1b4b
 #define SCSI_DEV_ID  0x9170
 #define CONFIG_SCSI_DEV_LIST {SCSI_VEND_ID, SCSI_DEV_ID}
diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h
index 943d65920e8..7353552d763 100644
--- a/include/configs/ls1046a_common.h
+++ b/include/configs/ls1046a_common.h
@@ -124,12 +124,7 @@
 
 /* SATA */
 #ifndef SPL_NO_SATA
-#define CONFIG_SCSI_AHCI_PLAT
-
 #define CONFIG_SYS_SATA				AHCI_BASE_ADDR
-
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID		1
-#define CONFIG_SYS_SCSI_MAX_LUN			1
 #endif
 
 /* FMan ucode */
diff --git a/include/configs/ls1088a_common.h b/include/configs/ls1088a_common.h
index e385fded579..166817f9e12 100644
--- a/include/configs/ls1088a_common.h
+++ b/include/configs/ls1088a_common.h
@@ -130,11 +130,7 @@ unsigned long long get_qixis_addr(void);
 
 /* SATA */
 #ifdef CONFIG_SCSI
-#define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SATA1		AHCI_BASE_ADDR1
-
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID	1
-#define CONFIG_SYS_SCSI_MAX_LUN		1
 #endif
 
 /* Physical Memory Map */
diff --git a/include/configs/ls2080aqds.h b/include/configs/ls2080aqds.h
index 8b4ea499e86..7554de1f6d3 100644
--- a/include/configs/ls2080aqds.h
+++ b/include/configs/ls2080aqds.h
@@ -33,14 +33,10 @@
 #endif
 
 /* SATA */
-#define CONFIG_SCSI_AHCI_PLAT
 
 #define CONFIG_SYS_SATA1			AHCI_BASE_ADDR1
 #define CONFIG_SYS_SATA2			AHCI_BASE_ADDR2
 
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID		1
-#define CONFIG_SYS_SCSI_MAX_LUN			1
-
 #define CONFIG_SYS_NOR0_CSPR_EXT	(0x0)
 #define CONFIG_SYS_NOR_AMASK		IFC_AMASK(128*1024*1024)
 #define CONFIG_SYS_NOR_AMASK_EARLY	IFC_AMASK(64*1024*1024)
diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h
index 1253698c883..1c05b086778 100644
--- a/include/configs/ls2080ardb.h
+++ b/include/configs/ls2080ardb.h
@@ -43,14 +43,10 @@
 #endif
 
 /* SATA */
-#define CONFIG_SCSI_AHCI_PLAT
 
 #define CONFIG_SYS_SATA1			AHCI_BASE_ADDR1
 #define CONFIG_SYS_SATA2			AHCI_BASE_ADDR2
 
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID		1
-#define CONFIG_SYS_SCSI_MAX_LUN			1
-
 #if !defined(CONFIG_FSL_QSPI) || defined(CONFIG_TFABOOT)
 
 #define CONFIG_SYS_NOR0_CSPR_EXT	(0x0)
diff --git a/include/configs/lsxl.h b/include/configs/lsxl.h
index e8e02e7f7b8..7fa4f00734c 100644
--- a/include/configs/lsxl.h
+++ b/include/configs/lsxl.h
@@ -96,7 +96,6 @@
 #endif /* CONFIG_CMD_NET */
 
 #ifdef CONFIG_SATA
-#define CONFIG_SYS_SATA_MAX_DEVICE 1
 #define CONFIG_SYS_64BIT_LBA
 #define CONFIG_LBA48
 #endif
diff --git a/include/configs/lx2160a_common.h b/include/configs/lx2160a_common.h
index eac309de804..a38b2f66650 100644
--- a/include/configs/lx2160a_common.h
+++ b/include/configs/lx2160a_common.h
@@ -110,11 +110,8 @@
 /* SATA */
 
 #ifdef CONFIG_SCSI
-#define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SATA1		AHCI_BASE_ADDR1
 #define CONFIG_SYS_SATA2		AHCI_BASE_ADDR2
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID	1
-#define CONFIG_SYS_SCSI_MAX_LUN		1
 #endif
 
 /* USB */
diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h
index 4a1d959d17c..8486cf8fc6e 100644
--- a/include/configs/m53menlo.h
+++ b/include/configs/m53menlo.h
@@ -99,7 +99,6 @@
  * SATA
  */
 #ifdef CONFIG_CMD_SATA
-#define CONFIG_SYS_SATA_MAX_DEVICE	1
 #define CONFIG_DWC_AHSATA_PORT_ID	0
 #define CONFIG_DWC_AHSATA_BASE_ADDR	SATA_BASE_ADDR
 #define CONFIG_LBA48
diff --git a/include/configs/mvebu_armada-37xx.h b/include/configs/mvebu_armada-37xx.h
index c192512e85a..fd9ce344dbd 100644
--- a/include/configs/mvebu_armada-37xx.h
+++ b/include/configs/mvebu_armada-37xx.h
@@ -51,13 +51,9 @@
 /*
  * SATA/SCSI/AHCI configuration
  */
-#define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_LBA48
 #define CONFIG_SYS_64BIT_LBA
 
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID	2
-#define CONFIG_SYS_SCSI_MAX_LUN		1
-
 #define BOOT_TARGET_DEVICES(func) \
 	func(MMC, mmc, 1) \
 	func(MMC, mmc, 0) \
diff --git a/include/configs/mvebu_armada-8k.h b/include/configs/mvebu_armada-8k.h
index 6a113ec2145..44bba6555cb 100644
--- a/include/configs/mvebu_armada-8k.h
+++ b/include/configs/mvebu_armada-8k.h
@@ -46,13 +46,9 @@
 /*
  * SATA/SCSI/AHCI configuration
  */
-#define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_LBA48
 #define CONFIG_SYS_64BIT_LBA
 
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID	2
-#define CONFIG_SYS_SCSI_MAX_LUN		1
-
 /*
  * PCI configuration
  */
diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h
index 92140df4be1..01ed221873a 100644
--- a/include/configs/mx53loco.h
+++ b/include/configs/mx53loco.h
@@ -125,7 +125,6 @@
 #define CONFIG_BOARD_SIZE_LIMIT		785408
 
 #ifdef CONFIG_CMD_SATA
-	#define CONFIG_SYS_SATA_MAX_DEVICE      1
 	#define CONFIG_DWC_AHSATA_PORT_ID       0
 	#define CONFIG_DWC_AHSATA_BASE_ADDR     SATA_BASE_ADDR
 	#define CONFIG_LBA48
diff --git a/include/configs/mx6cuboxi.h b/include/configs/mx6cuboxi.h
index 7d3e651f44d..1c25857296c 100644
--- a/include/configs/mx6cuboxi.h
+++ b/include/configs/mx6cuboxi.h
@@ -18,7 +18,6 @@
 
 /* SATA Configuration */
 #ifdef CONFIG_CMD_SATA
-#define CONFIG_SYS_SATA_MAX_DEVICE      1
 #define CONFIG_DWC_AHSATA_PORT_ID       0
 #define CONFIG_DWC_AHSATA_BASE_ADDR     SATA_ARB_BASE_ADDR
 #define CONFIG_LBA48
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h
index 1a1c08bd308..678b433cd7b 100644
--- a/include/configs/nitrogen6x.h
+++ b/include/configs/nitrogen6x.h
@@ -23,7 +23,6 @@
  * SATA Configs
  */
 #ifdef CONFIG_CMD_SATA
-#define CONFIG_SYS_SATA_MAX_DEVICE	1
 #define CONFIG_DWC_AHSATA_PORT_ID	0
 #define CONFIG_DWC_AHSATA_BASE_ADDR	SATA_ARB_BASE_ADDR
 #define CONFIG_LBA48
diff --git a/include/configs/nsa310s.h b/include/configs/nsa310s.h
index 8cc9ca6a49d..ccf4519119a 100644
--- a/include/configs/nsa310s.h
+++ b/include/configs/nsa310s.h
@@ -32,7 +32,6 @@
 
 /* SATA driver configuration */
 #ifdef CONFIG_SATA
-#define CONFIG_SYS_SATA_MAX_DEVICE	1
 #define CONFIG_LBA48
 #endif /* CONFIG_SATA */
 
diff --git a/include/configs/omap5_uevm.h b/include/configs/omap5_uevm.h
index e9a9d50db1d..75e84c35ee0 100644
--- a/include/configs/omap5_uevm.h
+++ b/include/configs/omap5_uevm.h
@@ -49,8 +49,4 @@
 
 #define CONSOLEDEV		"ttyS2"
 
-#define CONFIG_SCSI_AHCI_PLAT
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID	1
-#define CONFIG_SYS_SCSI_MAX_LUN		1
-
 #endif /* __CONFIG_OMAP5_EVM_H */
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index b993ec8316f..92008cd38e4 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -138,7 +138,6 @@
 #define CONFIG_PCIE1	/* PCIE controller 1 (slot 1) */
 #define CONFIG_PCIE2	/* PCIE controller 2 (slot 2) */
 
-#define CONFIG_SYS_SATA_MAX_DEVICE	2
 #define CONFIG_LBA48
 
 #define CONFIG_HWCONFIG
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index c4cc57401bc..073086e912a 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -40,10 +40,4 @@
 #define CONFIG_SYS_ATA_STRIDE		4
 #endif
 
-#define CONFIG_SCSI_AHCI_PLAT
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID	8
-#define CONFIG_SYS_SCSI_MAX_LUN		4
-
-#define CONFIG_SYS_SATA_MAX_DEVICE	2
-
 #endif
diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h
index 8dba4fcb4f8..4499a63aed2 100644
--- a/include/configs/sheevaplug.h
+++ b/include/configs/sheevaplug.h
@@ -46,7 +46,6 @@
  * SATA driver configuration
  */
 #ifdef CONFIG_SATA
-#define CONFIG_SYS_SATA_MAX_DEVICE	2
 #define CONFIG_LBA48
 #endif /* CONFIG_SATA */
 
diff --git a/include/configs/sifive-unmatched.h b/include/configs/sifive-unmatched.h
index 30adfe948f1..087764666bf 100644
--- a/include/configs/sifive-unmatched.h
+++ b/include/configs/sifive-unmatched.h
@@ -32,8 +32,6 @@
 
 #define CONFIG_STANDALONE_LOAD_ADDR	0x80200000
 
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID	4
-
 /* Environment options */
 
 #ifndef CONFIG_SPL_BUILD
diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h
index 58ccafc385a..065b406e2e7 100644
--- a/include/configs/tbs2910.h
+++ b/include/configs/tbs2910.h
@@ -40,7 +40,6 @@
 
 /* SATA */
 #ifdef CONFIG_CMD_SATA
-#define CONFIG_SYS_SATA_MAX_DEVICE	1
 #define CONFIG_DWC_AHSATA_PORT_ID	0
 #define CONFIG_DWC_AHSATA_BASE_ADDR	SATA_ARB_BASE_ADDR
 #define CONFIG_LBA48
diff --git a/include/configs/theadorable.h b/include/configs/theadorable.h
index 3c942cc6fa0..14817b165cf 100644
--- a/include/configs/theadorable.h
+++ b/include/configs/theadorable.h
@@ -41,7 +41,6 @@
 	"initrd_high=0x10000000\0"
 
 /* SATA support */
-#define CONFIG_SYS_SATA_MAX_DEVICE	1
 #define CONFIG_LBA48
 
 /* Enable LCD and reserve 512KB from top of memory*/
diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h
index 051c18ca232..80e8fe1deb2 100644
--- a/include/configs/wandboard.h
+++ b/include/configs/wandboard.h
@@ -17,7 +17,6 @@
 /* SATA Configs */
 
 #ifdef CONFIG_CMD_SATA
-#define CONFIG_SYS_SATA_MAX_DEVICE	1
 #define CONFIG_DWC_AHSATA_PORT_ID	0
 #define CONFIG_DWC_AHSATA_BASE_ADDR	SATA_ARB_BASE_ADDR
 #define CONFIG_LBA48
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index c6d735feb0a..691c9c4d338 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -725,7 +725,6 @@ CONFIG_SAR_REG
 CONFIG_SATA1
 CONFIG_SATA2
 CONFIG_SCIF_A
-CONFIG_SCSI_AHCI_PLAT
 CONFIG_SCSI_DEV_LIST
 CONFIG_SC_TIMER_CLK
 CONFIG_SDCARD
@@ -1859,7 +1858,6 @@ CONFIG_SYS_SATA2
 CONFIG_SYS_SATA2_FLAGS
 CONFIG_SYS_SATA2_OFFSET
 CONFIG_SYS_SATA_FAT_BOOT_PARTITION
-CONFIG_SYS_SATA_MAX_DEVICE
 CONFIG_SYS_SBFHDR_DATA_OFFSET
 CONFIG_SYS_SBFHDR_SIZE
 CONFIG_SYS_SCCR_SATACM
@@ -1867,8 +1865,6 @@ CONFIG_SYS_SCCR_TSEC1CM
 CONFIG_SYS_SCCR_TSEC2CM
 CONFIG_SYS_SCCR_USBDRCM
 CONFIG_SYS_SCR
-CONFIG_SYS_SCSI_MAX_LUN
-CONFIG_SYS_SCSI_MAX_SCSI_ID
 CONFIG_SYS_SDRAM
 CONFIG_SYS_SDRAM_BASE
 CONFIG_SYS_SDRAM_BASE0
-- 
2.35.0.rc2.247.g8bbb082509-goog



More information about the U-Boot mailing list