]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sandbox: Drop CONFIG_HOST_MAX_DEVICES
authorSimon Glass <sjg@chromium.org>
Wed, 24 Nov 2021 16:26:40 +0000 (09:26 -0700)
committerSimon Glass <sjg@chromium.org>
Sun, 5 Dec 2021 16:23:15 +0000 (09:23 -0700)
This can go in the related header file. Drop the CONFIG option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
cmd/host.c
drivers/block/sandbox.c
include/configs/sandbox.h
include/sandboxblockdev.h
scripts/config_whitelist.txt

index 2e998abbcdca35371f765b6ee4e825bdf8f0d675..f0d989ac0f9e914f5da16f1eeb91e09aff78d56a 100644 (file)
@@ -78,7 +78,7 @@ static int do_host_info(struct cmd_tbl *cmdtp, int flag, int argc,
        if (argc < 1 || argc > 2)
                return CMD_RET_USAGE;
        int min_dev = 0;
-       int max_dev = CONFIG_HOST_MAX_DEVICES - 1;
+       int max_dev = SANDBOX_HOST_MAX_DEVICES - 1;
        if (argc >= 2) {
                char *ep;
                char *dev_str = argv[1];
index 1c2c3b4f886edc214cb2a5283a027321d02b48b6..53925ce9b6921da543eb06baec519edf61db9df8 100644 (file)
 DECLARE_GLOBAL_DATA_PTR;
 
 #ifndef CONFIG_BLK
-static struct host_block_dev host_devices[CONFIG_HOST_MAX_DEVICES];
+static struct host_block_dev host_devices[SANDBOX_HOST_MAX_DEVICES];
 
 static struct host_block_dev *find_host_device(int dev)
 {
-       if (dev >= 0 && dev < CONFIG_HOST_MAX_DEVICES)
+       if (dev >= 0 && dev < SANDBOX_HOST_MAX_DEVICES)
                return &host_devices[dev];
 
        return NULL;
@@ -259,7 +259,7 @@ U_BOOT_DRIVER(sandbox_host_blk) = {
 U_BOOT_LEGACY_BLK(sandbox_host) = {
        .if_typename    = "host",
        .if_type        = IF_TYPE_HOST,
-       .max_devs       = CONFIG_HOST_MAX_DEVICES,
+       .max_devs       = SANDBOX_HOST_MAX_DEVICES,
        .get_dev        = host_get_dev_err,
 };
 #endif
index cc3a7ff05e4338a62245d242ce834905cb5a170d..b1689d39f1178ee68c2db9fd050a2b278b8d883a 100644 (file)
@@ -14,8 +14,6 @@
 #define CONFIG_SYS_TIMER_RATE          1000000
 #endif
 
-#define CONFIG_HOST_MAX_DEVICES 4
-
 #define CONFIG_MALLOC_F_ADDR           0x0010000
 
 #define CONFIG_SYS_CBSIZE              1024    /* Console I/O Buffer Size */
index 4006e942a028c2d15022ad8bb05c22886c75e28d..4ca9554e38a0354ac17d3b8d57c35dd20ace6595 100644 (file)
@@ -6,6 +6,9 @@
 #ifndef __SANDBOX_BLOCK_DEV__
 #define __SANDBOX_BLOCK_DEV__
 
+/* Maximum number of host devices - see drivers/block/sandbox.c */
+#define SANDBOX_HOST_MAX_DEVICES       4
+
 struct host_block_dev {
 #ifndef CONFIG_BLK
        struct blk_desc blk_dev;
index e2cf73cc053e30fcdc2b6eb6c7f400526119066c..e012dbc3b70fc7d5ad6bf4cdbad7b6a1f38cc86d 100644 (file)
@@ -440,7 +440,6 @@ CONFIG_HIDE_LOGO_VERSION
 CONFIG_HIKEY_GPIO
 CONFIG_HITACHI_SX14
 CONFIG_HOSTNAME
-CONFIG_HOST_MAX_DEVICES
 CONFIG_HPS_ALTERAGRP_DBGATCLK
 CONFIG_HPS_ALTERAGRP_MAINCLK
 CONFIG_HPS_ALTERAGRP_MPUCLK