sync with skbd.

This commit is contained in:
uch 1999-12-08 15:54:11 +00:00
parent 866a7053d6
commit 395dc11439
4 changed files with 132 additions and 58 deletions

View File

@ -2,7 +2,7 @@
# Distribution kernel (TX3912 based model) kernel config file
#
# $NetBSD: TX3912,v 1.1 1999/11/21 07:04:31 uch Exp $
# $NetBSD: TX3912,v 1.2 1999/12/08 15:56:03 uch Exp $
#
include "arch/hpcmips/conf/std.hpcmips"
@ -17,28 +17,29 @@ options TX39XX # Toshiba TX39 series
options TX391X # Product TMPR3912
options TX39_DEBUG
#options TX39_WATCHDOGTIMER
#options WINCE_DEFAULT_SETTING # Debugging use
options TX39ICUDEBUG
options TX39BIUDEBUG
options TX39IODEBUG
options TX39POWERDEBUG
#options TX39UARTDEBUG
options IT8368DEBUG
#options TX39_WATCHDOGTIMER
#options WINCE_DEFAULT_SETTING # Debugging use
#options TX39ICUDEBUG
#options TX39CLKDEBUG
#options TX39BIUDEBUG
#options TX39IODEBUG
#options TX39POWERDEBUG
#options TX39UARTDEBUG
#options IT8368DEBUG
options __NO_SOFT_SERIAL_INTERRUPT
options SERIALCONSSLOT=0 # UARTA 0, UARTB 1
options DDB # in-kernel debugger
#options DIAGNOSTIC # extra kernel debugging checks
#options DEBUG # extra kernel debugging support
options DIAGNOSTIC # extra kernel debugging checks
options DEBUG # extra kernel debugging support
options KTRACE # system call tracing support
options NKMEMCLUSTERS=1024 # 4K pages in kernel malloc pool
#options MINIROOTSIZE=10000
options RTC_OFFSET=-540 # JST-9
options COMPAT_43
options SCSIVERBOSE # human readable SCSI error messages
options PCMCIAVERBOSE # verbose PCMCIA configuration messages
file-system FFS # fast filesystem with user and group quotas
@ -69,18 +70,22 @@ txcom1 at tx39uart? slot 1
#
# TX39 external modules. (Platform dependent)
#
options USE_POLL
options CCKBD_POLL # XXX I could not find interrupt source. FIXME!!
options USE_POLL # p7416buf requires this
#
# COMPAQ C-series
#
#options COMPAQ_LOCAL_INTR
txcsbus3 at tx39biu? platform COMPAQ_C
# XXX interrupt line not found yet.
cckbd* at txcsbus3 iocs 3 iocsbase 0 iocssize 0x100 iocswidth 16
# PHILIPS 74ALVC*1624? connected keyboard
#
p7416buf* at txcsbus3 iocs 3 iocsbase 0 iocssize 0x100 iocswidth 16
skbd* at p7416buf?
# ITE IT8368E PCMCIA buffer chip
# card ... 3:2 (98)
# insert/remove ... 5:1 (161/168)
# insert/remove ... 5:1/8 (161/168)
it8368e* at txcsbus3 regcs 2 regcsbase 0 regcssize 0x20 regcswidth 16 iocs 8 iocsbase 0 iocssize 0x4000000 iocswidth 16 irq1 161 irq2 168 irq3 98
#
@ -95,17 +100,15 @@ it8368e* at txcsbus4 regcs 2 regcsbase 0 regcssize 0x20 regcswidth 16 iocs 8 ioc
txcsbus* at tx39biu?
# WS console uses SUN or VT100 terminal emulation
options WSDISPLAY_COMPAT_RAWKBD
fb* at tx3912video?
wsdisplay* at fb?
wskbd* at cckbd? mux 1
wskbd* at skbd? mux 1
options WSEMUL_VT100
options WSDISPLAY_DEFAULTSCREENS=4
#options FONT_VT220L8x8
options FONT_VT220L8x10
# PCMCIA bus support
pcmcia* at it8368e? controller ? socket ?

