aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-spear/include/plat/debug-macro.S
diff options
context:
space:
mode:
authorviresh kumar <viresh.kumar@st.com>2010-04-01 07:30:42 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-04-14 06:31:58 -0400
commitbf976b51a32e255523c69022c1f21bf9ad527fc5 (patch)
treebddfe6b79aa74ff81ae7d8bb09080ee3e22d6d9e /arch/arm/plat-spear/include/plat/debug-macro.S
parente024c3d50c53999d15e3b8a21e0abbbf74c32140 (diff)
ARM: 6012/1: ST SPEAr: Added basic header files for SPEAr platform
Reviewed-by: Linus Walleij <linux.walleij@stericsson.com> Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/plat-spear/include/plat/debug-macro.S')
-rw-r--r--arch/arm/plat-spear/include/plat/debug-macro.S38
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/arm/plat-spear/include/plat/debug-macro.S b/arch/arm/plat-spear/include/plat/debug-macro.S
new file mode 100644
index 000000000000..1670734b7e51
--- /dev/null
+++ b/arch/arm/plat-spear/include/plat/debug-macro.S
@@ -0,0 +1,38 @@
1/*
2 * arch/arm/plat-spear/include/plat/debug-macro.S
3 *
4 * Debugging macro include header for spear platform
5 *
6 * Copyright (C) 2009 ST Microelectronics
7 * Viresh Kumar<viresh.kumar@st.com>
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14#include <linux/amba/serial.h>
15#include <mach/spear.h>
16
17 .macro addruart, rx
18 mrc p15, 0, \rx, c1, c0
19 tst \rx, #1 @ MMU enabled?
20 moveq \rx, =SPEAR_DBG_UART_BASE @ Physical base
21 movne \rx, =VA_SPEAR_DBG_UART_BASE @ Virtual base
22 .endm
23
24 .macro senduart, rd, rx
25 strb \rd, [\rx, #UART01x_DR] @ ASC_TX_BUFFER
26 .endm
27
28 .macro waituart, rd, rx
291001: ldr \rd, [\rx, #UART01x_FR] @ FLAG REGISTER
30 tst \rd, #UART01x_FR_TXFF @ TX_FULL
31 bne 1001b
32 .endm
33
34 .macro busyuart, rd, rx
351002: ldr \rd, [\rx, #UART01x_FR] @ FLAG REGISTER
36 tst \rd, #UART011_FR_TXFE @ TX_EMPTY
37 beq 1002b
38 .endm