Source-Changes-HG archive

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

[src/trunk]: src/sys/arch fill in vexpress_platform_early_putchar(); make com...



details:   https://anonhg.NetBSD.org/src/rev/877b54de3342
branches:  trunk
changeset: 319792:877b54de3342
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Mon Jun 11 19:49:18 2018 +0000

description:
fill in vexpress_platform_early_putchar(); make comment about CONSADDR

diffstat:

 sys/arch/arm/vexpress/vexpress_platform.c |  21 ++++++++++++++++++---
 sys/arch/evbarm/conf/VEXPRESS_A15         |   3 ++-
 2 files changed, 20 insertions(+), 4 deletions(-)

diffs (67 lines):

diff -r e0732dd79424 -r 877b54de3342 sys/arch/arm/vexpress/vexpress_platform.c
--- a/sys/arch/arm/vexpress/vexpress_platform.c Mon Jun 11 19:42:22 2018 +0000
+++ b/sys/arch/arm/vexpress/vexpress_platform.c Mon Jun 11 19:49:18 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vexpress_platform.c,v 1.7 2018/03/17 18:34:09 ryo Exp $ */
+/* $NetBSD: vexpress_platform.c,v 1.8 2018/06/11 19:49:18 jakllsch Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
 #include "opt_fdt_arm.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vexpress_platform.c,v 1.7 2018/03/17 18:34:09 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vexpress_platform.c,v 1.8 2018/06/11 19:49:18 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -51,7 +51,7 @@
 
 #include <arm/cortex/gic_reg.h>
 
-#include <evbarm/dev/plcomvar.h>
+#include <evbarm/dev/plcomreg.h>
 
 #include <arm/vexpress/vexpress_platform.h>
 
@@ -178,6 +178,21 @@
 static void
 vexpress_platform_early_putchar(char c)
 {
+#ifdef CONSADDR
+#define CONSADDR_VA ((CONSADDR - VEXPRESS_CORE_PBASE) + VEXPRESS_CORE_VBASE)
+       volatile uint32_t *uartaddr = cpu_earlydevice_va_p() ?
+           (volatile uint32_t *)CONSADDR_VA :
+           (volatile uint32_t *)CONSADDR;
+
+       while ((le32toh(uartaddr[PL01XCOM_FR / 4]) & PL01X_FR_TXFF) != 0)
+               continue;
+
+       uartaddr[PL01XCOM_DR / 4] = htole32(c);
+       arm_dsb();
+
+       while ((le32toh(uartaddr[PL01XCOM_FR / 4]) & PL01X_FR_TXFE) == 0)
+               continue;
+#endif
 }
 
 static void
diff -r e0732dd79424 -r 877b54de3342 sys/arch/evbarm/conf/VEXPRESS_A15
--- a/sys/arch/evbarm/conf/VEXPRESS_A15 Mon Jun 11 19:42:22 2018 +0000
+++ b/sys/arch/evbarm/conf/VEXPRESS_A15 Mon Jun 11 19:49:18 2018 +0000
@@ -1,5 +1,5 @@
 #
-#      $NetBSD: VEXPRESS_A15,v 1.18 2018/06/06 20:38:00 jakllsch Exp $
+#      $NetBSD: VEXPRESS_A15,v 1.19 2018/06/11 19:49:18 jakllsch Exp $
 #
 #      ARM Versatile Express A15
 #
@@ -20,6 +20,7 @@
 #options       PMAP_DEBUG      # Enable pmap_debug_level code
 #options       IPKDB           # remote kernel debugging
 #options       VERBOSE_INIT_ARM # verbose bootstrapping messages
+#options       CONSADDR=0x1c090000
 
 makeoptions    DEBUG="-g"      # compile full symbol table
 makeoptions    COPY_SYMTAB=1



Home | Main Index | Thread Index | Old Index