aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap4-common.c
diff options
context:
space:
mode:
authorSantosh Shilimkar <santosh.shilimkar@ti.com>2013-02-25 03:42:58 -0500
committerSantosh Shilimkar <santosh.shilimkar@ti.com>2013-03-28 03:26:00 -0400
commitfd1c07861491abf5e0e9ca06799bb5c48f99b64d (patch)
tree36cfa3a1ca89b5fcf02c6cd009b3da900a2d97f0 /arch/arm/mach-omap2/omap4-common.c
parentd5336a5a0b4602b38c48d76e46269bf1f357d492 (diff)
ARM: OMAP4: Fix the init code to have OMAP4460 errata available in DT build
OMAP4460 ROM code bug needs the GIC distributor and local timer bases to be available for the bug work around. In current code, dt case these bases are not initialized leading to failure of the errata work-around. Fix it by extracting the bases from dt blob and populating them. Reported-by: Sourav Poddar <sourav.poddar@ti.com> Tested-by: Sourav Poddar <sourav.poddar@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap4-common.c')
-rw-r--r--arch/arm/mach-omap2/omap4-common.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 708bb115a27f..20bf3c754bfd 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -22,6 +22,7 @@
22#include <linux/of_platform.h> 22#include <linux/of_platform.h>
23#include <linux/export.h> 23#include <linux/export.h>
24#include <linux/irqchip/arm-gic.h> 24#include <linux/irqchip/arm-gic.h>
25#include <linux/of_address.h>
25 26
26#include <asm/hardware/cache-l2x0.h> 27#include <asm/hardware/cache-l2x0.h>
27#include <asm/mach/map.h> 28#include <asm/mach/map.h>
@@ -258,6 +259,21 @@ omap_early_initcall(omap4_sar_ram_init);
258 259
259void __init omap_gic_of_init(void) 260void __init omap_gic_of_init(void)
260{ 261{
262 struct device_node *np;
263
264 /* Extract GIC distributor and TWD bases for OMAP4460 ROM Errata WA */
265 if (!cpu_is_omap446x())
266 goto skip_errata_init;
267
268 np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-gic");
269 gic_dist_base_addr = of_iomap(np, 0);
270 WARN_ON(!gic_dist_base_addr);
271
272 np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-twd-timer");
273 twd_base = of_iomap(np, 0);
274 WARN_ON(!twd_base);
275
276skip_errata_init:
261 omap_wakeupgen_init(); 277 omap_wakeupgen_init();
262 irqchip_init(); 278 irqchip_init();
263} 279}