arm: mvebu: correct SPL boot configs for SPI/MMC
authorJoel Johnson <mrjoel@lixil.net>
Fri, 17 Apr 2020 07:19:05 +0000 (01:19 -0600)
committerStefan Roese <sr@denx.de>
Wed, 22 Apr 2020 12:28:15 +0000 (14:28 +0200)
Update mvebu SPL boot selection mechanism for the move to driver model
usage by ensuring that the required driver support for SPI and MMC
booting is available in SPL when the respective boot method is
selected.

Previously, all mvebu boards selected a boot method (implicitly
MVEBU_SPL_BOOT_DEVICE_SPI for many) even if SPL booting wasn't used.
This changes mvebu boot method selection to depend on SPL usage which
resolves the issue with aarch64 boards which don't use SPL getting an
implicit boot device selection resulting in unmet dependencies. The
32-bit arm boards do use SPL, but I'm led to conclude that most aren't
intentionally using the MVEBU_SPL_BOOT_DEVICE selection since none have
SPL_DM_SPI enabled in their defconfig even though they still implicitly
select the SPI boot method.

This also results in the new addition of SPL_GPIO_SUPPORT to helios4.
The mainline dts for helios4 includes the cd-gpios entry for sdhci with
identical addresses as the clearfog dts. I don't have a helios4 board
to confirm, but based on the current source conclude that the board
itself is either wired to pull the signal low for eMMC, or the default
MMC boot isn't fully functional in mainline. In either case, as far as
I can tell, including the GPIO support will at least cause no
regression.

Tested on SolidRun ClearFog devices.

Signed-off-by: Joel Johnson <mrjoel@lixil.net>
Reviewed-by: Stefan Roese <sr@denx.de>
14 files changed:
arch/arm/mach-mvebu/Kconfig
configs/clearfog_defconfig
configs/controlcenterdc_defconfig
configs/db-88f6720_defconfig
configs/db-88f6820-amc_defconfig
configs/db-88f6820-gp_defconfig
configs/db-mv784mp-gp_defconfig
configs/ds414_defconfig
configs/helios4_defconfig
configs/maxbcm_defconfig
configs/theadorable_debug_defconfig
configs/turris_omnia_defconfig
configs/x530_defconfig
include/configs/helios4.h

index 161dee937fa04ae4e5d3e684c31117c03ca80eb7..645990b3ef066e7c8769fb95a8996f6294833a18 100644 (file)
@@ -232,13 +232,25 @@ config SYS_SOC
 
 choice
        prompt "Boot method"
+       depends on SPL
 
 config MVEBU_SPL_BOOT_DEVICE_SPI
        bool "SPI NOR flash"
+       imply ENV_IS_IN_SPI_FLASH
+       select SPL_DM_SPI
+       select SPL_SPI_FLASH_SUPPORT
+       select SPL_SPI_LOAD
+       select SPL_SPI_SUPPORT
 
 config MVEBU_SPL_BOOT_DEVICE_MMC
        bool "SDIO/MMC card"
+       imply ENV_IS_IN_MMC
+       # GPIO needed for eMMC/SD card presence detection
+       select SPL_DM_GPIO
+       select SPL_DM_MMC
+       select SPL_GPIO_SUPPORT
        select SPL_LIBDISK_SUPPORT
+       select SPL_MMC_SUPPORT
 
 config MVEBU_SPL_BOOT_DEVICE_SATA
        bool "SATA"
index 6db8b8acf662d1644d6aa724a7f52c76f83e98f6..ada35cb53bae765edd56215faecd9fd704d0bc7d 100644 (file)
@@ -3,14 +3,12 @@ CONFIG_ARCH_CPU_INIT=y
 CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_TEXT_BASE=0x00800000
-CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_CLEARFOG=y
 CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC=y
 CONFIG_DM_GPIO=y
-CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_NR_DRAM_BANKS=2
 CONFIG_SPL=y
@@ -42,7 +40,6 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_TIME=y
 # CONFIG_SPL_PARTITION_UUIDS is not set
 CONFIG_DEFAULT_DEVICE_TREE="armada-388-clearfog"
