Skip to contentSkip to conversation

arm: mvebu: correct SPL boot configs for SPI/MMC

PATCH New Joel Johnson 3 participants 7 messages Apr 17, 2020 – Apr 22, 2020 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 arm: mvebu: correct SPL boot configs for SPI/MMC

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.

---

This patch unifies two patches from a prior ClearFog specific series which caused issues when building for most other mvebu boards. Now build and config diff tested for all arm and aarch64 mvebu boards!

The only substantive changes end up being the SPL dependency for boot selection, along with defconfig cleanups with Kconfig consolidated boot dependent values.

The superfluous addition of SPL_MTD_SUPPORT present in the prior patch for SPI booting was also removed.

---
 arch/arm/mach-mvebu/Kconfig         | 12 ++++++++++++
 configs/clearfog_defconfig          |  3 ---
 configs/controlcenterdc_defconfig   |  4 ----
 configs/db-88f6720_defconfig        |  4 ----
 configs/db-88f6820-amc_defconfig    |  4 ----
 configs/db-88f6820-gp_defconfig     |  4 ----
 configs/db-mv784mp-gp_defconfig     |  3 ---
 configs/ds414_defconfig             |  3 ---
 configs/helios4_defconfig           |  1 -
 configs/maxbcm_defconfig            |  3 ---
 configs/theadorable_debug_defconfig |  3 ---
 configs/turris_omnia_defconfig      |  4 ----
 configs/x530_defconfig              |  4 ----
 include/configs/helios4.h           |  5 -----
 14 files changed, 12 insertions(+), 45 deletions(-)
arch/arm/mach-mvebu/Kconfig +12 -0
index 161dee937f..645990b3ef 100644
@@ -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"
configs/clearfog_defconfig +0 -3
index 6db8b8acf6..ada35cb53b 100644
@@ -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
configs/controlcenterdc_defconfig +0 -4
index 51126cbdc3..524dbc2b39 100644
@@ -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
configs/db-88f6720_defconfig +0 -4
index 42c427b792..068f76bbe4 100644
@@ -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
configs/db-88f6820-amc_defconfig +0 -4
index 5bf9eb66ad..e231ca4673 100644
@@ -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
configs/db-88f6820-gp_defconfig +0 -4
index 7e3ee5ec1c..c866131025 100644
@@ -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
configs/db-mv784mp-gp_defconfig +0 -3
index d3a0d0020a..012149a860 100644
@@ -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
configs/ds414_defconfig +0 -3
index 435c896e41..01a3909c8c 100644
@@ -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
configs/helios4_defconfig +0 -1
index 1b8d130ebc..0fe8559507 100644
@@ -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
configs/maxbcm_defconfig +0 -3
index 60a87edac0..9cc9d66393 100644
@@ -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
configs/theadorable_debug_defconfig +0 -3
index fb12e841cb..616c07ab54 100644
@@ -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
configs/turris_omnia_defconfig +0 -4
index f3ed9917d5..29c49686e2 100644
@@ -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
configs/x530_defconfig +0 -4
index a15b0b46b4..c49211df95 100644
@@ -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
include/configs/helios4.h +0 -5
index 5a4c9ae066..af595bc7bc 100644
@@ -93,16 +93,11 @@
 #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
Signature · 1 line
2.26.1
#1 lore raw

PATCH 2/2 arm: mvebu: Enable helios4 opt-out of SPL GPIO

Change the SPL boot selection of MMC from a hard selection of GPIO to a softer imply and opt-out of GPIO support for helios4. This preserves the previous GPIO-less configuration.

---

Aditya Prayoga - if you object to the addition of GPIO to the helios4
SPL, I'd be interested in your thoughts on this option

This is an exploratory commit of a viable approach to retain the identical current helios4 current configuration. I think it's not worth it and shouldn't be applied since helios4 uses default MMC boot and there is sufficient space for the SPL image, but is a viable option depending on the opinion of helios4 interested maintainers.

---
 arch/arm/mach-mvebu/Kconfig | 6 +++---
 configs/helios4_defconfig   | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)
