summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Victor <andrew@sanpeople.com>2006-06-19 15:26:51 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-06-19 15:26:51 +0100
commit10e8e1fb758eed5cfb0cae1b770f842624851e7b (patch)
tree3276408aedaf5b1061c7f681ad5ea6dcf89925c2
parent2a6f9902c6a799a9c0218b37e39b75690c3b9a70 (diff)
downloadop-kernel-dev-10e8e1fb758eed5cfb0cae1b770f842624851e7b.zip
op-kernel-dev-10e8e1fb758eed5cfb0cae1b770f842624851e7b.tar.gz
[ARM] 3581/1: AT91RM9200 Internal SRAM
Patch from Andrew Victor This patch maps the AT91RM9200's internal SRAM into the virtual memory address space - just below the internal peripheral registers. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/mach-at91rm9200/common.c6
-rw-r--r--include/asm-arm/arch-at91rm9200/hardware.h5
-rw-r--r--include/asm-arm/arch-at91rm9200/vmalloc.h2
3 files changed, 11 insertions, 2 deletions
diff --git a/arch/arm/mach-at91rm9200/common.c b/arch/arm/mach-at91rm9200/common.c
index 3848fd2..40d29a73 100644
--- a/arch/arm/mach-at91rm9200/common.c
+++ b/arch/arm/mach-at91rm9200/common.c
@@ -17,6 +17,7 @@
#include <asm/mach/map.h>
#include <asm/arch/hardware.h>
+#include "generic.h"
static struct map_desc at91rm9200_io_desc[] __initdata = {
{
@@ -94,6 +95,11 @@ static struct map_desc at91rm9200_io_desc[] __initdata = {
.pfn = __phys_to_pfn(AT91_BASE_TCB0),
.length = SZ_16K,
.type = MT_DEVICE,
+ }, {
+ .virtual = AT91_SRAM_VIRT_BASE,
+ .pfn = __phys_to_pfn(AT91_SRAM_BASE),
+ .length = AT91_SRAM_SIZE,
+ .type = MT_DEVICE,
},
};
diff --git a/include/asm-arm/arch-at91rm9200/hardware.h b/include/asm-arm/arch-at91rm9200/hardware.h
index 59e6f44..87f40df 100644
--- a/include/asm-arm/arch-at91rm9200/hardware.h
+++ b/include/asm-arm/arch-at91rm9200/hardware.h
@@ -50,9 +50,12 @@
#define AT91_VA_BASE_TCB0 AT91_IO_P2V(AT91_BASE_TCB0)
/* Internal SRAM */
-#define AT91_BASE_SRAM 0x00200000 /* Internal SRAM base address */
+#define AT91_SRAM_BASE 0x00200000 /* Internal SRAM base address */
#define AT91_SRAM_SIZE 0x00004000 /* Internal SRAM SIZE (16Kb) */
+ /* Internal SRAM is mapped below the IO devices */
+#define AT91_SRAM_VIRT_BASE (AT91_IO_VIRT_BASE - AT91_SRAM_SIZE)
+
/* Serial ports */
#define AT91_NR_UART 5 /* 4 USART3's and one DBGU port */
diff --git a/include/asm-arm/arch-at91rm9200/vmalloc.h b/include/asm-arm/arch-at91rm9200/vmalloc.h
index 34d9718..4c367eb 100644
--- a/include/asm-arm/arch-at91rm9200/vmalloc.h
+++ b/include/asm-arm/arch-at91rm9200/vmalloc.h
@@ -21,6 +21,6 @@
#ifndef __ASM_ARCH_VMALLOC_H
#define __ASM_ARCH_VMALLOC_H
-#define VMALLOC_END (AT91_IO_VIRT_BASE & PGDIR_MASK)
+#define VMALLOC_END (AT91_SRAM_VIRT_BASE & PGDIR_MASK)
#endif
OpenPOWER on IntegriCloud