Aaron Durbin | 27ce094 | 2014-09-11 16:07:02 -0500 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2014 Google Inc |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | */ |
| 19 | |
| 20 | #ifndef GIC_H |
| 21 | #define GIC_H |
| 22 | |
| 23 | #if IS_ENABLED(CONFIG_GIC) |
| 24 | |
| 25 | /* Initialize the GIC on the currently processor, including GICD and GICC. */ |
| 26 | void gic_init(void); |
Furquan Shaikh | 1e2abe0 | 2015-04-13 19:57:54 -0700 | [diff] [blame^] | 27 | void gic_disable(void); |
| 28 | void gic_enable(void); |
Aaron Durbin | 27ce094 | 2014-09-11 16:07:02 -0500 | [diff] [blame] | 29 | |
| 30 | /* Return a pointer to the base of the GIC distributor mmio region. */ |
| 31 | void *gicd_base(void); |
| 32 | |
| 33 | /* Return a pointer to the base of the GIC cpu mmio region. */ |
| 34 | void *gicc_base(void); |
| 35 | |
| 36 | #else /* CONFIG_GIC */ |
| 37 | |
| 38 | static inline void gic_init(void) {} |
Furquan Shaikh | 1e2abe0 | 2015-04-13 19:57:54 -0700 | [diff] [blame^] | 39 | static inline void gic_disable(void) {} |
Aaron Durbin | 27ce094 | 2014-09-11 16:07:02 -0500 | [diff] [blame] | 40 | |
| 41 | #endif /* CONFIG_GIC */ |
| 42 | |
| 43 | #endif /* GIC_H */ |