summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2022-11-28 00:03:53 +0000
committerAndre Przywara <andre.przywara@arm.com>2022-12-14 22:31:06 +0000
commited82586c4054c62c35e119f4f0a14619f0ad6c2e (patch)
tree772f5812c7d2b42e63b2f6c3db3a42c81e90b721
parent705209a0957ffd9e0ad001d01cb2b468fb1b3347 (diff)
downloadu-boot-ed82586c4054c62c35e119f4f0a14619f0ad6c2e.tar.gz
u-boot-ed82586c4054c62c35e119f4f0a14619f0ad6c2e.tar.bz2
u-boot-ed82586c4054c62c35e119f4f0a14619f0ad6c2e.zip
sunxi: remove unused CONFIG_MMC_SUNXI_SLOT
There is a CONFIG_MMC_SUNXI_SLOT definition in our sunxi_common.h config header, which was used to note the first MMC controller to initialise. The definition in that header was always set to 0, with no easy way of overriding this, and certainly none of the existing boards made any use of that (non-)feature. Remove that definition and replace it with a constant 0 in the only user, in board.c. It turns out that this is safe, as this is only used in the SPL, and the BROM also unconditionally initialises MMC0. This also removes the last legacy config symbol with SUN*I in it from the whitelist. Reviewed-by: Samuel Holland <samuel@sholland.org> Tested-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-rw-r--r--board/sunxi/board.c9
-rw-r--r--include/configs/sunxi-common.h3
-rw-r--r--scripts/config_whitelist.txt1
3 files changed, 7 insertions, 6 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 21a2407e06..4d2491b5a8 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -525,9 +525,14 @@ static void mmc_pinmux_setup(int sdc)
int board_mmc_init(struct bd_info *bis)
{
+ /*
+ * The BROM always accesses MMC port 0 (typically an SD card), and
+ * most boards seem to have such a slot. The others haven't reported
+ * any problem with unconditionally enabling this in the SPL.
+ */
if (!IS_ENABLED(CONFIG_UART0_PORT_F)) {
- mmc_pinmux_setup(CONFIG_MMC_SUNXI_SLOT);
- if (!sunxi_mmc_init(CONFIG_MMC_SUNXI_SLOT))
+ mmc_pinmux_setup(0);
+ if (!sunxi_mmc_init(0))
return -1;
}
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 720768629d..e89ad42ce8 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -75,9 +75,6 @@
#define CONFIG_SYS_NAND_MAX_ECCPOS 1664
#endif
-/* mmc config */
-#define CONFIG_MMC_SUNXI_SLOT 0
-
/*
* Miscellaneous configurable options
*/
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index c0f55e41a5..ea71f9d234 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -153,7 +153,6 @@ CONFIG_MISC_COMMON
CONFIG_MIU_2BIT_21_7_INTERLEAVED
CONFIG_MIU_2BIT_INTERLEAVED
CONFIG_MMC_DEFAULT_DEV
-CONFIG_MMC_SUNXI_SLOT
CONFIG_MONITOR_IS_IN_RAM
CONFIG_MPC85XX_FEC
CONFIG_MPC85XX_FEC_NAME