linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tushar.behera@linaro.org (Tushar Behera)
To: linux-arm-kernel@lists.infradead.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	[thread overview]
Message-ID: <1370319552-17694-2-git-send-email-tushar.behera@linaro.org> (raw)
In-Reply-To: <1370319552-17694-1-git-send-email-tushar.behera@linaro.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 <tushar.behera@linaro.org>
---
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;
-- 
1.7.9.5

  reply	other threads:[~2013-06-04  4:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-04  4:19 [PATCH v2 0/3] Consolidate uncompress code for Samsung platform Tushar Behera
2013-06-04  4:19 ` Tushar Behera [this message]
2013-06-06  9:07   ` [PATCH v2 1/3] ARM: EXYNOS: uncompress - print debug messages if DEBUG_LL is defined Tushar Behera
2013-06-08  1:09     ` Olof Johansson
2013-06-04  4:19 ` [PATCH v2 2/3] ARM: SAMSUNG: Consolidate uncompress subroutine Tushar Behera
2013-06-13  6:04   ` Tushar Behera
2013-06-16 21:03     ` Kukjin Kim
2013-06-04  4:19 ` [PATCH v2 3/3] ARM: s5p64x0: Use common uncompress.h part for plat-samsung Tushar Behera
2013-06-13  6:04   ` Tushar Behera

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1370319552-17694-2-git-send-email-tushar.behera@linaro.org \
    --to=tushar.behera@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).