Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/ti Fix am33xx_platform_early_putchar for pre-MM...



details:   https://anonhg.NetBSD.org/src/rev/bebd9018268a
branches:  trunk
changeset: 460514:bebd9018268a
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat Oct 26 15:58:15 2019 +0000

description:
Fix am33xx_platform_early_putchar for pre-MMU output

diffstat:

 sys/arch/arm/ti/ti_platform.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r de4d31ae48c9 -r bebd9018268a sys/arch/arm/ti/ti_platform.c
--- a/sys/arch/arm/ti/ti_platform.c     Sat Oct 26 15:01:18 2019 +0000
+++ b/sys/arch/arm/ti/ti_platform.c     Sat Oct 26 15:58:15 2019 +0000
@@ -1,9 +1,9 @@
-/* $NetBSD: ti_platform.c,v 1.6 2018/10/30 16:41:52 skrll Exp $ */
+/* $NetBSD: ti_platform.c,v 1.7 2019/10/26 15:58:15 jmcneill Exp $ */
 
 #include "opt_console.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ti_platform.c,v 1.6 2018/10/30 16:41:52 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ti_platform.c,v 1.7 2019/10/26 15:58:15 jmcneill Exp $");
 
 #include <sys/param.h>
 
@@ -25,7 +25,9 @@
 {
 #ifdef CONSADDR
 #define CONSADDR_VA ((CONSADDR - 0x44c00000) + 0xe4c00000)
-       volatile uint32_t *uartaddr = (volatile uint32_t *)CONSADDR_VA;
+       volatile uint32_t *uartaddr = cpu_earlydevice_va_p() ?
+           (volatile uint32_t *)CONSADDR_VA :
+           (volatile uint32_t *)CONSADDR;
 
        while ((le32toh(uartaddr[com_lsr]) & LSR_TXRDY) == 0)
                ;



Home | Main Index | Thread Index | Old Index