xref: /openbmc/u-boot/arch/arm/mach-mvebu/Makefile (revision 0f347a00)
1# SPDX-License-Identifier: GPL-2.0+
2#
3# Copyright (C) 2014-2016 Stefan Roese <sr@denx.de>
4
5ifdef CONFIG_ARM64
6
7obj-$(CONFIG_ARMADA_3700) += armada3700/
8obj-$(CONFIG_ARMADA_8K) += armada8k/
9obj-y += arm64-common.o
10
11else # CONFIG_ARM64
12
13ifdef CONFIG_KIRKWOOD
14
15obj-y	= dram.o
16obj-y	+= gpio.o
17obj-y	+= timer.o
18
19else # CONFIG_KIRKWOOD
20
21obj-y	= cpu.o
22obj-y	+= dram.o
23ifndef CONFIG_SPL_BUILD
24obj-$(CONFIG_ARMADA_375) += ../../../drivers/ddr/marvell/axp/xor.o
25obj-$(CONFIG_ARMADA_38X) += ../../../drivers/ddr/marvell/a38x/xor.o
26obj-$(CONFIG_ARMADA_XP) += ../../../drivers/ddr/marvell/axp/xor.o
27obj-$(CONFIG_MVEBU_EFUSE) += efuse.o
28
29extra-y += kwbimage.cfg
30
31KWB_REPLACE += BOOT_FROM
32ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI),)
33	KWB_CFG_BOOT_FROM=spi
34endif
35ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC),)
36	KWB_CFG_BOOT_FROM=sdio
37endif
38ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_UART),)
39	KWB_CFG_BOOT_FROM=uart
40endif
41
42ifneq ($(CONFIG_SECURED_MODE_IMAGE),)
43KWB_REPLACE += CSK_INDEX
44KWB_CFG_CSK_INDEX = $(CONFIG_SECURED_MODE_CSK_INDEX)
45
46KWB_REPLACE += SEC_BOOT_DEV
47KWB_CFG_SEC_BOOT_DEV=$(patsubst "%",%, \
48	$(if $(findstring BOOT_SPI_NOR_FLASH,$(CONFIG_SPL_BOOT_DEVICE)),0x34) \
49	$(if $(findstring BOOT_SDIO_MMC_CARD,$(CONFIG_SPL_BOOT_DEVICE)),0x31) \
50	)
51
52KWB_REPLACE += SEC_FUSE_DUMP
53KWB_CFG_SEC_FUSE_DUMP = a38x
54endif
55
56$(src)/kwbimage.cfg: $(src)/kwbimage.cfg.in include/autoconf.mk \
57		include/config/auto.conf
58	$(Q)sed -ne '$(foreach V,$(KWB_REPLACE),s/^#@$(V)/$(V) $(KWB_CFG_$(V))/;)p' \
59	<$< >$(dir $<)$(@F)
60
61endif # CONFIG_SPL_BUILD
62obj-y	+= gpio.o
63obj-y	+= mbus.o
64obj-y	+= timer.o
65obj-$(CONFIG_SPL_BUILD) += spl.o
66obj-$(CONFIG_SPL_BUILD) += lowlevel_spl.o
67
68obj-$(CONFIG_ARMADA_38X) += serdes/a38x/
69obj-$(CONFIG_ARMADA_XP) += serdes/axp/
70
71endif # CONFIG_KIRKWOOD
72endif # CONFIG_ARM64
73