summaryrefslogtreecommitdiffstats
path: root/include/asm-arm/arch-mxc/debug-macro.S
diff options
context:
space:
mode:
authorSascha Hauer2008-07-05 10:02:51 +0200
committerRobert Schwebel2008-07-05 10:02:51 +0200
commit4bc256501a159abc7e9fee43f63c68894f6a11d8 (patch)
tree934b9da94e0dfb720556d24004399784bbe8a8d7 /include/asm-arm/arch-mxc/debug-macro.S
parenti.MXC family: Adding timer support (diff)
downloadkernel-qcow2-linux-4bc256501a159abc7e9fee43f63c68894f6a11d8.tar.gz
kernel-qcow2-linux-4bc256501a159abc7e9fee43f63c68894f6a11d8.tar.xz
kernel-qcow2-linux-4bc256501a159abc7e9fee43f63c68894f6a11d8.zip
MXC: add debug-macro.S for mxc
This patch adds debug-macro.S for arch-mxc Disadvantage: Due to the board specific UART definition, these macros (and compile time) will fail for multi board kernels. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/asm-arm/arch-mxc/debug-macro.S')
-rw-r--r--include/asm-arm/arch-mxc/debug-macro.S38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/asm-arm/arch-mxc/debug-macro.S b/include/asm-arm/arch-mxc/debug-macro.S
new file mode 100644
index 000000000000..34befbb2ea42
--- /dev/null
+++ b/include/asm-arm/arch-mxc/debug-macro.S
@@ -0,0 +1,38 @@
+/* linux/include/asm-arm/arch-imx/debug-macro.S
+ *
+ * Debugging macro include header
+ *
+ * Copyright (C) 1994-1999 Russell King
+ * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
+ *
+ * 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.
+ *
+ */
+
+#include <asm/arch/hardware.h>
+
+#ifdef CONFIG_MACH_MX31ADS
+#include <asm/arch/board-mx31ads.h>
+#endif
+
+ .macro addruart,rx
+ mrc p15, 0, \rx, c1, c0
+ tst \rx, #1 @ MMU enabled?
+ ldreq \rx, =MXC_LL_UART_PADDR @ physical
+ ldrne \rx, =MXC_LL_UART_VADDR @ virtual
+ .endm
+
+ .macro senduart,rd,rx
+ str \rd, [\rx, #0x40] @ TXDATA
+ .endm
+
+ .macro waituart,rd,rx
+ .endm
+
+ .macro busyuart,rd,rx
+1002: ldr \rd, [\rx, #0x98] @ SR2
+ tst \rd, #1 << 3 @ TXDC
+ beq 1002b @ wait until transmit done
+ .endm