Thomas Gleixner | caab277 | 2019-06-03 07:44:50 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Marc Zyngier | d51d0af | 2014-06-30 16:01:30 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2002 ARM Limited, All Rights Reserved. |
Marc Zyngier | d51d0af | 2014-06-30 16:01:30 +0100 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef _IRQ_GIC_COMMON_H |
| 7 | #define _IRQ_GIC_COMMON_H |
| 8 | |
| 9 | #include <linux/of.h> |
| 10 | #include <linux/irqdomain.h> |
Julien Grall | 502d6df | 2016-04-11 16:32:54 +0100 | [diff] [blame] | 11 | #include <linux/irqchip/arm-gic-common.h> |
Marc Zyngier | d51d0af | 2014-06-30 16:01:30 +0100 | [diff] [blame] | 12 | |
Robert Richter | 67510cc | 2015-09-21 22:58:37 +0200 | [diff] [blame] | 13 | struct gic_quirk { |
| 14 | const char *desc; |
Srinivas Kandagatla | f70fdb4 | 2018-12-10 13:56:31 +0000 | [diff] [blame] | 15 | const char *compatible; |
Ard Biesheuvel | 9d111d4 | 2017-10-17 17:55:55 +0100 | [diff] [blame] | 16 | bool (*init)(void *data); |
Robert Richter | 67510cc | 2015-09-21 22:58:37 +0200 | [diff] [blame] | 17 | u32 iidr; |
| 18 | u32 mask; |
| 19 | }; |
| 20 | |
Liviu Dudau | fb7e7de | 2015-01-20 16:52:59 +0000 | [diff] [blame] | 21 | int gic_configure_irq(unsigned int irq, unsigned int type, |
Marc Zyngier | d51d0af | 2014-06-30 16:01:30 +0100 | [diff] [blame] | 22 | void __iomem *base, void (*sync_access)(void)); |
| 23 | void gic_dist_config(void __iomem *base, int gic_irqs, |
| 24 | void (*sync_access)(void)); |
Marc Zyngier | 1a60e1e | 2019-07-18 11:15:14 +0100 | [diff] [blame] | 25 | void gic_cpu_config(void __iomem *base, int nr, void (*sync_access)(void)); |
Robert Richter | 67510cc | 2015-09-21 22:58:37 +0200 | [diff] [blame] | 26 | void gic_enable_quirks(u32 iidr, const struct gic_quirk *quirks, |
| 27 | void *data); |
Srinivas Kandagatla | f70fdb4 | 2018-12-10 13:56:31 +0000 | [diff] [blame] | 28 | void gic_enable_of_quirks(const struct device_node *np, |
| 29 | const struct gic_quirk *quirks, void *data); |
Marc Zyngier | d51d0af | 2014-06-30 16:01:30 +0100 | [diff] [blame] | 30 | |
Marc Zyngier | d51d0af | 2014-06-30 16:01:30 +0100 | [diff] [blame] | 31 | #endif /* _IRQ_GIC_COMMON_H */ |