blob: b73952044de7ab07f89d6554be59ad88925be1c3 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001# SPDX-License-Identifier: GPL-2.0+
Stefan Roese93e6bf42014-10-22 12:13:17 +02002#
Stefan Roese05b17652016-05-17 15:00:30 +02003# Copyright (C) 2014-2016 Stefan Roese <sr@denx.de>
Stefan Roese93e6bf42014-10-22 12:13:17 +02004
Stefan Roese05b17652016-05-17 15:00:30 +02005ifdef CONFIG_ARM64
6
7obj-$(CONFIG_ARMADA_3700) += armada3700/
Stefan Roesecb410332016-05-25 08:13:45 +02008obj-$(CONFIG_ARMADA_8K) += armada8k/
9obj-y += arm64-common.o
Stefan Roese05b17652016-05-17 15:00:30 +020010
11else # CONFIG_ARM64
12
Stefan Roese42e5aab2015-04-25 06:29:46 +020013ifdef CONFIG_KIRKWOOD
14
15obj-y = dram.o
16obj-y += gpio.o
Chris Packham968856c2019-03-13 20:47:03 +130017obj-y += mbus.o
Stefan Roese42e5aab2015-04-25 06:29:46 +020018obj-y += timer.o
19
Stefan Roese05b17652016-05-17 15:00:30 +020020else # CONFIG_KIRKWOOD
Stefan Roese42e5aab2015-04-25 06:29:46 +020021
Stefan Roese93e6bf42014-10-22 12:13:17 +020022obj-y = cpu.o
Stefan Roese42e5aab2015-04-25 06:29:46 +020023obj-y += dram.o
Stefan Roesef3345e62015-08-06 14:43:13 +020024ifndef CONFIG_SPL_BUILD
Stefan Roese479f9af2016-02-10 07:23:00 +010025obj-$(CONFIG_ARMADA_375) += ../../../drivers/ddr/marvell/axp/xor.o
Stefan Roeseeb083e52015-12-21 13:56:33 +010026obj-$(CONFIG_ARMADA_38X) += ../../../drivers/ddr/marvell/a38x/xor.o
27obj-$(CONFIG_ARMADA_XP) += ../../../drivers/ddr/marvell/axp/xor.o
Chris Packhama8f845e2019-04-11 22:22:50 +120028obj-$(CONFIG_ARMADA_MSYS) += ../../../drivers/ddr/marvell/axp/xor.o
Mario Six10d14492017-01-11 16:01:00 +010029obj-$(CONFIG_MVEBU_EFUSE) += efuse.o
Baruch Siachea3d9de2018-06-18 21:56:25 +030030
31extra-y += kwbimage.cfg
32
33KWB_REPLACE += BOOT_FROM
34ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI),)
35 KWB_CFG_BOOT_FROM=spi
36endif
37ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC),)
38 KWB_CFG_BOOT_FROM=sdio
39endif
Baruch Siachb936a272019-05-16 13:03:58 +030040ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SATA),)
41 KWB_CFG_BOOT_FROM=sata
42endif
Baruch Siachb35c4472018-06-18 21:56:26 +030043ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_UART),)
44 KWB_CFG_BOOT_FROM=uart
45endif
Baruch Siachea3d9de2018-06-18 21:56:25 +030046
47ifneq ($(CONFIG_SECURED_MODE_IMAGE),)
48KWB_REPLACE += CSK_INDEX
49KWB_CFG_CSK_INDEX = $(CONFIG_SECURED_MODE_CSK_INDEX)
50
51KWB_REPLACE += SEC_BOOT_DEV
52KWB_CFG_SEC_BOOT_DEV=$(patsubst "%",%, \
53 $(if $(findstring BOOT_SPI_NOR_FLASH,$(CONFIG_SPL_BOOT_DEVICE)),0x34) \
54 $(if $(findstring BOOT_SDIO_MMC_CARD,$(CONFIG_SPL_BOOT_DEVICE)),0x31) \
55 )
56
57KWB_REPLACE += SEC_FUSE_DUMP
58KWB_CFG_SEC_FUSE_DUMP = a38x
59endif
60
Bin Mengdf4019a2019-10-28 07:25:01 -070061$(obj)/kwbimage.cfg: $(src)/kwbimage.cfg.in include/autoconf.mk \
Baruch Siachea3d9de2018-06-18 21:56:25 +030062 include/config/auto.conf
63 $(Q)sed -ne '$(foreach V,$(KWB_REPLACE),s/^#@$(V)/$(V) $(KWB_CFG_$(V))/;)p' \
Bin Mengdf4019a2019-10-28 07:25:01 -070064 <$< >$(dir $@)$(@F)
Baruch Siachea3d9de2018-06-18 21:56:25 +030065
Stefan Roese05b17652016-05-17 15:00:30 +020066endif # CONFIG_SPL_BUILD
Stefan Roese42e5aab2015-04-25 06:29:46 +020067obj-y += gpio.o
68obj-y += mbus.o
69obj-y += timer.o
Stefan Roesee463bf32015-01-19 11:33:42 +010070obj-$(CONFIG_SPL_BUILD) += spl.o
71obj-$(CONFIG_SPL_BUILD) += lowlevel_spl.o
Stefan Roese42e5aab2015-04-25 06:29:46 +020072
Stefan Roeseeb083e52015-12-21 13:56:33 +010073obj-$(CONFIG_ARMADA_38X) += serdes/a38x/
74obj-$(CONFIG_ARMADA_XP) += serdes/axp/
Stefan Roesee5c5aa92015-04-20 09:28:12 +020075
Stefan Roese05b17652016-05-17 15:00:30 +020076endif # CONFIG_KIRKWOOD
77endif # CONFIG_ARM64