summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-msm/include/mach/debug-macro.S
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2011-11-08 10:33:04 -0800
committerDavid Brown <davidb@codeaurora.org>2011-11-10 10:17:06 -0800
commita3d3ef9d4fd57cfd407c8d2d0a7daec000468ebf (patch)
tree4894c7c2c68b9caa9e6842d317cde4800905e03e /arch/arm/mach-msm/include/mach/debug-macro.S
parent650e3f0d66ade2a614d854765dae3bbc9a87f58d (diff)
downloadblackbird-op-linux-a3d3ef9d4fd57cfd407c8d2d0a7daec000468ebf.tar.gz
blackbird-op-linux-a3d3ef9d4fd57cfd407c8d2d0a7daec000468ebf.zip
msm: Support DEBUG_LL on MSM8660 and MSM8960
Add support for DEBUG_LL on the 8660 and 8960 development boards. While we're here cleanup the uncompress.h code a bit. Avoid the use of readl/writel as those are Linux specific APIs that aren't guaranteed to work in the decompressor. Cc: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: David Brown <davidb@codeaurora.org>
Diffstat (limited to 'arch/arm/mach-msm/include/mach/debug-macro.S')
-rw-r--r--arch/arm/mach-msm/include/mach/debug-macro.S32
1 files changed, 29 insertions, 3 deletions
diff --git a/arch/arm/mach-msm/include/mach/debug-macro.S b/arch/arm/mach-msm/include/mach/debug-macro.S
index db1f22830d64..3ffd8668c9a5 100644
--- a/arch/arm/mach-msm/include/mach/debug-macro.S
+++ b/arch/arm/mach-msm/include/mach/debug-macro.S
@@ -1,6 +1,7 @@
/*
*
* Copyright (C) 2007 Google, Inc.
+ * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
* Author: Brian Swetland <swetland@google.com>
*
* This software is licensed under the terms of the GNU General Public
@@ -24,17 +25,42 @@
#endif
.endm
- .macro senduart,rd,rx
+ .macro senduart, rd, rx
+#ifdef CONFIG_MSM_HAS_DEBUG_UART_HS
+ @ Write the 1 character to UARTDM_TF
+ str \rd, [\rx, #0x70]
+#else
teq \rx, #0
strne \rd, [\rx, #0x0C]
+#endif
.endm
- .macro waituart,rd,rx
+ .macro waituart, rd, rx
+#ifdef CONFIG_MSM_HAS_DEBUG_UART_HS
+ @ check for TX_EMT in UARTDM_SR
+ ldr \rd, [\rx, #0x08]
+ tst \rd, #0x08
+ bne 1002f
+ @ wait for TXREADY in UARTDM_ISR
+1001: ldr \rd, [\rx, #0x14]
+ tst \rd, #0x80
+ beq 1001b
+1002:
+ @ Clear TX_READY by writing to the UARTDM_CR register
+ mov \rd, #0x300
+ str \rd, [\rx, #0x10]
+ @ Write 0x1 to NCF register
+ mov \rd, #0x1
+ str \rd, [\rx, #0x40]
+ @ UARTDM reg. Read to induce delay
+ ldr \rd, [\rx, #0x08]
+#else
@ wait for TX_READY
1001: ldr \rd, [\rx, #0x08]
tst \rd, #0x04
beq 1001b
+#endif
.endm
- .macro busyuart,rd,rx
+ .macro busyuart, rd, rx
.endm
OpenPOWER on IntegriCloud