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.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 40a8fbc07e4b..70de277f5c15 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -24,12 +24,14 @@
24 24
25#include <plat/irqs.h> 25#include <plat/irqs.h>
26#include <plat/sram.h> 26#include <plat/sram.h>
27#include <plat/omap-secure.h>
27 28
28#include <mach/hardware.h> 29#include <mach/hardware.h>
29#include <mach/omap-wakeupgen.h> 30#include <mach/omap-wakeupgen.h>
30 31
31#include "common.h" 32#include "common.h"
32#include "omap4-sar-layout.h" 33#include "omap4-sar-layout.h"
34#include <linux/export.h>
33 35
34#ifdef CONFIG_CACHE_L2X0 36#ifdef CONFIG_CACHE_L2X0
35static void __iomem *l2cache_base; 37static void __iomem *l2cache_base;
@@ -43,6 +45,9 @@ static void __iomem *sar_ram_base;
43 45
44void __iomem *dram_sync, *sram_sync; 46void __iomem *dram_sync, *sram_sync;
45 47
48static phys_addr_t paddr;
49static u32 size;
50
46void omap_bus_sync(void) 51void omap_bus_sync(void)
47{ 52{
48 if (dram_sync && sram_sync) { 53 if (dram_sync && sram_sync) {
@@ -51,19 +56,22 @@ void omap_bus_sync(void)
51 isb(); 56 isb();
52 } 57 }
53} 58}
59EXPORT_SYMBOL(omap_bus_sync);
54 60
55static int __init omap_barriers_init(void) 61/* Steal one page physical memory for barrier implementation */
62int __init omap_barrier_reserve_memblock(void)
56{ 63{
57 struct map_desc dram_io_desc[1];
58 phys_addr_t paddr;
59 u32 size;
60
61 if (!cpu_is_omap44xx())
62 return -ENODEV;
63 64
64 size = ALIGN(PAGE_SIZE, SZ_1M); 65 size = ALIGN(PAGE_SIZE, SZ_1M);
65 paddr = arm_memblock_steal(size, SZ_1M); 66 paddr = arm_memblock_steal(size, SZ_1M);
66 67
68 return 0;
69}
70
71void __init omap_barriers_init(void)
72{
73 struct map_desc dram_io_desc[1];
74
67 dram_io_desc[0].virtual = OMAP4_DRAM_BARRIER_VA; 75 dram_io_desc[0].virtual = OMAP4_DRAM_BARRIER_VA;
68 dram_io_desc[0].pfn = __phys_to_pfn(paddr); 76 dram_io_desc[0].pfn = __phys_to_pfn(paddr);
69 dram_io_desc[0].length = size; 77 dram_io_desc[0].length = size;
@@ -75,9 +83,10 @@ static int __init omap_barriers_init(void)
75 pr_info("OMAP4: Map 0x%08llx to 0x%08lx for dram barrier\n", 83 pr_info("OMAP4: Map 0x%08llx to 0x%08lx for dram barrier\n",
76 (long long) paddr, dram_io_desc[0].virtual); 84 (long long) paddr, dram_io_desc[0].virtual);
77 85
78 return 0;
79} 86}
80core_initcall(omap_barriers_init); 87#else
88void __init omap_barriers_init(void)
89{}
81#endif 90#endif
82 91
83void __init gic_init_irq(void) 92void __init gic_init_irq(void)