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.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 708bb115a27f..13b27ffaf45e 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>
@@ -240,15 +241,21 @@ void __iomem *omap4_get_sar_ram_base(void)
240 */ 241 */
241static int __init omap4_sar_ram_init(void) 242static int __init omap4_sar_ram_init(void)
242{ 243{
244 unsigned long sar_base;
245
243 /* 246 /*
244 * To avoid code running on other OMAPs in 247 * To avoid code running on other OMAPs in
245 * multi-omap builds 248 * multi-omap builds
246 */ 249 */
247 if (!cpu_is_omap44xx()) 250 if (cpu_is_omap44xx())
251 sar_base = OMAP44XX_SAR_RAM_BASE;
252 else if (soc_is_omap54xx())
253 sar_base = OMAP54XX_SAR_RAM_BASE;
254 else
248 return -ENOMEM; 255 return -ENOMEM;
249 256
250 /* Static mapping, never released */ 257 /* Static mapping, never released */
251 sar_ram_base = ioremap(OMAP44XX_SAR_RAM_BASE, SZ_16K); 258 sar_ram_base = ioremap(sar_base, SZ_16K);
252 if (WARN_ON(!sar_ram_base)) 259 if (WARN_ON(!sar_ram_base))
253 return -ENOMEM; 260 return -ENOMEM;
254 261
@@ -258,6 +265,21 @@ omap_early_initcall(omap4_sar_ram_init);
258 265
259void __init omap_gic_of_init(void) 266void __init omap_gic_of_init(void)
260{ 267{
268 struct device_node *np;
269
270 /* Extract GIC distributor and TWD bases for OMAP4460 ROM Errata WA */
271 if (!cpu_is_omap446x())
272 goto skip_errata_init;
273
274 np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-gic");
275 gic_dist_base_addr = of_iomap(np, 0);
276 WARN_ON(!gic_dist_base_addr);
277
278 np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-twd-timer");
279 twd_base = of_iomap(np, 0);
280 WARN_ON(!twd_base);
281
282skip_errata_init:
261 omap_wakeupgen_init(); 283 omap_wakeupgen_init();
262 irqchip_init(); 284 irqchip_init();
263} 285}