Skip to content

Commit

Permalink
MIPS: zboot: Add support for serial debug using the PROM
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Alex Smith <[email protected]>
Cc: Andrew Bresticker <[email protected]>
Cc: Wu Zhangjin <[email protected]>
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/11811/
Signed-off-by: Ralf Baechle <[email protected]>
  • Loading branch information
AlbanBedel authored and ralfbaechle committed Jan 24, 2016
1 parent 25f6609 commit dbb9831
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions arch/mips/boot/compressed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions arch/mips/boot/compressed/uart-prom.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

extern void prom_putchar(unsigned char ch);

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

0 comments on commit dbb9831

Please sign in to comment.