blob: 11282fc546970118590a391eaa12605fa418ec81 [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
7#include <gicv2.h>
Antonio Nino Diaz42eef852018-09-24 17:15:54 +01008#include <interrupt_props.h>
developer550bf5e2016-07-11 16:05:23 +08009#include <platform.h>
10#include <platform_def.h>
11
Antonio Nino Diaz42eef852018-09-24 17:15:54 +010012static const interrupt_prop_t g0_interrupt_props[] = {
13 INTR_PROP_DESC(FIQ_SMP_CALL_SGI, GIC_HIGHEST_SEC_PRIORITY,
14 GICV2_INTR_GROUP0, GIC_INTR_CFG_LEVEL),
developer550bf5e2016-07-11 16:05:23 +080015};
16
17gicv2_driver_data_t arm_gic_data = {
18 .gicd_base = BASE_GICD_BASE,
19 .gicc_base = BASE_GICC_BASE,
Antonio Nino Diaz42eef852018-09-24 17:15:54 +010020 .interrupt_props = g0_interrupt_props,
21 .interrupt_props_num = ARRAY_SIZE(g0_interrupt_props),
developer550bf5e2016-07-11 16:05:23 +080022};
23
24void plat_mt_gic_driver_init(void)
25{
26 gicv2_driver_init(&arm_gic_data);
27}
28
29void plat_mt_gic_init(void)
30{
31 gicv2_distif_init();
32 gicv2_pcpu_distif_init();
33 gicv2_cpuif_enable();
34}
35
36void plat_mt_gic_cpuif_enable(void)
37{
38 gicv2_cpuif_enable();
39}
40
41void plat_mt_gic_cpuif_disable(void)
42{
43 gicv2_cpuif_disable();
44}
45
46void plat_mt_gic_pcpu_init(void)
47{
48 gicv2_pcpu_distif_init();
49}