diff options
author | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2013-02-25 14:12:58 +0530 |
---|---|---|
committer | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2013-03-28 12:56:00 +0530 |
commit | fd1c07861491abf5e0e9ca06799bb5c48f99b64d (patch) | |
tree | 36cfa3a1ca89b5fcf02c6cd009b3da900a2d97f0 /arch | |
parent | d5336a5a0b4602b38c48d76e46269bf1f357d492 (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')
-rw-r--r-- | arch/arm/mach-omap2/omap4-common.c | 16 |
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 708bb115a27..20bf3c754bf 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c @@ -22,6 +22,7 @@ #include <linux/of_platform.h> #include <linux/export.h> #include <linux/irqchip/arm-gic.h> +#include <linux/of_address.h> #include <asm/hardware/cache-l2x0.h> #include <asm/mach/map.h> @@ -258,6 +259,21 @@ omap_early_initcall(omap4_sar_ram_init); void __init omap_gic_of_init(void) { + struct device_node *np; + + /* Extract GIC distributor and TWD bases for OMAP4460 ROM Errata WA */ + if (!cpu_is_omap446x()) + goto skip_errata_init; + + np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-gic"); + gic_dist_base_addr = of_iomap(np, 0); + WARN_ON(!gic_dist_base_addr); + + np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-twd-timer"); + twd_base = of_iomap(np, 0); + WARN_ON(!twd_base); + +skip_errata_init: omap_wakeupgen_init(); irqchip_init(); } |