ARM: tegra: Statically map all device io memory

Change-Id: I0c750b766dcdd166ddff6317b93556f9f5cce899
Signed-off-by: Colin Cross <ccross@android.com>
This commit is contained in:
Colin Cross
2011-01-21 17:04:07 -08:00
parent 66eaaf9564
commit 5d8b46b6df
3 changed files with 39 additions and 3 deletions

View File

@@ -20,7 +20,7 @@
#include <asm/hardware/gic.h>
/* Uses the GIC interrupt controller built into the cpu */
#define ICTRL_BASE (IO_CPU_VIRT + 0x100)
#define ICTRL_BASE (IO_CPU_VIRT + 0x40100)
.macro disable_fiq
.endm

View File

@@ -37,9 +37,9 @@
#define IO_IRAM_VIRT 0xFE400000
#define IO_IRAM_SIZE SZ_256K
#define IO_CPU_PHYS 0x50040000
#define IO_CPU_PHYS 0x50000000
#define IO_CPU_VIRT 0xFE000000
#define IO_CPU_SIZE SZ_16K
#define IO_CPU_SIZE SZ_1M
#define IO_PPSB_PHYS 0x60000000
#define IO_PPSB_VIRT 0xFE200000
@@ -49,6 +49,18 @@
#define IO_APB_VIRT 0xFE300000
#define IO_APB_SIZE SZ_1M
#define IO_USB_PHYS 0xC5000000
#define IO_USB_VIRT 0xFE500000
#define IO_USB_SIZE SZ_1M
#define IO_SDMMC_PHYS 0xC8000000
#define IO_SDMMC_VIRT 0xFE600000
#define IO_SDMMC_SIZE SZ_1M
#define IO_HOST1X_PHYS 0x54000000
#define IO_HOST1X_VIRT 0xFE700000
#define IO_HOST1X_SIZE SZ_4M
#define IO_TO_VIRT_BETWEEN(p, st, sz) ((p) >= (st) && (p) < ((st) + (sz)))
#define IO_TO_VIRT_XLATE(p, pst, vst) (((p) - (pst) + (vst)))
@@ -61,6 +73,12 @@
IO_TO_VIRT_XLATE((n), IO_CPU_PHYS, IO_CPU_VIRT) : \
IO_TO_VIRT_BETWEEN((n), IO_IRAM_PHYS, IO_IRAM_SIZE) ? \
IO_TO_VIRT_XLATE((n), IO_IRAM_PHYS, IO_IRAM_VIRT) : \
IO_TO_VIRT_BETWEEN((n), IO_HOST1X_PHYS, IO_HOST1X_SIZE) ? \
IO_TO_VIRT_XLATE((n), IO_HOST1X_PHYS, IO_HOST1X_VIRT) : \
IO_TO_VIRT_BETWEEN((n), IO_USB_PHYS, IO_USB_SIZE) ? \
IO_TO_VIRT_XLATE((n), IO_USB_PHYS, IO_USB_VIRT) : \
IO_TO_VIRT_BETWEEN((n), IO_SDMMC_PHYS, IO_SDMMC_SIZE) ? \
IO_TO_VIRT_XLATE((n), IO_SDMMC_PHYS, IO_SDMMC_VIRT) : \
0)
#ifndef __ASSEMBLER__

View File

@@ -55,6 +55,24 @@ static struct map_desc tegra_io_desc[] __initdata = {
.length = IO_IRAM_SIZE,
.type = MT_DEVICE,
},
{
.virtual = IO_HOST1X_VIRT,
.pfn = __phys_to_pfn(IO_HOST1X_PHYS),
.length = IO_HOST1X_SIZE,
.type = MT_DEVICE,
},
{
.virtual = IO_USB_VIRT,
.pfn = __phys_to_pfn(IO_USB_PHYS),
.length = IO_USB_SIZE,
.type = MT_DEVICE,
},
{
.virtual = IO_SDMMC_VIRT,
.pfn = __phys_to_pfn(IO_SDMMC_PHYS),
.length = IO_SDMMC_SIZE,
.type = MT_DEVICE,
},
};
void __init tegra_map_common_io(void)