[U-Boot] [PATCH 0/6] mvebu: allow selection of boot device

Currently the boot device that the generated .kwb image supports is statically set in two places. The BOOT_FROM directive in the per board kwbimage.cfg file, and the CONFIG_SPL_BOOT_DEVICE macro in the board config header file.
The gdsys Controlcenter DC supports build time generation of the kwbimage.cfg file which allows build time selection of the boot device.
This series extends the idea of kwbimage.cfg generation to all 32bit mvebu SoCs. In addition, this series makes Clearfog use the kconfig symbols alone for boot selection, so that no code modification is needed.
The first three patches are cleanup patches that should not change existing behavior.
The fourth patch extends the kwbimage.cfg build time generation support to all mvebu platforms.
The fifth patch adds support for boot from UART.
The last patch removes the static CONFIG_SPL_BOOT_DEVICE definition for Clearfog.
I tested this series on Clearfog Base, booting from SD card, SPI flash, and UART. I ran a number of build tests for other platforms. I would appreciate reports of run tests on affected platforms.
Baruch Siach (6): mvebu: turris_omnia: use u-boot-spl-dtb.bin mvebu: a38x: drop duplicate platform id symbols mvebu: consolidate SPL boot device config symbols mvebu: select boot device at SoC level mvebu: support UART boot image mvebu: clearfog: use kconfig symbols to select boot device
arch/arm/Kconfig | 1 - .../a38x => arch/arm/mach-mvebu}/.gitignore | 0 arch/arm/mach-mvebu/Kconfig | 17 +++++---- arch/arm/mach-mvebu/Makefile | 33 +++++++++++++++++ arch/arm/mach-mvebu/include/mach/config.h | 4 +-- .../arm/mach-mvebu}/kwbimage.cfg.in | 0 board/CZ.NIC/turris_omnia/kwbimage.cfg | 12 ------- board/Marvell/db-88f6720/kwbimage.cfg | 12 ------- board/Marvell/db-88f6820-amc/kwbimage.cfg | 12 ------- board/Marvell/db-88f6820-gp/kwbimage.cfg | 12 ------- board/Marvell/db-mv784mp-gp/kwbimage.cfg | 12 ------- board/Synology/ds414/kwbimage.cfg | 12 ------- board/gdsys/a38x/Kconfig | 36 ------------------- board/gdsys/a38x/Makefile | 31 ---------------- board/kobol/helios4/kwbimage.cfg | 13 ------- board/maxbcm/kwbimage.cfg | 12 ------- board/solidrun/clearfog/kwbimage.cfg | 12 ------- board/theadorable/kwbimage.cfg | 12 ------- configs/clearfog_defconfig | 2 +- configs/helios4_defconfig | 2 +- include/configs/clearfog.h | 16 ++------- include/configs/turris_omnia.h | 4 +-- 22 files changed, 51 insertions(+), 216 deletions(-) rename {board/gdsys/a38x => arch/arm/mach-mvebu}/.gitignore (100%) rename {board/gdsys/a38x => arch/arm/mach-mvebu}/kwbimage.cfg.in (100%) delete mode 100644 board/CZ.NIC/turris_omnia/kwbimage.cfg delete mode 100644 board/Marvell/db-88f6720/kwbimage.cfg delete mode 100644 board/Marvell/db-88f6820-amc/kwbimage.cfg delete mode 100644 board/Marvell/db-88f6820-gp/kwbimage.cfg delete mode 100644 board/Marvell/db-mv784mp-gp/kwbimage.cfg delete mode 100644 board/Synology/ds414/kwbimage.cfg delete mode 100644 board/gdsys/a38x/Kconfig delete mode 100644 board/kobol/helios4/kwbimage.cfg delete mode 100644 board/maxbcm/kwbimage.cfg delete mode 100644 board/solidrun/clearfog/kwbimage.cfg delete mode 100644 board/theadorable/kwbimage.cfg

u-boot-spl.bin and u-boot-spl-dtb.bin are identical when building the turris_omnia_defconfig. This commit makes Turris Omnia consistent with all other mvebu boards.
Signed-off-by: Baruch Siach baruch@tkos.co.il --- board/CZ.NIC/turris_omnia/kwbimage.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/CZ.NIC/turris_omnia/kwbimage.cfg b/board/CZ.NIC/turris_omnia/kwbimage.cfg index cc057925566c..1f748db37c1e 100644 --- a/board/CZ.NIC/turris_omnia/kwbimage.cfg +++ b/board/CZ.NIC/turris_omnia/kwbimage.cfg @@ -9,4 +9,4 @@ VERSION 1 BOOT_FROM spi
# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl.bin 0000005b 00000068 +BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068

