Add Broadcom's code for bcm63xx support
[project/bcm63xx/atf.git] / plat / bcm / platform.mk
1 include lib/libfdt/libfdt.mk
2
3 PLAT_INCLUDES := -Iinclude/plat/arm/common/ \
4 -Iinclude/plat/common/ \
5 -Iinclude/plat/arm/common/aarch64/ \
6 -Iplat/bcm/include \
7 -Iplat/bcm/include/bcm963xx \
8 -Iplat/bcm/drivers \
9 -Iinclude/drivers/ \
10 -Iinclude/drivers/arm/ \
11 -Iinclude/common/ \
12 -Iinclude/common/tbbr \
13 -Iinclude/lib/ \
14 -Iinclude/lib/psci/ \
15 -Iinclude/bl31/
16
17
18 ifeq ($(strip $(KERNEL_ARCH)),arm)
19 PLAT_BL_A9_SOURCE := plat/bcm/aarch32/pl310_a32.S \
20 plat/bcm/aarch32/cortexa9_mmu.S
21
22 PLAT_BL_COMMON_SOURCES := drivers/arm/gic/v2/gicv2_helpers.c \
23 drivers/arm/gic/v2/gicv2_main.c \
24 drivers/arm/gic/common/gic_common.c \
25 drivers/arm/pl011/aarch32/pl011_console.S \
26 drivers/delay_timer/delay_timer.c \
27 drivers/delay_timer/generic_delay_timer.c \
28 lib/xlat_tables/xlat_tables_common.c \
29 lib/xlat_tables/aarch32/xlat_tables.c \
30 plat/common/plat_psci_common.c \
31 plat/common/aarch32/platform_mp_stack.S \
32 plat/bcm/aarch32/plat_helpers.S \
33 plat/arm/common/aarch32/arm_helpers.S \
34 plat/arm/common/arm_common.c \
35 plat/bcm/brcm_bl32_setup.c \
36 plat/bcm/brcm_pm.c \
37 plat/bcm/topology.c \
38 plat/bcm/drivers/pmc_drv.c \
39 plat/bcm/drivers/pmc_cpu_core.c \
40 plat/bcm/sp_min/src/opteed_main.c \
41 plat/bcm/aarch32/opteed_helper.S
42
43 ifeq ($(strip $(BRCM_CHIP)),63138)
44 PLAT_BL_COMMON_SOURCES += $(PLAT_BL_A9_SOURCE)
45 # following is needed to compile out code that A9 does not support
46 PL011_GENERIC_UART := 1
47 endif
48
49 else
50 PLAT_BL_COMMON_SOURCES := drivers/arm/pl011/aarch64/pl011_console.S \
51 lib/xlat_tables/xlat_tables_common.c \
52 lib/xlat_tables/aarch64/xlat_tables.c
53
54 BL31_SOURCES += \
55 lib/cpus/aarch64/cortex_a53.S \
56 drivers/arm/gic/v2/gicv2_helpers.c \
57 drivers/arm/gic/v2/gicv2_main.c \
58 drivers/arm/gic/common/gic_common.c \
59 plat/common/plat_psci_common.c \
60 plat/bcm/brcm_pm.c \
61 plat/bcm/topology.c \
62 plat/bcm/aarch64/plat_helpers.S \
63 plat/bcm/brcm_bl31_setup.c \
64 plat/bcm/bcm_gic.c \
65 plat/bcm/drivers/pmc_drv.c \
66 plat/bcm/drivers/pmc_cpu_core.c \
67 plat/arm/common/arm_common.c \
68 drivers/delay_timer/delay_timer.c \
69 drivers/delay_timer/generic_delay_timer.c
70 endif
71
72 override WARMBOOT_ENABLE_DCACHE_EARLY := 1
73 override PROGRAMMABLE_RESET_ADDRESS := 1
74
75 # Disable the PSCI platform compatibility layer
76 ENABLE_PLAT_COMPAT := 0
77
78 BL32_RAM_LOCATION := tdram
79 ifeq (${BL32_RAM_LOCATION}, tsram)
80 BL32_RAM_LOCATION_ID = SEC_SRAM_ID
81 else ifeq (${BL32_RAM_LOCATION}, tdram)
82 BL32_RAM_LOCATION_ID = SEC_DRAM_ID
83 else
84 $(error "Unsupported BL32_RAM_LOCATION value")
85 endif
86
87 # Process flags
88 $(eval $(call add_define,BL32_RAM_LOCATION_ID))