From 5fe5c4d3bf11f4580ac9ee87526b705a1ec6c57f Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 21 Oct 2011 17:03:21 +0200 Subject: [PATCH] ARM: gic: add OF based initialization This adds ARM gic interrupt controller initialization using device tree data. The initialization function is intended to be called by of_irq_init function like this: const static struct of_device_id irq_match[] = { { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, {} }; static void __init init_irqs(void) { of_irq_init(irq_match); } Signed-off-by: Rob Herring Reviewed-by: Jamie Iles Tested-by: Thomas Abraham Acked-by: Grant Likely --- arch/arm/include/asm/hardware/cache-l2x0.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h index 434edccdf7f3..1db1143a9483 100644 --- a/arch/arm/include/asm/hardware/cache-l2x0.h +++ b/arch/arm/include/asm/hardware/cache-l2x0.h @@ -102,7 +102,14 @@ #ifndef __ASSEMBLY__ extern void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask); +#if defined(CONFIG_CACHE_L2X0) && defined(CONFIG_OF) extern int l2x0_of_init(__u32 aux_val, __u32 aux_mask); +#else +static inline int l2x0_of_init(__u32 aux_val, __u32 aux_mask) +{ + return -ENODEV; +} +#endif struct l2x0_regs { unsigned long phy_base; @@ -121,6 +128,6 @@ struct l2x0_regs { extern struct l2x0_regs l2x0_saved_regs; -#endif +#endif /* __ASSEMBLY__ */ #endif -- 2.39.5