aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-vexpress/include/mach/uncompress.h
diff options
context:
space:
mode:
authorPawel Moll <pawel.moll@arm.com>2011-12-09 13:47:39 -0500
committerPawel Moll <pawel.moll@arm.com>2012-02-24 04:18:20 -0500
commit6a3719562b69ffdfc36e829e19b35fda6ab19ca6 (patch)
tree0eb75a57e5f7b54d51d14c315f15cbc1433e2ee7 /arch/arm/mach-vexpress/include/mach/uncompress.h
parent8deed1786a6479d0ccda51226582920ab1d6976c (diff)
ARM: vexpress: Motherboard RS1 memory map support
This patch adds support for RS1 memory map based Versatile Express motherboard. Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Diffstat (limited to 'arch/arm/mach-vexpress/include/mach/uncompress.h')
-rw-r--r--arch/arm/mach-vexpress/include/mach/uncompress.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/arch/arm/mach-vexpress/include/mach/uncompress.h b/arch/arm/mach-vexpress/include/mach/uncompress.h
index 7972c5748d0..7dab5596b86 100644
--- a/arch/arm/mach-vexpress/include/mach/uncompress.h
+++ b/arch/arm/mach-vexpress/include/mach/uncompress.h
@@ -22,7 +22,27 @@
22#define AMBA_UART_CR(base) (*(volatile unsigned char *)((base) + 0x30)) 22#define AMBA_UART_CR(base) (*(volatile unsigned char *)((base) + 0x30))
23#define AMBA_UART_FR(base) (*(volatile unsigned char *)((base) + 0x18)) 23#define AMBA_UART_FR(base) (*(volatile unsigned char *)((base) + 0x18))
24 24
25#define get_uart_base() (0x10000000 + 0x00009000) 25#define UART_BASE 0x10009000
26#define UART_BASE_RS1 0x1c090000
27
28static unsigned long get_uart_base(void)
29{
30 unsigned long mpcore_periph;
31
32 /*
33 * Make an educated guess regarding the memory map:
34 * - the original A9 core tile, which has MPCore peripherals
35 * located at 0x1e000000, should use UART at 0x10009000
36 * - all other (RS1 complaint) tiles use UART mapped
37 * at 0x1c090000
38 */
39 asm("mrc p15, 4, %0, c15, c0, 0" : "=r" (mpcore_periph));
40
41 if (mpcore_periph == 0x1e000000)
42 return UART_BASE;
43 else
44 return UART_BASE_RS1;
45}
26 46
27/* 47/*
28 * This does not append a newline 48 * This does not append a newline