[PATCH u-boot-marvell v2 10/20] arm: mvebu: Set CPU for U-Boot SPL binary in kwbimage

Pali Rohár
2022-01-12T17:23:53Z

kwbimage needs to know CPU type, so set it in kwbimage config file.

Signed-off-by: Pali Rohár <pali@kernel.org>
---
arch/arm/mach-mvebu/Makefile | 8 ++++++++
arch/arm/mach-mvebu/kwbimage.cfg.in | 3 +++
2 files changed, 11 insertions(+)

diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
index acbaa6449d3d..17006c9df9b0 100644
--- a/arch/arm/mach-mvebu/Makefile
+++ b/arch/arm/mach-mvebu/Makefile
@@ -30,6 +30,14 @@ obj-$(CONFIG_MVEBU_EFUSE) += efuse.o

extra-y += kwbimage.cfg

+ifneq ($(CONFIG_ARMADA_370)$(CONFIG_ARMADA_XP),)
+ KWB_REPLACE += CPU
+ KWB_CFG_CPU = SHEEVA
+else ifneq ($(CONFIG_ARMADA_375)$(CONFIG_ARMADA_38X)$(CONFIG_ARMADA_39X),)
+ KWB_REPLACE += CPU
+ KWB_CFG_CPU = A9
+endif
+
KWB_REPLACE += BOOT_FROM
ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI),)
KWB_CFG_BOOT_FROM=spi
diff --git a/arch/arm/mach-mvebu/kwbimage.cfg.in b/arch/arm/mach-mvebu/kwbimage.cfg.in
index 049d23c6ef08..8e720daf4820 100644
--- a/arch/arm/mach-mvebu/kwbimage.cfg.in
+++ b/arch/arm/mach-mvebu/kwbimage.cfg.in
@@ -5,6 +5,9 @@
# Armada 38x uses version 1 image format
VERSION 1

+# Type of the CPU core
+#@CPU
+
# Boot Media configurations
#@BOOT_FROM

--
2.20.1