summaryrefslogtreecommitdiff
path: root/arch/arm/include
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@freescale.com>2013-05-12 17:22:17 +0800
committerJason Liu <r64343@freescale.com>2013-10-30 09:53:40 +0800
commitf12b16eb8f29afe0195877093f55f40a3351526e (patch)
tree82d22fee94854bef1ddc93cf9136e15f26158a39 /arch/arm/include
parent720cbc5c305dda4550dd799e1c6b187545391116 (diff)
ARM: imx: add low-level debug for Vybrid
Add low-level debug support for Vybrid, so that earlyprintk can be enabled for debugging early boot issue. Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/debug/vf.S26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/include/debug/vf.S b/arch/arm/include/debug/vf.S
new file mode 100644
index 000000000000..3791e5e7b6a6
--- /dev/null
+++ b/arch/arm/include/debug/vf.S
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2013 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+ .macro addruart, rp, rv, tmp
+ ldr \rp, =0x40028000 @ physical
+ ldr \rv, =0xfe028000 @ virtual
+ .endm
+
+ .macro senduart, rd, rx
+ strb \rd, [\rx, #0x7] @ Data Register
+ .endm
+
+ .macro busyuart, rd, rx
+1001: ldrb \rd, [\rx, #0x4] @ Status Register 1
+ tst \rd, #1 << 6 @ TC
+ beq 1001b @ wait until transmit done
+ .endm
+
+ .macro waituart,rd,rx
+ .endm