-CONFIG_ENV_IS_IN_MMC=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_AHCI_MVEBU=y
index 51126cbdc371dae620110ced8cb1d8874f7a6cdc..524dbc2b39b52c44b36ab457d92abd5e475344a5 100644 (file)
@@ -14,8 +14,6 @@ CONFIG_NR_DRAM_BANKS=2
 CONFIG_SPL=y
 CONFIG_DEBUG_UART_BASE=0xd0012000
 CONFIG_DEBUG_UART_CLOCK=250000000
-CONFIG_SPL_SPI_FLASH_SUPPORT=y
-CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_DEBUG_UART=y
 CONFIG_AHCI=y
 CONFIG_SPL_TEXT_BASE=0x40000030
@@ -28,7 +26,6 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_LAST_STAGE_INIT=y
 CONFIG_SPL_BOARD_INIT=y
 CONFIG_SPL_SYS_MALLOC_SIMPLE=y
-CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x30000
 CONFIG_HUSH_PARSER=y
 # CONFIG_CMD_ELF is not set
@@ -50,7 +47,6 @@ CONFIG_CMD_EXT4=y
 CONFIG_EFI_PARTITION=y
 CONFIG_OF_BOARD_FIXUP=y
 CONFIG_DEFAULT_DEVICE_TREE="armada-38x-controlcenterdc"
-CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_USE_ENV_SPI_MAX_HZ=y
 CONFIG_ENV_SPI_MAX_HZ=50000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
index 42c427b792002ff8c4496e703dd6b31311fd9dcf..068f76bbe466dc1ca12e9ca911ba3e9f90779a8c 100644 (file)
@@ -14,8 +14,6 @@ CONFIG_NR_DRAM_BANKS=2
 CONFIG_SPL=y
 CONFIG_DEBUG_UART_BASE=0xf1012000
 CONFIG_DEBUG_UART_CLOCK=250000000
-CONFIG_SPL_SPI_FLASH_SUPPORT=y
-CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_DEBUG_UART=y
 CONFIG_SPL_TEXT_BASE=0x40004030
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
@@ -25,7 +23,6 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_I2C_SUPPORT=y
-CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000
 CONFIG_CMD_I2C=y
 CONFIG_CMD_SPI=y
@@ -43,7 +40,6 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 # CONFIG_DOS_PARTITION is not set
 CONFIG_DEFAULT_DEVICE_TREE="armada-375-db"
-CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_USE_ENV_SPI_MAX_HZ=y
 CONFIG_ENV_SPI_MAX_HZ=50000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
index 5bf9eb66ad2274011237dd35a2f06ec7a1d3d4c3..e231ca4673b41aee2243582a0316cb9be1599b9a 100644 (file)
@@ -14,8 +14,6 @@ CONFIG_NR_DRAM_BANKS=2
 CONFIG_SPL=y
 CONFIG_DEBUG_UART_BASE=0xd0012000
 CONFIG_DEBUG_UART_CLOCK=200000000
-CONFIG_SPL_SPI_FLASH_SUPPORT=y
-CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_DEBUG_UART=y
 CONFIG_SPL_TEXT_BASE=0x40000030
 CONFIG_FIT=y
@@ -26,7 +24,6 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_I2C_SUPPORT=y
-CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x24000
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_I2C=y
@@ -48,7 +45,6 @@ CONFIG_EFI_PARTITION=y
 # CONFIG_PARTITION_UUIDS is not set
 # CONFIG_SPL_PARTITION_UUIDS is not set
 CONFIG_DEFAULT_DEVICE_TREE="armada-385-db-88f6820-amc"
-CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_USE_ENV_SPI_MAX_HZ=y
 CONFIG_ENV_SPI_MAX_HZ=50000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
index 7e3ee5ec1cf7d7043e67f44162597f5780287b8d..c86613102580993d264ad918b8f28dec0ff2f62a 100644 (file)
@@ -14,8 +14,6 @@ CONFIG_NR_DRAM_BANKS=2
 CONFIG_SPL=y
 CONFIG_DEBUG_UART_BASE=0xd0012000
 CONFIG_DEBUG_UART_CLOCK=250000000