View File

@ -2,7 +2,7 @@
# Distribution kernel (TX3922 based model) kernel config file
#
# $NetBSD: TX3922,v 1.1 1999/11/21 07:04:32 uch Exp $
# $NetBSD: TX3922,v 1.2 1999/12/08 15:56:03 uch Exp $
#
include "arch/hpcmips/conf/std.hpcmips"
@ -22,20 +22,24 @@ options TX39_DEBUG
#options WINCE_DEFAULT_SETTING # Debugging use
options TX39ICUDEBUG
options TX39BIUDEBUG
#options TX39IODEBUG
options TX39IODEBUG
options TX39POWERDEBUG
#options TX39UARTDEBUG
options DDB # in-kernel debugger
options DIAGNOSTIC # extra kernel debugging checks
options DEBUG # extra kernel debugging support
options KTRACE # system call tracing support
options NKMEMCLUSTERS=1024 # 4K pages in kernel malloc pool
options RTC_OFFSET=-540 # JST-9
options __NO_SOFT_SERIAL_INTERRUPT
options SERIALCONSSLOT=0 # UARTA 0, UARTB 1
options COMPAT_43
options SCSIVERBOSE # human readable SCSI error messages
options PCMCIAVERBOSE # verbose PCMCIA configuration messages
options USBVERBOSE # verbose USB device autoconfig messages
file-system FFS # fast filesystem with user and group quotas
config netbsd root on ? type ?
@ -58,8 +62,11 @@ txcom1 at tx39uart? slot 1
txcsbus* at tx39biu? platform ?
options USE_POLL # m38813 requires this
#
# TC6358TB(Plum2) register space: CS3, I/O space: MCS0 & MCS1, IRQ: 8:21 (IO[5] positive)
# TC6358TB(Plum2)
# register space: CS3,
# I/O space: MCS0 & MCS1, IRQ: 8:21 (IO[5] positive)
#
plum* at txcsbus? regcs 3 regcswidth 32 iocs 4 iocswidth 32 memcs 5 memcswidth 32 irq1 277
plumicu* at plum?
@ -67,24 +74,49 @@ plumpower* at plum?
plumvideo* at plum?
plumpcmcia* at plum?
plumiobus* at plum?
#ohci* at plum?
#plumisab0 at plumiobus? platform ? slot 0
#
# fake ISA-bridge directly connected TX3922 chip select.
#
# CS1 connect
# IRQ MFIO 3:7
#txisab* at txcsbus? iocs 1 iocswidth 16 irq1 103
# CS2 connect
#txisab* at txcsbus? iocs 2 iocswidth 16 irq1 103
# CARD1 io/attr connect
#txisab* at txcsbus? iocs 8 iocswidth 16 irq1 103
m38813c* at txcsbus? iocs 8 iocswidth 16 iocsbase 0 iocssize 8 irq1 103
skbd* at m38813c?
wskbd* at skbd? mux 1
# USB bus support
#usb* at ohci?
# USB Hubs
#uhub* at usb?
#uhub* at uhub? port ? configuration ? interface ?
# USB Mice
#ums* at uhub? port ? configuration ? interface ?
#wsmouse* at ums? mux 0
# USB Keyboards
#ukbd* at uhub? port ? configuration ? interface ?
#wskbd* at ukbd? console ? mux 1
plumisab0 at plumiobus? platform ? slot 0
# ISA bus support
isa0 at plumisab0
#isa* at plumisab?
#isa* at txisab?
# WS console uses SUN or VT100 terminal emulation
#fb* at plumvideo?
#wsdisplay* at fb?
fb* at plumvideo?
wsdisplay* at fb?
options WSEMUL_VT100
options WSDISPLAY_DEFAULTSCREENS=4
#options FONT_VT220L8x8
options FONT_VT220L8x10
#pckbc0 at isa0 # pc keyboard controller
#pckbd* at pckbc? # PC keyboard
#wskbd* at pckbd? console ?
# PCMCIA bus support
pcmcia* at plumpcmcia? controller ? socket ?
@ -110,5 +142,3 @@ sd* at scsibus? target ? lun ? # SCSI disk drives
pseudo-device loop 1 # network loopback
pseudo-device pty 64 # pseudo ptys
#pseudo-device biconsdev 1 # build-in console device

