xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* Xen-arm patch to early init_uart in head.S
@ 2013-01-10 19:18 lra
  2013-01-11 10:03 ` Ian Campbell
  0 siblings, 1 reply; 6+ messages in thread
From: lra @ 2013-01-10 19:18 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com

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.)

Cheers,
/Lars

>From 7184ce113d907ce8cf366dddbe8145e59987a656 Mon Sep 17 00:00:00 2001
From: Lars Rasmusson <Lars.Rasmusson@sics.se>
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@sics.se>
---
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
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] Set register values and comment in early init_uart to match documentation of PL011 UART
@ 2013-01-10 20:02 lra
  0 siblings, 0 replies; 6+ messages in thread
From: lra @ 2013-01-10 20:02 UTC (permalink / raw)
  To: xen-devel; +Cc: Lars Rasmusson

From: Lars Rasmusson <Lars.Rasmusson@sics.se>

Reading the PL011 UART documentation on
http://infocenter.arm.com/help/topic/com.arm.doc.ddi0183f/DDI0183.pdf
in sec 3.2 shows the early initialisation of the UART on the Versatile Express
is incorrect. (Currently it probably works only because the default
values are sane.)

Signed-off-by: Lars Rasmusson <Lars.Rasmusson@sics.se>
---
 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
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: Xen-arm patch to early init_uart in head.S
  2013-01-10 19:18 Xen-arm patch to early init_uart in head.S lra
@ 2013-01-11 10:03 ` Ian Campbell
  2013-01-17 13:19   ` Ian Campbell
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2013-01-11 10:03 UTC (permalink / raw)
  To: lra@sics.se; +Cc: xen-devel@lists.xensource.com

On Thu, 2013-01-10 at 19:18 +0000, lra@sics.se 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@sics.se>
> 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@sics.se>

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

> ---
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Xen-arm patch to early init_uart in head.S
  2013-01-11 10:03 ` Ian Campbell
@ 2013-01-17 13:19   ` Ian Campbell
  2013-01-17 14:08     ` [PATCH] Set register values and comment in early init_uart to match documentation of PL011 UART lra
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2013-01-17 13:19 UTC (permalink / raw)
  To: lra@sics.se; +Cc: xen-devel@lists.xensource.com

On Fri, 2013-01-11 at 10:03 +0000, Ian Campbell wrote:
> On Thu, 2013-01-10 at 19:18 +0000, lra@sics.se 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@sics.se>
> > 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@sics.se>
> 
> Acked-by: Ian Campbell <ian.campbell@citrix.com>

I'm afraid this patch doesn't apply, I think it is based on a tree prior
to moving head.S -> arm32/head.S and fixing up the whitespace.

Could you rebase please?

Thanks,
Ian.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] Set register values and comment in early init_uart to match documentation of PL011 UART
  2013-01-17 13:19   ` Ian Campbell
@ 2013-01-17 14:08     ` lra
  2013-01-17 16:49       ` Ian Campbell
  0 siblings, 1 reply; 6+ messages in thread
From: lra @ 2013-01-17 14:08 UTC (permalink / raw)
  To: xen-devel; +Cc: Lars Rasmusson

From: Lars Rasmusson <Lars.Rasmusson@sics.se>

Reading the PL011 UART documentation on
http://infocenter.arm.com/help/topic/com.arm.doc.ddi0183f/DDI0183.pdf
in sec 3.2 shows the early initialisation of the UART on the Versatile Express
is incorrect.  This fixes it.

Signed-off-by: Lars Rasmusson <Lars.Rasmusson@sics.se>
---
 xen/arch/arm/arm32/head.S |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S
index 4782f11..20e9da6 100644
--- a/xen/arch/arm/arm32/head.S
+++ b/xen/arch/arm/arm32/head.S
@@ -352,11 +352,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
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] Set register values and comment in early init_uart to match documentation of PL011 UART
  2013-01-17 14:08     ` [PATCH] Set register values and comment in early init_uart to match documentation of PL011 UART lra
@ 2013-01-17 16:49       ` Ian Campbell
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Campbell @ 2013-01-17 16:49 UTC (permalink / raw)
  To: lra@sics.se; +Cc: Lars Rasmusson, xen-devel@lists.xensource.com

On Thu, 2013-01-17 at 14:08 +0000, lra@sics.se wrote:
> From: Lars Rasmusson <Lars.Rasmusson@sics.se>
> 
> Reading the PL011 UART documentation on
> http://infocenter.arm.com/help/topic/com.arm.doc.ddi0183f/DDI0183.pdf
> in sec 3.2 shows the early initialisation of the UART on the Versatile Express
> is incorrect.  This fixes it.
> 
> Signed-off-by: Lars Rasmusson <Lars.Rasmusson@sics.se>

Acked + applied. Thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-01-17 16:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-10 19:18 Xen-arm patch to early init_uart in head.S lra
2013-01-11 10:03 ` Ian Campbell
2013-01-17 13:19   ` Ian Campbell
2013-01-17 14:08     ` [PATCH] Set register values and comment in early init_uart to match documentation of PL011 UART lra
2013-01-17 16:49       ` Ian Campbell
  -- strict thread matches above, loose matches on Subject: below --
2013-01-10 20:02 lra

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).