blob: 47a23dfe150603386adbafe6bb7dce1ef9a7d004 [file] [log] [blame]
developer550bf5e2016-07-11 16:05:23 +08001/*
2 * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
3 *
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>
8#include <plat_arm.h>
9#include <platform.h>
10#include <platform_def.h>
11
12const unsigned int g0_interrupt_array[] = {
13 PLAT_ARM_G0_IRQS
14};
15
16gicv2_driver_data_t arm_gic_data = {
17 .gicd_base = BASE_GICD_BASE,
18 .gicc_base = BASE_GICC_BASE,
19 .g0_interrupt_num = ARRAY_SIZE(g0_interrupt_array),
20 .g0_interrupt_array = g0_interrupt_array,
21};
22
23void plat_mt_gic_driver_init(void)
24{
25 gicv2_driver_init(&arm_gic_data);
26}
27
28void plat_mt_gic_init(void)
29{
30 gicv2_distif_init();
31 gicv2_pcpu_distif_init();
32 gicv2_cpuif_enable();
33}
34
35void plat_mt_gic_cpuif_enable(void)
36{
37 gicv2_cpuif_enable();
38}
39
40void plat_mt_gic_cpuif_disable(void)
41{
42 gicv2_cpuif_disable();
43}
44
45void plat_mt_gic_pcpu_init(void)
46{
47 gicv2_pcpu_distif_init();
48}