All of lore.kernel.org
 help / color / mirror / Atom feed
From: jun.nie@linaro.org (Jun Nie)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/7] ARM: zx: add low level debug support for zx296702
Date: Fri, 27 Mar 2015 21:52:32 +0800	[thread overview]
Message-ID: <1427464356-20112-4-git-send-email-jun.nie@linaro.org> (raw)
In-Reply-To: <1427464356-20112-1-git-send-email-jun.nie@linaro.org>

Use the UART0 peripheral for low level debug. Only the UART port 0 is
currently supported.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
---
 arch/arm/Kconfig.debug         | 14 ++++++++++++++
 arch/arm/include/debug/pl01x.S |  7 +++++++
 2 files changed, 21 insertions(+)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 970de75..8f0ad72 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -1169,6 +1169,18 @@ choice
 		  For more details about semihosting, please see
 		  chapter 8 of DUI0203I_rvct_developer_guide.pdf from ARM Ltd.
 
+	config DEBUG_ZTE_ZX
+		bool "Use ZTE ZX UART"
+		select DEBUG_UART_PL01X
+		depends on ARCH_ZX
+		help
+		  Say Y here if you are enabling ZTE ZX296702 SOC and need
+		  debug uart support.
+
+		  This option is preferred over the platform specific
+		  options; the platform specific options are deprecated
+		  and will be soon removed.
+
 	config DEBUG_LL_UART_8250
 		bool "Kernel low-level debugging via 8250 UART"
 		help
@@ -1349,6 +1361,7 @@ config DEBUG_UART_PHYS
 	default 0x02531000 if DEBUG_KEYSTONE_UART1
 	default 0x03010fe0 if ARCH_RPC
 	default 0x07000000 if DEBUG_SUN9I_UART0
+	default 0x09405000 if DEBUG_ZTE_ZX
 	default 0x10009000 if DEBUG_REALVIEW_STD_PORT || \
 				DEBUG_VEXPRESS_UART0_CA9
 	default 0x1010c000 if DEBUG_REALVIEW_PB1176_PORT
@@ -1479,6 +1492,7 @@ config DEBUG_UART_VIRT
 	default 0xfb009000 if DEBUG_REALVIEW_STD_PORT
 	default 0xfb10c000 if DEBUG_REALVIEW_PB1176_PORT
 	default 0xfc40ab00 if DEBUG_BRCMSTB_UART
+	default 0xfc705000 if DEBUG_ZTE_ZX
 	default 0xfcfe8600 if DEBUG_UART_BCM63XX
 	default 0xfd000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX
 	default 0xfd000000 if ARCH_SPEAR13XX
diff --git a/arch/arm/include/debug/pl01x.S b/arch/arm/include/debug/pl01x.S
index 92ef808..f7d8323 100644
--- a/arch/arm/include/debug/pl01x.S
+++ b/arch/arm/include/debug/pl01x.S
@@ -12,6 +12,13 @@
 */
 #include <linux/amba/serial.h>
 
+#ifdef CONFIG_DEBUG_ZTE_ZX
+#undef UART01x_DR
+#undef UART01x_FR
+#define UART01x_DR     0x04
+#define UART01x_FR     0x14
+#endif
+
 #ifdef CONFIG_DEBUG_UART_PHYS
 		.macro	addruart, rp, rv, tmp
 		ldr	\rp, =CONFIG_DEBUG_UART_PHYS
-- 
1.9.1

  parent reply	other threads:[~2015-03-27 13:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27 13:52 [PATCH v2 0/7] Basic support to ZTE ZX296702 Jun Nie
2015-03-27 13:52 ` [PATCH v2 1/7] ARM: zx: add basic support for " Jun Nie
2015-03-27 13:52 ` [PATCH v2 2/7] MAINTAINERS: add entry for ARM ZTE architecture Jun Nie
2015-03-27 13:52 ` Jun Nie [this message]
2015-03-27 13:52 ` [PATCH v2 4/7] ARM: dts: zx: add an initial zx296702 dts and doc Jun Nie
2015-03-27 13:52 ` [PATCH v2 5/7] clk: zx: add clock support to zx296702 Jun Nie
2015-04-13  3:56   ` Michael Turquette
2015-04-13  7:54   ` Shawn Guo
2015-03-27 13:52 ` [PATCH v2 6/7] ARM: zx: enable SMP and hotplug for zx296702 Jun Nie
2015-03-27 13:52 ` [PATCH v2 7/7] ARM: zx: Add basic defconfig support for ZX296702 Jun Nie
2015-04-13 23:14 ` [PATCH v2 0/7] Basic support to ZTE ZX296702 Arnd Bergmann

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=1427464356-20112-4-git-send-email-jun.nie@linaro.org \
    --to=jun.nie@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.