Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hpcsh enable wscons.



details:   https://anonhg.NetBSD.org/src/rev/798b30b0e020
branches:  trunk
changeset: 504201:798b30b0e020
user:      uch <uch%NetBSD.org@localhost>
date:      Sat Feb 24 20:17:45 2001 +0000

description:
enable wscons.

diffstat:

 sys/arch/hpcsh/conf/JORNADA690    |  29 ++++++++++++++++++++++--
 sys/arch/hpcsh/conf/files.hpcsh   |  28 ++++++++++++-----------
 sys/arch/hpcsh/hpcsh/autoconf.c   |   5 +--
 sys/arch/hpcsh/hpcsh/machdep.c    |  46 +++++++++++++++++++++++++++-----------
 sys/arch/hpcsh/hpcsh/mainbus.c    |  34 +++++++++++----------------
 sys/arch/hpcsh/hpcsh/shb.c        |  12 +++++-----
 sys/arch/hpcsh/include/autoconf.h |  43 ++++++++++++++++++++++++++++++++++++
 7 files changed, 138 insertions(+), 59 deletions(-)

diffs (truncated from 429 to 300 lines):

diff -r cff11b21b65a -r 798b30b0e020 sys/arch/hpcsh/conf/JORNADA690
--- a/sys/arch/hpcsh/conf/JORNADA690    Sat Feb 24 20:13:59 2001 +0000
+++ b/sys/arch/hpcsh/conf/JORNADA690    Sat Feb 24 20:17:45 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: JORNADA690,v 1.4 2001/02/21 16:28:02 uch Exp $
+#      $NetBSD: JORNADA690,v 1.5 2001/02/24 20:17:45 uch Exp $
 #
 #      JORNADA690 uch's Jornada 690
 #
@@ -51,6 +51,17 @@
 # Kernel root file system and dump configuration.
 config         netbsd  root on ? type ?
 
+options        WSEMUL_VT100
+options        WSDISPLAY_DEFAULTSCREENS=4
+options        FONT_VT220L8x10
+options        WS_KERNEL_FG=WSCOL_BROWN
+options        WS_KERNEL_BG=WSCOL_BLUE
+# compatibility to other console drivers
+options        WSDISPLAY_COMPAT_PCVT           # emulate some ioctls
+options        WSDISPLAY_COMPAT_SYSCONS        # emulate some ioctls
+options        WSDISPLAY_COMPAT_USL            # VT handling
+options        WSDISPLAY_COMPAT_RAWKBD         # can get raw scancodes
+
 #
 # Device configuration
 #
@@ -58,6 +69,15 @@
 
 shb* at mainbus?
 
+# Workstation Console attachments
+bivideo0       at mainbus0
+hpcfb*         at bivideo0
+
+wsdisplay*     at hpcfb?
+pfckbd*                at mainbus?
+hpckbd*                at pfckbd?
+wskbd*         at hpckbd? mux 1
+
 # Serial Devices
 # don't need to define SCICONSOLE. you can select from bootloader.
 options SCIFCN_SPEED=19200
@@ -88,8 +108,8 @@
 # PC-Card slot
 wdc1   at pcmcia0 function ?
 wd*    at wdc1 channel ? drive ? flags 0x0000
-# Compact Flash slot (only memory-mapped CF can attach)
-#wdc0  at pcmcia1 function ?   flags 0x0001    # memory mapped mode.
+# Compact Flash slot (only memory mapped mode CF can attach) 
+#wdc0  at pcmcia1 function ?
 #wd*   at wdc0 channel ? drive ? flags 0x0000
 
 # SCSI devices
@@ -107,3 +127,6 @@
 
 # miscellaneous pseudo-devices
 pseudo-device  pty                     # pseudo-terminals
