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: 17493 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f199.google.com (mail-qc0-f199.google.com [209.85.216.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1DED6238F2 for ; Tue, 4 Jun 2013 04:33:33 +0000 (UTC) Received: by mail-qc0-f199.google.com with SMTP id s1sf6223201qcw.6 for ; Mon, 03 Jun 2013 21:33:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=V9oI0y7zyRrmmAXOATA+1j6jbvMpxDgLSff67WzyWOg=; b=NxU8jM8/sjqoesiRfpzBQmWYAAED4pGc1dIM0dTbduLAUb5i6KsXUdngjMQcIUW1MA ROYcnK0UdD3Gg9dZ+uD3jX6zwGxskQz7ZxdDEZaM7ZP325wIpwfHl37zedc+XfpCqo9y Fg5detyDLQ1/RCLxBJKluaZTQx6RTRp74SzuZdszehHuk/2xZJCNWCcTjDT3UN4lx5Kt LH8xLiQAuWL2EDQSwAHgLi+3E4CBj8ym/oq06NhYbjpjvnWKVKCLmV2J7+m7CAsUynJu jp08gZy7p6QG7lXWw9C796oPlR7IEYCuMC3UzCelwq7TGFQmC5pK3S93ht+1mW0PB5bZ 8R3w== X-Received: by 10.224.59.205 with SMTP id m13mr15619584qah.7.1370320412824; Mon, 03 Jun 2013 21:33:32 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.18.195 with SMTP id y3ls95026qed.67.gmail; Mon, 03 Jun 2013 21:33:32 -0700 (PDT) X-Received: by 10.52.29.19 with SMTP id f19mr15228335vdh.100.1370320412643; Mon, 03 Jun 2013 21:33:32 -0700 (PDT) Received: from mail-vb0-x233.google.com (mail-vb0-x233.google.com [2607:f8b0:400c:c02::233]) by mx.google.com with ESMTPS id k19si36748091vcu.14.2013.06.03.21.33.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Jun 2013 21:33:32 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::233 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::233; Received: by mail-vb0-f51.google.com with SMTP id x17so2339151vbf.10 for ; Mon, 03 Jun 2013 21:33:32 -0700 (PDT) X-Received: by 10.52.36.115 with SMTP id p19mr15187697vdj.8.1370320412463; Mon, 03 Jun 2013 21:33:32 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.10.206 with SMTP id pb14csp108422vcb; Mon, 3 Jun 2013 21:33:31 -0700 (PDT) X-Received: by 10.68.182.33 with SMTP id eb1mr23633185pbc.186.1370320411491; Mon, 03 Jun 2013 21:33:31 -0700 (PDT) Received: from mail-pd0-f169.google.com (mail-pd0-f169.google.com [209.85.192.169]) by mx.google.com with ESMTPS id hb2si41748611pac.118.2013.06.03.21.33.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Jun 2013 21:33:31 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.169 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.192.169; Received: by mail-pd0-f169.google.com with SMTP id y10so585129pdj.28 for ; Mon, 03 Jun 2013 21:33:31 -0700 (PDT) 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: ALoCoQksQS3ipteE9AbCdRuK7yHOCzNO0NVR/dBuKES70QoBk89cmjaGCCrr5jyO7nUIVcfe83SZ X-Original-Sender: tushar.behera@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::233 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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;