summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mvebu
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mvebu')
-rw-r--r--arch/arm/mach-mvebu/.gitignore1
-rw-r--r--arch/arm/mach-mvebu/Kconfig17
-rw-r--r--arch/arm/mach-mvebu/Makefile33
-rw-r--r--arch/arm/mach-mvebu/include/mach/config.h4
-rw-r--r--arch/arm/mach-mvebu/kwbimage.cfg.in12
5 files changed, 58 insertions, 9 deletions
diff --git a/arch/arm/mach-mvebu/.gitignore b/arch/arm/mach-mvebu/.gitignore
new file mode 100644
index 0000000000..775b9346b8
--- /dev/null
+++ b/arch/arm/mach-mvebu/.gitignore
@@ -0,0 +1 @@
+kwbimage.cfg
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index 3df124c6a8..d1f71338ac 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,24 +178,25 @@ 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"
-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
+config MVEBU_SPL_BOOT_DEVICE_UART
+ bool "UART"
-endif
+endchoice
config MVEBU_EFUSE
bool "Enable eFuse support"
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
index ade7b87064..ee2eca9134 100644
--- a/arch/arm/mach-mvebu/Makefile
+++ b/arch/arm/mach-mvebu/Makefile
@@ -25,6 +25,39 @@ 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_MVEBU_SPL_BOOT_DEVICE_UART),)
+ KWB_CFG_BOOT_FROM=uart
+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 2acfd3314a..9f51411e43 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/arch/arm/mach-mvebu/kwbimage.cfg.in b/arch/arm/mach-mvebu/kwbimage.cfg.in
new file mode 100644
index 0000000000..72e67d75c3
--- /dev/null
+++ b/arch/arm/mach-mvebu/kwbimage.cfg.in
@@ -0,0 +1,12 @@
+#
+# Copyright (C) 2014 Stefan Roese <sr@denx.de>
+#
+
+# Armada 38x uses version 1 image format
+VERSION 1
+
+# Boot Media configurations
+#@BOOT_FROM
+
+# Binary Header (bin_hdr) with DDR3 training code
+BINARY spl/u-boot-spl.bin 0000005b 00000068