Module Name:    src
Committed By:   jakllsch
Date:           Mon Jun 11 19:49:18 UTC 2018

Modified Files:
        src/sys/arch/arm/vexpress: vexpress_platform.c
        src/sys/arch/evbarm/conf: VEXPRESS_A15

Log Message:
fill in vexpress_platform_early_putchar(); make comment about CONSADDR


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/vexpress/vexpress_platform.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/evbarm/conf/VEXPRESS_A15

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/vexpress/vexpress_platform.c
diff -u src/sys/arch/arm/vexpress/vexpress_platform.c:1.7 src/sys/arch/arm/vexpress/vexpress_platform.c:1.8
--- src/sys/arch/arm/vexpress/vexpress_platform.c:1.7	Sat Mar 17 18:34:09 2018
+++ src/sys/arch/arm/vexpress/vexpress_platform.c	Mon Jun 11 19:49:18 2018
@@ -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 <jmcne...@invisible.ca>
@@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: vexpress_pla
 
 #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 @@ vexpress_platform_init_attach_args(struc
 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

Index: src/sys/arch/evbarm/conf/VEXPRESS_A15
diff -u src/sys/arch/evbarm/conf/VEXPRESS_A15:1.18 src/sys/arch/evbarm/conf/VEXPRESS_A15:1.19
--- src/sys/arch/evbarm/conf/VEXPRESS_A15:1.18	Wed Jun  6 20:38:00 2018
+++ src/sys/arch/evbarm/conf/VEXPRESS_A15	Mon Jun 11 19:49:18 2018
@@ -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 @@ pseudo-device 	openfirm	# /dev/openfirm
 #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

Reply via email to