]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
scsi: Drop CONFIG_SYS_SCSI_MAX_DEVICE
authorSimon Glass <sjg@chromium.org>
Mon, 31 Jan 2022 14:49:36 +0000 (07:49 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 9 Feb 2022 14:16:48 +0000 (09:16 -0500)
This is defined based on two other CONFIGs for all boards except sandbox
and durian.

For sandbox the value does not matter. For durian the value seems
excessive.

Drop the option completely, to simplify configuration and reduce the
number of things we need to convert to Kconfig.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
29 files changed:
README
api/api_storage.c
arch/arm/include/asm/arch-ls102xa/config.h
drivers/scsi/scsi.c
include/configs/am57xx_evm.h
include/configs/clearfog.h
include/configs/controlcenterdc.h
include/configs/db-88f6820-gp.h
include/configs/durian.h
include/configs/helios4.h
include/configs/highbank.h
include/configs/ls1012a2g5rdb.h
include/configs/ls1012a_common.h
include/configs/ls1021aiot.h
include/configs/ls1028aqds.h
include/configs/ls1028ardb.h
include/configs/ls1043aqds.h
include/configs/ls1043ardb.h
include/configs/ls1046a_common.h
include/configs/ls1088a_common.h
include/configs/ls2080aqds.h
include/configs/ls2080ardb.h
include/configs/lx2160a_common.h
include/configs/mvebu_armada-37xx.h
include/configs/mvebu_armada-8k.h
include/configs/omap5_uevm.h
include/configs/sandbox.h
include/scsi.h
scripts/config_whitelist.txt

diff --git a/README b/README
index 3870b0dbe4fc7c4e8142bcfaadb3bff10a204198..a0d9cb4b955f8194d011dda91aa3347c3c590990 100644 (file)
--- a/README
+++ b/README
@@ -733,11 +733,9 @@ The following options need to be configured:
                        Default is 32bit.
 
 - SCSI Support:
-               CONFIG_SYS_SCSI_MAX_LUN [8], CONFIG_SYS_SCSI_MAX_SCSI_ID [7] and
-               CONFIG_SYS_SCSI_MAX_DEVICE [CONFIG_SYS_SCSI_MAX_SCSI_ID *
-               CONFIG_SYS_SCSI_MAX_LUN] can be adjusted to define the
-               maximum numbers of LUNs, SCSI ID's and target
-               devices.
+               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.
index a0dacad1a55ec7468573b6f5c7cae5b8abe4214b..adca44b4fd22cd08bf510741d84aa67758ccf8c2 100644 (file)
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <api_public.h>
 #include <part.h>
+#include <scsi.h>
 
 #if defined(CONFIG_CMD_USB) && defined(CONFIG_USB_STORAGE)
 #include <usb.h>
@@ -71,7 +72,7 @@ void dev_stor_init(void)
        specs[ENUM_SATA].name = "sata";
 #endif
 #if defined(CONFIG_SCSI)
-       specs[ENUM_SCSI].max_dev = CONFIG_SYS_SCSI_MAX_DEVICE;
+       specs[ENUM_SCSI].max_dev = SCSI_MAX_DEVICE;
        specs[ENUM_SCSI].enum_started = 0;
        specs[ENUM_SCSI].enum_ended = 0;
        specs[ENUM_SCSI].type = DEV_TYP_STOR | DT_STOR_SCSI;
index 0e1f9e0c0d8c11d3a1d60c825e59ae9d383c0aec..489286ed8d1f9c886ccb19bb3cf10e39976488c0 100644 (file)
@@ -81,8 +81,6 @@
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID            1
 #define CONFIG_SYS_SCSI_MAX_LUN                1
-#define CONFIG_SYS_SCSI_MAX_DEVICE             (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-                                               CONFIG_SYS_SCSI_MAX_LUN)
 #ifdef CONFIG_DDR_SPD
 #define CONFIG_VERY_BIG_RAM
 #define CONFIG_SYS_LS1_DDR_BLOCK1_SIZE         ((phys_size_t)2 << 30)
index d93d241928535b77b412f74848ae1f2e90630e7a..d7b33010e469d9fc2f8cd00e6e810ecd14e02e70 100644 (file)
@@ -46,7 +46,7 @@ static int scsi_max_devs; /* number of highest available scsi device */
 
 static int scsi_curr_dev; /* current device */
 
-static struct blk_desc scsi_dev_desc[CONFIG_SYS_SCSI_MAX_DEVICE];
+static struct blk_desc scsi_dev_desc[SCSI_MAX_DEVICE];
 #endif
 
 /* almost the maximum amount of the scsi_ext command.. */
@@ -655,7 +655,7 @@ int scsi_scan(bool verbose)
 
        if (verbose)
                printf("scanning bus for devices...\n");
-       for (i = 0; i < CONFIG_SYS_SCSI_MAX_DEVICE; i++)
+       for (i = 0; i < SCSI_MAX_DEVICE; i++)
                scsi_init_dev_desc(&scsi_dev_desc[i], i);
 
        scsi_max_devs = 0;
@@ -703,7 +703,7 @@ U_BOOT_DRIVER(scsi_blk) = {
 U_BOOT_LEGACY_BLK(scsi) = {
        .if_typename    = "scsi",
        .if_type        = IF_TYPE_SCSI,
-       .max_devs       = CONFIG_SYS_SCSI_MAX_DEVICE,
+       .max_devs       = SCSI_MAX_DEVICE,
        .desc           = scsi_dev_desc,
 };
 #endif
index 956844414f86389e42bc45554db822dd248a94ff..e4e3872d1ca93b4d746f28e8233a9eb1de0dd3f5 100644 (file)
@@ -52,8 +52,6 @@
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    1
 #define CONFIG_SYS_SCSI_MAX_LUN                1
-#define CONFIG_SYS_SCSI_MAX_DEVICE     (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-                                               CONFIG_SYS_SCSI_MAX_LUN)
 
 /*
  * Default to using SPI for environment, etc.
index c9af5a40cec0ba4b36d907165cb390acaba504fb..d5eacf1ec712e69e91574ea51a6b75c7515f503c 100644 (file)
@@ -40,8 +40,6 @@
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    1
 #define CONFIG_SYS_SCSI_MAX_LUN                1
-#define CONFIG_SYS_SCSI_MAX_DEVICE     (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-                                       CONFIG_SYS_SCSI_MAX_LUN)
 #endif
 
 /* Keep device tree and initrd in lower memory so the kernel can access them */
index ff385d9c6bef54b897eba244801b7e42de99ffb1..2c27a003b3db94b830ec06bde360081c080be990 100644 (file)
@@ -24,8 +24,6 @@
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    2
 #define CONFIG_SYS_SCSI_MAX_LUN                1
-#define CONFIG_SYS_SCSI_MAX_DEVICE     (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-                                        CONFIG_SYS_SCSI_MAX_LUN)
 
 /* Environment in SPI NOR flash */
 
index 5f2611995d357dc1dd1cb5858df7add36b646511..f5ea3657a4adff56ca0faecbbaa7e330d3f65cbc 100644 (file)
@@ -19,8 +19,6 @@
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    2
 #define CONFIG_SYS_SCSI_MAX_LUN                1
-#define CONFIG_SYS_SCSI_MAX_DEVICE     (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-                                        CONFIG_SYS_SCSI_MAX_LUN)
 
 /* Environment in SPI NOR flash */
 
index c0ea42e180a3fa38bf0d0211be891906d7136021..ce9e57c64be6620ff7c23d5c12717cf350c5497d 100644 (file)
@@ -21,7 +21,6 @@
 /* SCSI */
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID 4
 #define CONFIG_SYS_SCSI_MAX_LUN 1
-#define CONFIG_SYS_SCSI_MAX_DEVICE 128
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SATA_MAX_DEVICE 4
 
index de1ebbf375164724cb212d5f882fa3b6a8384017..c1d42f17ca6ecb8eb734a40f7d29eeaeafa49ecc 100644 (file)
@@ -40,8 +40,6 @@
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    1
 #define CONFIG_SYS_SCSI_MAX_LUN                1
-#define CONFIG_SYS_SCSI_MAX_DEVICE     (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-                                       CONFIG_SYS_SCSI_MAX_LUN)
 #endif
 
 /* Keep device tree and initrd in lower memory so the kernel can access them */
index 4ef3a46cfb97a7983ef132aff6ac51c07b3f534d..6d559746ab0574beef6d20b4bdc9be74964581b3 100644 (file)
@@ -19,8 +19,6 @@
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    5
 #define CONFIG_SYS_SCSI_MAX_LUN                1
-#define CONFIG_SYS_SCSI_MAX_DEVICE     (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-                                       CONFIG_SYS_SCSI_MAX_LUN)
 
 #define CONFIG_BOOT_RETRY_TIME         -1
 #define CONFIG_RESET_TO_RETRY
index bda4283ef5a7da87b28e0c46f8434234e17d3ea2..10274317cf89b5fc1a78788ee19e325641f77fdd 100644 (file)
@@ -20,8 +20,6 @@
 
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID            1
 #define CONFIG_SYS_SCSI_MAX_LUN                        1
-#define CONFIG_SYS_SCSI_MAX_DEVICE             (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-                                               CONFIG_SYS_SCSI_MAX_LUN)
 
 #undef CONFIG_EXTRA_ENV_SETTINGS
 #define CONFIG_EXTRA_ENV_SETTINGS              \
index 5d561009c563abfdfe5b16f8015a58555f813ad6..e33bafac61b236aea6f9eb8b617bdbd336107b0b 100644 (file)
@@ -37,8 +37,6 @@
 
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID            1
 #define CONFIG_SYS_SCSI_MAX_LUN                        1
-#define CONFIG_SYS_SCSI_MAX_DEVICE             (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-                                               CONFIG_SYS_SCSI_MAX_LUN)
 
 /* I2C */
 
index 7b4044fba724ceea7e33c1b567643dd30d778383..c02be10c6fa30836f92add4d764d311c0a6c3a09 100644 (file)
@@ -90,8 +90,6 @@
 
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    1
 #define CONFIG_SYS_SCSI_MAX_LUN                1
-#define CONFIG_SYS_SCSI_MAX_DEVICE     (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-               CONFIG_SYS_SCSI_MAX_LUN)
 
 /* SPI */
 
index 8e3bd7790fe1ccbdd653c74bee96efafb34ac678..2c50490b9c6151906af36d016a9795653aa63d59 100644 (file)
@@ -77,8 +77,6 @@
 #define CONFIG_SYS_SATA1                       AHCI_BASE_ADDR1
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID            1
 #define CONFIG_SYS_SCSI_MAX_LUN                        1
-#define CONFIG_SYS_SCSI_MAX_DEVICE             (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-                                               CONFIG_SYS_SCSI_MAX_LUN)
 #ifndef SPL_NO_ENV
 #undef CONFIG_EXTRA_ENV_SETTINGS
 #define CONFIG_EXTRA_ENV_SETTINGS \
index 5ce9ebbae93f1ada6e11d1830b4e661c98c5f280..653d2ac678aab48a33c494a800d9e72a0bec9b6d 100644 (file)
@@ -59,8 +59,6 @@
 /* SATA */
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID            1
 #define CONFIG_SYS_SCSI_MAX_LUN                        1
-#define CONFIG_SYS_SCSI_MAX_DEVICE             (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-                                               CONFIG_SYS_SCSI_MAX_LUN)
 #define SCSI_VEND_ID 0x1b4b
 #define SCSI_DEV_ID  0x9170
 #define CONFIG_SCSI_DEV_LIST {SCSI_VEND_ID, SCSI_DEV_ID}
index 5f9cb97855a6851686a270db5b9627f6db9233fd..083e2e65605dd7e3ba380f9691c7082af16cc849 100644 (file)
@@ -56,8 +56,6 @@
 
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID            1
 #define CONFIG_SYS_SCSI_MAX_LUN                        1
-#define CONFIG_SYS_SCSI_MAX_DEVICE             (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-                                               CONFIG_SYS_SCSI_MAX_LUN)
 
 /*
  * IFC Definitions
index 6d9cbc8c7df08aa1ceedcaba947632fec1177956..507d770f176f4db2921edb304f1e91c991f1adea 100644 (file)
 #ifndef SPL_NO_SATA
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID            2
 #define CONFIG_SYS_SCSI_MAX_LUN                        2
-#define CONFIG_SYS_SCSI_MAX_DEVICE             (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-                                               CONFIG_SYS_SCSI_MAX_LUN)
 #define SCSI_VEND_ID 0x1b4b
 #define SCSI_DEV_ID  0x9170
 #define CONFIG_SCSI_DEV_LIST {SCSI_VEND_ID, SCSI_DEV_ID}
index 04dc83037943bfeefb05f41f9b40071adbf0a1ef..15d4364a09ad48b5ed9f5aae4bc4514ed31f1a80 100644 (file)
 
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID            1
 #define CONFIG_SYS_SCSI_MAX_LUN                        1
-#define CONFIG_SYS_SCSI_MAX_DEVICE             (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-                                               CONFIG_SYS_SCSI_MAX_LUN)
 #endif
 
 /* FMan ucode */
index 9350daded1aa2e49273c6502fcd82af65e996482..e9a9c64217c3360344295050a8583d2516dd1247 100644 (file)
@@ -133,8 +133,6 @@ unsigned long long get_qixis_addr(void);
 
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    1
 #define CONFIG_SYS_SCSI_MAX_LUN                1
-#define CONFIG_SYS_SCSI_MAX_DEVICE     (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-                                       CONFIG_SYS_SCSI_MAX_LUN)
 #endif
 
 /* Physical Memory Map */
index 07cf59fcb8fc02a3316a7cf2352a94723db790b0..8b4ea499e867e7dd8d6c22bf946905a71a60504b 100644 (file)
@@ -40,8 +40,6 @@
 
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID            1
 #define CONFIG_SYS_SCSI_MAX_LUN                        1
-#define CONFIG_SYS_SCSI_MAX_DEVICE             (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-                                               CONFIG_SYS_SCSI_MAX_LUN)
 
 #define CONFIG_SYS_NOR0_CSPR_EXT       (0x0)
 #define CONFIG_SYS_NOR_AMASK           IFC_AMASK(128*1024*1024)
index 6d8effea74465fe68257b85540ba647abe02a5e2..1253698c88317b0fd4a9daab33e4f8c132d14e15 100644 (file)
@@ -50,8 +50,6 @@
 
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID            1
 #define CONFIG_SYS_SCSI_MAX_LUN                        1
-#define CONFIG_SYS_SCSI_MAX_DEVICE             (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-                                               CONFIG_SYS_SCSI_MAX_LUN)
 
 #if !defined(CONFIG_FSL_QSPI) || defined(CONFIG_TFABOOT)
 
index 26e4e7b7b69873dbaff4d37bf4f18bd621233916..eb88a572e73d6d67d58d5627d6ef1ee850c044d2 100644 (file)
 #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_SCSI_MAX_DEVICE     (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-                                       CONFIG_SYS_SCSI_MAX_LUN)
 #endif
 
 /* USB */
index e7f7e772fc72411ded85e7cac239ddc9f06821b4..c192512e85a97af4f31dd99911c475dca7f4ecf7 100644 (file)
@@ -57,8 +57,6 @@
 
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    2
 #define CONFIG_SYS_SCSI_MAX_LUN                1
-#define CONFIG_SYS_SCSI_MAX_DEVICE     (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-                                        CONFIG_SYS_SCSI_MAX_LUN)
 
 #define BOOT_TARGET_DEVICES(func) \
        func(MMC, mmc, 1) \
index ac0fdddbd94d894d00af55a927cb24da9a981fd0..6a113ec214569a468772d0aa82e2aaa30f17d39f 100644 (file)
@@ -52,8 +52,6 @@
 
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    2
 #define CONFIG_SYS_SCSI_MAX_LUN                1
-#define CONFIG_SYS_SCSI_MAX_DEVICE     (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-                                        CONFIG_SYS_SCSI_MAX_LUN)
 
 /*
  * PCI configuration
index 188ab0bf365daceec926959d0673ca55a1365bf0..e9a9d50db1d1e381fe266d95164882f1446ece4b 100644 (file)
@@ -52,7 +52,5 @@
 #define CONFIG_SCSI_AHCI_PLAT
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    1
 #define CONFIG_SYS_SCSI_MAX_LUN                1
-#define CONFIG_SYS_SCSI_MAX_DEVICE     (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
-                                               CONFIG_SYS_SCSI_MAX_LUN)
 
 #endif /* __CONFIG_OMAP5_EVM_H */
index 86b93bcbe7048f4e6e64bbb53dcb4a1e89133733..a352d6e0687e6916ff4bfd2999992f24eda387c0 100644 (file)
@@ -30,7 +30,6 @@
 #endif
 
 #define CONFIG_SCSI_AHCI_PLAT
-#define CONFIG_SYS_SCSI_MAX_DEVICE     2
 #define CONFIG_SYS_SCSI_MAX_SCSI_ID    8
 #define CONFIG_SYS_SCSI_MAX_LUN                4
 
index 66a2caa26e3b3c814d95fd6447486bd86e0662f5..b47c7463c1d6a7774de81542651213e2f49f8d43 100644 (file)
@@ -9,6 +9,10 @@
 #include <asm/cache.h>
 #include <linux/dma-direction.h>
 
+/* Fix this to the maximum */
+#define SCSI_MAX_DEVICE \
+       (CONFIG_SYS_SCSI_MAX_SCSI_ID * CONFIG_SYS_SCSI_MAX_LUN)
+
 struct udevice;
 
 struct scsi_cmd {
index 3d79f7834c883e64b9a696461c8b2f7b300fb9e0..7d8829e9c025c2b44e136b097fec994b22bc4848 100644 (file)
@@ -1854,7 +1854,6 @@ CONFIG_SYS_SCCR_TSEC1CM
 CONFIG_SYS_SCCR_TSEC2CM
 CONFIG_SYS_SCCR_USBDRCM
 CONFIG_SYS_SCR
-CONFIG_SYS_SCSI_MAX_DEVICE
 CONFIG_SYS_SCSI_MAX_LUN
 CONFIG_SYS_SCSI_MAX_SCSI_ID
 CONFIG_SYS_SDRAM