Skip to content

Commit dbb9831

Browse files
AlbanBedelralfbaechle
authored andcommitted
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: Alban 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: Ralf Baechle <ralf@linux-mips.org>
1 parent 25f6609 commit dbb9831

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

arch/mips/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1766,6 +1766,10 @@ config SYS_SUPPORTS_ZBOOT_UART16550
17661766
bool
17671767
select SYS_SUPPORTS_ZBOOT
17681768

1769+
config SYS_SUPPORTS_ZBOOT_UART_PROM
1770+
bool
1771+
select SYS_SUPPORTS_ZBOOT
1772+
17691773
config CPU_LOONGSON2
17701774
bool
17711775
select CPU_SUPPORTS_32BIT_KERNEL

arch/mips/boot/compressed/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o
3535
ifdef CONFIG_DEBUG_ZBOOT
3636
vmlinuzobjs-$(CONFIG_DEBUG_ZBOOT) += $(obj)/dbg.o
3737
vmlinuzobjs-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART16550) += $(obj)/uart-16550.o
38+
vmlinuzobjs-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART_PROM) += $(obj)/uart-prom.o
3839
vmlinuzobjs-$(CONFIG_MIPS_ALCHEMY) += $(obj)/uart-alchemy.o
3940
endif
4041

arch/mips/boot/compressed/uart-prom.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
extern void prom_putchar(unsigned char ch);
3+
4+
void putc(char c)
5+
{
6+
prom_putchar(c);
7+
}

0 commit comments

Comments
 (0)