public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom.net>
To: Tushar Behera <tushar.behera@linaro.org>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, arnd@arndb.de,
	kgene.kim@samsung.com, patches@linaro.org
Subject: Re: [PATCH 1/3] ARM: EXYNOS: uncompress - print debug messages if DEBUG_LL is defined
Date: Fri, 31 May 2013 20:59:29 -0700	[thread overview]
Message-ID: <20130601035929.GA3868@quad.lixom.net> (raw)
In-Reply-To: <1370000944-19786-2-git-send-email-tushar.behera@linaro.org>

On Fri, May 31, 2013 at 05:19:02PM +0530, Tushar Behera wrote:
> 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>
> ---
>  arch/arm/mach-exynos/include/mach/uncompress.h  |   11 ++++++++---
>  arch/arm/plat-samsung/include/plat/uncompress.h |   10 +++++++++-
>  2 files changed, 17 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos/include/mach/uncompress.h b/arch/arm/mach-exynos/include/mach/uncompress.h
> index 2979995..730f69f 100644
> --- a/arch/arm/mach-exynos/include/mach/uncompress.h
> +++ b/arch/arm/mach-exynos/include/mach/uncompress.h
> @@ -37,11 +37,16 @@ static void arch_detect_cpu(void)
>  	chip_id >>= 20;
>  	chip_id &= 0xf;
>  
> +#ifdef CONFIG_DEBUG_LL
>  	if (chip_id == 0x5)
> -		uart_base = (volatile u8 *)EXYNOS5_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);
> +		uart_base = (volatile u8 *)EXYNOS5_PA_UART +
> +			(S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);
>  	else
> -		uart_base = (volatile u8 *)EXYNOS4_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);
> -
> +		uart_base = (volatile u8 *)EXYNOS4_PA_UART +
> +			(S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT);
> +#else
> +	uart_base = NULL;
> +#endif

You can do:

	if (!config_enabled(CONFIG_DEBUG_LL))
		return;

Since uart_base will be set to 0 by being in BSS anyway.


-Olof

  reply	other threads:[~2013-06-01  3:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-31 11:49 [PATCH 0/3] Consolidate uncompress code for Samsung platform Tushar Behera
2013-05-31 11:49 ` [PATCH 1/3] ARM: EXYNOS: uncompress - print debug messages if DEBUG_LL is defined Tushar Behera
2013-06-01  3:59   ` Olof Johansson [this message]
2013-06-03  4:57     ` Tushar Behera
2013-05-31 11:49 ` [PATCH 2/3] ARM: SAMSUNG: Consolidate uncompress subroutine Tushar Behera
2013-06-01  4:00   ` Olof Johansson
2013-05-31 11:49 ` [PATCH 3/3] ARM: S5P64X0: Remove duplicate uncompress code Tushar Behera
2013-06-01  8:41   ` Sylwester Nawrocki
2013-06-03  4:18     ` Tushar Behera
2013-06-03 11:40       ` Tomasz Figa
2013-06-03 11:55         ` 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=20130601035929.GA3868@quad.lixom.net \
    --to=olof@lixom.net \
    --cc=arnd@arndb.de \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=tushar.behera@linaro.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