From patchwork Tue Jun 4 04:19:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 2656641 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 345BDDF2A1 for ; Tue, 4 Jun 2013 04:34:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753279Ab3FDEdf (ORCPT ); Tue, 4 Jun 2013 00:33:35 -0400 Received: from mail-pb0-f54.google.com ([209.85.160.54]:55102 "EHLO mail-pb0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753155Ab3FDEdb (ORCPT ); Tue, 4 Jun 2013 00:33:31 -0400 Received: by mail-pb0-f54.google.com with SMTP id ro12so6666360pbb.27 for ; Mon, 03 Jun 2013 21:33:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=V9oI0y7zyRrmmAXOATA+1j6jbvMpxDgLSff67WzyWOg=; b=LvEqmnhtbWkBxseYpVrQlT27oKlNPOucc5p/AbS28svMo4m/Cg75syXmKtEUvjaENf NuYOWzYJGwLQXhdAY4egna8pzEQy7PNUT8wyJ0S7YfiAgSX+zS9CqSEtJgOhyw+LGnSd kkNhT3Ckl57yiEY4KoKyRiI1zSxLqb8ADG9YM1eT2nL6ISHA111tMK4gzY3LBfiuT7j5 dlUjuPLRt/iD2kt+GIj0XY7VO9kYO1sd0mN0M81P6E5PwAF26oxW3myzAhq79ZAhuKkK ZCwAf3aYuW8j+EEkXTapvY7PZKkw/UwyNV7YuXGg70e5bE4D/ZtqebslYa09+q8fEFj5 YToQ== X-Received: by 10.66.220.197 with SMTP id py5mr27273850pac.86.1370320411095; Mon, 03 Jun 2013 21:33:31 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id ya4sm61570412pbb.24.2013.06.03.21.33.26 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Jun 2013 21:33:30 -0700 (PDT) From: Tushar Behera To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Cc: arnd@arndb.de, kgene.kim@samsung.com, olof@lixom.net, patches@linaro.org Subject: [PATCH v2 1/3] ARM: EXYNOS: uncompress - print debug messages if DEBUG_LL is defined Date: Tue, 4 Jun 2013 09:49:10 +0530 Message-Id: <1370319552-17694-2-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1370319552-17694-1-git-send-email-tushar.behera@linaro.org> References: <1370319552-17694-1-git-send-email-tushar.behera@linaro.org> X-Gm-Message-State: ALoCoQmHajrMctaDvVdOdJh2wJa9SHsNI/zrD6BG439hwx7oRLpUnDm6wxm1H/XPKNHDbPQEj1jf Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Printing low-level debug messages make an assumption that the specified UART port has been preconfigured by the bootloader. Incorrectly specified UART port results in system getting stalled while printing the message "Uncompressing Linux... done, booting the kernel" This UART port number is specified through S3C_LOWLEVEL_UART_PORT. Since the UART port might different for different board, it is not possible to specify it correctly for every board that use a common defconfig file. Calling this print subroutine only when DEBUG_LL fixes the problem. By disabling DEBUG_LL in default config file, we would be able to boot multiple boards with different default UART ports. With this current approach, we miss the print "Uncompressing Linux... done, booting the kernel." when DEBUG_LL is not defined. Signed-off-by: Tushar Behera --- Change for v2: * Instead of checking value of uart_base, now check if DEBUG_LL is enabled. This removes the ifdef's from mach/uncompress.h arch/arm/plat-samsung/include/plat/uncompress.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm/plat-samsung/include/plat/uncompress.h b/arch/arm/plat-samsung/include/plat/uncompress.h index 438b248..02b66d7 100644 --- a/arch/arm/plat-samsung/include/plat/uncompress.h +++ b/arch/arm/plat-samsung/include/plat/uncompress.h @@ -66,6 +66,9 @@ uart_rd(unsigned int reg) static void putc(int ch) { + if (!config_enabled(CONFIG_DEBUG_LL)) + return; + if (uart_rd(S3C2410_UFCON) & S3C2410_UFCON_FIFOMODE) { int level; @@ -118,7 +121,12 @@ static void arch_decomp_error(const char *x) #ifdef CONFIG_S3C_BOOT_UART_FORCE_FIFO static inline void arch_enable_uart_fifo(void) { - u32 fifocon = uart_rd(S3C2410_UFCON); + u32 fifocon; + + if (!config_enabled(CONFIG_DEBUG_LL)) + return; + + fifocon = uart_rd(S3C2410_UFCON); if (!(fifocon & S3C2410_UFCON_FIFOMODE)) { fifocon |= S3C2410_UFCON_RESETBOTH;