Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Make early console work.
details: https://anonhg.NetBSD.org/src/rev/41bf9221ca03
branches: trunk
changeset: 445562:41bf9221ca03
user: aymeric <aymeric%NetBSD.org@localhost>
date: Fri Nov 02 18:11:24 2018 +0000
description:
Make early console work.
diffstat:
sys/arch/arm/altera/cycv_platform.c | 10 +++++++---
sys/arch/evbarm/conf/NANOSOC | 4 ++--
2 files changed, 9 insertions(+), 5 deletions(-)
diffs (57 lines):
diff -r 605d68b0554f -r 41bf9221ca03 sys/arch/arm/altera/cycv_platform.c
--- a/sys/arch/arm/altera/cycv_platform.c Fri Nov 02 18:09:17 2018 +0000
+++ b/sys/arch/arm/altera/cycv_platform.c Fri Nov 02 18:11:24 2018 +0000
@@ -1,12 +1,13 @@
-/* $NetBSD: cycv_platform.c,v 1.7 2018/11/02 18:09:17 aymeric Exp $ */
+/* $NetBSD: cycv_platform.c,v 1.8 2018/11/02 18:11:24 aymeric Exp $ */
/* This file is in the public domain. */
#include "arml2cc.h"
+#include "opt_console.h"
#include "opt_multiprocessor.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cycv_platform.c,v 1.7 2018/11/02 18:09:17 aymeric Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cycv_platform.c,v 1.8 2018/11/02 18:11:24 aymeric Exp $");
#define _ARM32_BUS_DMA_PRIVATE
#include <sys/param.h>
@@ -29,6 +30,7 @@
#include <arm/fdt/arm_fdtvar.h>
#include <dev/fdt/fdtvar.h>
+#include <dev/ic/comreg.h>
void cycv_platform_early_putchar(char);
@@ -36,7 +38,9 @@
cycv_platform_early_putchar(char c) {
#ifdef CONSADDR
#define CONSADDR_VA (CONSADDR - CYCV_PERIPHERAL_BASE + CYCV_PERIPHERAL_VBASE)
- 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)
;
diff -r 605d68b0554f -r 41bf9221ca03 sys/arch/evbarm/conf/NANOSOC
--- a/sys/arch/evbarm/conf/NANOSOC Fri Nov 02 18:09:17 2018 +0000
+++ b/sys/arch/evbarm/conf/NANOSOC Fri Nov 02 18:11:24 2018 +0000
@@ -1,5 +1,5 @@
#
-# $NetBSD: NANOSOC,v 1.3 2018/10/18 09:01:53 skrll Exp $
+# $NetBSD: NANOSOC,v 1.4 2018/11/02 18:11:24 aymeric Exp $
#
# Altera DE0 Nano SoC
#
@@ -45,7 +45,7 @@
arml2cc0 at l2cc0
com* at fdt?
-options CONSADDR=0xFFC02000, CONSPEED=115200
+options EARLYCONS=cycv, CONSADDR=0xFFC02000, CONSPEED=115200
awge* at fdt?
#micphy* at mii? phy?
Home |
Main Index |
Thread Index |
Old Index