1 # 2 # Copyright (c) 2014-2015, Linaro Ltd. All rights reserved. 3 # Copyright (c) 2014-2015, Hisilicon Ltd. 4 # 5 # Redistribution and use in source and binary forms, with or without 6 # modification, are permitted provided that the following conditions are met: 7 # 8 # Redistributions of source code must retain the above copyright notice, this 9 # list of conditions and the following disclaimer. 10 # 11 # Redistributions in binary form must reproduce the above copyright notice, 12 # this list of conditions and the following disclaimer in the documentation 13 # and/or other materials provided with the distribution. 14 # 15 # Neither the name of ARM nor the names of its contributors may be used 16 # to endorse or promote products derived from this software without specific 17 # prior written permission. 18 # 19 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 # POSSIBILITY OF SUCH DAMAGE. 30 # 31 32 # On Hikey, the TSP can execute either from Trusted SRAM or Trusted DRAM. 33 # Trusted DRAM is the default. 34 # 35 PLAT_TSP_LOCATION := tdram 36 ifeq (${PLAT_TSP_LOCATION}, tsram) 37 PLAT_TSP_LOCATION_ID := PLAT_TRUSTED_SRAM_ID 38 else ifeq (${PLAT_TSP_LOCATION}, tdram) 39 PLAT_TSP_LOCATION_ID := PLAT_TRUSTED_DRAM_ID 40 else 41 $(error "Unsupported PLAT_TSP_LOCATION value") 42 endif 43 44 CONSOLE_BASE := PL011_UART3_BASE 45 CRASH_CONSOLE_BASE := PL011_UART3_BASE 46 47 # Process flags 48 $(eval $(call add_define,PLAT_TSP_LOCATION_ID)) 49 $(eval $(call add_define,CONSOLE_BASE)) 50 $(eval $(call add_define,CRASH_CONSOLE_BASE)) 51 52 53 PLAT_INCLUDES := -Iplat/hikey/include/ 54 55 PLAT_BL_COMMON_SOURCES := drivers/arm/pl011/pl011_console.S \ 56 drivers/io/io_block.c \ 57 drivers/io/io_fip.c \ 58 drivers/io/io_memmap.c \ 59 drivers/io/io_storage.c \ 60 lib/aarch64/xlat_tables.c \ 61 plat/common/aarch64/plat_common.c \ 62 plat/common/plat_gic.c \ 63 plat/hikey/aarch64/hikey_common.c \ 64 plat/hikey/aarch64/plat_helpers.S \ 65 plat/hikey/plat_io_storage.c 66 67 BL1_SOURCES += drivers/arm/cci400/cci400.c \ 68 drivers/arm/gpio/gpio.c \ 69 lib/cpus/aarch64/cortex_a53.S \ 70 plat/common/aarch64/platform_up_stack.S \ 71 plat/hikey/aarch64/bl1_plat_helpers.S \ 72 plat/hikey/bl1_plat_setup.c \ 73 plat/hikey/drivers/dw_mmc.c \ 74 plat/hikey/drivers/hi6553.c \ 75 plat/hikey/drivers/sp804_timer.c \ 76 plat/hikey/partitions.c \ 77 plat/hikey/pll.c \ 78 plat/hikey/usb.c 79 80 BL2_SOURCES += plat/common/aarch64/platform_up_stack.S \ 81 plat/hikey/bl2_plat_setup.c \ 82 plat/hikey/plat_security.c \ 83 plat/hikey/drivers/dw_mmc.c \ 84 plat/hikey/drivers/hi6553.c \ 85 plat/hikey/drivers/hisi_dvfs.c \ 86 plat/hikey/drivers/hisi_mcu.c \ 87 plat/hikey/drivers/sp804_timer.c \ 88 plat/hikey/partitions.c 89 90 BL31_SOURCES += drivers/arm/cci400/cci400.c \ 91 drivers/arm/gic/arm_gic.c \ 92 drivers/arm/gic/gic_v2.c \ 93 drivers/arm/gic/gic_v3.c \ 94 drivers/arm/gpio/gpio.c \ 95 lib/cpus/aarch64/cortex_a53.S \ 96 plat/common/aarch64/platform_mp_stack.S \ 97 plat/hikey/bl31_plat_setup.c \ 98 plat/hikey/drivers/hisi_pwrc.c \ 99 plat/hikey/drivers/hisi_pwrc_sram.S \ 100 plat/hikey/drivers/hisi_ipc.c \ 101 plat/hikey/drivers/sp804_timer.c \ 102 plat/hikey/plat_pm.c \ 103 plat/hikey/plat_topology.c 104 105 NEED_BL30 := yes 106