View File

@ -1,4 +1,4 @@
# $NetBSD: files.hpcmips,v 1.8 1999/12/04 14:23:35 takemura Exp $
# $NetBSD: files.hpcmips,v 1.9 1999/12/08 15:56:03 uch Exp $
# maxpartitions must be first item in files.${ARCH}.
maxpartitions 8
@ -48,6 +48,7 @@ file arch/hpcmips/hpcmips/platid.c
file arch/hpcmips/hpcmips/platid_mask.c
file arch/hpcmips/hpcmips/mainbus.c
file arch/hpcmips/hpcmips/bus_space.c
#file arch/hpcmips/hpcmips/bus_dma.c
file arch/hpcmips/hpcmips/disksubr.c disk
# Console autoconfiguration code: selects between a framebuffers
@ -118,7 +119,7 @@ file arch/hpcmips/vr/vrkiu.c vrkiu needs-flag
device pckbd: wskbddev
attach pckbd at pckbc
file dev/pckbc/pckbd.c pckbd needs-flag
file dev/pckbc/wskbdmap_mfii.c pckbd | vrkiu | cckbd
file dev/pckbc/wskbdmap_mfii.c pckbd | vrkiu | skbd
defopt PCKBD_LAYOUT
device vrpmu
@ -135,13 +136,13 @@ file arch/hpcmips/vr/vrdsu.c vrdsu needs-flag
defopt TX39_DEBUG
defopt TX39_WATCHDOGTIMER
defopt TX39ICUDEBUG
defopt USE_POLL
defopt CCKBD_POLL
defopt TX39CLKDEBUG
defopt TX39BIUDEBUG
defopt TX39IODEBUG
defopt TX39POWERDEBUG
defopt TX39UARTDEBUG
defopt IT8368DEBUG
defopt USE_POLL
device txsim { }
device txcsbusif {[platform = -1]}
@ -191,10 +192,22 @@ device it8368e: pcmciabus
attach it8368e at txcsbus
file arch/hpcmips/dev/it8368.c it8368e
# Compaq C-series keyboard
device cckbd: wskbddev
attach cckbd at txcsbus
file arch/hpcmips/dev/cckbd.c cckbd needs-flag
device skbdif {}
# PHILIPS 74ALVC16241 buffer driver (keyboard)
device p7416buf: skbdif
attach p7416buf at txcsbus
file arch/hpcmips/dev/p7416buf.c p7416buf needs-flag
# MITUBISHI M38813 keryboard controller
device m38813c: skbdif
attach m38813c at txcsbus
file arch/hpcmips/dev/m38813c.c m38813c needs-flag
# Simple keyboard interface for wskbd
device skbd: wskbddev
attach skbd at skbdif
file arch/hpcmips/dev/skbd.c skbd
# TOSHIBA TC6358E(Plum2)
device plumif {}
@ -227,6 +240,14 @@ device plumisab: isabus
attach plumisab at plumiobusif
file arch/hpcmips/isa/plumisa_machdep.c plumisab
# OHCI USB controller
#attach ohci at plumif with plumohci
#file arch/hpcmips/dev/plumohci.c plumohci
#device txisab: isabus
#attach txisab at txcsbus
#file arch/hpcmips/isa/txisa_machdep.c txisab
#
# Real-time clock (not optional)
#
@ -280,3 +301,5 @@ file arch/hpcmips/vr/com_vrip.c com_vrip
# Memory Disk for boot tape
file arch/hpcmips/dev/md_root.c memory_disk_hooks
major {md = 6}
#include "dev/usb/files.usb"

View File

