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