From: mans@mansr.com (Mans Rullgard)
To: linux-arm-kernel@lists.infradead.org
Subject: [RESEND][PATCH] ARM: debug: add support for Palmchip 16550-like UART
Date: Tue, 27 Oct 2015 12:57:57 +0000 [thread overview]
Message-ID: <1445950678-16097-1-git-send-email-mans@mansr.com> (raw)
Some SoCs have a Palmchip UART with a non-standard register layout.
This allows the debug console to work with these.
Signed-off-by: Mans Rullgard <mans@mansr.com>
---
arch/arm/Kconfig.debug | 8 ++++++++
arch/arm/include/debug/8250.S | 12 ++++++++++++
2 files changed, 20 insertions(+)
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 0cfd7f9..9039fff 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -1597,6 +1597,14 @@ config DEBUG_UART_8250_WORD
DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2 || \
DEBUG_BRCMSTB_UART
+config DEBUG_UART_8250_PALMCHIP
+ bool "8250 UART is Palmchip variant"
+ depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
+ help
+ Palmchip provides a UART implementation compatible with 16550
+ except for having a different register layout. Say Y here if
+ the debug UART is of this type.
+
config DEBUG_UART_8250_FLOW_CONTROL
bool "Enable flow control for 8250 UART"
depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
diff --git a/arch/arm/include/debug/8250.S b/arch/arm/include/debug/8250.S
index 7f7446f..2332f40 100644
--- a/arch/arm/include/debug/8250.S
+++ b/arch/arm/include/debug/8250.S
@@ -9,6 +9,18 @@
*/
#include <linux/serial_reg.h>
+#ifdef CONFIG_DEBUG_UART_8250_PALMCHIP
+
+#undef UART_TX
+#undef UART_LSR
+#undef UART_MSR
+
+#define UART_TX 1
+#define UART_LSR 7
+#define UART_MSR 8
+
+#endif
+
.macro addruart, rp, rv, tmp
ldr \rp, =CONFIG_DEBUG_UART_PHYS
ldr \rv, =CONFIG_DEBUG_UART_VIRT
--
2.6.2
next reply other threads:[~2015-10-27 12:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-27 12:57 Mans Rullgard [this message]
2015-11-04 15:39 ` [RESEND][PATCH] ARM: debug: add support for Palmchip 16550-like UART Mason
2015-11-04 15:47 ` Måns Rullgård
2015-11-04 15:59 ` Mason
2015-11-04 16:08 ` Måns Rullgård
2015-11-04 20:39 ` Arnd Bergmann
2015-11-04 21:41 ` Måns Rullgård
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=1445950678-16097-1-git-send-email-mans@mansr.com \
--to=mans@mansr.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).