@ -1,4 +1,4 @@
/* $NetBSD: tx39.c,v 1.4 1999/12/02 18:50:54 uch Exp $ */
/* $NetBSD: tx39.c,v 1.5 1999/12/08 15:54:11 uch Exp $ */
/*
* Copyright (c) 1999, by UCHIYAMA Yasushi
@ -27,7 +27,8 @@
*/
#include "opt_tx39_debug.h"
#include "cckbd.h"
#include "m38813c.h"
#include "p7416buf.h"
#include <sys/param.h>
#include <sys/systm.h>
@ -58,8 +59,12 @@
#define CONSPEED TTYDEF_SPEED
#endif
#if NCCKBD > 0
#include <hpcmips/dev/cckbdvar.h>
/* console keyboard */
#if NP7416BUF > 0
#include <hpcmips/dev/p7416bufvar.h>
#endif
#if NM38813C > 0
#include <hpcmips/dev/m38813cvar.h>
#endif
extern unsigned nullclkread __P((void));
@ -83,7 +88,8 @@ void tx_device_register __P((struct device *, void *));
void tx_fb_init __P((caddr_t*));
int tx_mem_init __P((caddr_t));
void tx_reboot __P((int howto, char *bootstr));
int tx_intr __P((u_int32_t mask, u_int32_t pc, u_int32_t statusReg, u_int32_t causeReg));
int tx_intr __P((u_int32_t mask, u_int32_t pc, u_int32_t statusReg,
u_int32_t causeReg));
void
tx_init()
@ -187,12 +193,14 @@ tx_mem_init(kernend)
endaddr = MIPS_PHYS_TO_KSEG1(TX39_SYSADDR_DRAMBANK0CS1 +
TX39_SYSADDR_DRAMBANK_LEN);
kpage = btoc(MIPS_KSEG1_TO_PHYS(startaddr));
/* D-RAM bank0 */
npage = tx39_find_dram(startaddr, endaddr);
printf("DRAM bank0: %d pages (%dMByte) reserved %d pages\n", npage + 1,
((npage + 1) * NBPG) / 0x100000, kpage + 1);
printf("DRAM bank0: %d pages (%dMByte) reserved %d pages\n",
npage + 1, ((npage + 1) * NBPG) / 0x100000, kpage + 1);
npage -= kpage; /* exclude kernel area */
/* Clear DRAM area */
memset((void*)startaddr, 0, npage * NBPG);
@ -204,9 +212,13 @@ tx_mem_init(kernend)
printf("DRAM bank1: %d pages (%dMByte) ...but not usable yet\n",
xpage + 1, ((xpage + 1) * NBPG) / 0x100000);
/* Clear currently unused D-RAM area (For reboot Windows CE clearly)*/
/*
* Clear currently unused D-RAM area
* (For reboot Windows CE clearly)
*/
memset((void*)startaddr, 0, npage * NBPG);
memset((void*)(KERNBASE + 0x400), 0, KERNTEXTOFF - KERNBASE - 0x800);
memset((void*)(KERNBASE + 0x400), 0,
KERNTEXTOFF - KERNBASE - 0x800);
return npage; /* Return bank0's memory only */
}
@ -261,15 +273,21 @@ tx_cons_init()
#endif
if (bootinfo->bi_cnuse & BI_CNUSE_SERIAL) {
if(txcom_cnattach(slot, CONSPEED,
(TTYDEF_CFLAG & ~(CSIZE | PARENB)) | CS8)) {
(TTYDEF_CFLAG & ~(CSIZE | PARENB)) |
CS8)) {
panic("tx_cons_init: can't attach serial console.");
}
}
#if NCCKBD > 0
if(cckbd_cnattach(0, 0)) {
panic("tx_cons_init: can't init cckbd as console");
}
} else {
#if NP7416BUF > 0
if(p7416buf_cnattach(TX39_SYSADDR_CS3)) {
panic("tx_cons_init: can't init console");
}
#elif NM38813C > 0
if(m38813c_cnattach(TX39_SYSADDR_CARD1)) {
panic("tx_cons_init: can't init console");
}
#endif
}
}