Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dbb98314 authored by Alban Bedel's avatar Alban Bedel Committed by Ralf Baechle
Browse files

MIPS: zboot: Add support for serial debug using the PROM



As most platforms implement the PROM serial interface prom_putchar()
add a simple bridge to allow re-using this code for zboot.

Signed-off-by: default avatarAlban Bedel <albeu@free.fr>
Cc: Alex Smith <alex.smith@imgtec.com>
Cc: Andrew Bresticker <abrestic@chromium.org>
Cc: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/11811/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 25f66096
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1766,6 +1766,10 @@ config SYS_SUPPORTS_ZBOOT_UART16550
	bool
	select SYS_SUPPORTS_ZBOOT

config SYS_SUPPORTS_ZBOOT_UART_PROM
	bool
	select SYS_SUPPORTS_ZBOOT

config CPU_LOONGSON2
	bool
	select CPU_SUPPORTS_32BIT_KERNEL
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o
ifdef CONFIG_DEBUG_ZBOOT
vmlinuzobjs-$(CONFIG_DEBUG_ZBOOT)		   += $(obj)/dbg.o
vmlinuzobjs-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART16550) += $(obj)/uart-16550.o
vmlinuzobjs-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART_PROM) += $(obj)/uart-prom.o
vmlinuzobjs-$(CONFIG_MIPS_ALCHEMY)		   += $(obj)/uart-alchemy.o
endif

+7 −0
Original line number Diff line number Diff line

extern void prom_putchar(unsigned char ch);

void putc(char c)
{
	prom_putchar(c);
}