[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Xen-arm patch to early init_uart in head.S



On Thu, 2013-01-10 at 19:18 +0000, lra@xxxxxxx wrote:
> Hi,
> 
> reading the PL011 UART documentation on
> http://infocenter.arm.com/help/topic/com.arm.doc.ddi0183f/DDI0183.pdf
> 
> I noticed the early initialisation of the UART on the Versatile Express
> is incorrect. (Currently it probably works only because the default
> values are sane.)

Good catch! Thanks.

> From 7184ce113d907ce8cf366dddbe8145e59987a656 Mon Sep 17 00:00:00 2001
> From: Lars Rasmusson <Lars.Rasmusson@xxxxxxx>
> Date: Thu, 10 Jan 2013 17:10:44 +0100
> Subject: [PATCH] Fixed register values and comment in early init_uart to
> match documentation of PL011 UART
> 
> Signed-off-by: Lars Rasmusson <Lars.Rasmusson@xxxxxxx>

Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

> ---
> xen/arch/arm/head.S |    4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/xen/arch/arm/head.S b/xen/arch/arm/head.S
> index cdbe011..a884592 100644
> --- a/xen/arch/arm/head.S
> +++ b/xen/arch/arm/head.S
> @@ -291,11 +291,11 @@ fail:   PRINT("- Boot failed -\r\n")
> * Clobbers r0-r2 */
> init_uart:
>       mov   r1, #0x0
> -     str   r1, [r11, #0x24]       /* -> UARTIBRD (Baud divisor fraction) */
> +     str   r1, [r11, #0x28]       /* -> UARTFBRD (Baud divisor fraction) */
>       mov   r1, #0x4               /* 7.3728MHz / 0x4 == 16 * 115200 */
>       str   r1, [r11, #0x24]       /* -> UARTIBRD (Baud divisor integer) */
>       mov   r1, #0x60              /* 8n1 */
> -     str   r1, [r11, #0x24]       /* -> UARTLCR_H (Line control) */
> +     str   r1, [r11, #0x2C]       /* -> UARTLCR_H (Line control) */
>       ldr   r1, =0x00000301        /* RXE | TXE | UARTEN */
>       str   r1, [r11, #0x30]       /* -> UARTCR (Control Register) */
>       adr   r0, 1f



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.