Use generic mvebu Kconfig symbols like all other mvebu boards.
Signed-off-by: Baruch Siach baruch@tkos.co.il --- arch/arm/mach-mvebu/Kconfig | 3 +++ board/gdsys/a38x/Kconfig | 12 ------------ 2 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index 5415b5a7bfe2..9226511f7f91 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -148,6 +148,7 @@ config SYS_BOARD default "ds414" if TARGET_DS414 default "maxbcm" if TARGET_MAXBCM default "theadorable" if TARGET_THEADORABLE + default "a38x" if TARGET_CONTROLCENTERDC
config SYS_CONFIG_NAME default "clearfog" if TARGET_CLEARFOG @@ -163,6 +164,7 @@ config SYS_CONFIG_NAME default "theadorable" if TARGET_THEADORABLE default "turris_omnia" if TARGET_TURRIS_OMNIA default "turris_mox" if TARGET_TURRIS_MOX + default "controlcenterdc" if TARGET_CONTROLCENTERDC
config SYS_VENDOR default "Marvell" if TARGET_DB_MV784MP_GP @@ -176,6 +178,7 @@ config SYS_VENDOR default "Synology" if TARGET_DS414 default "CZ.NIC" if TARGET_TURRIS_OMNIA default "CZ.NIC" if TARGET_TURRIS_MOX + default "gdsys" if TARGET_CONTROLCENTERDC
config SYS_SOC default "mvebu" diff --git a/board/gdsys/a38x/Kconfig b/board/gdsys/a38x/Kconfig index 3fdef64b5927..ff11eb2371e8 100644 --- a/board/gdsys/a38x/Kconfig +++ b/board/gdsys/a38x/Kconfig @@ -1,17 +1,5 @@ if TARGET_CONTROLCENTERDC
-config SYS_BOARD - default "a38x" - -config SYS_VENDOR - default "gdsys" - -config SYS_SOC - default "mvebu" - -config SYS_CONFIG_NAME - default "controlcenterdc" - menu "Controlcenter DC board options"
choice

Use MVEBU_SPL_BOOT_DEVICE_* to select between SPI and MMC, instead of board specific symbols. This commit enables the boot device selection menu to all mvebu platforms, but it is only effective on Turris Omnia and gdsys Controlcenter DC platforms. A following commit will enable boot selection for other platforms.
Signed-off-by: Baruch Siach baruch@tkos.co.il --- arch/arm/Kconfig | 1 - arch/arm/mach-mvebu/Kconfig | 11 ++++------- board/gdsys/a38x/Kconfig | 24 ------------------------ board/gdsys/a38x/Makefile | 4 ++-- include/configs/turris_omnia.h | 4 ++-- 5 files changed, 8 insertions(+), 36 deletions(-) delete mode 100644 board/gdsys/a38x/Kconfig
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 22234cde2ab6..226ac9979207 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1419,7 +1419,6 @@ source "board/freescale/ls1012ardb/Kconfig" source "board/freescale/ls1012afrdm/Kconfig" source "board/freescale/mx35pdk/Kconfig" source "board/freescale/s32v234evb/Kconfig" -source "board/gdsys/a38x/Kconfig" source "board/grinn/chiliboard/Kconfig" source "board/gumstix/pepper/Kconfig" source "board/h2200/Kconfig" diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index 9226511f7f91..2ee01e9cff81 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -183,21 +183,18 @@ config SYS_VENDOR config SYS_SOC default "mvebu"
-if TARGET_TURRIS_OMNIA - choice - prompt "Turris Omnia boot method" + prompt "Boot method"
-config TURRIS_OMNIA_SPL_BOOT_DEVICE_SPI +config MVEBU_SPL_BOOT_DEVICE_SPI bool "SPI NOR flash"
-config TURRIS_OMNIA_SPL_BOOT_DEVICE_MMC +config MVEBU_SPL_BOOT_DEVICE_MMC bool "SDIO/MMC card" + select SPL_LIBDISK_SUPPORT
endchoice
-endif - config MVEBU_EFUSE bool "Enable eFuse support" default n diff --git a/board/gdsys/a38x/Kconfig b/board/gdsys/a38x/Kconfig deleted file mode 100644 index ff11eb2371e8..000000000000 --- a/board/gdsys/a38x/Kconfig +++ /dev/null @@ -1,24 +0,0 @@ -if TARGET_CONTROLCENTERDC - -menu "Controlcenter DC board options" - -choice - prompt "Select boot method" - -config SPL_BOOT_DEVICE_SPI - bool "SPI" - -config SPL_BOOT_DEVICE_MMC - bool "MMC" - select SPL_LIBDISK_SUPPORT - -endchoice - -#config SPL_BOOT_DEVICE -# int -# default 1 if SPL_BOOT_DEVICE_SPI -# default 2 if SPL_BOOT_DEVICE_MMC - -endmenu - -endif diff --git a/board/gdsys/a38x/Makefile b/board/gdsys/a38x/Makefile index 43fec2edbb29..18ecbe5e7979 100644 --- a/board/gdsys/a38x/Makefile +++ b/board/gdsys/a38x/Makefile @@ -13,10 +13,10 @@ obj-$(CONFIG_TARGET_CONTROLCENTERDC) += hydra.o ihs_phys.o extra-$(CONFIG_TARGET_CONTROLCENTERDC) += kwbimage.cfg
KWB_REPLACE += BOOT_FROM -ifneq ($(CONFIG_SPL_BOOT_DEVICE_SPI),) +ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI),) KWB_CFG_BOOT_FROM=spi endif -ifneq ($(CONFIG_SPL_BOOT_DEVICE_MMC),) +ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC),) KWB_CFG_BOOT_FROM=sdio endif
diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h index 9d4d0dfbb29f..44d5016fbf6f 100644 --- a/include/configs/turris_omnia.h +++ b/include/configs/turris_omnia.h @@ -93,13 +93,13 @@ #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4) #define CONFIG_SPL_DRIVERS_MISC_SUPPORT
-#ifdef CONFIG_TURRIS_OMNIA_SPL_BOOT_DEVICE_SPI +#ifdef CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI /* SPL related SPI defines */ # define CONFIG_SYS_SPI_U_BOOT_OFFS 0x24000 # define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_SPI_U_BOOT_OFFS #endif
-#ifdef CONFIG_TURRIS_OMNIA_SPL_BOOT_DEVICE_MMC +#ifdef CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC /* SPL related MMC defines */ # define CONFIG_SYS_MMC_U_BOOT_OFFS (160 << 10) # define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_MMC_U_BOOT_OFFS

