summaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
authorStefan Agner <stefan@agner.ch>2014-03-05 23:07:48 +0100
committerShawn Guo <shawn.guo@freescale.com>2014-04-30 07:40:27 +0200
commitcfdb7d564c03a06e00f76a5e9b3929f802c1040b (patch)
tree9c7d46bcf05b660e4c0cda1fc10174147f5884a4 /arch/arm/include
parentARM: i.MX: mx21ads: Replace direct handling of peripheral bits with GPIOs (diff)
downloadlinux-cfdb7d564c03a06e00f76a5e9b3929f802c1040b.tar.xz
linux-cfdb7d564c03a06e00f76a5e9b3929f802c1040b.zip
ARM: vf610: add UART choice for low-level debug
Add choice for low-level debug UART. Similar to i.MX6, there is a numeric configuration, valid choices are 0 to 3. Note that the kernel assumes that the boot loader initialized clock properly. Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/debug/vf.S15
1 files changed, 13 insertions, 2 deletions
diff --git a/arch/arm/include/debug/vf.S b/arch/arm/include/debug/vf.S
index ba12cc44b2cb..b88933849a17 100644
--- a/arch/arm/include/debug/vf.S
+++ b/arch/arm/include/debug/vf.S
@@ -7,9 +7,20 @@
*
*/
+#define VF_UART0_BASE_ADDR 0x40027000
+#define VF_UART1_BASE_ADDR 0x40028000
+#define VF_UART2_BASE_ADDR 0x40029000
+#define VF_UART3_BASE_ADDR 0x4002a000
+#define VF_UART_BASE_ADDR(n) VF_UART##n##_BASE_ADDR
+#define VF_UART_BASE(n) VF_UART_BASE_ADDR(n)
+#define VF_UART_PHYSICAL_BASE VF_UART_BASE(CONFIG_DEBUG_VF_UART_PORT)
+
+#define VF_UART_VIRTUAL_BASE 0xfe000000
+
.macro addruart, rp, rv, tmp
- ldr \rp, =0x40028000 @ physical
- ldr \rv, =0xfe028000 @ virtual
+ ldr \rp, =VF_UART_PHYSICAL_BASE @ physical
+ and \rv, \rp, #0xffffff @ offset within 16MB section
+ add \rv, \rv, #VF_UART_VIRTUAL_BASE
.endm
.macro senduart, rd, rx