1 # SPDX-License-Identifier: GPL-2.0+
3 # Copyright (C) 2014-2016 Stefan Roese <sr@denx.de>
7 obj-$(CONFIG_ARMADA_3700) += armada3700/
8 obj-$(CONFIG_ARMADA_8K) += armada8k/
9 obj-y += arm64-common.o
13 ifdef CONFIG_ARCH_KIRKWOOD
23 else # CONFIG_ARCH_KIRKWOOD
28 obj-$(CONFIG_DM_RESET) += system-controller.o
29 ifndef CONFIG_SPL_BUILD
30 obj-$(CONFIG_ARMADA_375) += ../../../drivers/ddr/marvell/axp/xor.o
31 obj-$(CONFIG_ARMADA_38X) += ../../../drivers/ddr/marvell/a38x/xor.o
32 obj-$(CONFIG_ARMADA_XP) += ../../../drivers/ddr/marvell/axp/xor.o
33 obj-$(CONFIG_ARMADA_MSYS) += ../../../drivers/ddr/marvell/axp/xor.o
35 ifdef CONFIG_ARMADA_38X
36 obj-$(CONFIG_MVEBU_EFUSE) += efuse.o
39 extra-y += kwbimage.cfg
41 ifneq ($(CONFIG_ARMADA_370)$(CONFIG_ARMADA_XP),)
44 else ifneq ($(CONFIG_ARMADA_375)$(CONFIG_ARMADA_38X)$(CONFIG_ARMADA_39X),)
49 KWB_REPLACE += LOAD_ADDRESS
50 KWB_CFG_LOAD_ADDRESS = $(CONFIG_SPL_TEXT_BASE)
52 KWB_REPLACE += BOOT_FROM
53 ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI),)
56 ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC),)
57 KWB_CFG_BOOT_FROM=sdio
59 ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SATA),)
60 KWB_CFG_BOOT_FROM=sata
62 ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_UART),)
63 KWB_CFG_BOOT_FROM=uart
66 ifneq ($(CONFIG_SECURED_MODE_IMAGE),)
67 KWB_REPLACE += CSK_INDEX
68 KWB_CFG_CSK_INDEX = $(CONFIG_SECURED_MODE_CSK_INDEX)
70 KWB_REPLACE += SEC_BOOT_DEV
71 ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI),)
72 KWB_CFG_SEC_BOOT_DEV=0x34
74 ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC),)
75 KWB_CFG_SEC_BOOT_DEV=0x31
78 KWB_REPLACE += SEC_FUSE_DUMP
79 KWB_CFG_SEC_FUSE_DUMP = a38x
82 ifdef CONFIG_ARMADA_38X
83 # BootROM output is by default enabled on pre-A38x and disabled on A38x
84 # DEBUG flag on A38x for non-UART boot source only enable BootROM output and nothing more
89 quiet_cmd_kwbcfg = KWBCFG $@
90 cmd_kwbcfg = sed -ne '$(foreach V,$(KWB_REPLACE),s/\#@$(V)/$(V) $(KWB_CFG_$(V))/;)p' \
93 $(obj)/kwbimage.cfg: $(src)/kwbimage.cfg.in include/autoconf.mk \
94 include/config/auto.conf
97 endif # CONFIG_SPL_BUILD
101 obj-$(CONFIG_SPL_BUILD) += spl.o
102 obj-$(CONFIG_SPL_BUILD) += lowlevel_spl.o
104 obj-$(CONFIG_ARMADA_38X) += serdes/a38x/
105 obj-$(CONFIG_ARMADA_XP) += serdes/axp/
107 endif # CONFIG_ARCH_KIRKWOOD