+
+# mouse & keyboard multiplexor pseudo-devices
+pseudo-device  wsmux           2
diff -r cff11b21b65a -r 798b30b0e020 sys/arch/hpcsh/conf/files.hpcsh
--- a/sys/arch/hpcsh/conf/files.hpcsh   Sat Feb 24 20:13:59 2001 +0000
+++ b/sys/arch/hpcsh/conf/files.hpcsh   Sat Feb 24 20:17:45 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.hpcsh,v 1.7 2001/02/21 16:28:02 uch Exp $
+#      $NetBSD: files.hpcsh,v 1.8 2001/02/24 20:17:45 uch Exp $
 #
 maxpartitions 8
 
@@ -11,17 +11,20 @@
 file   arch/hpcsh/hpcsh/procfs_machdep.c       procfs
 file   arch/hpcsh/hpcsh/debug.c
 
+define mainbus { }
+
 #
 # H/PC Platform common files.
 #
 include "arch/hpc/conf/files.hpc"
+file   arch/hpc/hpc/disksubr.c                 disk
 include "dev/hpc/files.bicons"
-file   arch/hpc/hpc/disksubr.c                 disk
+include "dev/hpc/files.hpckbd"
+include "dev/hpc/files.hpcfb"
 
 #
 # Machine-independent SCSI drivers
 #
-
 include "dev/scsipi/files.scsipi"
 major  {sd = 3}
 major  {st = 4}
@@ -30,7 +33,6 @@
 #
 # Machine-independent ATA drivers
 #
-
 include "dev/ata/files.ata"
 major  {wd = 1}
 
@@ -42,15 +44,18 @@
 # System bus types
 #
 
-define mainbus { }
 device mainbus:  mainbus
 attach mainbus at root
-file   arch/hpcsh/hpcsh/mainbus.c      mainbus
+file   arch/hpcsh/hpcsh/mainbus.c              mainbus
 
 #
 # SH3 bus
 #
-include "arch/hpcsh/conf/files.shbus"
+include        "arch/hpcsh/conf/files.shbus"
+
+device pfckbd: hpckbdif
+attach pfckbd at mainbus
+file   arch/hpcsh/dev/pfckbd.c                 pfckbd  needs-flag
 
 #
 # HD64461
@@ -65,13 +70,10 @@
 file   arch/hpcsh/dev/hd64461/hd64461pcmcia.c  hd64461pcmcia
 
 # network devices MII bus
-include "dev/mii/files.mii"
-
-# Raster operations
-include "dev/rasops/files.rasops"
-include "dev/wsfont/files.wsfont"
+include        "dev/mii/files.mii"
 
 #
 # Workstation Console
 #
-include "dev/wscons/files.wscons"
+include        "dev/wscons/files.wscons"
+
diff -r cff11b21b65a -r 798b30b0e020 sys/arch/hpcsh/hpcsh/autoconf.c
--- a/sys/arch/hpcsh/hpcsh/autoconf.c   Sat Feb 24 20:13:59 2001 +0000
+++ b/sys/arch/hpcsh/hpcsh/autoconf.c   Sat Feb 24 20:17:45 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.2 2001/02/07 15:29:21 uch Exp $ */
+/*     $NetBSD: autoconf.c,v 1.3 2001/02/24 20:17:45 uch Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -65,8 +65,7 @@
 #include <machine/bus.h>
 
 #include <machine/config_hook.h>
-
-void makebootdev (const char *);
+#include <machine/autoconf.h>
 
 static struct device *booted_device;
 static int booted_partition;
diff -r cff11b21b65a -r 798b30b0e020 sys/arch/hpcsh/hpcsh/machdep.c
--- a/sys/arch/hpcsh/hpcsh/machdep.c    Sat Feb 24 20:13:59 2001 +0000
+++ b/sys/arch/hpcsh/hpcsh/machdep.c    Sat Feb 24 20:17:45 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.4 2001/02/21 16:28:03 uch Exp $  */
+/*     $NetBSD: machdep.c,v 1.5 2001/02/24 20:17:45 uch Exp $  */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -38,6 +38,8 @@
 #include "fs_mfs.h"
 #include "fs_nfs.h"
 #include "biconsdev.h"
+#include "hpcfb.h"
+#include "pfckbd.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -58,6 +60,7 @@
 #include <machine/bootinfo.h>
 #include <machine/platid.h>
 #include <machine/platid_mask.h>