-CONFIG_SPL_SPI_FLASH_SUPPORT=y
-CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_DEBUG_UART=y
 CONFIG_AHCI=y
 CONFIG_SPL_TEXT_BASE=0x40000030
@@ -26,7 +24,6 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION=y
 CONFIG_SPL_I2C_SUPPORT=y
-CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x24000
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
@@ -48,7 +45,6 @@ CONFIG_EFI_PARTITION=y
 # CONFIG_PARTITION_UUIDS is not set
 # CONFIG_SPL_PARTITION_UUIDS is not set
 CONFIG_DEFAULT_DEVICE_TREE="armada-388-gp"
-CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_USE_ENV_SPI_MAX_HZ=y
 CONFIG_ENV_SPI_MAX_HZ=50000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
index d3a0d0020a9a95ac254321988a7b0b49053371f5..012149a8600348d49d63551b38621499d203aea0 100644 (file)
@@ -14,8 +14,6 @@ CONFIG_NR_DRAM_BANKS=2
 CONFIG_SPL=y
 CONFIG_DEBUG_UART_BASE=0xd0012000
 CONFIG_DEBUG_UART_CLOCK=250000000
-CONFIG_SPL_SPI_FLASH_SUPPORT=y
-CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_DEBUG_UART=y
 CONFIG_SPL_TEXT_BASE=0x40004030
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
@@ -25,7 +23,6 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_I2C_SUPPORT=y
-CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_I2C=y
index 435c896e413a6bf3249ae40bba7395594bd40e2e..01a3909c8c0bd4709d92ca16b8fda29f2c610f68 100644 (file)
@@ -14,8 +14,6 @@ CONFIG_NR_DRAM_BANKS=2
 CONFIG_SPL=y
 CONFIG_DEBUG_UART_BASE=0xd0012000
 CONFIG_DEBUG_UART_CLOCK=250000000
-CONFIG_SPL_SPI_FLASH_SUPPORT=y
-CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_DEBUG_UART=y
 CONFIG_SPL_TEXT_BASE=0x40004030
 CONFIG_BOOTDELAY=3
@@ -26,7 +24,6 @@ CONFIG_PREBOOT="usb start; sf probe"
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_I2C_SUPPORT=y
-CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x24000
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_I2C=y
index 1b8d130ebc09371b02548da96cb5cacf9ce62cd6..0fe85595071919c3ec3f2d7502f250bb23703926 100644 (file)
@@ -38,7 +38,6 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_TIME=y
 # CONFIG_SPL_PARTITION_UUIDS is not set
 CONFIG_DEFAULT_DEVICE_TREE="armada-388-helios4"
-CONFIG_ENV_IS_IN_MMC=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_SCSI_AHCI=y
index 60a87edac0936f42f92ca8c5420e8f86c1d33382..9cc9d663937944114f37266fdfa90126e5fb5ff1 100644 (file)
@@ -14,8 +14,6 @@ CONFIG_NR_DRAM_BANKS=2
 CONFIG_SPL=y
 CONFIG_DEBUG_UART_BASE=0xd0012000
 CONFIG_DEBUG_UART_CLOCK=250000000
-CONFIG_SPL_SPI_FLASH_SUPPORT=y
-CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_DEBUG_UART=y
 CONFIG_SPL_TEXT_BASE=0x40004030
 CONFIG_BOOTDELAY=3
@@ -24,7 +22,6 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_I2C_SUPPORT=y
-CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000
 CONFIG_CMD_I2C=y
 CONFIG_CMD_SPI=y
index fb12e841cb98bcb4fdef1d33fc86db9f5e3aee36..616c07ab54f3e168a5c733e7989b8f1f7f966d99 100644 (file)
@@ -15,8 +15,6 @@ CONFIG_NR_DRAM_BANKS=2
 CONFIG_SPL=y
 CONFIG_DEBUG_UART_BASE=0xd0012000
 CONFIG_DEBUG_UART_CLOCK=250000000