arch/arm/mach-mvebu/Kconfig +3 -3
index 645990b3ef..af30d71cc6 100644
@@ -245,12 +245,12 @@ config MVEBU_SPL_BOOT_DEVICE_SPI
 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
+	# GPIO often needed for eMMC/SD card presence detection
+	imply SPL_DM_GPIO
+	imply SPL_GPIO_SUPPORT
 
 config MVEBU_SPL_BOOT_DEVICE_SATA
 	bool "SATA"
configs/helios4_defconfig +1 -0
index 0fe8559507..3630a004bd 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_CPU_INIT=y
 CONFIG_ARCH_MVEBU=y
 CONFIG_SYS_TEXT_BASE=0x00800000
+# CONFIG_SPL_GPIO_SUPPORT is not set
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
Signature · 1 line
2.26.1
#2 lore raw

PATCH 2/2 arm: mvebu: Enable helios4 opt-out of SPL GPIO

Quoted 5 lines · Joel Johnson

Change the SPL boot selection of MMC from a hard selection of GPIO to a softer imply and opt-out of GPIO support for helios4. This preserves the previous GPIO-less configuration.

Doesn't patch 1/2 generate a compile error (at least warning) on helios4? If yes, then please squash both patches together to preserve git bisect-ablility.

Thanks,
Stefan

Quoted 43 lines

---

Aditya Prayoga - if you object to the addition of GPIO to the helios4
SPL, I'd be interested in your thoughts on this option

This is an exploratory commit of a viable approach to retain the identical current helios4 current configuration. I think it's not worth it and shouldn't be applied since helios4 uses default MMC boot and there is sufficient space for the SPL image, but is a viable option depending on the opinion of helios4 interested maintainers.

---
  arch/arm/mach-mvebu/Kconfig | 6 +++---
  configs/helios4_defconfig   | 1 +
  2 files changed, 4 insertions(+), 3 deletions(-)
arch/arm/mach-mvebu/Kconfig +3 -3
index 645990b3ef..af30d71cc6 100644
@@ -245,12 +245,12 @@ config MVEBU_SPL_BOOT_DEVICE_SPI
  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
+	# GPIO often needed for eMMC/SD card presence detection
+	imply SPL_DM_GPIO
+	imply SPL_GPIO_SUPPORT
 
  config MVEBU_SPL_BOOT_DEVICE_SATA
  	bool "SATA"
configs/helios4_defconfig +0 -0
index 0fe8559507..3630a004bd 100644

configs/helios4_defconfig CONFIG_ARM=y · line 8

Quoted 7 lines
configs/helios4_defconfig +1 -0
@@ -2,6 +2,7 @@ CONFIG_ARM=y
  CONFIG_ARCH_CPU_INIT=y
  CONFIG_ARCH_MVEBU=y
  CONFIG_SYS_TEXT_BASE=0x00800000
+# CONFIG_SPL_GPIO_SUPPORT is not set
  CONFIG_SPL_LIBCOMMON_SUPPORT=y
  CONFIG_SPL_LIBGENERIC_SUPPORT=y
  CONFIG_SYS_MALLOC_F_LEN=0x2000

Viele Gr??e,
Stefan

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de
#3 lore raw

PATCH 2/2 arm: mvebu: Enable helios4 opt-out of SPL GPIO

Quoted 5 lines · Stefan Roese
Quoted 4 lines · Joel Johnson

Change the SPL boot selection of MMC from a hard selection of GPIO to a softer imply and opt-out of GPIO support for helios4. This preserves the previous GPIO-less configuration.

Quoted 8 lines
Quoted 1 line

Doesn't patch 1/2 generate a compile error (at least warning) on helios4? If yes, then please squash both patches together to preserve git bisect-ablility.

Thanks,
Stefan

No, all mvebu targets build cleanly with just the first commit. My goal is to drop the second patch entirely and only have the first patch merged unless someone strongly objects.

