]> err.no Git - linux-2.6/commitdiff
[ARM] 3581/1: AT91RM9200 Internal SRAM
authorAndrew Victor <andrew@sanpeople.com>
Mon, 19 Jun 2006 14:26:51 +0000 (15:26 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 19 Jun 2006 14:26:51 +0000 (15:26 +0100)
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>
arch/arm/mach-at91rm9200/common.c
include/asm-arm/arch-at91rm9200/hardware.h
include/asm-arm/arch-at91rm9200/vmalloc.h

index 3848fd2d5596a8b95afab50dc86a72465af7a94b..40d29a73b5c5614f1076e6cb560caff6ddc82721 100644 (file)
@@ -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,
        },
 };
 
index 59e6f44d3a0db5ee9b9e3ba3f4c2a9283a00b691..87f40df57140aec86cc2898de32c9028c1750c3e 100644 (file)
 #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 */
 
index 34d9718feb90e14ef514c55cfa8fc5d2e99a922d..4c367eb57f47c9dccc242612a71702951def3bfb 100644 (file)
@@ -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