Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sandpoint/sandpoint Call com_init_regs() in eumbcna...



details:   https://anonhg.NetBSD.org/src/rev/a0487ff5a19d
branches:  trunk
changeset: 998109:a0487ff5a19d
user:      jdc <jdc%NetBSD.org@localhost>
date:      Sun Apr 07 15:44:44 2019 +0000

description:
Call com_init_regs() in eumbcnattach() to set up com port register mapping.
Fixes broken console output after changes to remove COM_REGMAP.

diffstat:

 sys/arch/sandpoint/sandpoint/com_eumb.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r 6d788fd4ec12 -r a0487ff5a19d sys/arch/sandpoint/sandpoint/com_eumb.c
--- a/sys/arch/sandpoint/sandpoint/com_eumb.c   Sun Apr 07 14:58:25 2019 +0000
+++ b/sys/arch/sandpoint/sandpoint/com_eumb.c   Sun Apr 07 15:44:44 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: com_eumb.c,v 1.9 2018/12/08 17:46:12 thorpej Exp $ */
+/* $NetBSD: com_eumb.c,v 1.10 2019/04/07 15:44:44 jdc Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: com_eumb.c,v 1.9 2018/12/08 17:46:12 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com_eumb.c,v 1.10 2019/04/07 15:44:44 jdc Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -111,6 +111,9 @@
     int conaddr, int conspeed, int confreq, int contype, int conmode)
 {
        static int attached = 0;
+       bus_space_handle_t dummy_bsh; /* XXX see com.c:comcnattach() */
+
+       memset(&dummy_bsh, 0, sizeof(dummy_bsh));
 
        if (attached)
                return 0;
@@ -119,5 +122,6 @@
        cnregs.cr_iot = tag;
        cnregs.cr_iobase = conaddr;
        cnregs.cr_nports = COM_NPORTS;
+       com_init_regs(&cnregs, tag, dummy_bsh, conaddr);
        return comcnattach1(&cnregs, conspeed, confreq, contype, conmode);
 }



Home | Main Index | Thread Index | Old Index