aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap4-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/omap4-common.c')
-rw-r--r--arch/arm/mach-omap2/omap4-common.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index cf7aafb27fd1..7bb116a6f86f 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -241,26 +241,26 @@ static int __init omap4_sar_ram_init(void)
241} 241}
242omap_early_initcall(omap4_sar_ram_init); 242omap_early_initcall(omap4_sar_ram_init);
243 243
244static const struct of_device_id gic_match[] = { 244static const struct of_device_id intc_match[] = {
245 { .compatible = "arm,cortex-a9-gic", }, 245 { .compatible = "ti,omap4-wugen-mpu", },
246 { .compatible = "arm,cortex-a15-gic", }, 246 { .compatible = "ti,omap5-wugen-mpu", },
247 { }, 247 { },
248}; 248};
249 249
250static struct device_node *gic_node; 250static struct device_node *intc_node;
251 251
252unsigned int omap4_xlate_irq(unsigned int hwirq) 252unsigned int omap4_xlate_irq(unsigned int hwirq)
253{ 253{
254 struct of_phandle_args irq_data; 254 struct of_phandle_args irq_data;
255 unsigned int irq; 255 unsigned int irq;
256 256
257 if (!gic_node) 257 if (!intc_node)
258 gic_node = of_find_matching_node(NULL, gic_match); 258 intc_node = of_find_matching_node(NULL, intc_match);
259 259
260 if (WARN_ON(!gic_node)) 260 if (WARN_ON(!intc_node))
261 return hwirq; 261 return hwirq;
262 262
263 irq_data.np = gic_node; 263 irq_data.np = intc_node;
264 irq_data.args_count = 3; 264 irq_data.args_count = 3;
265 irq_data.args[0] = 0; 265 irq_data.args[0] = 0;
266 irq_data.args[1] = hwirq - OMAP44XX_IRQ_GIC_START; 266 irq_data.args[1] = hwirq - OMAP44XX_IRQ_GIC_START;
@@ -277,6 +277,12 @@ void __init omap_gic_of_init(void)
277{ 277{
278 struct device_node *np; 278 struct device_node *np;
279 279
280 intc_node = of_find_matching_node(NULL, intc_match);
281 if (WARN_ON(!intc_node)) {
282 pr_err("No WUGEN found in DT, system will misbehave.\n");
283 pr_err("UPDATE YOUR DEVICE TREE!\n");
284 }
285
280 /* Extract GIC distributor and TWD bases for OMAP4460 ROM Errata WA */ 286 /* Extract GIC distributor and TWD bases for OMAP4460 ROM Errata WA */
281 if (!cpu_is_omap446x()) 287 if (!cpu_is_omap446x())
282 goto skip_errata_init; 288 goto skip_errata_init;
@@ -290,6 +296,5 @@ void __init omap_gic_of_init(void)
290 WARN_ON(!twd_base); 296 WARN_ON(!twd_base);
291 297
292skip_errata_init: 298skip_errata_init:
293 omap_wakeupgen_init();
294 irqchip_init(); 299 irqchip_init();
295} 300}