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); |
| 27 | |
| 28 | /* Return a pointer to the base of the GIC distributor mmio region. */ |
| 29 | void *gicd_base(void); |
| 30 | |
| 31 | /* Return a pointer to the base of the GIC cpu mmio region. */ |
| 32 | void *gicc_base(void); |
| 33 | |
| 34 | #else /* CONFIG_GIC */ |
| 35 | |
| 36 | static inline void gic_init(void) {} |
| 37 | |
| 38 | #endif /* CONFIG_GIC */ |
| 39 | |
| 40 | #endif /* GIC_H */ |