[ARM] tegra: add iram heap
authorGary King <gking@nvidia.com>
Tue, 20 Jul 2010 21:29:27 +0000 (14:29 -0700)
committerColin Cross <ccross@android.com>
Wed, 6 Oct 2010 23:33:25 +0000 (16:33 -0700)
AVP modules expect IRAM to be allocatable through nvmap, so the
IRAM heap needs to be created

Change-Id: Idd1bdccd5ff05ae655cb59780a89002a122055c9
Signed-off-by: Gary King <gking@nvidia.com>
arch/arm/mach-tegra/board-stingray.c

index 10d2f5e7e87bd8c33ee82f1e54f50e5c5e54163a..f45542cb68bfd81bf4297018ed914f86c1779646 100644 (file)
@@ -51,6 +51,7 @@
 #include "gpio-names.h"
 #include "devices.h"
 #include "power.h"
+#include "nv/include/linux/nvmem_ioctl.h"
 
 /* NVidia bootloader tags */
 #define ATAG_NVIDIA            0x41000801
@@ -713,6 +714,9 @@ static struct tegra_suspend_platform_data stingray_suspend = {
        .wake_any = 0,
 };
 
+extern int nvmap_add_carveout_heap(unsigned long, size_t, const char *,
+                                  unsigned int);
+
 static void __init tegra_stingray_init(void)
 {
        struct clk *clk;
@@ -769,6 +773,9 @@ static void __init tegra_stingray_init(void)
        clk = tegra_get_clock_by_name("uartb");
        debug_uart_platform_data[0].uartclk = clk_get_rate(clk);
 
+       nvmap_add_carveout_heap(TEGRA_IRAM_BASE, TEGRA_IRAM_SIZE, "iram",
+                               NVMEM_HEAP_CARVEOUT_IRAM);
+
        clk = clk_get_sys("3d", NULL);
        tegra_periph_reset_assert(clk);
        writel(0x101, IO_ADDRESS(TEGRA_PMC_BASE) + 0x30);