blob: a4201bb440ba706b531af08018b356147caa399e [file] [log] [blame]
Angel Pons32859fc2020-04-02 23:48:27 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Aaron Durbin27ce0942014-09-11 16:07:02 -05002
3#ifndef GIC_H
4#define GIC_H
5
Julius Wernercd49cce2019-03-05 16:53:33 -08006#if CONFIG(GIC)
Aaron Durbin27ce0942014-09-11 16:07:02 -05007
8/* Initialize the GIC on the currently processor, including GICD and GICC. */
9void gic_init(void);
Furquan Shaikh1e2abe02015-04-13 19:57:54 -070010void gic_disable(void);
11void gic_enable(void);
Aaron Durbin27ce0942014-09-11 16:07:02 -050012
13/* Return a pointer to the base of the GIC distributor mmio region. */
14void *gicd_base(void);
15
Elyes HAOUAS918535a2016-07-28 21:25:21 +020016/* Return a pointer to the base of the GIC CPU mmio region. */
Aaron Durbin27ce0942014-09-11 16:07:02 -050017void *gicc_base(void);
18
19#else /* CONFIG_GIC */
20
21static inline void gic_init(void) {}
Furquan Shaikh1e2abe02015-04-13 19:57:54 -070022static inline void gic_disable(void) {}
Aaron Durbin27ce0942014-09-11 16:07:02 -050023
24#endif /* CONFIG_GIC */
25
26#endif /* GIC_H */