+#include <machine/autoconf.h>          /* makebootdev() */
 
 #include <sh3/intcreg.h>
 
@@ -69,6 +72,15 @@
 #define DPRINTF(arg)
 #endif
 
+#if NHPCFB > 0
+#include <dev/wscons/wsdisplayvar.h>
+#include <dev/rasops/rasops.h>
+#include <dev/hpc/hpcfbvar.h>
+#endif
+#if NPFCKBD > 0
+#include <hpcsh/dev/pfckbdvar.h>
+#endif
+
 /* 
  * D-RAM location (Windows CE machine specific)
  *
@@ -155,7 +167,6 @@
 
 void main(void);
 void machine_startup(int, char *[], struct bootinfo *);
-void makebootdev(const char *);
 struct bootinfo *bootinfo;
 
 void
@@ -227,24 +238,18 @@
                kernend += fssz;
        }
 #endif
+       /* console requires platform information */
+       if (bootinfo->magic == BOOTINFO_MAGIC) {
+               platid.dw.dw0 = bootinfo->platid_cpu;
+               platid.dw.dw1 = bootinfo->platid_machine;
+       }
 
        /* start console */
        consinit();
        
        /* print kernel option */
-       for (i = 0; i < argc; i++) {
+       for (i = 0; i < argc; i++)
                DPRINTF(("option [%d]: %s\n", i, argv[i]));
-       }
-       if (bootinfo->magic == BOOTINFO_MAGIC) {
-               if (bootinfo->platid_cpu != 0) {
-                       platid.dw.dw0 = bootinfo->platid_cpu;
-               }
-               if (bootinfo->platid_machine != 0) {
-                       platid.dw.dw1 = bootinfo->platid_machine;
-               }
-       } else {
-               panic("invalid boot info magic. use lates bootloader.\n");
-       }
        DPRINTF(("platid(cpu/machine) = %08lx/%08lx\n",
                 bootinfo->platid_cpu, bootinfo->platid_machine));
        DPRINTF(("display=%dx%d-(%d) %p type=%d \n",
@@ -624,9 +629,22 @@
 void
 consinit()
 {
+       static int initted;
+
+       if (initted)
+               return;
+       initted = 1;
 #if NBICONSDEV > 0
        if (!(bootinfo->bi_cnuse & BI_CNUSE_SERIAL))
                bicons_set_priority(CN_REMOTE + 1); /* set highest */
 #endif
        cninit();
+       if (!(bootinfo->bi_cnuse & BI_CNUSE_SERIAL)) {
+#if NPFCKBD > 0
+               pfckbd_cnattach();
+#endif
+#if NHPCFB > 0
+               hpcfb_cnattach(0);
+#endif
+       }
 }
diff -r cff11b21b65a -r 798b30b0e020 sys/arch/hpcsh/hpcsh/mainbus.c
--- a/sys/arch/hpcsh/hpcsh/mainbus.c    Sat Feb 24 20:13:59 2001 +0000
+++ b/sys/arch/hpcsh/hpcsh/mainbus.c    Sat Feb 24 20:17:45 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mainbus.c,v 1.3 2001/02/21 16:28:03 uch Exp $  */
+/*     $NetBSD: mainbus.c,v 1.4 2001/02/24 20:17:45 uch Exp $  */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -33,8 +33,7 @@
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/device.h>
-
-#include <machine/shbvar.h>
+#include <machine/autoconf.h>
 
 static int mainbus_match(struct device *, struct cfdata *, void *);
 static void mainbus_attach(struct device *, struct device *, void *);
@@ -44,15 +43,13 @@
        sizeof(struct device), mainbus_match, mainbus_attach
 };
 
-struct mainbus_attach_args {
-       const char *mba_busname;                /* first elem of all */
-       struct shbus_attach_args mba_sba;
+static struct mainbus_attach_args devs[] = {
+       { "shb" },
+       { "bivideo" },
+       { "pfckbd" }
 };
 
-/*
- * Probe for the mainbus; always succeeds.
- */
-int
+static int



Home | Main Index | Thread Index | Old Index