-CONFIG_SPL_SPI_FLASH_SUPPORT=y
-CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_DEBUG_UART=y
 CONFIG_SPL_TEXT_BASE=0x40004030
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
@@ -28,7 +26,6 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_I2C_SUPPORT=y
-CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x1a000
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
index f3ed9917d5e56f7b36f80c47667f7d220fb3642d..29c49686e2a86e7b431967c62a5b58b42ec47511 100644 (file)
@@ -17,8 +17,6 @@ CONFIG_NR_DRAM_BANKS=2
 CONFIG_SPL=y
 CONFIG_DEBUG_UART_BASE=0xd0012000
 CONFIG_DEBUG_UART_CLOCK=250000000
-CONFIG_SPL_SPI_FLASH_SUPPORT=y
-CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_DEBUG_UART=y
 CONFIG_AHCI=y
 CONFIG_SPL_TEXT_BASE=0x40000030
@@ -32,7 +30,6 @@ CONFIG_MISC_INIT_R=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_I2C_SUPPORT=y
-CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x24000
 CONFIG_CMD_MEMTEST=y
 CONFIG_SYS_ALT_MEMTEST=y
@@ -53,7 +50,6 @@ CONFIG_CMD_HASH=y
 CONFIG_CMD_BTRFS=y
 # CONFIG_SPL_PARTITION_UUIDS is not set
 CONFIG_DEFAULT_DEVICE_TREE="armada-385-turris-omnia"
-CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_USE_ENV_SPI_MAX_HZ=y
 CONFIG_ENV_SPI_MAX_HZ=50000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
index a15b0b46b47eab970f50b34d214818b98585ee3b..c49211df952f0d347cbb222b1b8e406ffce53567 100644 (file)
@@ -15,8 +15,6 @@ CONFIG_NR_DRAM_BANKS=2
 CONFIG_SPL=y
 CONFIG_DEBUG_UART_BASE=0xd0012000
 CONFIG_DEBUG_UART_CLOCK=250000000
-CONFIG_SPL_SPI_FLASH_SUPPORT=y
-CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_DEBUG_UART=y
 CONFIG_SPL_TEXT_BASE=0x40000030
 CONFIG_FIT=y
@@ -26,7 +24,6 @@ CONFIG_SILENT_U_BOOT_ONLY=y
 CONFIG_SILENT_CONSOLE_UPDATE_ON_RELOC=y
 CONFIG_MISC_INIT_R=y
 CONFIG_SPL_BOARD_INIT=y
-CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x24000
 CONFIG_SPL_WATCHDOG_SUPPORT=y
 CONFIG_CMD_MEMINFO=y
@@ -47,7 +44,6 @@ CONFIG_CMD_EXT4=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_DEFAULT_DEVICE_TREE="armada-385-atl-x530"
-CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_ENV_ADDR=0x100000
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_BLK=y
index 5a4c9ae066ebd821bf38234ea18a8659145a5a7a..af595bc7bcc054b9c1fbfeda763eb4c0b7b1daca 100644 (file)
 #define CONFIG_SPL_BOOTROM_SAVE                (CONFIG_SPL_STACK + 4)
 
 #if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SPI_NOR_FLASH
-/* SPL related SPI defines */
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
-#define CONFIG_SPL_SPI_LOAD
-#define CONFIG_SPL_SPI_SUPPORT
 #define CONFIG_SYS_U_BOOT_OFFS         CONFIG_SYS_SPI_U_BOOT_OFFS
 #endif
 
 #if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SDIO_MMC_CARD
 /* SPL related MMC defines */
-#define CONFIG_SPL_MMC_SUPPORT
 #define CONFIG_SYS_MMC_U_BOOT_OFFS             (160 << 10)
 #define CONFIG_SYS_U_BOOT_OFFS                 CONFIG_SYS_MMC_U_BOOT_OFFS
 #ifdef CONFIG_SPL_BUILD