Linux-MIPS Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] mips: ralink: mt7621: add zboot debug console
@ 2020-10-15  5:26 Chuanhong Guo
  0 siblings, 0 replies; only message in thread
From: Chuanhong Guo @ 2020-10-15  5:26 UTC (permalink / raw)
  To: linux-mips; +Cc: Chuanhong Guo, Thomas Bogendoerfer, John Crispin, linux-kernel

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15  5:26 [PATCH] mips: ralink: mt7621: add zboot debug console Chuanhong Guo

Linux-MIPS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mips/0 linux-mips/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mips linux-mips/ https://lore.kernel.org/linux-mips \
		linux-mips@vger.kernel.org
	public-inbox-index linux-mips

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-mips


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git