diff options
Diffstat (limited to 'arch/arm/mach-omap2/omap4-common.c')
-rw-r--r-- | arch/arm/mach-omap2/omap4-common.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index 40a8fbc07e4b..ebc595091312 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c | |||
@@ -24,6 +24,7 @@ | |||
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> |
@@ -43,6 +44,9 @@ static void __iomem *sar_ram_base; | |||
43 | 44 | ||
44 | void __iomem *dram_sync, *sram_sync; | 45 | void __iomem *dram_sync, *sram_sync; |
45 | 46 | ||
47 | static phys_addr_t paddr; | ||
48 | static u32 size; | ||
49 | |||
46 | void omap_bus_sync(void) | 50 | void omap_bus_sync(void) |
47 | { | 51 | { |
48 | if (dram_sync && sram_sync) { | 52 | if (dram_sync && sram_sync) { |
@@ -52,18 +56,20 @@ void omap_bus_sync(void) | |||
52 | } | 56 | } |
53 | } | 57 | } |
54 | 58 | ||
55 | static int __init omap_barriers_init(void) | 59 | /* Steal one page physical memory for barrier implementation */ |
60 | int __init omap_barrier_reserve_memblock(void) | ||
56 | { | 61 | { |
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 | 62 | ||
64 | size = ALIGN(PAGE_SIZE, SZ_1M); | 63 | size = ALIGN(PAGE_SIZE, SZ_1M); |
65 | paddr = arm_memblock_steal(size, SZ_1M); | 64 | paddr = arm_memblock_steal(size, SZ_1M); |
66 | 65 | ||
66 | return 0; | ||
67 | } | ||
68 | |||
69 | void __init omap_barriers_init(void) | ||
70 | { | ||
71 | struct map_desc dram_io_desc[1]; | ||
72 | |||
67 | dram_io_desc[0].virtual = OMAP4_DRAM_BARRIER_VA; | 73 | dram_io_desc[0].virtual = OMAP4_DRAM_BARRIER_VA; |
68 | dram_io_desc[0].pfn = __phys_to_pfn(paddr); | 74 | dram_io_desc[0].pfn = __phys_to_pfn(paddr); |
69 | dram_io_desc[0].length = size; | 75 | dram_io_desc[0].length = size; |
@@ -75,9 +81,10 @@ static int __init omap_barriers_init(void) | |||
75 | pr_info("OMAP4: Map 0x%08llx to 0x%08lx for dram barrier\n", | 81 | pr_info("OMAP4: Map 0x%08llx to 0x%08lx for dram barrier\n", |
76 | (long long) paddr, dram_io_desc[0].virtual); | 82 | (long long) paddr, dram_io_desc[0].virtual); |
77 | 83 | ||
78 | return 0; | ||
79 | } | 84 | } |
80 | core_initcall(omap_barriers_init); | 85 | #else |
86 | void __init omap_barriers_init(void) | ||
87 | {} | ||
81 | #endif | 88 | #endif |
82 | 89 | ||
83 | void __init gic_init_irq(void) | 90 | void __init gic_init_irq(void) |