Move the gdsys Controlcenter DC specific build time kwbimage.cfg generation code into the mach-mvebu/ directory to be shared by all 32bit mvebu platforms.
Remove board specific kwbimage.cfg files, and use the generated one instead. These files are all identical, with two exceptions. Clearfog and Helios4 use the sdio boot device, whereas all others use spi. Update the defconfigs for the exceptional boards to generate the same kwbimage.cfg as before.
Signed-off-by: Baruch Siach baruch@tkos.co.il --- .../a38x => arch/arm/mach-mvebu}/.gitignore | 0 arch/arm/mach-mvebu/Makefile | 30 ++++++++++++++++++ arch/arm/mach-mvebu/include/mach/config.h | 4 +-- .../arm/mach-mvebu}/kwbimage.cfg.in | 0 board/CZ.NIC/turris_omnia/kwbimage.cfg | 12 ------- board/Marvell/db-88f6720/kwbimage.cfg | 12 ------- board/Marvell/db-88f6820-amc/kwbimage.cfg | 12 ------- board/Marvell/db-88f6820-gp/kwbimage.cfg | 12 ------- board/Marvell/db-mv784mp-gp/kwbimage.cfg | 12 ------- board/Synology/ds414/kwbimage.cfg | 12 ------- board/gdsys/a38x/Makefile | 31 ------------------- board/kobol/helios4/kwbimage.cfg | 13 -------- board/maxbcm/kwbimage.cfg | 12 ------- board/solidrun/clearfog/kwbimage.cfg | 12 ------- board/theadorable/kwbimage.cfg | 12 ------- configs/clearfog_defconfig | 2 +- configs/helios4_defconfig | 2 +- 17 files changed, 34 insertions(+), 156 deletions(-) rename {board/gdsys/a38x => arch/arm/mach-mvebu}/.gitignore (100%) rename {board/gdsys/a38x => arch/arm/mach-mvebu}/kwbimage.cfg.in (100%) delete mode 100644 board/CZ.NIC/turris_omnia/kwbimage.cfg delete mode 100644 board/Marvell/db-88f6720/kwbimage.cfg delete mode 100644 board/Marvell/db-88f6820-amc/kwbimage.cfg delete mode 100644 board/Marvell/db-88f6820-gp/kwbimage.cfg delete mode 100644 board/Marvell/db-mv784mp-gp/kwbimage.cfg delete mode 100644 board/Synology/ds414/kwbimage.cfg delete mode 100644 board/kobol/helios4/kwbimage.cfg delete mode 100644 board/maxbcm/kwbimage.cfg delete mode 100644 board/solidrun/clearfog/kwbimage.cfg delete mode 100644 board/theadorable/kwbimage.cfg
diff --git a/board/gdsys/a38x/.gitignore b/arch/arm/mach-mvebu/.gitignore similarity index 100% rename from board/gdsys/a38x/.gitignore rename to arch/arm/mach-mvebu/.gitignore diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile index ade7b870646f..d907fac3752d 100644 --- a/arch/arm/mach-mvebu/Makefile +++ b/arch/arm/mach-mvebu/Makefile @@ -25,6 +25,36 @@ obj-$(CONFIG_ARMADA_375) += ../../../drivers/ddr/marvell/axp/xor.o obj-$(CONFIG_ARMADA_38X) += ../../../drivers/ddr/marvell/a38x/xor.o obj-$(CONFIG_ARMADA_XP) += ../../../drivers/ddr/marvell/axp/xor.o obj-$(CONFIG_MVEBU_EFUSE) += efuse.o + +extra-y += kwbimage.cfg + +KWB_REPLACE += BOOT_FROM +ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI),) + KWB_CFG_BOOT_FROM=spi +endif +ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC),) + KWB_CFG_BOOT_FROM=sdio +endif + +ifneq ($(CONFIG_SECURED_MODE_IMAGE),) +KWB_REPLACE += CSK_INDEX +KWB_CFG_CSK_INDEX = $(CONFIG_SECURED_MODE_CSK_INDEX) + +KWB_REPLACE += SEC_BOOT_DEV +KWB_CFG_SEC_BOOT_DEV=$(patsubst "%",%, \ + $(if $(findstring BOOT_SPI_NOR_FLASH,$(CONFIG_SPL_BOOT_DEVICE)),0x34) \ + $(if $(findstring BOOT_SDIO_MMC_CARD,$(CONFIG_SPL_BOOT_DEVICE)),0x31) \ + ) + +KWB_REPLACE += SEC_FUSE_DUMP +KWB_CFG_SEC_FUSE_DUMP = a38x +endif + +$(src)/kwbimage.cfg: $(src)/kwbimage.cfg.in include/autoconf.mk \ + include/config/auto.conf + $(Q)sed -ne '$(foreach V,$(KWB_REPLACE),s/^#@$(V)/$(V) $(KWB_CFG_$(V))/;)p' \ + <$< >$(dir $<)$(@F) + endif # CONFIG_SPL_BUILD obj-y += gpio.o obj-y += mbus.o diff --git a/arch/arm/mach-mvebu/include/mach/config.h b/arch/arm/mach-mvebu/include/mach/config.h index 2acfd3314a68..9f51411e43f1 100644 --- a/arch/arm/mach-mvebu/include/mach/config.h +++ b/arch/arm/mach-mvebu/include/mach/config.h @@ -32,12 +32,12 @@ #endif
/* - * By default kwbimage.cfg from board specific folder is used + * By default the generated mvebu kwbimage.cfg is used * If for some board, different configuration file need to be used, * CONFIG_SYS_KWD_CONFIG should be defined in board specific header file */ #ifndef CONFIG_SYS_KWD_CONFIG -#define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage.cfg +#define CONFIG_SYS_KWD_CONFIG arch/arm/mach-mvebu/kwbimage.cfg #endif /* CONFIG_SYS_KWD_CONFIG */
/* Add target to build it automatically upon "make" */ diff --git a/board/gdsys/a38x/kwbimage.cfg.in b/arch/arm/mach-mvebu/kwbimage.cfg.in similarity index 100% rename from board/gdsys/a38x/kwbimage.cfg.in rename to arch/arm/mach-mvebu/kwbimage.cfg.in diff --git a/board/CZ.NIC/turris_omnia/kwbimage.cfg b/board/CZ.NIC/turris_omnia/kwbimage.cfg deleted file mode 100644 index 1f748db37c1e..000000000000 --- a/board/CZ.NIC/turris_omnia/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2014 Stefan Roese sr@denx.de -# - -# Armada XP uses version 1 image format -VERSION 1 - -# Boot Media configurations -BOOT_FROM spi - -# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 diff --git a/board/Marvell/db-88f6720/kwbimage.cfg b/board/Marvell/db-88f6720/kwbimage.cfg deleted file mode 100644 index 1f748db37c1e..000000000000 --- a/board/Marvell/db-88f6720/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2014 Stefan Roese sr@denx.de -# - -# Armada XP uses version 1 image format -VERSION 1 - -# Boot Media configurations -BOOT_FROM spi - -# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 diff --git a/board/Marvell/db-88f6820-amc/kwbimage.cfg b/board/Marvell/db-88f6820-amc/kwbimage.cfg deleted file mode 100644 index 1f748db37c1e..000000000000 --- a/board/Marvell/db-88f6820-amc/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2014 Stefan Roese sr@denx.de -# - -# Armada XP uses version 1 image format -VERSION 1 - -# Boot Media configurations -BOOT_FROM spi - -# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 diff --git a/board/Marvell/db-88f6820-gp/kwbimage.cfg b/board/Marvell/db-88f6820-gp/kwbimage.cfg deleted file mode 100644 index 1f748db37c1e..000000000000 --- a/board/Marvell/db-88f6820-gp/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2014 Stefan Roese sr@denx.de -# - -# Armada XP uses version 1 image format -VERSION 1 - -# Boot Media configurations -BOOT_FROM spi - -# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 diff --git a/board/Marvell/db-mv784mp-gp/kwbimage.cfg b/board/Marvell/db-mv784mp-gp/kwbimage.cfg deleted file mode 100644 index 1f748db37c1e..000000000000 --- a/board/Marvell/db-mv784mp-gp/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2014 Stefan Roese sr@denx.de -# - -# Armada XP uses version 1 image format -VERSION 1 - -# Boot Media configurations -BOOT_FROM spi - -# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 diff --git a/board/Synology/ds414/kwbimage.cfg b/board/Synology/ds414/kwbimage.cfg deleted file mode 100644 index 1f748db37c1e..000000000000 --- a/board/Synology/ds414/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2014 Stefan Roese sr@denx.de -# - -# Armada XP uses version 1 image format -VERSION 1 - -# Boot Media configurations -BOOT_FROM spi - -# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 diff --git a/board/gdsys/a38x/Makefile b/board/gdsys/a38x/Makefile index 18ecbe5e7979..32fffab467be 100644 --- a/board/gdsys/a38x/Makefile +++ b/board/gdsys/a38x/Makefile @@ -7,36 +7,5 @@ obj-$(CONFIG_TARGET_CONTROLCENTERDC) += controlcenterdc.o hre.o spl.o keyprogram.o dt_helpers.o
ifeq ($(CONFIG_SPL_BUILD),) - obj-$(CONFIG_TARGET_CONTROLCENTERDC) += hydra.o ihs_phys.o - -extra-$(CONFIG_TARGET_CONTROLCENTERDC) += kwbimage.cfg - -KWB_REPLACE += BOOT_FROM -ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI),) - KWB_CFG_BOOT_FROM=spi -endif -ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC),) - KWB_CFG_BOOT_FROM=sdio -endif - -ifneq ($(CONFIG_SECURED_MODE_IMAGE),) -KWB_REPLACE += CSK_INDEX -KWB_CFG_CSK_INDEX = $(CONFIG_SECURED_MODE_CSK_INDEX) - -KWB_REPLACE += SEC_BOOT_DEV -KWB_CFG_SEC_BOOT_DEV=$(patsubst "%",%, \ - $(if $(findstring BOOT_SPI_NOR_FLASH,$(CONFIG_SPL_BOOT_DEVICE)),0x34) \ - $(if $(findstring BOOT_SDIO_MMC_CARD,$(CONFIG_SPL_BOOT_DEVICE)),0x31) \ - ) - -KWB_REPLACE += SEC_FUSE_DUMP -KWB_CFG_SEC_FUSE_DUMP = a38x -endif - -$(src)/kwbimage.cfg: $(src)/kwbimage.cfg.in include/autoconf.mk \ - include/config/auto.conf - $(Q)sed -ne '$(foreach V,$(KWB_REPLACE),s/^#@$(V)/$(V) $(KWB_CFG_$(V))/;)p' \ - <$< >$(dir $<)$(@F) - endif diff --git a/board/kobol/helios4/kwbimage.cfg b/board/kobol/helios4/kwbimage.cfg deleted file mode 100644 index 035063bc9097..000000000000 --- a/board/kobol/helios4/kwbimage.cfg +++ /dev/null @@ -1,13 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# Copyright (C) 2015 Stefan Roese sr@denx.de -# - -# Armada 38x use version 1 image format -VERSION 1 - -# Boot Media configurations -BOOT_FROM sdio - -# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 diff --git a/board/maxbcm/kwbimage.cfg b/board/maxbcm/kwbimage.cfg deleted file mode 100644 index 1f748db37c1e..000000000000 --- a/board/maxbcm/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2014 Stefan Roese sr@denx.de -# - -# Armada XP uses version 1 image format -VERSION 1 - -# Boot Media configurations -BOOT_FROM spi - -# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 diff --git a/board/solidrun/clearfog/kwbimage.cfg b/board/solidrun/clearfog/kwbimage.cfg deleted file mode 100644 index f41d25a8a142..000000000000 --- a/board/solidrun/clearfog/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2015 Stefan Roese sr@denx.de -# - -# Armada 38x use version 1 image format -VERSION 1 - -# Boot Media configurations -BOOT_FROM sdio - -# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 diff --git a/board/theadorable/kwbimage.cfg b/board/theadorable/kwbimage.cfg deleted file mode 100644 index 4f3b7b23f37f..000000000000 --- a/board/theadorable/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2015-2016 Stefan Roese sr@denx.de -# - -# Armada XP uses version 1 image format -VERSION 1 - -# Boot Media configurations -BOOT_FROM spi - -# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig index 7a9ee510171b..2164e20a3f08 100644 --- a/configs/clearfog_defconfig +++ b/configs/clearfog_defconfig @@ -6,12 +6,12 @@ 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_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL=y CONFIG_DEBUG_UART_BASE=0xd0012000 CONFIG_DEBUG_UART_CLOCK=250000000 -CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_DEFAULT_DEVICE_TREE="armada-388-clearfog" CONFIG_DEBUG_UART=y CONFIG_DISTRO_DEFAULTS=y diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig index b72428555d37..27e661debe0b 100644 --- a/configs/helios4_defconfig +++ b/configs/helios4_defconfig @@ -5,9 +5,9 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_HELIOS4=y +CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC=y CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y -CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SPL=y CONFIG_DEFAULT_DEVICE_TREE="armada-388-helios4" CONFIG_DEBUG_UART=y

