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/b11dca4c3ecc
branches:  trunk
changeset: 1004358:b11dca4c3ecc
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 1628f755e52e -r b11dca4c3ecc 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