diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-07-29 17:06:28 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-07-29 17:06:28 +0000 |
commit | 79edeb311081330b02ec8a86c84211f82b1f78d5 (patch) | |
tree | fe08045fafe951b275a5413e71e0cbd0fc67fdbd /sys/arch/vax | |
parent | 7be8c12978f2b3f6aaf65e85a36ba1b0a634b759 (diff) |
Sync dz and lk{kbd,ms} code with NetBSD, this allows keyboards to work when
initialized by the PROM.
Diffstat (limited to 'sys/arch/vax')
-rw-r--r-- | sys/arch/vax/dec/dzkbd.c | 24 | ||||
-rw-r--r-- | sys/arch/vax/dec/dzkbdvar.h | 3 | ||||
-rw-r--r-- | sys/arch/vax/dec/dzms.c | 51 | ||||
-rw-r--r-- | sys/arch/vax/dec/lk201.h | 7 | ||||
-rw-r--r-- | sys/arch/vax/dec/lk201_ws.c | 42 | ||||
-rw-r--r-- | sys/arch/vax/dec/lk201var.h | 4 | ||||
-rw-r--r-- | sys/arch/vax/dec/wskbdmap_lk201.c | 12 | ||||
-rw-r--r-- | sys/arch/vax/dec/wskbdmap_lk201.h | 4 | ||||
-rw-r--r-- | sys/arch/vax/qbus/dz.c | 47 | ||||
-rw-r--r-- | sys/arch/vax/qbus/dz_uba.c | 13 | ||||
-rw-r--r-- | sys/arch/vax/qbus/dzreg.h | 18 |
11 files changed, 107 insertions, 118 deletions
diff --git a/sys/arch/vax/dec/dzkbd.c b/sys/arch/vax/dec/dzkbd.c index 5a384da236f..46f698308b3 100644 --- a/sys/arch/vax/dec/dzkbd.c +++ b/sys/arch/vax/dec/dzkbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dzkbd.c,v 1.5 2006/01/17 20:26:16 miod Exp $ */ +/* $OpenBSD: dzkbd.c,v 1.6 2006/07/29 17:06:25 miod Exp $ */ /* $NetBSD: dzkbd.c,v 1.1 2000/12/02 17:03:55 ragge Exp $ */ /* @@ -80,7 +80,6 @@ struct dzkbd_softc { struct dzkbd_internal *sc_itl; int sc_enabled; - int kbd_type; struct device *sc_wskbddev; }; @@ -119,7 +118,7 @@ const struct wskbd_consops dzkbd_consops = { static int dzkbd_sendchar(void *, u_char); const struct wskbd_mapdata dzkbd_keymapdata = { - zskbd_keydesctab, + lkkbd_keydesctab, #ifdef DZKBD_LAYOUT DZKBD_LAYOUT, #else @@ -168,15 +167,17 @@ dzkbd_attach(struct device *parent, struct device *self, void *aux) if (isconsole) { dzi = &dzkbd_console_internal; + dzkbd->sc_enabled = 1; } else { - dzi = malloc(sizeof(struct dzkbd_internal), - M_DEVBUF, M_NOWAIT); - if (dzi == NULL) - panic("dzkbd_attach"); + dzi = malloc(sizeof(struct dzkbd_internal), M_DEVBUF, M_NOWAIT); + if (dzi == NULL) { + printf(": out of memory\n"); + return; + } dzi->dzi_ks.attmt.sendchar = dzkbd_sendchar; dzi->dzi_ks.attmt.cookie = ls; - dzi->dzi_ls = ls; } + dzi->dzi_ls = ls; dzkbd->sc_itl = dzi; printf("\n"); @@ -187,10 +188,6 @@ dzkbd_attach(struct device *parent, struct device *self, void *aux) /* XXX should identify keyboard ID here XXX */ /* XXX layout and the number of LED is varying XXX */ - dzkbd->kbd_type = WSKBD_TYPE_LK201; - - dzkbd->sc_enabled = 1; - a.console = isconsole; a.keymap = &dzkbd_keymapdata; a.accessops = &dzkbd_accessops; @@ -271,7 +268,6 @@ dzkbd_set_leds(v, leds) { struct dzkbd_softc *sc = (struct dzkbd_softc *)v; -//printf("dzkbd_set_leds\n"); lk201_set_leds(&sc->sc_itl->dzi_ks, leds); } @@ -287,7 +283,7 @@ dzkbd_ioctl(v, cmd, data, flag, p) switch (cmd) { case WSKBDIO_GTYPE: - *(int *)data = sc->kbd_type; + *(int *)data = WSKBD_TYPE_LK201; return 0; case WSKBDIO_SETLEDS: lk201_set_leds(&sc->sc_itl->dzi_ks, *(int *)data); diff --git a/sys/arch/vax/dec/dzkbdvar.h b/sys/arch/vax/dec/dzkbdvar.h index e0de4e9b7bf..2b8a80f3ef5 100644 --- a/sys/arch/vax/dec/dzkbdvar.h +++ b/sys/arch/vax/dec/dzkbdvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dzkbdvar.h,v 1.1 2001/05/16 22:15:17 hugh Exp $ */ +/* $OpenBSD: dzkbdvar.h,v 1.2 2006/07/29 17:06:25 miod Exp $ */ /* $NetBSD: dzkbdvar.h,v 1.2 2001/03/06 07:40:52 matt Exp $ */ struct dzkm_attach_args { @@ -12,7 +12,6 @@ struct dzkm_attach_args { /* These functions must be present for the keyboard/mouse to work */ int dzgetc(struct dz_linestate *); void dzputc(struct dz_linestate *, int); -void dzsetlpr(struct dz_linestate *, int); /* Exported functions */ int dzkbd_cnattach(struct dz_linestate *); diff --git a/sys/arch/vax/dec/dzms.c b/sys/arch/vax/dec/dzms.c index 01a8c05c330..b0c77532867 100644 --- a/sys/arch/vax/dec/dzms.c +++ b/sys/arch/vax/dec/dzms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dzms.c,v 1.4 2006/01/17 20:26:16 miod Exp $ */ +/* $OpenBSD: dzms.c,v 1.5 2006/07/29 17:06:25 miod Exp $ */ /* $NetBSD: dzms.c,v 1.1 2000/12/02 17:03:55 ragge Exp $ */ /* @@ -50,6 +50,9 @@ #include <sys/device.h> #include <sys/ioctl.h> #include <sys/syslog.h> +#include <sys/kernel.h> +#include <sys/proc.h> +#include <sys/tty.h> #include <machine/bus.h> @@ -67,12 +70,11 @@ struct dzms_softc { /* driver status information */ struct dz_linestate *dzms_ls; int sc_enabled; /* input enabled? */ - int self_test; + int sc_selftest; int inputstate; u_int buttons; - signed char dx; - signed char dy; + int dx, dy; struct device *sc_wsmousedev; }; @@ -143,7 +145,7 @@ dzms_attach(parent, self, aux) a.accesscookie = dzms; dzms->sc_enabled = 0; - dzms->self_test = 0; + dzms->sc_selftest = 0; dzms->sc_wsmousedev = config_found(self, &a, wsmousedevprint); } @@ -156,21 +158,17 @@ dzms_enable(v) if (sc->sc_enabled) return EBUSY; - /* XXX mice presence test should be done in match/attach context XXX */ - sc->self_test = 1; + sc->sc_selftest = 4; /* wait for 4 byte reply upto 1/2 sec */ dzputc(sc->dzms_ls, MOUSE_SELF_TEST); - DELAY(100000); - if (sc->self_test < 0) { - sc->self_test = 0; - return EBUSY; - } else if (sc->self_test == 5) { - sc->self_test = 0; - sc->sc_enabled = 1; + (void)tsleep(dzms_enable, TTIPRI, "dzmsopen", hz / 2); + if (sc->sc_selftest != 0) { + sc->sc_selftest = 0; + return ENXIO; } - sc->inputstate = 0; - + DELAY(150); dzputc(sc->dzms_ls, MOUSE_INCREMENTAL); - + sc->sc_enabled = 1; + sc->inputstate = 0; return 0; } @@ -205,23 +203,12 @@ dzms_input(vsc, data) { struct dzms_softc *sc = vsc; - /* XXX mice presence test should be done in match/attach context XXX */ if (!sc->sc_enabled) { - if (sc->self_test > 0) { - if (data < 0) { - printf("Timeout on 1st byte of mouse self-test report\n"); - sc->self_test = -1; - } else { - sc->self_test++; - } - } - if (sc->self_test == 3) { - if ((data & 0x0f) != 0x2) { - printf("We don't have a mouse!!!\n"); - sc->self_test = -1; - } + if (sc->sc_selftest > 0) { + sc->sc_selftest--; + if (sc->sc_selftest == 0) + wakeup(dzms_enable); } - /* Interrupts are not expected. Discard the byte. */ return(1); } diff --git a/sys/arch/vax/dec/lk201.h b/sys/arch/vax/dec/lk201.h index a496cb17b45..d457ab5c954 100644 --- a/sys/arch/vax/dec/lk201.h +++ b/sys/arch/vax/dec/lk201.h @@ -1,4 +1,4 @@ -/* $OpenBSD: lk201.h,v 1.3 2002/03/14 03:16:02 millert Exp $ */ +/* $OpenBSD: lk201.h,v 1.4 2006/07/29 17:06:25 miod Exp $ */ /* $NetBSD: lk201.h,v 1.7 1999/03/19 18:34:01 ad Exp $ */ @@ -139,8 +139,3 @@ #define RIGHT_BUTTON 0x01 #define MIDDLE_BUTTON 0x02 #define LEFT_BUTTON 0x04 - -#ifdef _KERNEL -extern int LKgetc(dev_t dev); -extern void lkdivert(int (*getc_fn)(dev_t dev), dev_t dev); -#endif diff --git a/sys/arch/vax/dec/lk201_ws.c b/sys/arch/vax/dec/lk201_ws.c index 3d61b9af973..c3bcc2b41c2 100644 --- a/sys/arch/vax/dec/lk201_ws.c +++ b/sys/arch/vax/dec/lk201_ws.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lk201_ws.c,v 1.2 2006/01/17 20:26:16 miod Exp $ */ +/* $OpenBSD: lk201_ws.c,v 1.3 2006/07/29 17:06:25 miod Exp $ */ /* $NetBSD: lk201_ws.c,v 1.2 1998/10/22 17:55:20 drochner Exp $ */ /* @@ -62,6 +62,7 @@ lk201_init(lks) send(lks, LK_CL_ENABLE); send(lks, LK_PARAM_VOLUME(3)); + lks->kcvol = (8 - 3) * 100 / 8; lks->bellvol = -1; /* not yet set */ @@ -86,23 +87,23 @@ lk201_decode(lks, datain, type, dataout) int i, freeslot; switch (datain) { - case LK_KEY_UP: + case LK_KEY_UP: for (i = 0; i < LK_KLL; i++) lks->down_keys_list[i] = -1; *type = WSCONS_EVENT_ALL_KEYS_UP; return (1); - case LK_POWER_UP: + case LK_POWER_UP: printf("lk201_decode: powerup detected\n"); lk201_init(lks); return (0); - case LK_KDOWN_ERROR: - case LK_POWER_ERROR: - case LK_OUTPUT_ERROR: - case LK_INPUT_ERROR: + case LK_KDOWN_ERROR: + case LK_POWER_ERROR: + case LK_OUTPUT_ERROR: + case LK_INPUT_ERROR: printf("lk201_decode: error %x\n", datain); - /* FALLTHRU */ - case LK_KEY_REPEAT: /* autorepeat handled by wskbd */ - case LK_MODE_CHANGE: /* ignore silently */ + /* FALLTHROUGH */ + case LK_KEY_REPEAT: /* autorepeat handled by wskbd */ + case LK_MODE_CHANGE: /* ignore silently */ return (0); } @@ -177,3 +178,24 @@ lk201_set_leds(lks, leds) lks->leds_state = leds; } + +void +lk201_set_keyclick(lks, vol) + struct lk201_state *lks; + int vol; +{ + unsigned int newvol; + + if (vol == 0) + send(lks, LK_CL_DISABLE); + else { + newvol = 8 - vol * 8 / 100; + if (newvol > 7) + newvol = 7; + + send(lks, LK_CL_ENABLE); + send(lks, LK_PARAM_VOLUME(newvol)); + } + + lks->kcvol = vol; +} diff --git a/sys/arch/vax/dec/lk201var.h b/sys/arch/vax/dec/lk201var.h index e623e9e709b..9c2e9e5093d 100644 --- a/sys/arch/vax/dec/lk201var.h +++ b/sys/arch/vax/dec/lk201var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: lk201var.h,v 1.2 2002/03/14 01:26:47 millert Exp $ */ +/* $OpenBSD: lk201var.h,v 1.3 2006/07/29 17:06:25 miod Exp $ */ /* $NetBSD: lk201var.h,v 1.2 1998/10/22 17:55:20 drochner Exp $ */ /* @@ -44,9 +44,11 @@ struct lk201_state { int down_keys_list[LK_KLL]; int bellvol; int leds_state; + int kcvol; }; int lk201_init(struct lk201_state *); int lk201_decode(struct lk201_state *, int, u_int *, int *); void lk201_bell(struct lk201_state *, struct wskbd_bell_data *); void lk201_set_leds(struct lk201_state *, int); +void lk201_set_keyclick(struct lk201_state *, int); diff --git a/sys/arch/vax/dec/wskbdmap_lk201.c b/sys/arch/vax/dec/wskbdmap_lk201.c index 18bbf1132f6..241da95f4f1 100644 --- a/sys/arch/vax/dec/wskbdmap_lk201.c +++ b/sys/arch/vax/dec/wskbdmap_lk201.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wskbdmap_lk201.c,v 1.2 2006/01/17 20:26:16 miod Exp $ */ +/* $OpenBSD: wskbdmap_lk201.c,v 1.3 2006/07/29 17:06:25 miod Exp $ */ /* $NetBSD: wskbdmap_lk201.c,v 1.4 2000/12/02 16:57:41 ragge Exp $ */ #include <sys/types.h> @@ -8,7 +8,7 @@ #define KC(n) KS_KEYCODE((n) - MIN_LK201_KEY) -static const keysym_t zskbd_keydesc_us[] = { +static const keysym_t lkkbd_keydesc_us[] = { /* pos command normal shifted */ KC(86), KS_Cmd_Screen0, KS_f1, KC(87), KS_Cmd_Screen1, KS_f2, @@ -116,7 +116,7 @@ static const keysym_t zskbd_keydesc_us[] = { KC(251), KS_apostrophe, KS_quotedbl, }; -static const keysym_t zskbd_keydesc_us_lk401[] = { +static const keysym_t lkkbd_keydesc_us_lk401[] = { KC(171), KS_Shift_R, KC(172), KS_Cmd2, KS_Alt_L, KC(173), KS_Multi_key, /* right compose */ @@ -127,9 +127,9 @@ static const keysym_t zskbd_keydesc_us_lk401[] = { #define KBD_MAP(name, base, map) \ { name, base, sizeof(map)/sizeof(keysym_t), map } -const struct wscons_keydesc zskbd_keydesctab[] = { - KBD_MAP(KB_US, 0, zskbd_keydesc_us), - KBD_MAP(KB_US | KB_LK401, KB_US, zskbd_keydesc_us_lk401), +const struct wscons_keydesc lkkbd_keydesctab[] = { + KBD_MAP(KB_US, 0, lkkbd_keydesc_us), + KBD_MAP(KB_US | KB_LK401, KB_US, lkkbd_keydesc_us_lk401), {0, 0, 0, 0} }; diff --git a/sys/arch/vax/dec/wskbdmap_lk201.h b/sys/arch/vax/dec/wskbdmap_lk201.h index 01b965b20a7..aa1333cdefe 100644 --- a/sys/arch/vax/dec/wskbdmap_lk201.h +++ b/sys/arch/vax/dec/wskbdmap_lk201.h @@ -1,7 +1,7 @@ -/* $OpenBSD: wskbdmap_lk201.h,v 1.1 2001/05/16 22:15:18 hugh Exp $ */ +/* $OpenBSD: wskbdmap_lk201.h,v 1.2 2006/07/29 17:06:25 miod Exp $ */ /* $NetBSD: wskbdmap_lk201.h,v 1.2 1998/09/17 19:59:30 drochner Exp $ */ #define MIN_LK201_KEY 86 #define MAX_LK201_KEY 251 -extern const struct wscons_keydesc zskbd_keydesctab[]; +extern const struct wscons_keydesc lkkbd_keydesctab[]; diff --git a/sys/arch/vax/qbus/dz.c b/sys/arch/vax/qbus/dz.c index 0001eae092a..16cc70b7a38 100644 --- a/sys/arch/vax/qbus/dz.c +++ b/sys/arch/vax/qbus/dz.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dz.c,v 1.12 2004/09/19 21:34:42 mickey Exp $ */ +/* $OpenBSD: dz.c,v 1.13 2006/07/29 17:06:27 miod Exp $ */ /* $NetBSD: dz.c,v 1.23 2000/06/04 02:14:12 matt Exp $ */ /* * Copyright (c) 1996 Ken C. Wellsch. All rights reserved. @@ -68,13 +68,6 @@ #define DZ_WRITE_WORD(adr, val) \ bus_space_write_2(sc->sc_iot, sc->sc_ioh, sc->sc_dr.adr, val) -/* A DZ-11 has 8 ports while a DZV/DZQ-11 has only 4. We use 8 by default */ - -#define NDZLINE 8 - -#define DZ_C2I(c) ((c)<<3) /* convert controller # to index */ -#define DZ_I2C(c) ((c)>>3) /* convert minor to controller # */ -#define DZ_PORT(u) ((u)&07) /* extract the port # */ /* Flags used to monitor modem bits, make them understood outside driver */ @@ -125,9 +118,6 @@ int dz_timer = 0; /* true if timer started */ struct timeout dz_timeout; -#define DZ_DZ 8 /* Unibus DZ-11 board linecount */ -#define DZ_DZV 4 /* Q-bus DZV-11 or DZQ-11 */ - void dzattach(struct dz_softc *sc) { @@ -143,8 +133,11 @@ dzattach(struct dz_softc *sc) /* Initialize our softc structure. Should be done in open? */ - for (n = 0; n < sc->sc_type; n++) + for (n = 0; n < sc->sc_type; n++) { + sc->sc_dz[n].dz_sc = sc; + sc->sc_dz[n].dz_line = n; sc->sc_dz[n].dz_tty = ttymalloc(); + } /* Alas no interrupt on modem bit changes, so we manually scan */ @@ -154,7 +147,6 @@ dzattach(struct dz_softc *sc) timeout_add(&dz_timeout, hz); } printf("\n"); - return; } /* Receiver Interrupt */ @@ -197,7 +189,7 @@ dzrint(void *arg) if (c & DZ_RBUF_PARITY_ERR) cc |= TTY_PE; -#if defined(DDB) && (defined(VAX410) || defined(VAX43) || defined(VAX46) || defined(VAX53)) +#if defined(DDB) && (defined(VAX410) || defined(VAX43) || defined(VAX46) || defined(VAX48) || defined(VAX49) || defined(VAX53)) if (tp->t_dev == cn_tab->cn_dev) { int j = kdbrint(cc); @@ -263,6 +255,8 @@ dzxint(void *arg) tcr &= 255; tcr &= ~(1 << line); DZ_WRITE_BYTE(dr_tcr, tcr); + if (sc->sc_dz[line].dz_catch) + continue; if (tp->t_state & TS_FLUSH) tp->t_state &= ~TS_FLUSH; @@ -291,12 +285,16 @@ dzopen(dev_t dev, int flag, int mode, struct proc *p) sc = dz_cd.cd_devs[unit]; - if (sc->sc_openings++ == 0) - dzdrain(sc); - if (line >= sc->sc_type) return ENXIO; + /* if some other device is using the line, it's busy */ + if (sc->sc_dz[line].dz_catch) + return EBUSY; + + if (sc->sc_openings++ == 0) + dzdrain(sc); + tp = sc->sc_dz[line].dz_tty; if (tp == NULL) return (ENODEV); @@ -402,6 +400,7 @@ dzioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p); if (error >= 0) return (error); + error = ttioctl(tp, cmd, data, flag, p); if (error >= 0) return (error); @@ -478,8 +477,10 @@ dzstart(struct tty *tp) sc = dz_cd.cd_devs[unit]; s = spltty(); - if (tp->t_state & (TS_TIMEOUT|TS_BUSY|TS_TTSTOP)) + if (tp->t_state & (TS_TIMEOUT|TS_BUSY|TS_TTSTOP)) { + splx(s); return; + } cl = &tp->t_outq; if (cl->c_cc <= tp->t_lowat) { if (tp->t_state & TS_ASLEEP) { @@ -488,8 +489,10 @@ dzstart(struct tty *tp) } selwakeup(&tp->t_wsel); } - if (cl->c_cc == 0) + if (cl->c_cc == 0) { + splx(s); return; + } tp->t_state |= TS_BUSY; @@ -693,7 +696,6 @@ dzscan(void *arg) } splx(s); timeout_add(&dz_timeout, hz); - return; } /* @@ -711,7 +713,7 @@ dzreset(struct device *dev) for (i = 0; i < sc->sc_type; i++) { tp = sc->sc_dz[i].dz_tty; - if (((tp->t_state & TS_ISOPEN) == 0)) + if ((tp->t_state & TS_ISOPEN) == 0) continue; dzparam(tp, &tp->t_termios); @@ -725,7 +727,8 @@ dzreset(struct device *dev) * Drain RX fifo. */ static void -dzdrain(struct dz_softc *sc) { +dzdrain(struct dz_softc *sc) +{ while (DZ_READ_WORD(dr_rbuf) & DZ_RBUF_DATA_VALID) /*EMPTY*/; } diff --git a/sys/arch/vax/qbus/dz_uba.c b/sys/arch/vax/qbus/dz_uba.c index 9a342aeccf3..5c64cc823f2 100644 --- a/sys/arch/vax/qbus/dz_uba.c +++ b/sys/arch/vax/qbus/dz_uba.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dz_uba.c,v 1.5 2004/07/09 15:57:16 deraadt Exp $ */ +/* $OpenBSD: dz_uba.c,v 1.6 2006/07/29 17:06:27 miod Exp $ */ /* $NetBSD: dz_uba.c,v 1.11 2000/06/04 06:17:02 matt Exp $ */ /* * Copyright (c) 1998 Ludd, University of Lule}, Sweden. All rights reserved. @@ -71,11 +71,12 @@ dz_uba_match(parent, cf, aux) void *aux; { struct uba_attach_args *ua = aux; +#ifdef notdef bus_space_tag_t iot = ua->ua_iot; +#endif bus_space_handle_t ioh = ua->ua_ioh; int n; - iot = iot; /* Silly GCC */ /* Reset controller to initialize, enable TX interrupts */ /* to catch floating vector info elsewhere when completed */ @@ -129,16 +130,16 @@ dz_uba_attach(parent, self, aux) sc->sc_type = DZ_DZ; /* Now register the TX & RX interrupt handlers */ - uba_intr_establish(ua->ua_icookie, ua->ua_cvec, + sc->sc_tcvec = ua->ua_cvec; + uba_intr_establish(ua->ua_icookie, sc->sc_tcvec, dzxint, sc, &sc->sc_tintrcnt); - uba_intr_establish(ua->ua_icookie, ua->ua_cvec - 4, + sc->sc_rcvec = ua->ua_cvec - 4; + uba_intr_establish(ua->ua_icookie, sc->sc_rcvec, dzrint, sc, &sc->sc_rintrcnt); uba_reset_establish(dzreset, self); - sc->sc_rcvec = ua->ua_cvec - 4; evcount_attach(&sc->sc_rintrcnt, sc->sc_dev.dv_xname, (void *)&sc->sc_rcvec, &evcount_intr); - sc->sc_tcvec = ua->ua_cvec; evcount_attach(&sc->sc_tintrcnt, sc->sc_dev.dv_xname, (void *)&sc->sc_tcvec, &evcount_intr); diff --git a/sys/arch/vax/qbus/dzreg.h b/sys/arch/vax/qbus/dzreg.h index 8f046c50fa0..613a581c866 100644 --- a/sys/arch/vax/qbus/dzreg.h +++ b/sys/arch/vax/qbus/dzreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dzreg.h,v 1.1 2000/04/27 03:14:47 bjc Exp $ */ +/* $OpenBSD: dzreg.h,v 1.2 2006/07/29 17:06:27 miod Exp $ */ /* $NetBSD: dzreg.h,v 1.4 1999/05/27 16:03:13 ragge Exp $ */ /* * Copyright (c) 1996 Ken C. Wellsch. All rights reserved. @@ -51,20 +51,6 @@ struct DZregs typedef struct DZregs dzregs; -#if 0 -struct dz_regs { - volatile unsigned short *dr_csr; - volatile unsigned short *dr_rbuf; -#define dr_lpr dr_rbuf - volatile unsigned char *dr_dtr; - volatile unsigned char *dr_break; - volatile unsigned char *dr_tbuf; - volatile unsigned char *dr_tcr; - volatile unsigned short *dr_tcrw; - volatile unsigned char *dr_ring; - volatile unsigned char *dr_dcd; -}; -#else struct dz_regs { bus_addr_t dr_csr; bus_addr_t dr_rbuf; @@ -86,8 +72,6 @@ struct dz_regs { #define DZ_UBA_DCD 7 #define DZ_UBA_RING 6 -#endif - /* CSR bits */ #define DZ_CSR_TX_READY 0100000 /* Transmitter Ready */ |