The difference with helios4 is that it actually specifies MVEBU_SPL_BOOT_DEVICE_MMC explicitly and so takes that config path with the newly selected options. It is the only board besides ClearFog to do so, but I can only personally test with ClearFog hardware.

The only meaningful difference for helios4 is that the GPIO support is added where it wasn't included before, resulting in an increase of 2678 bytes in the SPL image. I don't see any way including GPIO support would or could cause harm, especially since the device tree includes the same gpio line for sdhci detection as ClearFog. I am however, open to and inviting clarification if helios4 has a problem with that. As far as I could tell, Aditya Prayoga is the most recent and most active helios4 contributor.

Concretely, the following is the buildman -sK -sS report for the series on helios4, showing config and resulting binary size differences.

01: Merge tag 'arc-fixes-for-2020.07-rc1' of
https://gitlab.denx.de/u-boot/custodians/u-boot-arc
arm: w+ helios4
02: arm: mvebu: correct SPL boot configs for SPI/MMC

        arm: (for 1/1 boards) spl/u-boot-spl:all +2678.0 
spl/u-boot-spl:data +144.0 spl/u-boot-spl:rodata +214.0 
spl/u-boot-spl:text +2320.0
             helios4        : spl/u-boot-spl:all +2678 

spl/u-boot-spl:data +144 spl/u-boot-spl:rodata +214 spl/u-boot-spl:text +2320
spl-u-boot-spl: add: 26/0, grow: 2/0 bytes: 2464/0 (2464)
function old new
delta
fdtdec_parse_phandle_with_args - 332
+332
static.gpio_request_tail - 200
+200
dm_gpio_request - 148
+148
dm_gpio_set_dir_flags - 136
+136
gpio_renumber - 132
+132
check_reserved - 116
+116
gpio_request_by_name - 112
+112
fdt_get_phandle - 112
+112
uclass_find_device_by_ofnode - 108
+108
ofnode_parse_phandle_with_args - 108
+108
fdt_node_offset_by_phandle - 96
+96
mvebu_gpio_probe - 76
+76
_u_boot_list_2_uclass_2_gpio - 76
+76
mvebu_gpio_direction_output - 72
+72
dm_gpio_get_value - 72
+72
gpio_xlate_offs_flags - 68
+68
_u_boot_list_2_driver_2_gpio_mvebu - 68
+68
mvebu_gpio_set_value - 56
+56
gpio_post_probe - 56
+56
fdtdec_get_int - 52
+52
uclass_get_device_by_ofnode - 48
+48
mvebu_gpio_get_function - 44
+44
mvebu_gpio_direction_input - 40
+40
sdhci_probe 336 372
+36
mvebu_gpio_get_value - 36
+36
sdhci_get_cd 96 128
+32
gpio_pre_remove - 24
+24
gpio_post_bind - 8
+8
arm:
+ u-boot.cfg: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
+ u-boot-spl.cfg: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
+ all: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
helios4 :
+ u-boot.cfg: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
+ u-boot-spl.cfg: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
+ all: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
03: [WIP] arm: mvebu: Enable helios4 opt-out of SPL GPIO

        arm: (for 1/1 boards) spl/u-boot-spl:all -2678.0 
spl/u-boot-spl:data -144.0 spl/u-boot-spl:rodata -214.0 
spl/u-boot-spl:text -2320.0
             helios4        : spl/u-boot-spl:all -2678 

spl/u-boot-spl:data -144 spl/u-boot-spl:rodata -214 spl/u-boot-spl:text -2320
arm:
- u-boot.cfg: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
- u-boot-spl.cfg: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
- all: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
helios4 :
- u-boot.cfg: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
- u-boot-spl.cfg: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
- all: CONFIG_SPL_DM_GPIO=1 CONFIG_SPL_GPIO_SUPPORT=1
Joel

Quoted 11 lines
Quoted 11 lines

Aditya Prayoga - if you object to the addition of GPIO to the helios4
SPL, I'd be interested in your thoughts on this
option

This is an exploratory commit of a viable approach to retain the identical current helios4 current configuration. I think it's not worth
it and shouldn't be applied since helios4 uses default MMC boot and there is sufficient space for the SPL image, but is a viable option depending on the opinion of helios4 interested maintainers.

