^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * Copyright (C) 2002 ARM Limited, All Rights Reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #ifndef _IRQ_GIC_COMMON_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) #define _IRQ_GIC_COMMON_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #include <linux/of.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <linux/irqdomain.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <linux/irqchip/arm-gic-common.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) struct gic_quirk {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) const char *desc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) const char *compatible;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) bool (*init)(void *data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) u32 iidr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) u32 mask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) int gic_configure_irq(unsigned int irq, unsigned int type,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) void __iomem *base, void (*sync_access)(void));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) void gic_dist_config(void __iomem *base, int gic_irqs,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) void (*sync_access)(void));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) void gic_cpu_config(void __iomem *base, int nr, void (*sync_access)(void));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) void gic_enable_quirks(u32 iidr, const struct gic_quirk *quirks,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) void *data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) void gic_enable_of_quirks(const struct device_node *np,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) const struct gic_quirk *quirks, void *data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) void gic_set_kvm_info(const struct gic_kvm_info *info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) #endif /* _IRQ_GIC_COMMON_H */