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: 2656651 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id A25B5DF2A1 for ; Tue, 4 Jun 2013 04:34:27 +0000 (UTC) Received: from merlin.infradead.org ([205.233.59.134]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ujiwg-0000sF-LE; Tue, 04 Jun 2013 04:34:07 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UjiwY-0001C7-8G; Tue, 04 Jun 2013 04:33:58 +0000 Received: from mail-pd0-f172.google.com ([209.85.192.172]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UjiwS-0001Aw-Eb for linux-arm-kernel@lists.infradead.org; Tue, 04 Jun 2013 04:33:53 +0000 Received: by mail-pd0-f172.google.com with SMTP id t10so3112233pdi.31 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=XQxIFjXlVOybITseku2oBzoH4zY1oWL6sSBYKrIYE+ZiO1Gd6Glgfv28aWP6osoADb 7Xt/KLgz5U8f+j06lHGUvwb+cFyEq5cMTqseST6IAHboeoMwafr0pWO75aeoTlzO4ZzW fX1S7xseFiQxjYcOR+dBkENlXEWXEWzdh3hbhtmbaWq3HvwJE1kzHdmqdKnJBuNfOl1p 4Fl2V4WsnJZmgeOft2S4cNkqfnbB0W5CSmqKPE4qXTKKA7xHK86ZIjJOZRyBmVD/hLjv fmG2POUkurPDwG0kL4Hgv9HOgMMsdfhm5YmPg0MaIxN3jagbVjaF3XR9Te96qdSUqOsi Bo7g== 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 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: ALoCoQkIpfiOUCKXspnKFv7II9z7fqDO0Lxq40XRHoVLUQQg0fGoiw1IrxGazXmM6+4e5vGvCJ5h X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130604_003352_616888_28B83BBF X-CRM114-Status: GOOD ( 15.93 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.192.172 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: olof@lixom.net, kgene.kim@samsung.com, arnd@arndb.de, patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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;