Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0+ |
Stefan Roese | 41e5ee5 | 2014-10-22 12:13:17 +0200 | [diff] [blame] | 2 | # |
Stefan Roese | f61aefc | 2016-05-17 15:00:30 +0200 | [diff] [blame] | 3 | # Copyright (C) 2014-2016 Stefan Roese <sr@denx.de> |
Stefan Roese | 41e5ee5 | 2014-10-22 12:13:17 +0200 | [diff] [blame] | 4 | |
Stefan Roese | f61aefc | 2016-05-17 15:00:30 +0200 | [diff] [blame] | 5 | ifdef CONFIG_ARM64 |
| 6 | |
| 7 | obj-$(CONFIG_ARMADA_3700) += armada3700/ |
Stefan Roese | 21b29fc | 2016-05-25 08:13:45 +0200 | [diff] [blame] | 8 | obj-$(CONFIG_ARMADA_8K) += armada8k/ |
| 9 | obj-y += arm64-common.o |
Stefan Roese | f61aefc | 2016-05-17 15:00:30 +0200 | [diff] [blame] | 10 | |
| 11 | else # CONFIG_ARM64 |
| 12 | |
Stefan Roese | d078765 | 2015-04-25 06:29:46 +0200 | [diff] [blame] | 13 | ifdef CONFIG_KIRKWOOD |
| 14 | |
| 15 | obj-y = dram.o |
| 16 | obj-y += gpio.o |
Chris Packham | 8ef078b | 2019-03-13 20:47:03 +1300 | [diff] [blame^] | 17 | obj-y += mbus.o |
Stefan Roese | d078765 | 2015-04-25 06:29:46 +0200 | [diff] [blame] | 18 | obj-y += timer.o |
| 19 | |
Stefan Roese | f61aefc | 2016-05-17 15:00:30 +0200 | [diff] [blame] | 20 | else # CONFIG_KIRKWOOD |
Stefan Roese | d078765 | 2015-04-25 06:29:46 +0200 | [diff] [blame] | 21 | |
Stefan Roese | 41e5ee5 | 2014-10-22 12:13:17 +0200 | [diff] [blame] | 22 | obj-y = cpu.o |
Stefan Roese | d078765 | 2015-04-25 06:29:46 +0200 | [diff] [blame] | 23 | obj-y += dram.o |
Stefan Roese | 0ceb2da | 2015-08-06 14:43:13 +0200 | [diff] [blame] | 24 | ifndef CONFIG_SPL_BUILD |
Stefan Roese | 09e89ab | 2016-02-10 07:23:00 +0100 | [diff] [blame] | 25 | obj-$(CONFIG_ARMADA_375) += ../../../drivers/ddr/marvell/axp/xor.o |
Stefan Roese | 81e33f4 | 2015-12-21 13:56:33 +0100 | [diff] [blame] | 26 | obj-$(CONFIG_ARMADA_38X) += ../../../drivers/ddr/marvell/a38x/xor.o |
| 27 | obj-$(CONFIG_ARMADA_XP) += ../../../drivers/ddr/marvell/axp/xor.o |
Mario Six | a1b6b0a | 2017-01-11 16:01:00 +0100 | [diff] [blame] | 28 | obj-$(CONFIG_MVEBU_EFUSE) += efuse.o |
Baruch Siach | ca1a4c8 | 2018-06-18 21:56:25 +0300 | [diff] [blame] | 29 | |
| 30 | extra-y += kwbimage.cfg |
| 31 | |
| 32 | KWB_REPLACE += BOOT_FROM |
| 33 | ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI),) |
| 34 | KWB_CFG_BOOT_FROM=spi |
| 35 | endif |
| 36 | ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC),) |
| 37 | KWB_CFG_BOOT_FROM=sdio |
| 38 | endif |
Baruch Siach | 72c4e67 | 2018-06-18 21:56:26 +0300 | [diff] [blame] | 39 | ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_UART),) |
| 40 | KWB_CFG_BOOT_FROM=uart |
| 41 | endif |
Baruch Siach | ca1a4c8 | 2018-06-18 21:56:25 +0300 | [diff] [blame] | 42 | |
| 43 | ifneq ($(CONFIG_SECURED_MODE_IMAGE),) |
| 44 | KWB_REPLACE += CSK_INDEX |
| 45 | KWB_CFG_CSK_INDEX = $(CONFIG_SECURED_MODE_CSK_INDEX) |
| 46 | |
| 47 | KWB_REPLACE += SEC_BOOT_DEV |
| 48 | KWB_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 | |
| 53 | KWB_REPLACE += SEC_FUSE_DUMP |
| 54 | KWB_CFG_SEC_FUSE_DUMP = a38x |
| 55 | endif |
| 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 Roese | f61aefc | 2016-05-17 15:00:30 +0200 | [diff] [blame] | 62 | endif # CONFIG_SPL_BUILD |
Stefan Roese | d078765 | 2015-04-25 06:29:46 +0200 | [diff] [blame] | 63 | obj-y += gpio.o |
| 64 | obj-y += mbus.o |
| 65 | obj-y += timer.o |
Stefan Roese | b0f80b9 | 2015-01-19 11:33:42 +0100 | [diff] [blame] | 66 | obj-$(CONFIG_SPL_BUILD) += spl.o |
| 67 | obj-$(CONFIG_SPL_BUILD) += lowlevel_spl.o |
Stefan Roese | d078765 | 2015-04-25 06:29:46 +0200 | [diff] [blame] | 68 | |
Stefan Roese | 81e33f4 | 2015-12-21 13:56:33 +0100 | [diff] [blame] | 69 | obj-$(CONFIG_ARMADA_38X) += serdes/a38x/ |
| 70 | obj-$(CONFIG_ARMADA_XP) += serdes/axp/ |
Stefan Roese | 29b103c | 2015-04-20 09:28:12 +0200 | [diff] [blame] | 71 | |
Stefan Roese | f61aefc | 2016-05-17 15:00:30 +0200 | [diff] [blame] | 72 | endif # CONFIG_KIRKWOOD |
| 73 | endif # CONFIG_ARM64 |