blob: 97f2e1c7f36204b5ef30e633908369f4b8f50d66 [file] [log] [blame]
developer550bf5e2016-07-11 16:05:23 +08001#
2# Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are met:
6#
7# Redistributions of source code must retain the above copyright notice, this
8# list of conditions and the following disclaimer.
9#
10# Redistributions in binary form must reproduce the above copyright notice,
11# this list of conditions and the following disclaimer in the documentation
12# and/or other materials provided with the distribution.
13#
14# Neither the name of ARM nor the names of its contributors may be used
15# to endorse or promote products derived from this software without specific
16# prior written permission.
17#
18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28# POSSIBILITY OF SUCH DAMAGE.
29#
30
31MTK_PLAT := plat/mediatek
32MTK_PLAT_SOC := ${MTK_PLAT}/${PLAT}
33
34# Add OEM customized codes
35OEMS := true
36MTK_SIP_KERNEL_BOOT_ENABLE := 1
37
38
39ifneq (${OEMS},none)
40 OEMS_INCLUDES := -I${MTK_PLAT}/common/custom/
41 OEMS_SOURCES := ${MTK_PLAT}/common/custom/oem_svc.c
42endif
43
44PLAT_INCLUDES := -I${MTK_PLAT}/common/ \
45 -I${MTK_PLAT}/common/drivers/uart \
46 -I${MTK_PLAT_SOC}/ \
47 -I${MTK_PLAT_SOC}/drivers/timer/ \
48 -I${MTK_PLAT_SOC}/include/ \
49 -Iinclude/plat/arm/common/ \
50 -Iinclude/common/tbbr/ \
51 ${OEMS_INCLUDES}
52
53PLAT_BL_COMMON_SOURCES := lib/aarch64/xlat_tables.c \
54 plat/common/aarch64/plat_common.c \
55 plat/common/plat_gic.c
56
57BL31_SOURCES += drivers/arm/cci/cci.c \
58 drivers/delay_timer/generic_delay_timer.c \
59 drivers/arm/gic/common/gic_common.c \
60 drivers/arm/gic/v2/gicv2_main.c \
61 drivers/arm/gic/v2/gicv2_helpers.c \
62 plat/common/plat_gicv2.c \
63 drivers/console/console.S \
64 drivers/delay_timer/delay_timer.c \
65 lib/cpus/aarch64/cortex_a53.S \
66 plat/common/aarch64/platform_mp_stack.S \
67 ${MTK_PLAT_SOC}/bl31_plat_setup.c \
68 ${MTK_PLAT_SOC}/plat_mt_gic.c \
69 ${MTK_PLAT}/common/mtk_sip_svc.c \
70 ${MTK_PLAT}/common/mtk_plat_common.c \
71 ${MTK_PLAT}/common/drivers/uart/8250_console.S \
72 ${MTK_PLAT_SOC}/aarch64/plat_helpers.S \
73 ${MTK_PLAT_SOC}/drivers/timer/mt_cpuxgpt.c \
74 ${MTK_PLAT_SOC}/plat_sip_svc.c \
75 ${MTK_PLAT_SOC}/plat_delay_timer.c \
76 ${MTK_PLAT_SOC}/plat_pm.c \
77 ${MTK_PLAT_SOC}/plat_topology.c \
78 ${MTK_PLAT_SOC}/power_tracer.c \
79 ${MTK_PLAT_SOC}/scu.c \
80 ${OEMS_SOURCES}
81
82# Flag used by the MTK_platform port to determine the version of ARM GIC
83# architecture to use for interrupt management in EL3.
84ARM_GIC_ARCH := 2
85$(eval $(call add_define,ARM_GIC_ARCH))
86
87# Enable workarounds for selected Cortex-A53 erratas.
88ERRATA_A53_826319 := 1
89ERRATA_A53_836870 := 1
90
91# indicate the reset vector address can be programmed
92PROGRAMMABLE_RESET_ADDRESS := 1
93
94$(eval $(call add_define,MTK_SIP_KERNEL_BOOT_ENABLE))
95