A message that is not in the archive (sent off-list or not yet received): CAABkxwuN=K=BUCfY+g3otbRj1h5DYnHVtr-WB79ZLXJucTWG1Q@mail.gmail.com

#5 lore raw

PATCH 1/2 arm: mvebu: correct SPL boot configs for SPI/MMC

resending from a different email address as Gmail rejected my first attempt to send

Quoted 420 lines · Dennis Gilmore
Quoted 16 lines · Joel Johnson

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.

Quoted 8 lines

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.

Currently, SPL does not find u-boot.bin on the helios4, I am working on syncing all of the changes done to clearfog to the helios4, generally speaking, any change made to clearfog needs to also, be made for the helios4 as they have the same SOM. the differences being in changes for the carrier board.

Dennis

Quoted 385 lines

Tested on SolidRun ClearFog devices.

---

This patch unifies two patches from a prior ClearFog specific series which caused issues when building for most other mvebu boards. Now build and config diff tested for all arm and aarch64 mvebu boards!

The only substantive changes end up being the SPL dependency for boot selection, along with defconfig cleanups with Kconfig consolidated boot dependent values.

The superfluous addition of SPL_MTD_SUPPORT present in the prior patch for SPI booting was also removed.

---
 arch/arm/mach-mvebu/Kconfig         | 12 ++++++++++++
 configs/clearfog_defconfig          |  3 ---
 configs/controlcenterdc_defconfig   |  4 ----
 configs/db-88f6720_defconfig        |  4 ----
 configs/db-88f6820-amc_defconfig    |  4 ----
 configs/db-88f6820-gp_defconfig     |  4 ----
 configs/db-mv784mp-gp_defconfig     |  3 ---
 configs/ds414_defconfig             |  3 ---
 configs/helios4_defconfig           |  1 -
 configs/maxbcm_defconfig            |  3 ---
 configs/theadorable_debug_defconfig |  3 ---
 configs/turris_omnia_defconfig      |  4 ----
 configs/x530_defconfig              |  4 ----
 include/configs/helios4.h           |  5 -----
 14 files changed, 12 insertions(+), 45 deletions(-)
arch/arm/mach-mvebu/Kconfig +12 -0
index 161dee937f..645990b3ef 100644
@@ -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"
configs/clearfog_defconfig +0 -3
index 6db8b8acf6..ada35cb53b 100644
@@ -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
configs/controlcenterdc_defconfig +0 -4
index 51126cbdc3..524dbc2b39 100644
@@ -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
configs/db-88f6720_defconfig +0 -4
index 42c427b792..068f76bbe4 100644
@@ -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
configs/db-88f6820-amc_defconfig +0 -4
index 5bf9eb66ad..e231ca4673 100644
@@ -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
configs/db-88f6820-gp_defconfig +0 -4
index 7e3ee5ec1c..c866131025 100644
@@ -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
configs/db-mv784mp-gp_defconfig +0 -3
index d3a0d0020a..012149a860 100644
@@ -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
configs/ds414_defconfig +0 -3
index 435c896e41..01a3909c8c 100644
@@ -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
configs/helios4_defconfig +0 -1
index 1b8d130ebc..0fe8559507 100644
@@ -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
configs/maxbcm_defconfig +0 -3
index 60a87edac0..9cc9d66393 100644
@@ -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
configs/theadorable_debug_defconfig +0 -3
index fb12e841cb..616c07ab54 100644
@@ -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
configs/turris_omnia_defconfig +0 -4
index f3ed9917d5..29c49686e2 100644
@@ -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
configs/x530_defconfig +0 -4
index a15b0b46b4..c49211df95 100644
@@ -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
include/configs/helios4.h +0 -6
index 5a4c9ae066..af595bc7bc 100644
@@ -93,16 +93,11 @@
 #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
--

2.26.1

#6 lore raw

PATCH 1/2 arm: mvebu: correct SPL boot configs for SPI/MMC

