Angel Pons | 32859fc | 2020-04-02 23:48:27 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Aaron Durbin | 27ce094 | 2014-09-11 16:07:02 -0500 | [diff] [blame] | 2 | |
| 3 | #ifndef GIC_H |
| 4 | #define GIC_H |
| 5 | |
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 6 | #if CONFIG(GIC) |
Aaron Durbin | 27ce094 | 2014-09-11 16:07:02 -0500 | [diff] [blame] | 7 | |
| 8 | /* Initialize the GIC on the currently processor, including GICD and GICC. */ |
| 9 | void gic_init(void); |
Furquan Shaikh | 1e2abe0 | 2015-04-13 19:57:54 -0700 | [diff] [blame] | 10 | void gic_disable(void); |
| 11 | void gic_enable(void); |
Aaron Durbin | 27ce094 | 2014-09-11 16:07:02 -0500 | [diff] [blame] | 12 | |
| 13 | /* Return a pointer to the base of the GIC distributor mmio region. */ |
| 14 | void *gicd_base(void); |
| 15 | |
Elyes HAOUAS | 918535a | 2016-07-28 21:25:21 +0200 | [diff] [blame] | 16 | /* Return a pointer to the base of the GIC CPU mmio region. */ |
Aaron Durbin | 27ce094 | 2014-09-11 16:07:02 -0500 | [diff] [blame] | 17 | void *gicc_base(void); |
| 18 | |
| 19 | #else /* CONFIG_GIC */ |
| 20 | |
| 21 | static inline void gic_init(void) {} |
Furquan Shaikh | 1e2abe0 | 2015-04-13 19:57:54 -0700 | [diff] [blame] | 22 | static inline void gic_disable(void) {} |
Aaron Durbin | 27ce094 | 2014-09-11 16:07:02 -0500 | [diff] [blame] | 23 | |
| 24 | #endif /* CONFIG_GIC */ |
| 25 | |
| 26 | #endif /* GIC_H */ |