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.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index a0fe747634c1..16b20cedc38d 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -25,6 +25,7 @@
25#include <linux/irqchip/irq-crossbar.h> 25#include <linux/irqchip/irq-crossbar.h>
26#include <linux/of_address.h> 26#include <linux/of_address.h>
27#include <linux/reboot.h> 27#include <linux/reboot.h>
28#include <linux/genalloc.h>
28 29
29#include <asm/hardware/cache-l2x0.h> 30#include <asm/hardware/cache-l2x0.h>
30#include <asm/mach/map.h> 31#include <asm/mach/map.h>
@@ -71,6 +72,26 @@ void omap_bus_sync(void)
71} 72}
72EXPORT_SYMBOL(omap_bus_sync); 73EXPORT_SYMBOL(omap_bus_sync);
73 74
75static int __init omap4_sram_init(void)
76{
77 struct device_node *np;
78 struct gen_pool *sram_pool;
79
80 np = of_find_compatible_node(NULL, NULL, "ti,omap4-mpu");
81 if (!np)
82 pr_warn("%s:Unable to allocate sram needed to handle errata I688\n",
83 __func__);
84 sram_pool = of_get_named_gen_pool(np, "sram", 0);
85 if (!sram_pool)
86 pr_warn("%s:Unable to get sram pool needed to handle errata I688\n",
87 __func__);
88 else
89 sram_sync = (void *)gen_pool_alloc(sram_pool, PAGE_SIZE);
90
91 return 0;
92}
93omap_arch_initcall(omap4_sram_init);
94
74/* Steal one page physical memory for barrier implementation */ 95/* Steal one page physical memory for barrier implementation */
75int __init omap_barrier_reserve_memblock(void) 96int __init omap_barrier_reserve_memblock(void)
76{ 97{
@@ -91,7 +112,6 @@ void __init omap_barriers_init(void)
91 dram_io_desc[0].type = MT_MEMORY_RW_SO; 112 dram_io_desc[0].type = MT_MEMORY_RW_SO;
92 iotable_init(dram_io_desc, ARRAY_SIZE(dram_io_desc)); 113 iotable_init(dram_io_desc, ARRAY_SIZE(dram_io_desc));
93 dram_sync = (void __iomem *) dram_io_desc[0].virtual; 114 dram_sync = (void __iomem *) dram_io_desc[0].virtual;
94 sram_sync = (void __iomem *) OMAP4_SRAM_VA;
95 115
96 pr_info("OMAP4: Map 0x%08llx to 0x%08lx for dram barrier\n", 116 pr_info("OMAP4: Map 0x%08llx to 0x%08lx for dram barrier\n",
97 (long long) paddr, dram_io_desc[0].virtual); 117 (long long) paddr, dram_io_desc[0].virtual);