Quoted 29 lines · Dennis Gilmore
Quoted 27 lines · Dennis Gilmore
Quoted 24 lines · Joel Johnson

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.

Quoted 7 lines
Quoted 7 lines

Currently, SPL does not find u-boot.bin on the helios4, I am working on syncing all of the changes done to clearfog to the helios4, generally speaking, any change made to clearfog needs to also, be made for the helios4 as they have the same SOM. the differences being in changes for the carrier board.

Dennis

Great, thanks for the update and confirmation!

Stefan - in this case, I'd encourage that only the first commit of this series be merged and drop the second patch entirely.

Joel

#7 lore raw

PATCH 1/2 arm: mvebu: correct SPL boot configs for SPI/MMC

In reply to Joel Johnson
Quoted 24 lines · Joel Johnson

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.

Quoted 3 lines

Tested on SolidRun ClearFog devices.

Thanks,
Stefan

Quoted 369 lines

---

This patch unifies two patches from a prior ClearFog specific series which caused issues when building for most other mvebu boards. Now build and config diff tested for all arm and aarch64 mvebu boards!

The only substantive changes end up being the SPL dependency for boot selection, along with defconfig cleanups with Kconfig consolidated boot dependent values.

The superfluous addition of SPL_MTD_SUPPORT present in the prior patch for SPI booting was also removed.

---
  arch/arm/mach-mvebu/Kconfig         | 12 ++++++++++++
  configs/clearfog_defconfig          |  3 ---
  configs/controlcenterdc_defconfig   |  4 ----
  configs/db-88f6720_defconfig        |  4 ----
  configs/db-88f6820-amc_defconfig    |  4 ----
  configs/db-88f6820-gp_defconfig     |  4 ----
  configs/db-mv784mp-gp_defconfig     |  3 ---
  configs/ds414_defconfig             |  3 ---
  configs/helios4_defconfig           |  1 -
  configs/maxbcm_defconfig            |  3 ---
  configs/theadorable_debug_defconfig |  3 ---
  configs/turris_omnia_defconfig      |  4 ----
  configs/x530_defconfig              |  4 ----
  include/configs/helios4.h           |  5 -----
  14 files changed, 12 insertions(+), 45 deletions(-)
arch/arm/mach-mvebu/Kconfig +12 -0
index 161dee937f..645990b3ef 100644
@@ -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"
configs/clearfog_defconfig +0 -3
index 6db8b8acf6..ada35cb53b 100644
@@ -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
configs/controlcenterdc_defconfig +0 -4
index 51126cbdc3..524dbc2b39 100644
@@ -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
configs/db-88f6720_defconfig +0 -4
index 42c427b792..068f76bbe4 100644
@@ -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
configs/db-88f6820-amc_defconfig +0 -4
index 5bf9eb66ad..e231ca4673 100644
@@ -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
configs/db-88f6820-gp_defconfig +0 -4
index 7e3ee5ec1c..c866131025 100644
@@ -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
configs/db-mv784mp-gp_defconfig +0 -3
index d3a0d0020a..012149a860 100644
@@ -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
configs/ds414_defconfig +0 -3
index 435c896e41..01a3909c8c 100644
@@ -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
configs/helios4_defconfig +0 -1
index 1b8d130ebc..0fe8559507 100644
@@ -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
configs/maxbcm_defconfig +0 -3
index 60a87edac0..9cc9d66393 100644
@@ -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
configs/theadorable_debug_defconfig +0 -3
index fb12e841cb..616c07ab54 100644
@@ -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
configs/turris_omnia_defconfig +0 -4
index f3ed9917d5..29c49686e2 100644
@@ -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
configs/x530_defconfig +0 -4
index a15b0b46b4..c49211df95 100644
@@ -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
include/configs/helios4.h +0 -3
index 5a4c9ae066..af595bc7bc 100644
@@ -93,16 +93,11 @@
  #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

include/configs/helios4.h line 103

Quoted 10 lines
include/configs/helios4.h +0 -2
-#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

Viele Gr??e,
Stefan

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de