blob: d4ec558a7ffffe87cb2c9e7dcf221849745a20b9 [file] [log] [blame]
Angel Pons32859fc2020-04-02 23:48:27 +02001/* SPDX-License-Identifier: GPL-2.0-only */
2/* This file is part of the coreboot project. */
Aaron Durbin27ce0942014-09-11 16:07:02 -05003
4#ifndef GIC_H
5#define GIC_H
6
Julius Wernercd49cce2019-03-05 16:53:33 -08007#if CONFIG(GIC)
Aaron Durbin27ce0942014-09-11 16:07:02 -05008
9/* Initialize the GIC on the currently processor, including GICD and GICC. */
10void gic_init(void);
Furquan Shaikh1e2abe02015-04-13 19:57:54 -070011void gic_disable(void);
12void gic_enable(void);
Aaron Durbin27ce0942014-09-11 16:07:02 -050013
14/* Return a pointer to the base of the GIC distributor mmio region. */
15void *gicd_base(void);
16
Elyes HAOUAS918535a2016-07-28 21:25:21 +020017/* Return a pointer to the base of the GIC CPU mmio region. */
Aaron Durbin27ce0942014-09-11 16:07:02 -050018void *gicc_base(void);
19
20#else /* CONFIG_GIC */
21
22static inline void gic_init(void) {}
Furquan Shaikh1e2abe02015-04-13 19:57:54 -070023static inline void gic_disable(void) {}
Aaron Durbin27ce0942014-09-11 16:07:02 -050024
25#endif /* CONFIG_GIC */
26
27#endif /* GIC_H */