diff options
Diffstat (limited to 'arch/arm/plat-omap/devices.c')
-rw-r--r-- | arch/arm/plat-omap/devices.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index d1920be7833b..4c8f9b96aa6c 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/memblock.h> | ||
18 | 19 | ||
19 | #include <mach/hardware.h> | 20 | #include <mach/hardware.h> |
20 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
@@ -272,6 +273,35 @@ static void omap_init_wdt(void) | |||
272 | static inline void omap_init_wdt(void) {} | 273 | static inline void omap_init_wdt(void) {} |
273 | #endif | 274 | #endif |
274 | 275 | ||
276 | #if defined(CONFIG_TIDSPBRIDGE) || defined(CONFIG_TIDSPBRIDGE_MODULE) | ||
277 | |||
278 | static phys_addr_t omap_dsp_phys_mempool_base; | ||
279 | |||
280 | void __init omap_dsp_reserve_sdram_memblock(void) | ||
281 | { | ||
282 | phys_addr_t size = CONFIG_TIDSPBRIDGE_MEMPOOL_SIZE; | ||
283 | phys_addr_t paddr; | ||
284 | |||
285 | if (!size) | ||
286 | return; | ||
287 | |||
288 | paddr = __memblock_alloc_base(size, SZ_1M, MEMBLOCK_REAL_LIMIT); | ||
289 | if (!paddr) { | ||
290 | pr_err("%s: failed to reserve %x bytes\n", | ||
291 | __func__, size); | ||
292 | return; | ||
293 | } | ||
294 | |||
295 | omap_dsp_phys_mempool_base = paddr; | ||
296 | } | ||
297 | |||
298 | phys_addr_t omap_dsp_get_mempool_base(void) | ||
299 | { | ||
300 | return omap_dsp_phys_mempool_base; | ||
301 | } | ||
302 | EXPORT_SYMBOL(omap_dsp_get_mempool_base); | ||
303 | #endif | ||
304 | |||
275 | /* | 305 | /* |
276 | * This gets called after board-specific INIT_MACHINE, and initializes most | 306 | * This gets called after board-specific INIT_MACHINE, and initializes most |
277 | * on-chip peripherals accessible on this board (except for few like USB): | 307 | * on-chip peripherals accessible on this board (except for few like USB): |