diff options
author | Eric Jackson <ericj@cvs.openbsd.org> | 2000-11-16 04:33:48 +0000 |
---|---|---|
committer | Eric Jackson <ericj@cvs.openbsd.org> | 2000-11-16 04:33:48 +0000 |
commit | 135b3449cca911fd86ce42497cad4c7ef445fb9d (patch) | |
tree | 229ba81f6deda1aef61b3758849c6799d24b057f /sys | |
parent | cc4d62d2020e35e37077de37e616bf7374283dfe (diff) |
configure vga, mouse and keyboard's once again. Currently only on eb164.
others soon. Some of this from NetBSD.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/alpha/alpha/dec_eb164.c | 15 | ||||
-rw-r--r-- | sys/arch/alpha/alpha/machdep.c | 22 | ||||
-rw-r--r-- | sys/arch/alpha/include/types.h | 4 | ||||
-rw-r--r-- | sys/arch/alpha/isa/isa_machdep.c | 77 | ||||
-rw-r--r-- | sys/arch/alpha/isa/isa_machdep.h | 4 |
5 files changed, 92 insertions, 30 deletions
diff --git a/sys/arch/alpha/alpha/dec_eb164.c b/sys/arch/alpha/alpha/dec_eb164.c index 7a2eba57afc..9678f998693 100644 --- a/sys/arch/alpha/alpha/dec_eb164.c +++ b/sys/arch/alpha/alpha/dec_eb164.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dec_eb164.c,v 1.6 2000/11/08 21:48:44 art Exp $ */ +/* $OpenBSD: dec_eb164.c,v 1.7 2000/11/16 04:33:46 ericj Exp $ */ /* $NetBSD: dec_eb164.c,v 1.33 2000/05/22 20:13:32 thorpej Exp $ */ /* @@ -48,9 +48,8 @@ #include <dev/isa/isareg.h> #include <dev/isa/isavar.h> -#if 0 +#include <dev/ic/i8042reg.h> #include <dev/ic/pckbcvar.h> -#endif #include <dev/pci/pcireg.h> #include <dev/pci/pcivar.h> @@ -61,9 +60,7 @@ #include <scsi/scsiconf.h> #include <dev/ata/atavar.h> -#if 0 #include "pckbd.h" -#endif #ifndef CONSPEED #define CONSPEED TTYDEF_SPEED @@ -128,13 +125,13 @@ dec_eb164_cons_init() #if NPCKBD > 0 /* display console ... */ /* XXX */ - (void) pckbc_cnattach(&ccp->cc_iot, IO_KBD, PCKBC_KBD_SLOT); - + (void) pckbc_cnattach(ccp->cc_iot, IO_KBD, KBCMDP, + PCKBC_KBD_SLOT); if (CTB_TURBOSLOT_TYPE(ctb->ctb_turboslot) == CTB_TURBOSLOT_TYPE_ISA) - isa_display_console(&ccp->cc_iot, &ccp->cc_memt); + isa_display_console(ccp->cc_iot, ccp->cc_memt); else - pci_display_console(&ccp->cc_iot, &ccp->cc_memt, + pci_display_console(ccp->cc_iot, ccp->cc_memt, &ccp->cc_pc, CTB_TURBOSLOT_BUS(ctb->ctb_turboslot), CTB_TURBOSLOT_SLOT(ctb->ctb_turboslot), 0); #else diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c index 25146b0004e..0320c77317c 100644 --- a/sys/arch/alpha/alpha/machdep.c +++ b/sys/arch/alpha/alpha/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.35 2000/11/08 19:16:59 ericj Exp $ */ +/* $OpenBSD: machdep.c,v 1.36 2000/11/16 04:33:46 ericj Exp $ */ /* $NetBSD: machdep.c,v 1.206 2000/05/23 05:12:54 thorpej Exp $ */ /*- @@ -887,6 +887,26 @@ consinit() #endif } +#include "pckbc.h" +#include "pckbd.h" +#if (NPCKBC > 0) && (NPCKBD == 0) + +#include <dev/ic/pckbcvar.h> + +/* + * This is called by the pbkbc driver if no pckbd is configured. + * On the i386, it is used to glue in the old, deprecated console + * code. On the Alpha, it does nothing. + */ +int +pckbc_machdep_cnattach(kbctag, kbcslot) + pckbc_tag_t kbctag; + pckbc_slot_t kbcslot; +{ + return (ENXIO); +} +#endif /* NPCKBC > 0 && NPCKBD == 0 */ + void cpu_startup() { diff --git a/sys/arch/alpha/include/types.h b/sys/arch/alpha/include/types.h index c1bf5ad7fe9..b111d7ada10 100644 --- a/sys/arch/alpha/include/types.h +++ b/sys/arch/alpha/include/types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: types.h,v 1.7 1999/07/07 23:16:40 art Exp $ */ +/* $OpenBSD: types.h,v 1.8 2000/11/16 04:33:47 ericj Exp $ */ /* $NetBSD: types.h,v 1.6 1996/12/05 00:13:47 cgd Exp $ */ /*- @@ -81,4 +81,6 @@ typedef int64_t register_t; #define __BROKEN_INDIRECT_CONFIG +#define __HAVE_NWSCONS + #endif /* _MACHTYPES_H_ */ diff --git a/sys/arch/alpha/isa/isa_machdep.c b/sys/arch/alpha/isa/isa_machdep.c index ad642f6f0f7..03a9cf1043b 100644 --- a/sys/arch/alpha/isa/isa_machdep.c +++ b/sys/arch/alpha/isa/isa_machdep.c @@ -1,5 +1,5 @@ -/* $OpenBSD: isa_machdep.c,v 1.6 1997/11/10 15:53:10 niklas Exp $ */ -/* $NetBSD: isa_machdep.c,v 1.5 1996/11/23 06:38:49 cgd Exp $ */ +/* $OpenBSD: isa_machdep.c,v 1.7 2000/11/16 04:33:47 ericj Exp $ */ +/* $NetBSD: isa_machdep.c,v 1.12 1998/08/07 10:26:39 drochner Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -38,34 +38,77 @@ #include <sys/systm.h> #include <sys/errno.h> #include <sys/device.h> + #include <vm/vm.h> +#include <uvm/uvm_extern.h> #include <dev/isa/isavar.h> #include "vga_isa.h" #if NVGA_ISA +#include <dev/ic/mc6845reg.h> +#include <dev/ic/pcdisplayvar.h> #include <dev/isa/vga_isavar.h> #endif -struct { - int (*probe) __P((bus_space_tag_t, bus_space_tag_t)); - void (*console) __P((bus_space_tag_t, bus_space_tag_t)); -} isa_display_console_devices[] = { -#if NVGA_ISA - { vga_isa_console_match, vga_isa_console_attach }, -#endif - { }, +#include "pcppi.h" +#if (NPCPPI > 0) +#include <dev/isa/pcppivar.h> + +int isabeepmatch __P((struct device *, struct cfdata *, void *)); +void isabeepattach __P((struct device *, struct device *, void *)); + +struct cfattach isabeep_ca = { + sizeof(struct device), isabeepmatch, isabeepattach }; -void +static int ppi_attached; +static pcppi_tag_t ppicookie; +#endif /* PCPPI */ + +int isa_display_console(iot, memt) bus_space_tag_t iot, memt; { - int i = 0; + int res = ENXIO; +#if NVGA_ISA + res = vga_isa_cnattach(iot, memt); + if (!res) + return(0); +#endif + return(res); +} - while (isa_display_console_devices[i].probe != NULL) - if ((*isa_display_console_devices[i].probe)(iot, memt)) { - (*isa_display_console_devices[i].console)(iot, memt); - break; - } +#if (NPCPPI > 0) +int +isabeepmatch(parent, match, aux) + struct device *parent; + struct cfdata *match; + void *aux; +{ + return (!ppi_attached); } + +void +isabeepattach(parent, self, aux) + struct device *parent, *self; + void *aux; +{ + printf("\n"); + + ppicookie = ((struct pcppi_attach_args *)aux)->pa_cookie; + ppi_attached = 1; +} +#endif + +#if 0 +void +isabeep(pitch, period) + int pitch, period; +{ +#if (NPCPPI > 0) + if (ppi_attached) + pcppi_bell(ppicookie, pitch, period, 0); +#endif +} +#endif diff --git a/sys/arch/alpha/isa/isa_machdep.h b/sys/arch/alpha/isa/isa_machdep.h index f2ab47a455e..cf2ed3c0fc0 100644 --- a/sys/arch/alpha/isa/isa_machdep.h +++ b/sys/arch/alpha/isa/isa_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: isa_machdep.h,v 1.6 2000/11/08 16:01:15 art Exp $ */ +/* $OpenBSD: isa_machdep.h,v 1.7 2000/11/16 04:33:47 ericj Exp $ */ /* $NetBSD: isa_machdep.h,v 1.3 1996/11/19 04:53:07 cgd Exp $ */ /* @@ -59,4 +59,4 @@ struct alpha_isa_chipset { * alpha-specific ISA functions. * NOT TO BE USED DIRECTLY BY MACHINE INDEPENDENT CODE. */ -void isa_display_console __P((bus_space_tag_t, bus_space_tag_t)); +int isa_display_console __P((bus_space_tag_t, bus_space_tag_t)); |