blob: 25144205637fbd4a1e5bc3f863b193b9fe8ad732 [file] [log] [blame]
Aaron Durbin27ce0942014-09-11 16:07:02 -05001/*
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. */
26void gic_init(void);
Furquan Shaikh1e2abe02015-04-13 19:57:54 -070027void gic_disable(void);
28void gic_enable(void);
Aaron Durbin27ce0942014-09-11 16:07:02 -050029
30/* Return a pointer to the base of the GIC distributor mmio region. */
31void *gicd_base(void);
32
33/* Return a pointer to the base of the GIC cpu mmio region. */
34void *gicc_base(void);
35
36#else /* CONFIG_GIC */
37
38static inline void gic_init(void) {}
Furquan Shaikh1e2abe02015-04-13 19:57:54 -070039static inline void gic_disable(void) {}
Aaron Durbin27ce0942014-09-11 16:07:02 -050040
41#endif /* CONFIG_GIC */
42
43#endif /* GIC_H */