xref: /rk3399_rockchip-uboot/arch/arm/mach-rockchip/Makefile (revision a66fd6dcbc6344967fabd3e7a5f8ec6bb585d0e2)
1#
2# Copyright (c) 2014 Google, Inc
3#
4# SPDX-License-Identifier:	GPL-2.0+
5#
6
7# We don't want the bootrom-helper present in a full U-Boot build, as
8# this may have entered from ATF with the stack-pointer pointing to
9# inaccessible/protected memory (and the bootrom-helper assumes that
10# the stack-pointer is valid before switching to the U-Boot stack).
11obj-spl-$(CONFIG_ROCKCHIP_BROM_HELPER) += bootrom.o
12obj-tpl-$(CONFIG_ROCKCHIP_BROM_HELPER) += bootrom.o
13
14obj-tpl-y += tpl.o
15obj-spl-y += spl.o spl-boot-order.o
16
17ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),)
18
19# Always include boot_mode.o, as we bypass it (i.e. turn it off)
20# inside of boot_mode.c when CONFIG_BOOT_MODE_REG is 0.  This way,
21# we can have the preprocessor correctly recognise both 0x0 and 0
22# meaning "turn it off".
23obj-y += boot_mode.o
24obj-y += board.o
25obj-y += chip_info.o
26
27obj-$(CONFIG_ROCKCHIP_CRC) += rockchip_crc.o
28obj-$(CONFIG_ROCKCHIP_SMCCC) += rockchip_smccc.o
29obj-$(CONFIG_ROCKCHIP_VENDOR_PARTITION) += vendor.o
30obj-$(CONFIG_ROCKCHIP_RESOURCE_IMAGE) += resource_img.o
31endif
32
33obj-$(CONFIG_$(SPL_TPL_)RAM) += sdram_common.o
34
35obj-$(CONFIG_ROCKCHIP_PX30) += px30/
36obj-$(CONFIG_ROCKCHIP_RK3036) += rk3036/
37obj-$(CONFIG_ROCKCHIP_RK3066) += rk3066/
38obj-$(CONFIG_ROCKCHIP_RK3128) += rk3128/
39ifndef CONFIG_TPL_BUILD
40obj-$(CONFIG_ROCKCHIP_RK3188) += rk3188/
41endif
42obj-$(CONFIG_ROCKCHIP_RK322X) += rk322x/
43obj-$(CONFIG_ROCKCHIP_RK3288) += rk3288/
44obj-$(CONFIG_ROCKCHIP_RK3308) += rk3308/
45obj-$(CONFIG_ROCKCHIP_RK3328) += rk3328/
46obj-$(CONFIG_ROCKCHIP_RK3368) += rk3368/
47obj-$(CONFIG_ROCKCHIP_RK3399) += rk3399/
48obj-$(CONFIG_ROCKCHIP_RV1108) += rv1108/
49
50# Clear out SPL objects, in case this is a TPL build
51obj-spl-$(CONFIG_TPL_BUILD) =
52
53# Now add SPL/TPL objects back into the main build
54obj-$(CONFIG_SPL_BUILD) += $(obj-spl-y)
55obj-$(CONFIG_TPL_BUILD) += $(obj-tpl-y)
56