diff options
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r-- | arch/arm/mach-tegra/board-common.c | 24 | ||||
-rw-r--r-- | arch/arm/mach-tegra/common.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/iomap.h | 3 |
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 |