Hi Baruch,
this patch needs to be rebased on git master as it does not apply.
Thanks
Dennis El lun, 18-06-2018 a las 21:56 +0300, Baruch Siach escribió:
Move the gdsys Controlcenter DC specific build time kwbimage.cfg generation code into the mach-mvebu/ directory to be shared by all 32bit mvebu platforms.
Remove board specific kwbimage.cfg files, and use the generated one instead. These files are all identical, with two exceptions. Clearfog and Helios4 use the sdio boot device, whereas all others use spi. Update the defconfigs for the exceptional boards to generate the same kwbimage.cfg as before.
Signed-off-by: Baruch Siach baruch@tkos.co.il
.../a38x => arch/arm/mach-mvebu}/.gitignore | 0 arch/arm/mach-mvebu/Makefile | 30 ++++++++++++++++++ arch/arm/mach-mvebu/include/mach/config.h | 4 +-- .../arm/mach-mvebu}/kwbimage.cfg.in | 0 board/CZ.NIC/turris_omnia/kwbimage.cfg | 12 ------- board/Marvell/db-88f6720/kwbimage.cfg | 12 ------- board/Marvell/db-88f6820-amc/kwbimage.cfg | 12 ------- board/Marvell/db-88f6820-gp/kwbimage.cfg | 12 ------- board/Marvell/db-mv784mp-gp/kwbimage.cfg | 12 ------- board/Synology/ds414/kwbimage.cfg | 12 ------- board/gdsys/a38x/Makefile | 31 ---------------
board/kobol/helios4/kwbimage.cfg | 13 -------- board/maxbcm/kwbimage.cfg | 12 ------- board/solidrun/clearfog/kwbimage.cfg | 12 ------- board/theadorable/kwbimage.cfg | 12 ------- configs/clearfog_defconfig | 2 +- configs/helios4_defconfig | 2 +- 17 files changed, 34 insertions(+), 156 deletions(-) rename {board/gdsys/a38x => arch/arm/mach-mvebu}/.gitignore (100%) rename {board/gdsys/a38x => arch/arm/mach-mvebu}/kwbimage.cfg.in (100%) delete mode 100644 board/CZ.NIC/turris_omnia/kwbimage.cfg delete mode 100644 board/Marvell/db-88f6720/kwbimage.cfg delete mode 100644 board/Marvell/db-88f6820-amc/kwbimage.cfg delete mode 100644 board/Marvell/db-88f6820-gp/kwbimage.cfg delete mode 100644 board/Marvell/db-mv784mp-gp/kwbimage.cfg delete mode 100644 board/Synology/ds414/kwbimage.cfg delete mode 100644 board/kobol/helios4/kwbimage.cfg delete mode 100644 board/maxbcm/kwbimage.cfg delete mode 100644 board/solidrun/clearfog/kwbimage.cfg delete mode 100644 board/theadorable/kwbimage.cfg
diff --git a/board/gdsys/a38x/.gitignore b/arch/arm/mach- mvebu/.gitignore similarity index 100% rename from board/gdsys/a38x/.gitignore rename to arch/arm/mach-mvebu/.gitignore diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach- mvebu/Makefile index ade7b870646f..d907fac3752d 100644 --- a/arch/arm/mach-mvebu/Makefile +++ b/arch/arm/mach-mvebu/Makefile @@ -25,6 +25,36 @@ obj-$(CONFIG_ARMADA_375) += ../../../drivers/ddr/marvell/axp/xor.o obj-$(CONFIG_ARMADA_38X) += ../../../drivers/ddr/marvell/a38x/xor.o obj-$(CONFIG_ARMADA_XP) += ../../../drivers/ddr/marvell/axp/xor.o obj-$(CONFIG_MVEBU_EFUSE) += efuse.o
+extra-y += kwbimage.cfg
+KWB_REPLACE += BOOT_FROM +ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI),)
- KWB_CFG_BOOT_FROM=spi
+endif +ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC),)
- KWB_CFG_BOOT_FROM=sdio
+endif
+ifneq ($(CONFIG_SECURED_MODE_IMAGE),) +KWB_REPLACE += CSK_INDEX +KWB_CFG_CSK_INDEX = $(CONFIG_SECURED_MODE_CSK_INDEX)
+KWB_REPLACE += SEC_BOOT_DEV +KWB_CFG_SEC_BOOT_DEV=$(patsubst "%",%, \
- $(if $(findstring
BOOT_SPI_NOR_FLASH,$(CONFIG_SPL_BOOT_DEVICE)),0x34) \
- $(if $(findstring
BOOT_SDIO_MMC_CARD,$(CONFIG_SPL_BOOT_DEVICE)),0x31) \
- )
+KWB_REPLACE += SEC_FUSE_DUMP +KWB_CFG_SEC_FUSE_DUMP = a38x +endif
+$(src)/kwbimage.cfg: $(src)/kwbimage.cfg.in include/autoconf.mk \
include/config/auto.conf
- $(Q)sed -ne '$(foreach V,$(KWB_REPLACE),s/^#@$(V)/$(V)
$(KWB_CFG_$(V))/;)p' \
- <$< >$(dir $<)$(@F)
endif # CONFIG_SPL_BUILD obj-y += gpio.o obj-y += mbus.o diff --git a/arch/arm/mach-mvebu/include/mach/config.h b/arch/arm/mach-mvebu/include/mach/config.h index 2acfd3314a68..9f51411e43f1 100644 --- a/arch/arm/mach-mvebu/include/mach/config.h +++ b/arch/arm/mach-mvebu/include/mach/config.h @@ -32,12 +32,12 @@ #endif
/*
- By default kwbimage.cfg from board specific folder is used
- By default the generated mvebu kwbimage.cfg is used
- If for some board, different configuration file need to be used,
- CONFIG_SYS_KWD_CONFIG should be defined in board specific header
file */ #ifndef CONFIG_SYS_KWD_CONFIG -#define CONFIG_SYS_KWD_CONFIG $(CONFIG_BOARDDIR)/kwbimage.c fg +#define CONFIG_SYS_KWD_CONFIG arch/arm/mach- mvebu/kwbimage.cfg #endif /* CONFIG_SYS_KWD_CONFIG */
/* Add target to build it automatically upon "make" */ diff --git a/board/gdsys/a38x/kwbimage.cfg.in b/arch/arm/mach- mvebu/kwbimage.cfg.in similarity index 100% rename from board/gdsys/a38x/kwbimage.cfg.in rename to arch/arm/mach-mvebu/kwbimage.cfg.in diff --git a/board/CZ.NIC/turris_omnia/kwbimage.cfg b/board/CZ.NIC/turris_omnia/kwbimage.cfg deleted file mode 100644 index 1f748db37c1e..000000000000 --- a/board/CZ.NIC/turris_omnia/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2014 Stefan Roese sr@denx.de -#
-# Armada XP uses version 1 image format -VERSION 1
-# Boot Media configurations -BOOT_FROM spi
-# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 diff --git a/board/Marvell/db-88f6720/kwbimage.cfg b/board/Marvell/db-88f6720/kwbimage.cfg deleted file mode 100644 index 1f748db37c1e..000000000000 --- a/board/Marvell/db-88f6720/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2014 Stefan Roese sr@denx.de -#
-# Armada XP uses version 1 image format -VERSION 1
-# Boot Media configurations -BOOT_FROM spi
-# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 diff --git a/board/Marvell/db-88f6820-amc/kwbimage.cfg b/board/Marvell/db-88f6820-amc/kwbimage.cfg deleted file mode 100644 index 1f748db37c1e..000000000000 --- a/board/Marvell/db-88f6820-amc/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2014 Stefan Roese sr@denx.de -#
-# Armada XP uses version 1 image format -VERSION 1
-# Boot Media configurations -BOOT_FROM spi
-# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 diff --git a/board/Marvell/db-88f6820-gp/kwbimage.cfg b/board/Marvell/db-88f6820-gp/kwbimage.cfg deleted file mode 100644 index 1f748db37c1e..000000000000 --- a/board/Marvell/db-88f6820-gp/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2014 Stefan Roese sr@denx.de -#
-# Armada XP uses version 1 image format -VERSION 1
-# Boot Media configurations -BOOT_FROM spi
-# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 diff --git a/board/Marvell/db-mv784mp-gp/kwbimage.cfg b/board/Marvell/db-mv784mp-gp/kwbimage.cfg deleted file mode 100644 index 1f748db37c1e..000000000000 --- a/board/Marvell/db-mv784mp-gp/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2014 Stefan Roese sr@denx.de -#
-# Armada XP uses version 1 image format -VERSION 1
-# Boot Media configurations -BOOT_FROM spi
-# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 diff --git a/board/Synology/ds414/kwbimage.cfg b/board/Synology/ds414/kwbimage.cfg deleted file mode 100644 index 1f748db37c1e..000000000000 --- a/board/Synology/ds414/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2014 Stefan Roese sr@denx.de -#
-# Armada XP uses version 1 image format -VERSION 1
-# Boot Media configurations -BOOT_FROM spi
-# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 diff --git a/board/gdsys/a38x/Makefile b/board/gdsys/a38x/Makefile index 18ecbe5e7979..32fffab467be 100644 --- a/board/gdsys/a38x/Makefile +++ b/board/gdsys/a38x/Makefile @@ -7,36 +7,5 @@ obj-$(CONFIG_TARGET_CONTROLCENTERDC) += controlcenterdc.o hre.o spl.o keyprogram.o dt_helpers.o
ifeq ($(CONFIG_SPL_BUILD),)
obj-$(CONFIG_TARGET_CONTROLCENTERDC) += hydra.o ihs_phys.o
-extra-$(CONFIG_TARGET_CONTROLCENTERDC) += kwbimage.cfg
-KWB_REPLACE += BOOT_FROM -ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI),)
- KWB_CFG_BOOT_FROM=spi
-endif -ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC),)
- KWB_CFG_BOOT_FROM=sdio
-endif
-ifneq ($(CONFIG_SECURED_MODE_IMAGE),) -KWB_REPLACE += CSK_INDEX -KWB_CFG_CSK_INDEX = $(CONFIG_SECURED_MODE_CSK_INDEX)
-KWB_REPLACE += SEC_BOOT_DEV -KWB_CFG_SEC_BOOT_DEV=$(patsubst "%",%, \
- $(if $(findstring
BOOT_SPI_NOR_FLASH,$(CONFIG_SPL_BOOT_DEVICE)),0x34) \
- $(if $(findstring
BOOT_SDIO_MMC_CARD,$(CONFIG_SPL_BOOT_DEVICE)),0x31) \
- )
-KWB_REPLACE += SEC_FUSE_DUMP -KWB_CFG_SEC_FUSE_DUMP = a38x -endif
-$(src)/kwbimage.cfg: $(src)/kwbimage.cfg.in include/autoconf.mk \
include/config/auto.conf
- $(Q)sed -ne '$(foreach V,$(KWB_REPLACE),s/^#@$(V)/$(V)
$(KWB_CFG_$(V))/;)p' \
- <$< >$(dir $<)$(@F)
endif diff --git a/board/kobol/helios4/kwbimage.cfg b/board/kobol/helios4/kwbimage.cfg deleted file mode 100644 index 035063bc9097..000000000000 --- a/board/kobol/helios4/kwbimage.cfg +++ /dev/null @@ -1,13 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# Copyright (C) 2015 Stefan Roese sr@denx.de -#
-# Armada 38x use version 1 image format -VERSION 1
-# Boot Media configurations -BOOT_FROM sdio
-# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 diff --git a/board/maxbcm/kwbimage.cfg b/board/maxbcm/kwbimage.cfg deleted file mode 100644 index 1f748db37c1e..000000000000 --- a/board/maxbcm/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2014 Stefan Roese sr@denx.de -#
-# Armada XP uses version 1 image format -VERSION 1
-# Boot Media configurations -BOOT_FROM spi
-# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 diff --git a/board/solidrun/clearfog/kwbimage.cfg b/board/solidrun/clearfog/kwbimage.cfg deleted file mode 100644 index f41d25a8a142..000000000000 --- a/board/solidrun/clearfog/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2015 Stefan Roese sr@denx.de -#
-# Armada 38x use version 1 image format -VERSION 1
-# Boot Media configurations -BOOT_FROM sdio
-# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 diff --git a/board/theadorable/kwbimage.cfg b/board/theadorable/kwbimage.cfg deleted file mode 100644 index 4f3b7b23f37f..000000000000 --- a/board/theadorable/kwbimage.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (C) 2015-2016 Stefan Roese sr@denx.de -#
-# Armada XP uses version 1 image format -VERSION 1
-# Boot Media configurations -BOOT_FROM spi
-# Binary Header (bin_hdr) with DDR3 training code -BINARY spl/u-boot-spl-dtb.bin 0000005b 00000068 diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig index 7a9ee510171b..2164e20a3f08 100644 --- a/configs/clearfog_defconfig +++ b/configs/clearfog_defconfig @@ -6,12 +6,12 @@ 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_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL=y CONFIG_DEBUG_UART_BASE=0xd0012000 CONFIG_DEBUG_UART_CLOCK=250000000 -CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_DEFAULT_DEVICE_TREE="armada-388-clearfog" CONFIG_DEBUG_UART=y CONFIG_DISTRO_DEFAULTS=y diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig index b72428555d37..27e661debe0b 100644 --- a/configs/helios4_defconfig +++ b/configs/helios4_defconfig @@ -5,9 +5,9 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_HELIOS4=y +CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC=y CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y -CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SPL=y CONFIG_DEFAULT_DEVICE_TREE="armada-388-helios4" CONFIG_DEBUG_UART=y

