From: Julien Grall <julien.grall@linaro.org>
To: Andre Przywara <andre.przywara@calxeda.com>
Cc: xen-devel@lists.xen.org, Ian.Campbell@citrix.com,
stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH 2/4] arm/early-printk: allow skipping of UART init
Date: Fri, 24 May 2013 13:30:31 +0100 [thread overview]
Message-ID: <519F5D67.5050405@linaro.org> (raw)
In-Reply-To: <1369392152-1305-3-git-send-email-andre.przywara@calxeda.com>
On 05/24/2013 11:42 AM, Andre Przywara wrote:
> While it seems obvious to initialize the UART before using it, chances
> are that some firmware code or the bootloader already did this.
> So it may actually be a good idea to skip the initialization, in fact
> this fixes early printk on my TC2 Versatile Express.
> So provide an option in xen/arch/arm/Rules.mk to only initialize the
> UART when needed.
I'm using the fast model: Fast Models [8.0.60 (Mar 7 2013)] and the
UART initialization is needed.
Could you do one of the following option:
1) add fastmodel early printk (with EARLY_PRINTK_INIT_UART=y)
2) document the behavior in docs/misc/arm/early-printk.txt
> Signed-off-by: Andre Przywara <andre.przywara@calxeda.com>
> ---
> xen/arch/arm/Rules.mk | 2 ++
> xen/arch/arm/arm32/head.S | 2 ++
> xen/arch/arm/arm64/head.S | 2 ++
> 3 files changed, 6 insertions(+)
>
> diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
> index b4d6907..fdcf73e 100644
> --- a/xen/arch/arm/Rules.mk
> +++ b/xen/arch/arm/Rules.mk
> @@ -49,6 +49,7 @@ EARLY_PRINTK_BAUD := 38400
> endif
> ifeq ($(CONFIG_EARLY_PRINTK), exynos5250)
> EARLY_PRINTK_INC := exynos4210
> +EARLY_PRINTK_INIT_UART := y
> EARLY_PRINTK_BAUD := 115200
> endif
>
> @@ -57,6 +58,7 @@ EARLY_PRINTK := y
> endif
>
> CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK
> +CFLAGS-$(EARLY_PRINTK_INIT_UART) += -DEARLY_PRINTK_INIT_UART
> CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK_INC=\"debug-$(EARLY_PRINTK_INC).inc\"
> CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK_BAUD=$(EARLY_PRINTK_BAUD)
> endif
> diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S
> index ec7f640..0588d54 100644
> --- a/xen/arch/arm/arm32/head.S
> +++ b/xen/arch/arm/arm32/head.S
> @@ -369,7 +369,9 @@ fail: PRINT("- Boot failed -\r\n")
> * r11: Early UART base address
> * Clobbers r0-r2 */
> init_uart:
> +#ifdef EARLY_PRINTK_INIT_UART
> early_uart_init r11, r1, r2
> +#endif
> adr r0, 1f
> b puts /* Jump to puts */
> 1: .asciz "- UART enabled -\r\n"
> diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
> index 8955946..21b7e4d 100644
> --- a/xen/arch/arm/arm64/head.S
> +++ b/xen/arch/arm/arm64/head.S
> @@ -116,7 +116,9 @@ boot_cpu:
> #ifdef EARLY_PRINTK
> ldr x23, =EARLY_UART_BASE_ADDRESS /* x23 := UART base address */
> cbnz x22, 1f
> +#ifdef EARLY_PRINTK_INIT_UART
> bl init_uart /* CPU 0 sets up the UART too */
> +#endif
> 1: PRINT("- CPU ")
> mov x0, x22
> bl putn
--
Julien
next prev parent reply other threads:[~2013-05-24 12:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-24 10:42 [PATCH 0/4] ARM/early-printk: Improve reusability and add Calxeda support Andre Przywara
2013-05-24 10:42 ` [PATCH 1/4] arm/early-printk: calculate baud rate divisor from user provided value Andre Przywara
2013-05-24 12:15 ` Julien Grall
2013-05-24 10:42 ` [PATCH 2/4] arm/early-printk: allow skipping of UART init Andre Przywara
2013-05-24 12:30 ` Julien Grall [this message]
2013-05-24 10:42 ` [PATCH 3/4] arm/early-printk: move UART base address to Rules.mk Andre Przywara
2013-05-24 12:36 ` Julien Grall
2013-05-24 12:51 ` Julien Grall
2013-05-24 10:42 ` [PATCH 4/4] arm/early-printk: add Calxeda Midway UART support Andre Przywara
2013-05-24 12:38 ` Julien Grall
2013-05-24 12:40 ` [PATCH 0/4] ARM/early-printk: Improve reusability and add Calxeda support Julien Grall
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=519F5D67.5050405@linaro.org \
--to=julien.grall@linaro.org \
--cc=Ian.Campbell@citrix.com \
--cc=andre.przywara@calxeda.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.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).