From: hvaibhav@ti.com (hvaibhav at ti.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH-V3 4/4] arm:omap:am33xx: Add low level debugging support
Date: Tue, 20 Sep 2011 20:02:22 +0530 [thread overview]
Message-ID: <1316529142-27564-5-git-send-email-hvaibhav@ti.com> (raw)
In-Reply-To: <hvaibhav@ti.com>
From: Afzal Mohammed <afzal@ti.com>
Add support for low level debugging on AM335X EVM (AM33XX family).
Currently only support for UART1 console, which is used on AM335X EVM
is added.
Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
---
arch/arm/mach-omap2/include/mach/debug-macro.S | 22 ++++++++++++++++++++++
arch/arm/plat-omap/include/plat/serial.h | 4 ++++
arch/arm/plat-omap/include/plat/uncompress.h | 6 ++++++
3 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/include/mach/debug-macro.S b/arch/arm/mach-omap2/include/mach/debug-macro.S
index 48adfe9..f649973 100644
--- a/arch/arm/mach-omap2/include/mach/debug-macro.S
+++ b/arch/arm/mach-omap2/include/mach/debug-macro.S
@@ -78,6 +78,8 @@ omap_uart_lsr: .word 0
beq 82f @ configure UART2
cmp \rp, #TI816XUART3 @ ti816x UART offsets different
beq 83f @ configure UART3
+ cmp \rp, #AM33XXUART1 @ AM33XX UART offsets different
+ beq 84f @ configure UART1
cmp \rp, #ZOOM_UART @ only on zoom2/3
beq 95f @ configure ZOOM_UART
@@ -106,6 +108,9 @@ omap_uart_lsr: .word 0
b 98f
83: mov \rp, #UART_OFFSET(TI816X_UART3_BASE)
b 98f
+84: ldr \rp, =AM33XX_UART1_BASE
+ and \rp, \rp, #0x00ffffff
+ b 97f
95: ldr \rp, =ZOOM_UART_BASE
mrc p15, 0, \rv, c1, c0
tst \rv, #1 @ MMU enabled?
@@ -121,6 +126,23 @@ omap_uart_lsr: .word 0
b 10b
/* Store both phys and virt address for the uart */
+97: add \rp, \rp, #0x44000000 @ phys base
+ mrc p15, 0, \rv, c1, c0
+ tst \rv, #1 @ MMU enabled?
+ ldreq \rv, =omap_uart_v2p(omap_uart_phys) @ MMU disabled
+ ldrne \rv, =omap_uart_phys @ MMU enabled
+ str \rp, [\rv, #0]
+ sub \rp, \rp, #0x44000000 @ phys base
+ add \rp, \rp, #0xf9000000 @ virt base
+ add \rv, \rv, #4 @ omap_uart_virt
+ str \rp, [\rv, #0]
+ mov \rp, #(UART_LSR << OMAP_PORT_SHIFT)
+ add \rv, \rv, #4 @ omap_uart_lsr
+ str \rp, [\rv, #0]
+
+ b 10b
+
+ /* Store both phys and virt address for the uart */
98: add \rp, \rp, #0x48000000 @ phys base
mrc p15, 0, \rv, c1, c0
tst \rv, #1 @ MMU enabled?
diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h
index de3b10c..ad19377 100644
--- a/arch/arm/plat-omap/include/plat/serial.h
+++ b/arch/arm/plat-omap/include/plat/serial.h
@@ -59,6 +59,9 @@
/* AM3505/3517 UART4 */
#define AM35XX_UART4_BASE 0x4809E000 /* Only on AM3505/3517 */
+/* AM33XX serial port */
+#define AM33XX_UART1_BASE 0x44E09000
+
/* External port on Zoom2/3 */
#define ZOOM_UART_BASE 0x10000000
#define ZOOM_UART_VIRT 0xfa400000
@@ -92,6 +95,7 @@
#define TI816XUART1 81
#define TI816XUART2 82
#define TI816XUART3 83
+#define AM33XXUART1 84
#define ZOOM_UART 95 /* Only on zoom2/3 */
/* This is only used by 8250.c for omap1510 */
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h
index a067484..bd1e051 100644
--- a/arch/arm/plat-omap/include/plat/uncompress.h
+++ b/arch/arm/plat-omap/include/plat/uncompress.h
@@ -97,6 +97,10 @@ static inline void flush(void)
_DEBUG_LL_ENTRY(mach, TI816X_UART##p##_BASE, OMAP_PORT_SHIFT, \
TI816XUART##p)
+#define DEBUG_LL_AM33XX(p, mach) \
+ _DEBUG_LL_ENTRY(mach, AM33XX_UART##p##_BASE, OMAP_PORT_SHIFT, \
+ AM33XXUART##p)
+
static inline void __arch_decomp_setup(unsigned long arch_id)
{
int port = 0;
@@ -173,6 +177,8 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
/* TI8168 base boards using UART3 */
DEBUG_LL_TI816X(3, ti8168evm);
+ /* AM33XX base boards using UART1 */
+ DEBUG_LL_AM33XX(1, am335xevm);
} while (0);
}
--
1.7.0.4
next prev reply other threads:[~2011-09-20 14:32 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <hvaibhav@ti.com>
2011-08-29 12:46 ` [RFC PATCH-V2 0/4] Introducing TI's New SoC/board AM335XEVM hvaibhav at ti.com
2011-09-15 0:32 ` Tony Lindgren
2011-09-15 7:13 ` Hiremath, Vaibhav
2011-09-20 14:32 ` [PATCH-V3 1/4] arm:omap:am33xx: Update common omap platform files hvaibhav at ti.com
2011-10-06 23:03 ` Tony Lindgren
2011-09-20 14:32 ` [PATCH-V3 2/4] arm:omap:am33xx: Update common OMAP machine specific sources hvaibhav at ti.com
2011-09-26 18:45 ` Kevin Hilman
2011-09-30 12:09 ` Premi, Sanjeev
2011-09-30 17:09 ` Kevin Hilman
2011-10-06 23:03 ` Tony Lindgren
2011-11-03 13:48 ` Hiremath, Vaibhav
2011-11-05 9:41 ` Hiremath, Vaibhav
2011-11-05 10:29 ` Hiremath, Vaibhav
2011-09-20 14:32 ` [PATCH-V3 3/4] arm:omap:am33xx: Create board support and enable build for AM335XEVM hvaibhav at ti.com
2011-10-06 23:07 ` Tony Lindgren
2011-09-20 14:32 ` hvaibhav at ti.com [this message]
2011-10-06 23:09 ` [PATCH-V3 4/4] arm:omap:am33xx: Add low level debugging support Tony Lindgren
2011-11-07 15:17 ` Hiremath, Vaibhav
2011-11-07 18:16 ` Tony Lindgren
2011-12-02 6:43 ` [PATCH-V5 0/3] Introducing TI's New SoC/board AM335XEVM hvaibhav at ti.com
2011-12-07 0:24 ` Kevin Hilman
2011-12-07 21:10 ` Tony Lindgren
2011-12-08 13:45 ` Hiremath, Vaibhav
2011-12-08 17:18 ` Tony Lindgren
2012-02-01 6:53 ` Hiremath, Vaibhav
2012-01-18 8:47 ` Hiremath, Vaibhav
2011-12-02 6:43 ` [PATCH-V5 1/3] arm:omap:am33xx: Update common OMAP machine specific sources hvaibhav at ti.com
2011-12-07 21:09 ` Tony Lindgren
2011-12-02 6:43 ` [PATCH-V5 2/3] arm:omap:am33xx: Add AM335XEVM machine support hvaibhav at ti.com
2012-05-02 9:23 ` Paul Walmsley
2012-05-02 9:34 ` Hiremath, Vaibhav
2012-05-03 15:57 ` Tony Lindgren
2012-05-03 16:41 ` Hiremath, Vaibhav
2012-05-03 19:37 ` Tony Lindgren
2012-05-04 6:14 ` Hiremath, Vaibhav
2012-05-03 21:17 ` Kevin Hilman
2012-05-04 6:00 ` Hiremath, Vaibhav
2012-05-04 20:05 ` Tony Lindgren
2012-05-07 14:38 ` Hiremath, Vaibhav
2012-05-07 17:32 ` Tony Lindgren
2012-05-07 18:55 ` Hiremath, Vaibhav
2012-05-08 19:06 ` Tony Lindgren
2012-05-08 19:57 ` Hiremath, Vaibhav
2012-05-04 6:28 ` Hiremath, Vaibhav
2012-05-04 20:00 ` Tony Lindgren
2013-03-04 11:35 ` [RFC PATCH 0/3] ARM: OMAP2+: Add command line parameter for debugSS module control hvaibhav at ti.com
2013-03-14 11:29 ` Hiremath, Vaibhav
2013-04-08 17:30 ` Tony Lindgren
2013-04-09 8:11 ` Hiremath, Vaibhav
2013-03-04 11:35 ` [RFC PATCH 1/3] ARM: AM33XX: clock: Add debugSS clock nodes to clock tree hvaibhav at ti.com
2013-05-29 19:07 ` Paul Walmsley
2013-03-04 11:35 ` [RFC PATCH 3/3] ARM: OMAP2+: Add command line parameter for debugSS module control hvaibhav at ti.com
2013-04-08 17:29 ` Tony Lindgren
2013-04-09 8:07 ` Hiremath, Vaibhav
2013-04-09 16:34 ` Tony Lindgren
2013-04-10 5:11 ` Hiremath, Vaibhav
2013-04-10 17:07 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1316529142-27564-5-git-send-email-hvaibhav@ti.com \
--to=hvaibhav@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).