Hi Dennis,
Thanks for taking the time to look into this series.
Dennis Gilmore writes:
this patch needs to be rebased on git master as it does not apply.
The conflict is trivial for git to handle automatically on rebase (remove, remove). I assume 'git am -3' can do the same. Would you like me to send v2 of this series for that?
baruch
El lun, 18-06-2018 a las 21:56 +0300, Baruch Siach escribió:
Move the gdsys Controlcenter DC specific build time kwbimage.cfg generation code into the mach-mvebu/ directory to be shared by all 32bit mvebu platforms.
Remove board specific kwbimage.cfg files, and use the generated one instead. These files are all identical, with two exceptions. Clearfog and Helios4 use the sdio boot device, whereas all others use spi. Update the defconfigs for the exceptional boards to generate the same kwbimage.cfg as before.
Signed-off-by: Baruch Siach baruch@tkos.co.il
[...]
diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig index b72428555d37..27e661debe0b 100644 --- a/configs/helios4_defconfig +++ b/configs/helios4_defconfig @@ -5,9 +5,9 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_HELIOS4=y +CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC=y CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y -CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SPL=y CONFIG_DEFAULT_DEVICE_TREE="armada-388-helios4" CONFIG_DEBUG_UART=y
-- http://baruch.siach.name/blog/ ~. .~ Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

