Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752507AbbLJJ54 (ORCPT ); Thu, 10 Dec 2015 04:57:56 -0500 Received: from smtpfb1-g21.free.fr ([212.27.42.9]:39321 "EHLO smtpfb1-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750966AbbLJJ5x (ORCPT ); Thu, 10 Dec 2015 04:57:53 -0500 From: Alban Bedel To: linux-mips@linux-mips.org Cc: Alban Bedel , Ralf Baechle , Alex Smith , Andrew Bresticker , Wu Zhangjin , linux-kernel@vger.kernel.org Subject: [PATCH 2/3] MIPS: zboot: Add support for serial debug using the PROM Date: Thu, 10 Dec 2015 10:57:21 +0100 Message-Id: <1449741444-29110-2-git-send-email-albeu@free.fr> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1449741444-29110-1-git-send-email-albeu@free.fr> References: <1449741444-29110-1-git-send-email-albeu@free.fr> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1921 Lines: 59 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 --- arch/mips/Kconfig | 4 ++++ arch/mips/boot/compressed/Makefile | 1 + arch/mips/boot/compressed/uart-prom.c | 7 +++++++ 3 files changed, 12 insertions(+) create mode 100644 arch/mips/boot/compressed/uart-prom.c diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 71683a8..ef1d665 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -1756,6 +1756,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 diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile index e66b2c6..4eff1ef 100644 --- a/arch/mips/boot/compressed/Makefile +++ b/arch/mips/boot/compressed/Makefile @@ -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 diff --git a/arch/mips/boot/compressed/uart-prom.c b/arch/mips/boot/compressed/uart-prom.c new file mode 100644 index 0000000..1c3d51b --- /dev/null +++ b/arch/mips/boot/compressed/uart-prom.c @@ -0,0 +1,7 @@ + +extern void prom_putchar(unsigned char ch); + +void putc(char c) +{ + prom_putchar(c); +} -- 2.0.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/