blob: 20cb26d5ee205ca78355d16f1f0dabb0a4dc9a16 [file] [log] [blame]
developer550bf5e2016-07-11 16:05:23 +08001/*
Antonio Nino Diaz42eef852018-09-24 17:15:54 +01002 * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved.
developer550bf5e2016-07-11 16:05:23 +08003 *
dp-armfa3cf0b2017-05-03 09:38:09 +01004 * SPDX-License-Identifier: BSD-3-Clause
developer550bf5e2016-07-11 16:05:23 +08005 */
6
developer550bf5e2016-07-11 16:05:23 +08007#include <platform_def.h>
8
Antonio Nino Diaze0f90632018-12-14 00:18:21 +00009#include <common/interrupt_props.h>
10#include <drivers/arm/gicv2.h>
11#include <plat/common/platform.h>
12
Antonio Nino Diaz42eef852018-09-24 17:15:54 +010013static 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),
developer550bf5e2016-07-11 16:05:23 +080016};
17
18gicv2_driver_data_t arm_gic_data = {
19 .gicd_base = BASE_GICD_BASE,
20 .gicc_base = BASE_GICC_BASE,
Antonio Nino Diaz42eef852018-09-24 17:15:54 +010021 .interrupt_props = g0_interrupt_props,
22 .interrupt_props_num = ARRAY_SIZE(g0_interrupt_props),
developer550bf5e2016-07-11 16:05:23 +080023};
24
25void plat_mt_gic_driver_init(void)
26{
27 gicv2_driver_init(&arm_gic_data);
28}
29
30void plat_mt_gic_init(void)
31{
32 gicv2_distif_init();
33 gicv2_pcpu_distif_init();
34 gicv2_cpuif_enable();
35}
36
37void plat_mt_gic_cpuif_enable(void)
38{
39 gicv2_cpuif_enable();
40}
41
42void plat_mt_gic_cpuif_disable(void)
43{
44 gicv2_cpuif_disable();
45}
46
47void plat_mt_gic_pcpu_init(void)
48{
49 gicv2_pcpu_distif_init();
50}