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