summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra
diff options
context:
space:
mode:
authorGary King <gking@nvidia.com>2010-05-17 15:14:54 -0700
committerGary King <gking@nvidia.com>2010-05-17 19:19:56 -0700
commit16748fcde69d77bbd094168458c6da6dbeee5c5f (patch)
treeb7747ff2fb81d241a6c7da53bc1cadc4d05ca99e /arch/arm/mach-tegra
parentf5c8c694f164c5af885e9e9d402784fe866a38b5 (diff)
[ARM/tegra] register GART driver and IRAM nvmap heap
Change-Id: I1c7912c9239c67e1963c640d36686015d18ca87c
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r--arch/arm/mach-tegra/board-common.c24
-rw-r--r--arch/arm/mach-tegra/common.c4
-rw-r--r--arch/arm/mach-tegra/include/mach/iomap.h3
3 files changed, 31 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-common.c b/arch/arm/mach-tegra/board-common.c
index 13a4294b264e..327b2b5795db 100644
--- a/arch/arm/mach-tegra/board-common.c
+++ b/arch/arm/mach-tegra/board-common.c
@@ -192,6 +192,27 @@ static struct platform_device tegra_kbc_device = {
};
#endif
+#ifdef CONFIG_TEGRA_IOVMM_GART
+static struct resource tegra_gart_resources[] = {
+ [0] = {
+ .start = TEGRA_MC_BASE,
+ .end = TEGRA_MC_BASE + TEGRA_MC_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = TEGRA_GART_BASE,
+ .end = TEGRA_GART_BASE + TEGRA_GART_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+};
+static struct platform_device tegra_gart_device = {
+ .name = "tegra_gart",
+ .id = -1,
+ .resource = tegra_gart_resources,
+ .num_resources = ARRAY_SIZE(tegra_gart_resources),
+};
+#endif
+
static struct platform_device *tegra_devices[] __initdata = {
#ifndef CONFIG_TEGRA_DEBUG_UART_NONE
&debug_uart,
@@ -205,6 +226,9 @@ static struct platform_device *tegra_devices[] __initdata = {
#ifdef CONFIG_KEYBOARD_TEGRA
&tegra_kbc_device,
#endif
+#ifdef CONFIG_TEGRA_IOVMM_GART
+ &tegra_gart_device,
+#endif
};
void __init tegra_register_socdev(void)
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index efa5e453bfeb..b3b42004f3ac 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -26,6 +26,7 @@
#include <mach/iomap.h>
#include <mach/dma.h>
+#include <mach/nvmem.h>
#include "board.h"
@@ -61,6 +62,9 @@ void __init tegra_common_init(void)
reg |= 1;
asm volatile ("mcr p15, 0, %0, c15, c0, 0" : : "r" (reg) : "cc");
#endif
+
+ nvmap_add_carveout_heap(TEGRA_IRAM_BASE, TEGRA_IRAM_SIZE,
+ "iram", NVMEM_HEAP_CARVEOUT_IRAM);
tegra_init_clock();
tegra_init_cache();
tegra_dma_init();
diff --git a/arch/arm/mach-tegra/include/mach/iomap.h b/arch/arm/mach-tegra/include/mach/iomap.h
index 89722a54c243..89cfa2a4b027 100644
--- a/arch/arm/mach-tegra/include/mach/iomap.h
+++ b/arch/arm/mach-tegra/include/mach/iomap.h
@@ -41,6 +41,9 @@
#define TEGRA_DISPLAY2_BASE 0x54240000
#define TEGRA_DISPLAY2_SIZE SZ_256K
+#define TEGRA_GART_BASE 0x58000000
+#define TEGRA_GART_SIZE SZ_32M
+
#define TEGRA_PRIMARY_ICTLR_BASE 0x60004000
#define TEGRA_PRIMARY_ICTLR_SIZE SZ_64