From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754489AbbERPwb (ORCPT ); Mon, 18 May 2015 11:52:31 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:34537 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754407AbbERPv5 (ORCPT ); Mon, 18 May 2015 11:51:57 -0400 X-Auth-Info: 2ag4bT9LRsFRcjJSq4l2FuxnwMzsQC3pGZ24EMg2BNOyautpKBTMNbbEDvJ8NtVn From: Olaf Mandel To: linux@arm.linux.org.uk Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Olaf Mandel , Marek Vasut Subject: [PATCH] arm: add CONFIG_ARM_VERBOSE_BOOTUP Date: Mon, 18 May 2015 17:50:43 +0200 Message-Id: <1431964243-9995-1-git-send-email-o.mandel@menlosystems.com> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The new option copies the behaviour of CONFIG_X86_VERBOSE_BOOTUP to the arm architecture, allowing to completely silence the serial port. The default value is y, which is the original behaviour. Signed-off-by: Olaf Mandel CC: Marek Vasut --- arch/arm/Kconfig.debug | 9 +++++++++ arch/arm/boot/compressed/misc.c | 16 +++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 0c12ffb..644f585 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1565,6 +1565,15 @@ config UNCOMPRESS_INCLUDE ARCH_SHMOBILE_LEGACY default "mach/uncompress.h" +config ARM_VERBOSE_BOOTUP + bool "Enable verbose arm bootup info messages" + default y + ---help--- + Enables the informational output from the decompression stage + (e.g. bzImage) of the boot. Disable this if you want silent + bootup. Error messages from the compression stage are shown + even if this option is disabled. + config EARLY_PRINTK bool "Early printk" depends on DEBUG_LL diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index d4f891f..4873708 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c @@ -22,7 +22,13 @@ unsigned int __machine_arch_type; #include #include -static void putstr(const char *ptr); +static void __putstr(const char *ptr); +#ifdef CONFIG_ARM_VERBOSE_BOOTUP +#define putstr(__x) __putstr(__x) +#else +static inline void putstr(const char *ptr) +{ } +#endif extern void error(char *x); #include CONFIG_UNCOMPRESS_INCLUDE @@ -83,7 +89,7 @@ static void icedcc_putc(int ch) #define putc(ch) icedcc_putc(ch) #endif -static void putstr(const char *ptr) +static void __putstr(const char *ptr) { char c; @@ -115,9 +121,9 @@ void error(char *x) { arch_error(x); - putstr("\n\n"); - putstr(x); - putstr("\n\n -- System halted"); + __putstr("\n\n"); + __putstr(x); + __putstr("\n\n -- System halted"); while(1); /* Halt */ } -- 2.1.4