xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: lra@sics.se
To: xen-devel@lists.xen.org
Cc: Lars Rasmusson <Lars.Rasmusson@sics.se>
Subject: [PATCH] Set register values and comment in early init_uart to match documentation of PL011 UART
Date: Thu, 10 Jan 2013 21:02:21 +0100	[thread overview]
Message-ID: <1357848141-10852-1-git-send-email-lra@sics.se> (raw)

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

             reply	other threads:[~2013-01-10 20:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-10 20:02 lra [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-01-17 13:19 Xen-arm patch to early init_uart in head.S 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

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=1357848141-10852-1-git-send-email-lra@sics.se \
    --to=lra@sics.se \
    --cc=Lars.Rasmusson@sics.se \
    --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).