Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Support EARLYCONS and VERBOSE_INIT_ARM for Raspberr...



details:   https://anonhg.NetBSD.org/src/rev/0fa09c7a8fe0
branches:  trunk
changeset: 946305:0fa09c7a8fe0
user:      rin <rin%NetBSD.org@localhost>
date:      Mon Nov 23 06:24:35 2020 +0000

description:
Support EARLYCONS and VERBOSE_INIT_ARM for Raspberry Pi Zero W, for
which mini UART should be used instead of PL011 UART.

diffstat:

 sys/arch/arm/broadcom/bcm283x_platform.c |  14 ++++++++++++--
 sys/arch/evbarm/conf/RPI                 |   5 +++--
 2 files changed, 15 insertions(+), 4 deletions(-)

diffs (62 lines):

diff -r a5101c58b2ec -r 0fa09c7a8fe0 sys/arch/arm/broadcom/bcm283x_platform.c
--- a/sys/arch/arm/broadcom/bcm283x_platform.c  Mon Nov 23 06:21:07 2020 +0000
+++ b/sys/arch/arm/broadcom/bcm283x_platform.c  Mon Nov 23 06:24:35 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcm283x_platform.c,v 1.42 2020/11/23 06:21:07 rin Exp $        */
+/*     $NetBSD: bcm283x_platform.c,v 1.43 2020/11/23 06:24:35 rin Exp $        */
 
 /*-
  * Copyright (c) 2017 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm283x_platform.c,v 1.42 2020/11/23 06:21:07 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm283x_platform.c,v 1.43 2020/11/23 06:24:35 rin Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_bcm283x.h"
@@ -112,6 +112,7 @@
 #define RPI_CPU_MAX    4
 
 void bcm2835_platform_early_putchar(char c);
+void bcm2835_aux_platform_early_putchar(char c);
 void bcm2836_platform_early_putchar(char c);
 void bcm2837_platform_early_putchar(char c);
 void bcm2711_platform_early_putchar(char c);
@@ -1368,6 +1369,15 @@
 }
 
 void __noasan
+bcm2835_aux_platform_early_putchar(char c)
+{
+       paddr_t pa = BCM2835_PERIPHERALS_BUS_TO_PHYS(BCM2835_AUX_UART_BASE);
+       vaddr_t va = BCM2835_IOPHYSTOVIRT(pa);
+
+       bcm283x_aux_platform_early_putchar(va, pa, c);
+}
+
+void __noasan
 bcm2836_platform_early_putchar(char c)
 {
        paddr_t pa = BCM2836_PERIPHERALS_BUS_TO_PHYS(BCM2835_UART0_BASE);
diff -r a5101c58b2ec -r 0fa09c7a8fe0 sys/arch/evbarm/conf/RPI
--- a/sys/arch/evbarm/conf/RPI  Mon Nov 23 06:21:07 2020 +0000
+++ b/sys/arch/evbarm/conf/RPI  Mon Nov 23 06:24:35 2020 +0000
@@ -1,5 +1,5 @@
 #
-#      $NetBSD: RPI,v 1.93 2020/10/30 11:02:50 rin Exp $
+#      $NetBSD: RPI,v 1.94 2020/11/23 06:24:35 rin Exp $
 #
 #      RPi -- Raspberry Pi
 #
@@ -19,7 +19,8 @@
 # Development and Debugging options
 #options       KGDB,KGDB_PLCOMUNIT=0,KGDB_DEVRATE=115200,KGDB_CONMODE=0xB00
 #options       VERBOSE_INIT_ARM
-#options       EARLYCONS=bcm2835,CONSADDR=0x20201000
+#options       EARLYCONS=bcm2835,CONSADDR=0x20201000           # RPI1, RPI0
+#options       EARLYCONS=bcm2835_aux,CONSADDR=0x20215040       # RPI0W
 makeoptions    DEBUG="-g"      # compile full symbol table
 makeoptions    COPY_SYMTAB=1
 options        PLCONSOLE



Home | Main Index | Thread Index | Old Index