Hi Baruch,
On 06.08.2018 12:12, Baruch Siach wrote:
Hi Dennis,
Thanks for taking the time to look into this series.
Dennis Gilmore writes:
this patch needs to be rebased on git master as it does not apply.
The conflict is trivial for git to handle automatically on rebase (remove, remove). I assume 'git am -3' can do the same. Would you like me to send v2 of this series for that?
Seems to be fine. I just tried it and it applies fine, resolving the conflicts automatically. No new version necessary.
Thanks, Stefan

Weird git am failed for me so I had to tweak the patch. I must have done something wrong on my end. I did test on the helios4 after applying the set and it booted fine
On 6 August 2018 2:13:33 pm GMT+02:00, Stefan Roese sr@denx.de wrote:
Hi Baruch,
On 06.08.2018 12:12, Baruch Siach wrote:
Hi Dennis,
Thanks for taking the time to look into this series.
Dennis Gilmore writes:
this patch needs to be rebased on git master as it does not apply.
The conflict is trivial for git to handle automatically on rebase (remove, remove). I assume 'git am -3' can do the same. Would you
like
me to send v2 of this series for that?
Seems to be fine. I just tried it and it applies fine, resolving the conflicts automatically. No new version necessary.
Thanks, Stefan

The kwboot utility can use the generated image to boot mvebu SoCs from UART.
Signed-off-by: Baruch Siach baruch@tkos.co.il --- arch/arm/mach-mvebu/Kconfig | 3 +++ arch/arm/mach-mvebu/Makefile | 3 +++ 2 files changed, 6 insertions(+)
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index 2ee01e9cff81..38eacb24b388 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -193,6 +193,9 @@ config MVEBU_SPL_BOOT_DEVICE_MMC bool "SDIO/MMC card" select SPL_LIBDISK_SUPPORT
+config MVEBU_SPL_BOOT_DEVICE_UART + bool "UART" + endchoice
config MVEBU_EFUSE diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile index d907fac3752d..ee2eca913484 100644 --- a/arch/arm/mach-mvebu/Makefile +++ b/arch/arm/mach-mvebu/Makefile @@ -35,6 +35,9 @@ endif ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC),) KWB_CFG_BOOT_FROM=sdio endif +ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_UART),) + KWB_CFG_BOOT_FROM=uart +endif
ifneq ($(CONFIG_SECURED_MODE_IMAGE),) KWB_REPLACE += CSK_INDEX

