blob: c0274a6f09aa33431d10519b437bc8d257269b9c [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001# SPDX-License-Identifier: GPL-2.0+
Stefan Roese41e5ee52014-10-22 12:13:17 +02002#
Stefan Roesef61aefc2016-05-17 15:00:30 +02003# Copyright (C) 2014-2016 Stefan Roese <sr@denx.de>
Stefan Roese41e5ee52014-10-22 12:13:17 +02004
Stefan Roesef61aefc2016-05-17 15:00:30 +02005ifdef CONFIG_ARM64
6
7obj-$(CONFIG_ARMADA_3700) += armada3700/
Stefan Roese21b29fc2016-05-25 08:13:45 +02008obj-$(CONFIG_ARMADA_8K) += armada8k/
9obj-y += arm64-common.o
Stefan Roesef61aefc2016-05-17 15:00:30 +020010
11else # CONFIG_ARM64
12
Stefan Roesed0787652015-04-25 06:29:46 +020013ifdef CONFIG_KIRKWOOD
14
15obj-y = dram.o
16obj-y += gpio.o
Chris Packham8ef078b2019-03-13 20:47:03 +130017obj-y += mbus.o
Stefan Roesed0787652015-04-25 06:29:46 +020018obj-y += timer.o
19
Stefan Roesef61aefc2016-05-17 15:00:30 +020020else # CONFIG_KIRKWOOD
Stefan Roesed0787652015-04-25 06:29:46 +020021
Stefan Roese41e5ee52014-10-22 12:13:17 +020022obj-y = cpu.o
Stefan Roesed0787652015-04-25 06:29:46 +020023obj-y += dram.o
Stefan Roese0ceb2da2015-08-06 14:43:13 +020024ifndef CONFIG_SPL_BUILD
Stefan Roese09e89ab2016-02-10 07:23:00 +010025obj-$(CONFIG_ARMADA_375) += ../../../drivers/ddr/marvell/axp/xor.o
Stefan Roese81e33f42015-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
Mario Sixa1b6b0a2017-01-11 16:01:00 +010028obj-$(CONFIG_MVEBU_EFUSE) += efuse.o
Baruch Siachca1a4c82018-06-18 21:56:25 +030029
30extra-y += kwbimage.cfg
31
32KWB_REPLACE += BOOT_FROM
33ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI),)
34 KWB_CFG_BOOT_FROM=spi
35endif
36ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC),)
37 KWB_CFG_BOOT_FROM=sdio
38endif
Baruch Siach72c4e672018-06-18 21:56:26 +030039ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_UART),)
40 KWB_CFG_BOOT_FROM=uart
41endif
Baruch Siachca1a4c82018-06-18 21:56:25 +030042
43ifneq ($(CONFIG_SECURED_MODE_IMAGE),)
44KWB_REPLACE += CSK_INDEX
45KWB_CFG_CSK_INDEX = $(CONFIG_SECURED_MODE_CSK_INDEX)
46
47KWB_REPLACE += SEC_BOOT_DEV
48KWB_CFG_SEC_BOOT_DEV=$(patsubst "%",%, \
49 $(if $(findstring BOOT_SPI_NOR_FLASH,$(CONFIG_SPL_BOOT_DEVICE)),0x34) \
50 $(if $(findstring BOOT_SDIO_MMC_CARD,$(CONFIG_SPL_BOOT_DEVICE)),0x31) \
51 )
52
53KWB_REPLACE += SEC_FUSE_DUMP
54KWB_CFG_SEC_FUSE_DUMP = a38x
55endif
56
57$(src)/kwbimage.cfg: $(src)/kwbimage.cfg.in include/autoconf.mk \
58 include/config/auto.conf
59 $(Q)sed -ne '$(foreach V,$(KWB_REPLACE),s/^#@$(V)/$(V) $(KWB_CFG_$(V))/;)p' \
60 <$< >$(dir $<)$(@F)
61
Stefan Roesef61aefc2016-05-17 15:00:30 +020062endif # CONFIG_SPL_BUILD
Stefan Roesed0787652015-04-25 06:29:46 +020063obj-y += gpio.o
64obj-y += mbus.o
65obj-y += timer.o
Stefan Roeseb0f80b92015-01-19 11:33:42 +010066obj-$(CONFIG_SPL_BUILD) += spl.o
67obj-$(CONFIG_SPL_BUILD) += lowlevel_spl.o
Stefan Roesed0787652015-04-25 06:29:46 +020068
Stefan Roese81e33f42015-12-21 13:56:33 +010069obj-$(CONFIG_ARMADA_38X) += serdes/a38x/
70obj-$(CONFIG_ARMADA_XP) += serdes/axp/
Stefan Roese29b103c2015-04-20 09:28:12 +020071
Stefan Roesef61aefc2016-05-17 15:00:30 +020072endif # CONFIG_KIRKWOOD
73endif # CONFIG_ARM64