Skip to content

Commit

Permalink
Convert CONFIG_SYS_MMC_MAX_DEVICE to Kconfig
Browse files Browse the repository at this point in the history
This converts the following to Kconfig:
   CONFIG_SYS_MMC_MAX_DEVICE

Signed-off-by: Tom Rini <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Jaehoon Chung <[email protected]>
  • Loading branch information
trini committed Nov 10, 2022
1 parent 75fc79e commit 9ba938e
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 40 deletions.
5 changes: 5 additions & 0 deletions api/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@ config API
help
This option enables the U-Boot API. See api/README for more information.

config SYS_MMC_MAX_DEVICE
int "Maximum number of MMC devices exposed via the API"
depends on API
default 1

endmenu
4 changes: 0 additions & 4 deletions api/api_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ struct stor_spec {

static struct stor_spec specs[ENUM_MAX] = { { 0, 0, 0, 0, NULL }, };

#ifndef CONFIG_SYS_MMC_MAX_DEVICE
#define CONFIG_SYS_MMC_MAX_DEVICE 1
#endif

void dev_stor_init(void)
{
#if defined(CONFIG_IDE)
Expand Down
18 changes: 0 additions & 18 deletions include/configs/am335x_evm.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,24 +192,6 @@
DFU_ALT_INFO_NAND
#endif

/*
* Default to using SPI for environment, etc.
* 0x000000 - 0x020000 : SPL (128KiB)
* 0x020000 - 0x0A0000 : U-Boot (512KiB)
* 0x0A0000 - 0x0BFFFF : First copy of U-Boot Environment (128KiB)
* 0x0C0000 - 0x0DFFFF : Second copy of U-Boot Environment (128KiB)
* 0x0E0000 - 0x442000 : Linux Kernel
* 0x442000 - 0x800000 : Userland
*/
#if defined(CONFIG_SPI_BOOT)
/* SPL related */
#elif defined(CONFIG_EMMC_BOOT)
#define CONFIG_SYS_MMC_MAX_DEVICE 2
#endif

/* Network. */
/* Enable Atheros phy driver */

/*
* NOR Size = 16 MiB
* Number of Sectors/Blocks = 128
Expand Down
3 changes: 0 additions & 3 deletions include/configs/stm32mp13_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
*/
#define CONFIG_SYS_BOOTMAPSZ SZ_256M

/*MMC SD*/
#define CONFIG_SYS_MMC_MAX_DEVICE 2

/* NAND support */

/*****************************************************************************/
Expand Down
3 changes: 0 additions & 3 deletions include/configs/stm32mp15_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
*/
#define CONFIG_SYS_BOOTMAPSZ SZ_256M

/*MMC SD*/
#define CONFIG_SYS_MMC_MAX_DEVICE 3

/* NAND support */

/* Ethernet need */
Expand Down
2 changes: 0 additions & 2 deletions include/configs/sunxi-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@
/* mmc config */
#define CONFIG_MMC_SUNXI_SLOT 0

#define CONFIG_SYS_MMC_MAX_DEVICE 4

/*
* Miscellaneous configurable options
*/
Expand Down
7 changes: 0 additions & 7 deletions include/configs/tegra-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@
*/
#define CONFIG_SYS_NS16550_CLK V_NS16550_CLK

/*
* Common HW configuration.
* If this varies between SoCs later, move to tegraNN-common.h
* Note: This is number of devices, not max device ID.
*/
#define CONFIG_SYS_MMC_MAX_DEVICE 4

#ifdef CONFIG_ARM64
#define FDTFILE "nvidia/" CONFIG_DEFAULT_DEVICE_TREE ".dtb"
#else
Expand Down
3 changes: 0 additions & 3 deletions include/configs/zynq-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,6 @@

/* Extend size of kernel image for uncompression */

/* Boot FreeBSD/vxWorks from an ELF image */
#define CONFIG_SYS_MMC_MAX_DEVICE 1

/* Address in RAM where the parameters must be copied by SPL. */

/* Not using MMC raw mode - just for compilation purpose */
Expand Down

0 comments on commit 9ba938e

Please sign in to comment.