From: Chuanhong Guo <gch981213@gmail.com>
To: linux-mips@vger.kernel.org
Cc: Chuanhong Guo <gch981213@gmail.com>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
John Crispin <john@phrozen.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH] mips: ralink: mt7621: add zboot debug console
Date: Thu, 15 Oct 2020 13:26:21 +0800 [thread overview]
Message-ID: <20201015052631.138783-1-gch981213@gmail.com> (raw)
uartlite0 at 0x1e000c00 is a 16550 compatible uart controller. It's
usually used for debug console and is already configured by u-boot.
Add ZBOOT_UART16550 and related definitions in uart-16550.c for zboot
debug output.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
---
arch/mips/boot/compressed/uart-16550.c | 6 ++++++
arch/mips/ralink/Kconfig | 1 +
2 files changed, 7 insertions(+)
diff --git a/arch/mips/boot/compressed/uart-16550.c b/arch/mips/boot/compressed/uart-16550.c
index aee8d7b8f091..7122df28967a 100644
--- a/arch/mips/boot/compressed/uart-16550.c
+++ b/arch/mips/boot/compressed/uart-16550.c
@@ -35,6 +35,12 @@
#define IOTYPE unsigned int
#endif
+#ifdef CONFIG_SOC_MT7621
+#define UART0_BASE 0x1e000c00
+#define PORT(offset) (CKSEG1ADDR(UART0_BASE) + (4 * offset))
+#define IOTYPE unsigned int
+#endif
+
#ifndef IOTYPE
#define IOTYPE char
#endif
diff --git a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig
index c10d8b233ab1..4c3c6ef330e3 100644
--- a/arch/mips/ralink/Kconfig
+++ b/arch/mips/ralink/Kconfig
@@ -52,6 +52,7 @@ choice
select SYS_SUPPORTS_SMP
select SYS_SUPPORTS_MIPS_CPS
select SYS_SUPPORTS_HIGHMEM
+ select SYS_SUPPORTS_ZBOOT_UART16550
select MIPS_GIC
select COMMON_CLK
select CLKSRC_MIPS_GIC
--
2.26.2
reply other threads:[~2020-10-15 5:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20201015052631.138783-1-gch981213@gmail.com \
--to=gch981213@gmail.com \
--cc=john@phrozen.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/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).