This allows selection of the boot device at build time without source code modification.
Signed-off-by: Baruch Siach baruch@tkos.co.il --- include/configs/clearfog.h | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h index 1141aee08b6e..7d56dfd86e96 100644 --- a/include/configs/clearfog.h +++ b/include/configs/clearfog.h @@ -70,16 +70,6 @@ "initrd_high=0x10000000\0"
/* SPL */ -/* - * Select the boot device here - * - * Currently supported are: - * SPL_BOOT_SPI_NOR_FLASH - Booting via SPI NOR flash - * SPL_BOOT_SDIO_MMC_CARD - Booting via SDIO/MMC card (partition 1) - */ -#define SPL_BOOT_SPI_NOR_FLASH 1 -#define SPL_BOOT_SDIO_MMC_CARD 2 -#define CONFIG_SPL_BOOT_DEVICE SPL_BOOT_SDIO_MMC_CARD
/* Defines for SPL */ #define CONFIG_SPL_SIZE (140 << 10) @@ -96,13 +86,11 @@ #define CONFIG_SPL_STACK (0x40000000 + ((192 - 16) << 10)) #define CONFIG_SPL_BOOTROM_SAVE (CONFIG_SPL_STACK + 4)
-#if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SPI_NOR_FLASH +#if defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI) /* SPL related SPI defines */ #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000 #define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_SPI_U_BOOT_OFFS -#endif - -#if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SDIO_MMC_CARD +#elif defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC) /* SPL related MMC defines */ #define CONFIG_SYS_MMC_U_BOOT_OFFS (160 << 10) #define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_MMC_U_BOOT_OFFS
participants (3)
-
Baruch Siach
-
Dennis Gilmore
-
Stefan Roese