summaryrefslogtreecommitdiff
path: root/drivers/irqchip/irq-gic-common.c
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2018-12-10 16:56:31 +0300
committerMarc Zyngier <marc.zyngier@arm.com>2018-12-13 20:23:37 +0300
commitf70fdb42a095d265813d6cc8bd10497d7c592ab6 (patch)
treea764e3eee208d8713ab4aabe4a39b9bf0e4d5f90 /drivers/irqchip/irq-gic-common.c
parent7c813152cf9ba1901a4d621ebba1edbac910095e (diff)
downloadlinux-f70fdb42a095d265813d6cc8bd10497d7c592ab6.tar.xz
irqchip/gic: Add support to device tree based quirks
This patch adds support to device tree based quirks based on device tree compatible string. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'drivers/irqchip/irq-gic-common.c')
-rw-r--r--drivers/irqchip/irq-gic-common.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-gic-common.c b/drivers/irqchip/irq-gic-common.c
index 01e673c680cd..3c93c6f4d1f1 100644
--- a/drivers/irqchip/irq-gic-common.c
+++ b/drivers/irqchip/irq-gic-common.c
@@ -36,6 +36,18 @@ void gic_set_kvm_info(const struct gic_kvm_info *info)
gic_kvm_info = info;
}
+void gic_enable_of_quirks(const struct device_node *np,
+ const struct gic_quirk *quirks, void *data)
+{
+ for (; quirks->desc; quirks++) {
+ if (!of_device_is_compatible(np, quirks->compatible))
+ continue;
+ if (quirks->init(data))
+ pr_info("GIC: enabling workaround for %s\n",
+ quirks->desc);
+ }
+}
+
void gic_enable_quirks(u32 iidr, const struct gic_quirk *quirks,
void *data)
{