1 /* 2 * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #include <platform_def.h> 8 9 #include <common/interrupt_props.h> 10 #include <drivers/arm/gicv2.h> 11 #include <plat/common/platform.h> 12 13 static const interrupt_prop_t g0_interrupt_props[] = { 14 INTR_PROP_DESC(FIQ_SMP_CALL_SGI, GIC_HIGHEST_SEC_PRIORITY, 15 GICV2_INTR_GROUP0, GIC_INTR_CFG_LEVEL), 16 }; 17 18 gicv2_driver_data_t arm_gic_data = { 19 .gicd_base = BASE_GICD_BASE, 20 .gicc_base = BASE_GICC_BASE, 21 .interrupt_props = g0_interrupt_props, 22 .interrupt_props_num = ARRAY_SIZE(g0_interrupt_props), 23 }; 24 plat_mt_gic_driver_init(void)25void plat_mt_gic_driver_init(void) 26 { 27 gicv2_driver_init(&arm_gic_data); 28 } 29 plat_mt_gic_init(void)30void plat_mt_gic_init(void) 31 { 32 gicv2_distif_init(); 33 gicv2_pcpu_distif_init(); 34 gicv2_cpuif_enable(); 35 } 36 plat_mt_gic_cpuif_enable(void)37void plat_mt_gic_cpuif_enable(void) 38 { 39 gicv2_cpuif_enable(); 40 } 41 plat_mt_gic_cpuif_disable(void)42void plat_mt_gic_cpuif_disable(void) 43 { 44 gicv2_cpuif_disable(); 45 } 46 plat_mt_gic_pcpu_init(void)47void plat_mt_gic_pcpu_init(void) 48 { 49 gicv2_pcpu_distif_init(); 50 } 51