Skip to content

Commit

Permalink
[ARM] 3581/1: AT91RM9200 Internal SRAM
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Victor authored and Russell King committed Jun 19, 2006
1 parent 2a6f990 commit 10e8e1f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions arch/arm/mach-at91rm9200/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
{
Expand Down Expand Up @@ -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,
},
};

Expand Down
5 changes: 4 additions & 1 deletion include/asm-arm/arch-at91rm9200/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
2 changes: 1 addition & 1 deletion include/asm-arm/arch-at91rm9200/vmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 10e8e1f

Please sign in to comment.