Commit 437d8ac5 authored by Tushar Behera's avatar Tushar Behera Committed by Olof Johansson

ARM: EXYNOS: uncompress - print debug messages if DEBUG_LL is defined

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: default avatarTushar Behera <tushar.behera@linaro.org>
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parent 0b682558
...@@ -66,6 +66,9 @@ uart_rd(unsigned int reg) ...@@ -66,6 +66,9 @@ uart_rd(unsigned int reg)
static void putc(int ch) static void putc(int ch)
{ {
if (!config_enabled(CONFIG_DEBUG_LL))
return;
if (uart_rd(S3C2410_UFCON) & S3C2410_UFCON_FIFOMODE) { if (uart_rd(S3C2410_UFCON) & S3C2410_UFCON_FIFOMODE) {
int level; int level;
...@@ -118,7 +121,12 @@ static void arch_decomp_error(const char *x) ...@@ -118,7 +121,12 @@ static void arch_decomp_error(const char *x)
#ifdef CONFIG_S3C_BOOT_UART_FORCE_FIFO #ifdef CONFIG_S3C_BOOT_UART_FORCE_FIFO
static inline void arch_enable_uart_fifo(void) 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)) { if (!(fifocon & S3C2410_UFCON_FIFOMODE)) {
fifocon |= S3C2410_UFCON_RESETBOTH; fifocon |= S3C2410_UFCON_RESETBOTH;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment