aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/plat-omap/devices.c
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2010-10-04 19:09:14 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-05 12:05:11 -0700
commit90173882ed15a8034d6d162da5f343a2c7d87587 (patch)
treeca7a366d93b4d93aa5d43d6e0005b13efee49866 /arch/arm/plat-omap/devices.c
parent07dea29a110b610a82ab7ecfea99b617d51c4965 (diff)
omap: add dsp platform device
Otherwise tidspbridge cannot work. It looks like this was dropped in the conversion to staging. I took the liberty of doing some cleaning up. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/arm/plat-omap/devices.c')
-rw-r--r--arch/arm/plat-omap/devices.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index d1920be7833..4c8f9b96aa6 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -15,6 +15,7 @@
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/slab.h>
+#include <linux/memblock.h>
#include <mach/hardware.h>
#include <asm/mach-types.h>
@@ -272,6 +273,35 @@ static void omap_init_wdt(void)
static inline void omap_init_wdt(void) {}
#endif
+#if defined(CONFIG_TIDSPBRIDGE) || defined(CONFIG_TIDSPBRIDGE_MODULE)
+
+static phys_addr_t omap_dsp_phys_mempool_base;
+
+void __init omap_dsp_reserve_sdram_memblock(void)
+{
+ phys_addr_t size = CONFIG_TIDSPBRIDGE_MEMPOOL_SIZE;
+ phys_addr_t paddr;
+
+ if (!size)
+ return;
+
+ paddr = __memblock_alloc_base(size, SZ_1M, MEMBLOCK_REAL_LIMIT);
+ if (!paddr) {
+ pr_err("%s: failed to reserve %x bytes\n",
+ __func__, size);
+ return;
+ }
+
+ omap_dsp_phys_mempool_base = paddr;
+}
+
+phys_addr_t omap_dsp_get_mempool_base(void)
+{
+ return omap_dsp_phys_mempool_base;
+}
+EXPORT_SYMBOL(omap_dsp_get_mempool_base);
+#endif
+
/*
* This gets called after board-specific INIT_MACHINE, and initializes most
* on-chip peripherals accessible on this board (except for few like USB):