From mboxrd@z Thu Jan 1 00:00:00 1970 From: lra@sics.se Subject: [PATCH] Set register values and comment in early init_uart to match documentation of PL011 UART Date: Thu, 17 Jan 2013 15:08:59 +0100 Message-ID: <1358431739-14349-1-git-send-email-lra@sics.se> References: <1358428780.13856.57.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1358428780.13856.57.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xensource.com Cc: Lars Rasmusson List-Id: xen-devel@lists.xenproject.org From: Lars Rasmusson 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 --- 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