diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-01-19 17:09:35 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-01-19 17:09:35 +0000 |
commit | b50190178e31341751ce01f2bf2ab9450d42d501 (patch) | |
tree | aa60c163c6691c71c6ade193eb6fe1486fdb93df /sys/arch | |
parent | 50f702103877eaa70551246edcf47eb5956a4fd6 (diff) |
Oops, repair stand/ by putting copies of the old grf/ite include files
in stand/include until they are cleaned up.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/hp300/stand/common/autoconf.c | 5 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/hil.c | 9 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/ite.c | 5 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/ite_dv.c | 7 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/ite_gb.c | 7 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/ite_hy.c | 15 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/ite_rb.c | 8 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/ite_subr.c | 5 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/ite_tc.c | 9 | ||||
-rw-r--r-- | sys/arch/hp300/stand/include/grf_dvreg.h | 190 | ||||
-rw-r--r-- | sys/arch/hp300/stand/include/grf_gbreg.h | 123 | ||||
-rw-r--r-- | sys/arch/hp300/stand/include/grf_hyreg.h | 79 | ||||
-rw-r--r-- | sys/arch/hp300/stand/include/grf_rbreg.h | 142 | ||||
-rw-r--r-- | sys/arch/hp300/stand/include/grf_tcreg.h | 142 | ||||
-rw-r--r-- | sys/arch/hp300/stand/include/grfreg.h | 89 | ||||
-rw-r--r-- | sys/arch/hp300/stand/include/hilreg.h | 175 | ||||
-rw-r--r-- | sys/arch/hp300/stand/include/hilvar.h | 141 | ||||
-rw-r--r-- | sys/arch/hp300/stand/include/itereg.h | 56 | ||||
-rw-r--r-- | sys/arch/hp300/stand/include/kbdmap.h | 70 | ||||
-rw-r--r-- | sys/arch/hp300/stand/uboot/clock.c | 7 |
20 files changed, 1240 insertions, 44 deletions
diff --git a/sys/arch/hp300/stand/common/autoconf.c b/sys/arch/hp300/stand/common/autoconf.c index 3348a3a349d..e6f575dcf5a 100644 --- a/sys/arch/hp300/stand/common/autoconf.c +++ b/sys/arch/hp300/stand/common/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.3 2003/06/02 23:27:46 millert Exp $ */ +/* $OpenBSD: autoconf.c,v 1.4 2005/01/19 17:09:30 miod Exp $ */ /* $NetBSD: autoconf.c,v 1.12 1997/01/30 10:32:51 thorpej Exp $ */ /* @@ -45,8 +45,7 @@ #include "samachdep.h" #include "rominfo.h" #include "device.h" - -#include <hp300/dev/grfreg.h> +#include "grfreg.h" /* * Mapping of ROM MSUS types to BSD major device numbers diff --git a/sys/arch/hp300/stand/common/hil.c b/sys/arch/hp300/stand/common/hil.c index 08091876d33..f484575c991 100644 --- a/sys/arch/hp300/stand/common/hil.c +++ b/sys/arch/hp300/stand/common/hil.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hil.c,v 1.2 2003/06/02 23:27:46 millert Exp $ */ +/* $OpenBSD: hil.c,v 1.3 2005/01/19 17:09:30 miod Exp $ */ /* $NetBSD: hil.c,v 1.2 1997/04/14 19:00:10 thorpej Exp $ */ /* @@ -49,10 +49,9 @@ #include <sys/param.h> #include <sys/device.h> /* XXX */ -#include <hp300/dev/hilreg.h> -#include <hp300/dev/kbdmap.h> -#include <hp300/dev/itevar.h> - +#include "hilreg.h" +#include "kbdmap.h" +#include "itevar.h" #include "samachdep.h" #include "kbdvar.h" diff --git a/sys/arch/hp300/stand/common/ite.c b/sys/arch/hp300/stand/common/ite.c index 2dd0784bdbb..9275656bfef 100644 --- a/sys/arch/hp300/stand/common/ite.c +++ b/sys/arch/hp300/stand/common/ite.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ite.c,v 1.3 2003/06/02 23:27:46 millert Exp $ */ +/* $OpenBSD: ite.c,v 1.4 2005/01/19 17:09:30 miod Exp $ */ /* $NetBSD: ite.c,v 1.12 1997/01/30 10:32:55 thorpej Exp $ */ /* @@ -48,8 +48,7 @@ #include <sys/param.h> #include <dev/cons.h> -#include <hp300/dev/grfreg.h> - +#include "grfreg.h" #include "device.h" #include "itevar.h" #include "consdefs.h" diff --git a/sys/arch/hp300/stand/common/ite_dv.c b/sys/arch/hp300/stand/common/ite_dv.c index 9cf97e24fc0..719ffed7171 100644 --- a/sys/arch/hp300/stand/common/ite_dv.c +++ b/sys/arch/hp300/stand/common/ite_dv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ite_dv.c,v 1.3 2003/06/02 23:27:46 millert Exp $ */ +/* $OpenBSD: ite_dv.c,v 1.4 2005/01/19 17:09:30 miod Exp $ */ /* $NetBSD: ite_dv.c,v 1.8 1996/03/03 04:23:35 thorpej Exp $ */ /* @@ -46,9 +46,8 @@ #include <sys/param.h> #include "itevar.h" - -#include <hp300/dev/itereg.h> -#include <hp300/dev/grf_dvreg.h> +#include "itereg.h" +#include "grf_dvreg.h" #define REGBASE ((struct dvboxfb *)(ip->regbase)) #define WINDOWMOVER dvbox_windowmove diff --git a/sys/arch/hp300/stand/common/ite_gb.c b/sys/arch/hp300/stand/common/ite_gb.c index c738d01f1ec..00ffd0c8a5d 100644 --- a/sys/arch/hp300/stand/common/ite_gb.c +++ b/sys/arch/hp300/stand/common/ite_gb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ite_gb.c,v 1.3 2003/06/02 23:27:46 millert Exp $ */ +/* $OpenBSD: ite_gb.c,v 1.4 2005/01/19 17:09:30 miod Exp $ */ /* $NetBSD: ite_gb.c,v 1.8 1996/03/03 04:23:36 thorpej Exp $ */ /* @@ -46,9 +46,8 @@ #include <sys/param.h> #include "itevar.h" - -#include <hp300/dev/itereg.h> -#include <hp300/dev/grf_gbreg.h> +#include "itereg.h" +#include "grf_gbreg.h" #define REGBASE ((struct gboxfb *)(ip->regbase)) #define WINDOWMOVER gbox_windowmove diff --git a/sys/arch/hp300/stand/common/ite_hy.c b/sys/arch/hp300/stand/common/ite_hy.c index b903b3c2f04..3445a4e8c4a 100644 --- a/sys/arch/hp300/stand/common/ite_hy.c +++ b/sys/arch/hp300/stand/common/ite_hy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ite_hy.c,v 1.3 2003/06/02 23:27:46 millert Exp $ */ +/* $OpenBSD: ite_hy.c,v 1.4 2005/01/19 17:09:30 miod Exp $ */ /* $NetBSD: ite_hy.c,v 1.3 1996/03/03 04:23:37 thorpej Exp $ */ /* @@ -46,9 +46,8 @@ #include <sys/param.h> #include "itevar.h" - -#include <hp300/dev/itereg.h> -#include <hp300/dev/grf_hyreg.h> +#include "itereg.h" +#include "grf_hyreg.h" #define REGBASE ((struct hyboxfb *)(ip->regbase)) #define WINDOWMOVER hyper_windowmove @@ -305,14 +304,14 @@ hyper_windowmove(ip, sy, sx, dy, dx, h, w, func) while(h--) { - getandputrop(psrc, srcBit, dstBit, w, pdst, func) + getandputrop(psrc, srcBit, dstBit, w, pdst, func); pdst += width; psrc += width; } } else { - maskbits(dx, w, startmask, endmask, nlMiddle) + maskbits(dx, w, startmask, endmask, nlMiddle); if (startmask) nstart = 32 - (dx & 0x1f); else @@ -336,7 +335,7 @@ hyper_windowmove(ip, sy, sx, dy, dx, h, w, func) if (startmask) { getandputrop(psrc, (sx & 0x1f), - (dx & 0x1f), nstart, pdst, func) + (dx & 0x1f), nstart, pdst, func); pdst++; if (srcStartOver) psrc++; @@ -357,7 +356,7 @@ hyper_windowmove(ip, sy, sx, dy, dx, h, w, func) nl = nlMiddle + 1; while (--nl) { - getunalignedword (psrc, xoffSrc, tmpSrc) + getunalignedword (psrc, xoffSrc, tmpSrc); DoRop (*pdst, func, tmpSrc, *pdst); pdst++; psrc++; diff --git a/sys/arch/hp300/stand/common/ite_rb.c b/sys/arch/hp300/stand/common/ite_rb.c index 1901915d5c1..4c346f9fd5e 100644 --- a/sys/arch/hp300/stand/common/ite_rb.c +++ b/sys/arch/hp300/stand/common/ite_rb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ite_rb.c,v 1.3 2003/06/02 23:27:46 millert Exp $ */ +/* $OpenBSD: ite_rb.c,v 1.4 2005/01/19 17:09:30 miod Exp $ */ /* $NetBSD: ite_rb.c,v 1.8 1996/03/03 04:23:38 thorpej Exp $ */ /* @@ -46,10 +46,8 @@ #include <sys/param.h> #include "itevar.h" - -#include <hp300/dev/itereg.h> - -#include <hp300/dev/grf_rbreg.h> +#include "itereg.h" +#include "grf_rbreg.h" #define REGBASE ((struct rboxfb *)(ip->regbase)) #define WINDOWMOVER rbox_windowmove diff --git a/sys/arch/hp300/stand/common/ite_subr.c b/sys/arch/hp300/stand/common/ite_subr.c index 422b6b870ad..e6cf31ea40c 100644 --- a/sys/arch/hp300/stand/common/ite_subr.c +++ b/sys/arch/hp300/stand/common/ite_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ite_subr.c,v 1.2 2003/06/02 23:27:46 millert Exp $ */ +/* $OpenBSD: ite_subr.c,v 1.3 2005/01/19 17:09:30 miod Exp $ */ /* $NetBSD: ite_subr.c,v 1.8 1996/03/03 04:23:40 thorpej Exp $ */ /* @@ -46,8 +46,7 @@ #include <sys/param.h> #include "itevar.h" - -#include <hp300/dev/itereg.h> +#include "itereg.h" ite_fontinfo(ip) struct ite_data *ip; diff --git a/sys/arch/hp300/stand/common/ite_tc.c b/sys/arch/hp300/stand/common/ite_tc.c index 27a6009fbce..6a664860325 100644 --- a/sys/arch/hp300/stand/common/ite_tc.c +++ b/sys/arch/hp300/stand/common/ite_tc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ite_tc.c,v 1.3 2003/06/02 23:27:46 millert Exp $ */ +/* $OpenBSD: ite_tc.c,v 1.4 2005/01/19 17:09:30 miod Exp $ */ /* $NetBSD: ite_tc.c,v 1.8 1996/03/03 04:23:41 thorpej Exp $ */ /* @@ -46,10 +46,9 @@ #include <sys/param.h> #include "itevar.h" - -#include <hp300/dev/itereg.h> -#include <hp300/dev/grfreg.h> -#include <hp300/dev/grf_tcreg.h> +#include "itereg.h" +#include "grfreg.h" +#include "grf_tcreg.h" #define REGBASE ((struct tcboxfb *)(ip->regbase)) #define WINDOWMOVER topcat_windowmove diff --git a/sys/arch/hp300/stand/include/grf_dvreg.h b/sys/arch/hp300/stand/include/grf_dvreg.h new file mode 100644 index 00000000000..fe45b6b63cf --- /dev/null +++ b/sys/arch/hp300/stand/include/grf_dvreg.h @@ -0,0 +1,190 @@ +/* $OpenBSD: grf_dvreg.h,v 1.1 2005/01/19 17:09:32 miod Exp $ */ +/* $NetBSD: grf_dvreg.h,v 1.5 1994/10/26 07:23:50 cgd Exp $ */ + +/* + * Copyright (c) 1988 University of Utah. + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * the Systems Programming Group of the University of Utah Computer + * Science Department. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * from: Utah $Hdr: grf_dvreg.h 1.5 92/01/21$ + * + * @(#)grf_dvreg.h 8.1 (Berkeley) 6/10/93 + */ + +#include <hp300/dev/iotypes.h> /* XXX */ + +/* + * Map of the DaVinci frame buffer controller chip in memory ... + */ + +#define db_waitbusy(regaddr) \ + while (((struct dvboxfb *)(regaddr))->wbusy || \ + ((struct dvboxfb *)(regaddr))->as_busy) DELAY(100) + +struct rgb { + u_char :8, :8, :8; + vu_char red; + u_char :8, :8, :8; + vu_char green; + u_char :8, :8, :8; + vu_char blue; +}; + +struct dvboxfb { + u_char :8; + vu_char reset; /* reset register 0x01 */ + u_char fb_address; /* frame buffer address 0x02 */ + vu_char interrupt; /* interrupt register 0x03 */ + u_char :8; + vu_char fbwmsb; /* frame buffer width MSB 0x05 */ + u_char :8; + vu_char fbwlsb; /* frame buffer width MSB 0x07 */ + u_char :8; + vu_char fbhmsb; /* frame buffer height MSB 0x09 */ + u_char :8; + vu_char fbhlsb; /* frame buffer height MSB 0x0b */ + u_char :8; + vu_char dwmsb; /* display width MSB 0x0d */ + u_char :8; + vu_char dwlsb; /* display width MSB 0x0f */ + u_char :8; + vu_char dhmsb; /* display height MSB 0x11 */ + u_char :8; + vu_char dhlsb; /* display height MSB 0x13 */ + u_char :8; + vu_char fbid; /* frame buffer id 0x15 */ + u_char f1[0x47]; + vu_char fbomsb; /* frame buffer offset MSB 0x5d */ + u_char :8; + vu_char fbolsb; /* frame buffer offset LSB 0x5f */ + u_char f2[16359]; + vu_char wbusy; /* Window move in progress 0x4047 */ + u_char f3[0x405b-0x4047-1]; + vu_char as_busy; /* Scan accessing frame buf. 0x405B */ + u_char f4[0x4090-0x405b-1]; + vu_int fbwen; /* Frame buffer write enable 0x4090 */ + u_char f5[0x409f-0x4090-4]; + vu_char wmove; /* Initiate window move. 0x409F */ + u_char f6[0x40b3-0x409f-1]; + vu_char fold; /* Byte/longword per pixel 0x40B3 */ + u_char f7[0x40b7-0x40b3-1]; + vu_char opwen; /* Overlay plane write enable 0x40B7 */ + u_char f8[0x40bf-0x40b7-1]; + vu_char drive; /* Select FB vs. Overlay. 0x40BF */ + + u_char f8a[0x40cb-0x40bf-1]; + vu_char zconfig; /* Z buffer configuration 0x40CB */ + u_char f8b[0x40cf-0x40cb-1]; + vu_char alt_rr; /* Alternate replacement rule 0x40CF */ + u_char f8c[0x40d3-0x40cf-1]; + vu_char zrr; /* Z replacement rule 0x40D3 */ + + u_char f9[0x40d7-0x40d3-1]; + vu_char en_scan; /* Enable scan DTACK. 0x40D7 */ + u_char f10[0x40ef-0x40d7-1]; + vu_char rep_rule; /* Replacement rule 0x40EF */ + u_char f11[0x40f2-0x40ef-1]; + vu_short source_x; /* Window source X origin 0x40F2 */ + u_char f12[0x40f6-0x40f2-2]; + vu_short source_y; /* Window source Y origin 0x40F6 */ + u_char f13[0x40fa-0x40f6-2]; + vu_short dest_x; /* Window dest X origin 0x40FA */ + u_char f14[0x40fe -0x40fa-2]; + vu_short dest_y; /* Window dest Y origin 0x40FE */ + u_char f15[0x4102-0x40fe -2]; + vu_short wwidth; /* Window width 0x4102 */ + u_char f16[0x4106-0x4102-2]; + vu_short wheight; /* Window height 0x4106 */ + u_char f17[0x6003-0x4106-2]; + vu_char cmapbank; /* Bank select (0 or 1) 0x6003 */ + u_char f18[0x6007-0x6003-1]; + vu_char dispen; /* Display enable 0x6007 */ + + u_char f18a[0x600B-0x6007-1]; + vu_char fbvenp; /* Frame buffer video enable 0x600B */ + u_char f18b[0x6017-0x600B-1]; + vu_char fbvens; /* fbvenp blink counterpart 0x6017 */ + + u_char f19[0x6023-0x6017-1]; + vu_char vdrive; /* Video display mode 0x6023 */ + u_char f20[0x6083-0x6023-1]; + vu_char panxh; /* Pan display in X (high) 0x6083 */ + u_char f21[0x6087-0x6083-1]; + vu_char panxl; /* Pan display in X (low) 0x6087 */ + u_char f22[0x608b-0x6087-1]; + vu_char panyh; /* Pan display in Y (high) 0x608B */ + u_char f23[0x608f-0x608b-1]; + vu_char panyl; /* Pan display in Y (low) 0x608F */ + u_char f24[0x6093-0x608f-1]; + vu_char zoom; /* Zoom factor 0x6093 */ + u_char f25[0x6097-0x6093-1]; + vu_char pz_trig; /* Pan & zoom trigger 0x6097 */ + u_char f26[0x609b-0x6097-1]; + vu_char ovly0p; /* Overlay 0 primary map 0x609B */ + u_char f27[0x609f-0x609b-1]; + vu_char ovly1p; /* Overlay 1 primary map 0x609F */ + u_char f28[0x60a3-0x609f-1]; + vu_char ovly0s; /* Overlay 0 secondary map 0x60A3 */ + u_char f29[0x60a7-0x60a3-1]; + vu_char ovly1s; /* Overlay 1 secondary map 0x60A7 */ + u_char f30[0x60ab-0x60a7-1]; + vu_char opvenp; /* Overlay video enable 0x60AB */ + u_char f31[0x60af-0x60ab-1]; + vu_char opvens; /* Overlay blink enable 0x60AF */ + u_char f32[0x60b3-0x60af-1]; + vu_char fv_trig; /* Trigger control registers 0x60B3 */ + u_char f33[0x60b7-0x60b3-1]; + vu_char cdwidth; /* Iris cdwidth timing reg. 0x60B7 */ + u_char f34[0x60bb-0x60b7-1]; + vu_char chstart; /* Iris chstart timing reg. 0x60BB */ + u_char f35[0x60bf-0x60bb-1]; + vu_char cvwidth; /* Iris cvwidth timing reg. 0x60BF */ + u_char f36[0x6100-0x60bf-1]; + struct rgb rgb[8]; /* overlay color map */ + u_char f37[0x6403-0x6100-sizeof(struct rgb)*8]; + vu_char red0; + u_char f38[0x6803-0x6403-1]; + vu_char green0; + u_char f39[0x6c03-0x6803-1]; + vu_char blue0; + u_char f40[0x7403-0x6c03-1]; + vu_char red1; + u_char f41[0x7803-0x7403-1]; + vu_char green1; + u_char f42[0x7c03-0x7803-1]; + vu_char blue1; + u_char f43[0x8012-0x7c03-1]; + vu_short status1; /* Master Status register 0x8012 */ + u_char f44[0xC226-0x8012-2]; + vu_short trans; /* Transparency 0xC226 */ + u_char f45[0xC23E -0xC226-2]; + vu_short pstop; /* Pace value control 0xc23e */ +}; diff --git a/sys/arch/hp300/stand/include/grf_gbreg.h b/sys/arch/hp300/stand/include/grf_gbreg.h new file mode 100644 index 00000000000..7778851e58b --- /dev/null +++ b/sys/arch/hp300/stand/include/grf_gbreg.h @@ -0,0 +1,123 @@ +/* $OpenBSD: grf_gbreg.h,v 1.1 2005/01/19 17:09:32 miod Exp $ */ +/* $NetBSD: grf_gbreg.h,v 1.4 1994/10/26 07:23:53 cgd Exp $ */ + +/* + * Copyright (c) 1988 University of Utah. + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * the Systems Programming Group of the University of Utah Computer + * Science Department. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * from: Utah $Hdr: grf_gbreg.h 1.11 92/01/21$ + * + * @(#)grf_gbreg.h 8.1 (Berkeley) 6/10/93 + */ + +#include <hp300/dev/iotypes.h> /* XXX */ + +/* + * Gatorbox driver regs + */ + +#define TILER_ENABLE 0x80 +#define LINE_MOVER_ENABLE 0x80 +#define UP_LEFT 0x00 +#define DOWN_RIGHT 0x40 +#define MOVE_UP_LEFT TILER_ENABLE|UP_LEFT +#define MOVE_DOWN_RIGHT TILER_ENABLE|DOWN_RIGHT + +#define tile_mover_waitbusy(regaddr) \ + while (((struct gboxfb *)(regaddr))->sec_interrupt & 0x10) + +#define line_mover_waitbusy(regaddr) \ + while ((((struct gboxfb *)(regaddr))->status & 0x80) == 0) + +#define gbcm_waitbusy(regaddr) \ + while (((struct gboxfb *)(regaddr))->cmap_busy != 0xff) + +struct gboxfb { + u_char :8; + vu_char reset; /* reset register 0x01 */ + vu_char sec_interrupt; /* Secondary interrupt register 0x03 */ + vu_char interrupt; /* interrupt register 0x03 */ + u_char :8; + vu_char fbwmsb; /* frame buffer width MSB 0x05 */ + u_char :8; + vu_char fbwlsb; /* frame buffer width MSB 0x07 */ + u_char :8; + vu_char fbhmsb; /* frame buffer height MSB 0x09 */ + u_char :8; + vu_char fbhlsb; /* frame buffer height MSB 0x0b */ + u_char :8; + vu_char dwmsb; /* display width MSB 0x0d */ + u_char :8; + vu_char dwlsb; /* display width MSB 0x0f */ + u_char :8; + vu_char dhmsb; /* display height MSB 0x11 */ + u_char :8; + vu_char dhlsb; /* display height MSB 0x13 */ + u_char :8; + vu_char fbid; /* Scondary frame buffer id 0x15 */ + u_char f1[0x5d-0x15-1]; + vu_char fbomsb; /* frame buffer offset MSB 0x5d */ + u_char :8; + vu_char fbolsb; /* frame buffer offset LSB 0x5f */ + u_char f2[0x4000-0x5f-1]; + vu_char crtc_address; /* CTR controller address reg 0x4000 */ + vu_char status; /* Status register 0x4001 */ + vu_char crtc_data; /* CTR controller data reg 0x4002 */ + u_char f3[6]; + vu_char line_mover_rep_rule; /* Line move rep rule */ + u_char :8, :8; + vu_char line_mover_width; /* Line move width */ + u_char f4[0xff3]; + vu_char width; /* width in tiles 0x5001 */ + u_char :8; + vu_char height; /* height in tiles 0x5003 */ + u_char f5[3]; + vu_char rep_rule; /* replacement rule 0x5007 */ + u_char f6[0x6001-0x5007-1]; + vu_char blink1; /* blink 1 0x6001 */ + u_char f7[3]; + vu_char blink2; /* blink 2 0x6005 */ + u_char f8[3]; + vu_char write_protect; /* write protect 0x6009 */ + u_char f9[0x6803-0x6009-1]; + vu_char cmap_busy; /* color map busy 0x6803 */ + u_char f10[0x68b9-0x6803-1]; + vu_char creg_select; /* color map register select 0x68b8 */ + u_char f11[0x68f1-0x68b9-1]; + vu_char cmap_write; /* color map write trigger 0x68f1 */ + u_char f12[0x69b3-0x68f1-1]; + vu_char cmap_red; /* red value register 0x69b3 */ + u_char :8; + vu_char cmap_grn; /* green value register 0x69b5 */ + u_char :8; + vu_char cmap_blu; /* blue value register 0x69b6 */ +}; diff --git a/sys/arch/hp300/stand/include/grf_hyreg.h b/sys/arch/hp300/stand/include/grf_hyreg.h new file mode 100644 index 00000000000..6d0ea53d2d0 --- /dev/null +++ b/sys/arch/hp300/stand/include/grf_hyreg.h @@ -0,0 +1,79 @@ +/* $OpenBSD: grf_hyreg.h,v 1.1 2005/01/19 17:09:32 miod Exp $ */ +/* $NetBSD: grf_hyreg.h,v 1.2 1994/10/26 07:23:57 cgd Exp $ */ + +/* + * Copyright (c) 1991 University of Utah. + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * the Systems Programming Group of the University of Utah Computer + * Science Department and Mark Davies of the Department of Computer + * Science, Victoria University of Wellington, New Zealand. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * from: Utah $Hdr: grf_hyreg.h 1.1 92/01/22$ + * + * @(#)grf_hyreg.h 8.1 (Berkeley) 6/10/93 + */ + +#include <hp300/dev/iotypes.h> /* XXX */ + +struct hyboxfb { + u_char :8; + vu_char reset; /* reset register 0x01 */ + vu_char fb_address; /* frame buffer address 0x02 */ + vu_char interrupt; /* interrupt register 0x03 */ + u_char :8; + vu_char fbwmsb; /* frame buffer width MSB 0x05 */ + u_char :8; + vu_char fbwlsb; /* frame buffer width MSB 0x07 */ + u_char :8; + vu_char fbhmsb; /* frame buffer height MSB 0x09 */ + u_char :8; + vu_char fbhlsb; /* frame buffer height MSB 0x0b */ + u_char :8; + vu_char dwmsb; /* display width MSB 0x0d */ + u_char :8; + vu_char dwlsb; /* display width MSB 0x0f */ + u_char :8; + vu_char dhmsb; /* display height MSB 0x11 */ + u_char :8; + vu_char dhlsb; /* display height MSB 0x13 */ + u_char :8; + vu_char fbid; /* Scondary frame buffer id 0x15 */ + u_char :8; + vu_char bits; /* square(0)/double-high(1) 0x17 */ + u_char f1[0x5b-0x17-1]; + vu_char num_planes; /* number of color planes 0x5b */ + u_char :8; + vu_char fbomsb; /* frame buffer offset MSB 0x5d */ + u_char :8; + vu_char fbolsb; /* frame buffer offset LSB 0x5f */ + u_char f2[0x4000-0x5f-1]; + vu_char nblank; /* display enable planes 0x4000 */ +}; + diff --git a/sys/arch/hp300/stand/include/grf_rbreg.h b/sys/arch/hp300/stand/include/grf_rbreg.h new file mode 100644 index 00000000000..95b3922e69a --- /dev/null +++ b/sys/arch/hp300/stand/include/grf_rbreg.h @@ -0,0 +1,142 @@ +/* $OpenBSD: grf_rbreg.h,v 1.1 2005/01/19 17:09:32 miod Exp $ */ +/* $NetBSD: grf_rbreg.h,v 1.4 1994/10/26 07:24:03 cgd Exp $ */ + +/* + * Copyright (c) 1988 University of Utah. + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * the Systems Programming Group of the University of Utah Computer + * Science Department. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * from: Utah $Hdr: grf_rbreg.h 1.9 92/01/21$ + * + * @(#)grf_rbreg.h 8.1 (Berkeley) 6/10/93 + */ + +/* + * Map of the Renaissance frame buffer controller chip in memory ... + */ + +#include <hp300/dev/iotypes.h> /* XXX */ + +#define rb_waitbusy(regaddr) \ + while (((struct rboxfb *)(regaddr))->wbusy & 0x01) DELAY(100) + +#define CM1RED ((struct rencm *)(ip->regbase + 0x6400)) +#define CM1GRN ((struct rencm *)(ip->regbase + 0x6800)) +#define CM1BLU ((struct rencm *)(ip->regbase + 0x6C00)) +#define CM2RED ((struct rencm *)(ip->regbase + 0x7400)) +#define CM2GRN ((struct rencm *)(ip->regbase + 0x7800)) +#define CM2BLU ((struct rencm *)(ip->regbase + 0x7C00)) + +struct rencm { + u_char :8, :8, :8; + vu_char value; +}; + +struct rboxfb { + u_char filler1[1]; + vu_char reset; /* reset register 0x01 */ + vu_char fb_address; /* frame buffer address 0x02 */ + vu_char interrupt; /* interrupt register 0x03 */ + u_char filler1a; + vu_char fbwmsb; /* frame buffer width MSB 0x05 */ + u_char filler1b; + vu_char fbwlsb; /* frame buffer width MSB 0x07 */ + u_char filler1c; + vu_char fbhmsb; /* frame buffer height MSB 0x09 */ + u_char filler1d; + vu_char fbhlsb; /* frame buffer height MSB 0x0b */ + u_char filler1e; + vu_char dwmsb; /* display width MSB 0x0d */ + u_char filler1f; + vu_char dwlsb; /* display width MSB 0x0f */ + u_char filler1g; + vu_char dhmsb; /* display height MSB 0x11 */ + u_char filler1h; + vu_char dhlsb; /* display height MSB 0x13 */ + u_char filler1i; + vu_char fbid; /* frame buffer id 0x15 */ + u_char filler1j[0x47]; + vu_char fbomsb; /* frame buffer offset MSB 0x5d */ + u_char filler1k; + vu_char fbolsb; /* frame buffer offset LSB 0x5f */ + u_char filler2[16359]; + vu_char wbusy; /* window mover is active 0x4047 */ + u_char filler3[0x405b - 0x4048]; + vu_char scanbusy; /* scan converteris active 0x405B */ + u_char filler3b[0x4083 - 0x405c]; + vu_char video_enable; /* drive vid. refresh bus 0x4083 */ + u_char filler4[3]; + vu_char display_enable; /* enable the display 0x4087 */ + u_char filler5[8]; + vu_int write_enable; /* write enable register 0x4090 */ + u_char filler6[11]; + vu_char wmove; /* start window mover 0x409f */ + u_char filler7[3]; + vu_char blink; /* blink register 0x40a3 */ + u_char filler8[15]; + vu_char fold; /* fold register 0x40b3 */ + vu_int opwen; /* overlay plane write enable 0x40b4 */ + u_char filler9[3]; + vu_char tmode; /* Tile mode size 0x40bb */ + u_char filler9a[3]; + vu_char drive; /* drive register 0x40bf */ + u_char filler10[3]; + vu_char vdrive; /* vdrive register 0x40c3 */ + u_char filler10a[0x40cb-0x40c4]; + vu_char zconfig; /* Z-buffer mode 0x40cb */ + u_char filler11a[2]; + vu_short tpatt; /* Transparency pattern 0x40ce */ + u_char filler11b[3]; + vu_char dmode; /* dither mode 0x40d3 */ + u_char filler11c[3]; + vu_char en_scan; /* enable scan board to DTACK 0x40d7 */ + u_char filler11d[0x40ef-0x40d8]; + vu_char rep_rule; /* replacement rule 0x40ef */ + u_char filler12[2]; + vu_short source_x; /* source x 0x40f2 */ + u_char filler13[2]; + vu_short source_y; /* source y 0x40f6 */ + u_char filler14[2]; + vu_short dest_x; /* dest x 0x40fa */ + u_char filler15[2]; + vu_short dest_y; /* dest y 0x40fe */ + u_char filler16[2]; + vu_short wwidth; /* window width 0x4102 */ + u_char filler17[2]; + vu_short wheight; /* window height 0x4106 */ + u_char filler18[18]; + vu_short patt_x; /* pattern x 0x411a */ + u_char filler19[2]; + vu_short patt_y; /* pattern y 0x411e */ + u_char filler20[0x8012 - 0x4120]; + vu_short te_status; /* transform engine status 0x8012 */ + u_char filler21[0x1ffff-0x8014]; +}; diff --git a/sys/arch/hp300/stand/include/grf_tcreg.h b/sys/arch/hp300/stand/include/grf_tcreg.h new file mode 100644 index 00000000000..b08dedc079e --- /dev/null +++ b/sys/arch/hp300/stand/include/grf_tcreg.h @@ -0,0 +1,142 @@ +/* $OpenBSD: grf_tcreg.h,v 1.1 2005/01/19 17:09:32 miod Exp $ */ +/* $NetBSD: grf_tcreg.h,v 1.6 1994/10/26 07:24:06 cgd Exp $ */ + +/* + * Copyright (c) 1988 University of Utah. + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * the Systems Programming Group of the University of Utah Computer + * Science Department. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * from: Utah $Hdr: grf_tcreg.h 1.11 92/01/21$ + * + * @(#)grf_tcreg.h 8.1 (Berkeley) 6/10/93 + */ + +#include <hp300/dev/iotypes.h> /* XXX */ + +#define tccm_waitbusy(regaddr) \ + while (((struct tcboxfb *)(regaddr))->cmap_busy & 0x04) DELAY(100) + +#define tc_waitbusy(regaddr,planes) \ + while (((struct tcboxfb *)(regaddr))->busy & planes) DELAY(100) + +struct tcboxfb { + u_char :8; + vu_char reset; /* reset register 0x01 */ + vu_char fb_address; /* frame buffer address 0x02 */ + vu_char interrupt; /* interrupt register 0x03 */ + u_char :8; + vu_char fbwmsb; /* frame buffer width MSB 0x05 */ + u_char :8; + vu_char fbwlsb; /* frame buffer width MSB 0x07 */ + u_char :8; + vu_char fbhmsb; /* frame buffer height MSB 0x09 */ + u_char :8; + vu_char fbhlsb; /* frame buffer height MSB 0x0b */ + u_char :8; + vu_char dwmsb; /* display width MSB 0x0d */ + u_char :8; + vu_char dwlsb; /* display width MSB 0x0f */ + u_char :8; + vu_char dhmsb; /* display height MSB 0x11 */ + u_char :8; + vu_char dhlsb; /* display height MSB 0x13 */ + u_char :8; + vu_char fbid; /* Scondary frame buffer id 0x15 */ + u_char :8; + vu_char bits; /* square(0)/double-high(1) 0x17 */ + u_char f1[0x5b-0x17-1]; + vu_char num_planes; /* number of color planes 0x5b */ + u_char :8; + vu_char fbomsb; /* frame buffer offset MSB 0x5d */ + u_char :8; + vu_char fbolsb; /* frame buffer offset LSB 0x5f */ + u_char f2[0x4040-0x5f-1]; + vu_char vblank; /* vertical blanking 0x4040 */ + u_char :8,:8,:8; + vu_char busy; /* window move active 0x4044 */ + u_char :8,:8,:8; + vu_char vtrace_request; /* vert retrace intr request 0x4048 */ + u_char :8,:8,:8; + vu_char move_request; /* window move intr request 0x404C */ + u_char f3[0x4080-0x404c-1]; + vu_char nblank; /* display enable planes 0x4080 */ + u_char f4[0x4088-0x4080-1]; + vu_char wen; /* write enable plane 0x4088 */ + u_char f5[0x408c-0x4088-1]; + vu_char ren; /* read enable plane 0x408c */ + u_char f6[0x4090-0x408c-1]; + vu_char fben; /* frame buffer write enable 0x4090 */ + u_char f7[0x409c-0x4090-1]; + vu_char wmove; /* start window move 0x409c */ + u_char f8[0x40a0-0x409c-1]; + vu_char blink; /* enable blink planes 0x40a0 */ + u_char f9[0x40a8-0x40a0-1]; + vu_char altframe; /* enable alternate frame 0x40a8 */ + u_char f10[0x40ac-0x40a8-1]; + vu_char curon; /* cursor control register 0x40ac */ + u_char f11[0x40ea-0x40ac-1]; + vu_char prr; /* pixel replacement rule 0x40ea */ + u_char f12[0x40ef-0x40ea-1]; + vu_char wmrr; /* move replacement rule 0x40ef */ + u_char f13[0x40f2-0x40ef-1]; + vu_short source_x; /* source x pixel # 0x40f2 */ + u_char f14[0x40f6-0x40f2-2]; + vu_short source_y; /* source y pixel # 0x40f6 */ + u_char f15[0x40fa-0x40f6-2]; + vu_short dest_x; /* dest x pixel # 0x40fa */ + u_char f16[0x40fe -0x40fa-2]; + vu_short dest_y; /* dest y pixel # 0x40fe */ + u_char f17[0x4102-0x40fe -2]; + vu_short wwidth; /* block mover pixel width 0x4102 */ + u_char f18[0x4106-0x4102-2]; + vu_short wheight; /* block mover pixel height 0x4106 */ + /* Catseye */ + u_char f19[0x4206-0x4106-2]; + vu_short rug_cmdstat; /* RUG Command/Staus 0x4206 */ + u_char f20[0x4510-0x4206-2]; + vu_short vb_select; /* Vector/BitBlt Select 0x4510 */ + vu_short tcntrl; /* Three Operand Control 0x4512 */ + vu_short acntrl; /* BitBlt Mode 0x4514 */ + vu_short pncntrl; /* Plane Control 0x4516 */ + u_char f21[0x4800-0x4516-2]; + vu_short catseye_status; /* Catseye Status 0x4800 */ + /* End of Catseye */ + u_char f22[0x6002-0x4800-2]; + vu_short cmap_busy; /* Color Ram busy 0x6002 */ + u_char f23[0x60b2-0x6002-2]; + vu_short rdata; /* color map red data 0x60b2 */ + vu_short gdata; /* color map green data 0x60b4 */ + vu_short bdata; /* color map blue data 0x60b6 */ + vu_short cindex; /* color map index 0x60b8 */ + vu_short plane_mask; /* plane mask select 0x60ba */ + u_char f24[0x60f0-0x60ba-2]; + vu_short strobe; /* color map trigger 0x60f0 */ +}; diff --git a/sys/arch/hp300/stand/include/grfreg.h b/sys/arch/hp300/stand/include/grfreg.h new file mode 100644 index 00000000000..d3dfe490a19 --- /dev/null +++ b/sys/arch/hp300/stand/include/grfreg.h @@ -0,0 +1,89 @@ +/* $OpenBSD: grfreg.h,v 1.1 2005/01/19 17:09:32 miod Exp $ */ +/* $NetBSD: grfreg.h,v 1.2 1994/10/26 07:24:09 cgd Exp $ */ + +/* + * Copyright (c) 1991 University of Utah. + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * the Systems Programming Group of the University of Utah Computer + * Science Department. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * from: Utah $Hdr: grfreg.h 1.6 92/01/31$ + * + * @(#)grfreg.h 8.1 (Berkeley) 6/10/93 + */ + +/* 300 bitmapped display hardware primary id */ +#define GRFHWID 0x39 + +/* 300 internal bitmapped display address */ +#define GRFIADDR 0x560000 + +/* 300 hardware secondary ids */ +#define GID_GATORBOX 1 +#define GID_TOPCAT 2 +#define GID_RENAISSANCE 4 +#define GID_LRCATSEYE 5 +#define GID_HRCCATSEYE 6 +#define GID_HRMCATSEYE 7 +#define GID_DAVINCI 8 +#define GID_XXXCATSEYE 9 +#define GID_XGENESIS 11 +#define GID_TIGER 12 +#define GID_YGENESIS 13 +#define GID_HYPERION 14 + +typedef unsigned char grftype; + +struct grfreg { + grftype gr_pad0, + gr_id, /* +0x01 */ + gr_pad1[0x3], + gr_fbwidth_h, /* +0x05 */ + gr_pad2, + gr_fbwidth_l, /* +0x07 */ + gr_pad3, + gr_fbheight_h, /* +0x09 */ + gr_pad4, + gr_fbheight_l, /* +0x0B */ + gr_pad5, + gr_dwidth_h, /* +0x0D */ + gr_pad6, + gr_dwidth_l, /* +0x0F */ + gr_pad7, + gr_dheight_h, /* +0x11 */ + gr_pad8, + gr_dheight_l, /* +0x13 */ + gr_pad9, + gr_id2, /* +0x15 */ + gr_pad10[0x47], + gr_fbomsb, /* +0x5d */ + gr_pad11, + gr_fbolsb; /* +0x5f */ +}; diff --git a/sys/arch/hp300/stand/include/hilreg.h b/sys/arch/hp300/stand/include/hilreg.h new file mode 100644 index 00000000000..b4689fe6fa4 --- /dev/null +++ b/sys/arch/hp300/stand/include/hilreg.h @@ -0,0 +1,175 @@ +/* $OpenBSD: hilreg.h,v 1.1 2005/01/19 17:09:32 miod Exp $ */ +/* $NetBSD: hilreg.h,v 1.6 1997/02/02 09:39:21 thorpej Exp $ */ + +/* + * Copyright (c) 1988 University of Utah. + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * the Systems Programming Group of the University of Utah Computer + * Science Department. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * from: Utah $Hdr: hilreg.h 1.10 92/01/21$ + * + * @(#)hilreg.h 8.1 (Berkeley) 6/10/93 + */ + +#include <hp300/dev/iotypes.h> /* XXX */ + +#ifdef hp300 +struct hil_dev { + char hil_pad0; + vu_char hil_data; + char hil_pad1; + vu_char hil_cmd; +}; + +#define HILADDR ((struct hil_dev *)IIOV(0x428000)) +#endif + +#ifdef hp800 +#ifdef hp700 +struct hil_dev { + vu_char hil_rsthold; /* (WO) reset hold (and Serial #3) */ + vu_char hil_resv1[2047]; + vu_char hil_data; /* send/receive data to/from 8042 */ + vu_char hil_cmd; /* status/control to/from 8042 */ + vu_char hil_resv2[1022]; + vu_char hil_rstrel; /* (WO) reset release (and Serial #3) */ + +}; +#else +struct hil_dev { + vu_int hil_data; + vu_int hil_pad; + vu_int hil_cmd; +}; +#endif +#endif +#define hil_stat hil_cmd + +#if defined(hp300) || defined(hp700) +#define READHILDATA(x) ((x)->hil_data) +#define READHILSTAT(x) ((x)->hil_stat) +#define READHILCMD(x) ((x)->hil_cmd) +#define WRITEHILDATA(x, y) ((x)->hil_data = (y)) +#define WRITEHILSTAT(x, y) ((x)->hil_stat = (y)) +#define WRITEHILCMD(x, y) ((x)->hil_cmd = (y)) +#else +#define READHILDATA(x) ((x)->hil_data >> 24) +#define READHILSTAT(x) ((x)->hil_stat >> 24) +#define READHILCMD(x) ((x)->hil_cmd >> 24) +#define WRITEHILDATA(x, y) ((x)->hil_data = ((y) << 24)) +#define WRITEHILSTAT(x, y) ((x)->hil_stat = ((y) << 24)) +#define WRITEHILCMD(x, y) ((x)->hil_cmd = ((y) << 24)) +#endif + +#define HIL_BUSY 0x02 +#define HIL_DATA_RDY 0x01 + +#define HILWAIT(hil_dev) while ((READHILSTAT(hil_dev) & HIL_BUSY)) +#define HILDATAWAIT(hil_dev) while (!(READHILSTAT(hil_dev) & HIL_DATA_RDY)) + +/* HIL status bits */ +#define HIL_POLLDATA 0x10 /* HIL poll data follows */ +#define HIL_COMMAND 0x08 /* Start of original command */ +#define HIL_ERROR 0x080 /* HIL error */ +#define HIL_RECONFIG 0x080 /* HIL has reconfigured */ +#define HIL_STATMASK (HIL_DATA | HIL_COMMAND) + +#define HIL_SSHIFT 4 /* Bits to shift status over */ +#define HIL_SMASK 0xF /* Service request status mask */ +#define HIL_DEVMASK 0x07 + +/* HIL status types */ +#define HIL_STATUS 0x5 /* HIL status in data register */ +#define HIL_DATA 0x6 /* HIL data in data register */ +#define HIL_CTRLSHIFT 0x8 /* key + CTRL + SHIFT */ +#define HIL_CTRL 0x9 /* key + CTRL */ +#define HIL_SHIFT 0xA /* key + SHIFT */ +#define HIL_KEY 0xB /* key only */ +#define HIL_68K 0x4 /* Data from the 68k is ready */ + +/* HIL commands */ +#define HIL_SETARD 0xA0 /* set auto-repeat delay */ +#define HIL_SETARR 0xA2 /* set auto-repeat rate */ +#define HIL_SETTONE 0xA3 /* set tone generator */ +#define HIL_CNMT 0xB2 /* clear nmi */ +#define HIL_INTON 0x5C /* Turn on interrupts. */ +#define HIL_INTOFF 0x5D /* Turn off interrupts. */ +#define HIL_TRIGGER 0xC5 /* trigger command */ +#define HIL_STARTCMD 0xE0 /* start loop command */ +#define HIL_TIMEOUT 0xFE /* timeout */ +#define HIL_READTIME 0x13 /* Read real time register */ + +/* Read/write various registers on the 8042. */ +#define HIL_READBUSY 0x02 /* internal "busy" register */ +#define HIL_READKBDLANG 0x12 /* read keyboard language code */ +#define HIL_READKBDSADR 0xF9 +#define HIL_WRITEKBDSADR 0xE9 +#define HIL_READLPSTAT 0xFA +#define HIL_WRITELPSTAT 0xEA +#define HIL_READLPCTRL 0xFB +#define HIL_WRITELPCTRL 0xEB + +/* BUSY bits */ +#define BSY_LOOPBUSY 0x04 + +/* LPCTRL bits */ +#define LPC_AUTOPOLL 0x01 /* enable auto-polling */ +#define LPC_NOERROR 0x02 /* don't report errors */ +#define LPC_NORECONF 0x04 /* don't report reconfigure */ +#define LPC_KBDCOOK 0x10 /* cook all keyboards */ +#define LPC_RECONF 0x80 /* reconfigure the loop */ + +/* LPSTAT bits */ +#define LPS_DEVMASK 0x07 /* number of loop devices */ +#define LPS_CONFGOOD 0x08 /* reconfiguration worked */ +#define LPS_CONFFAIL 0x80 /* reconfiguration failed */ + +/* HIL packet headers */ +#define HIL_MOUSEDATA 0x2 +#define HIL_KBDDATA 0x40 + +#define HIL_MOUSEMOTION 0x02 /* mouse movement event */ +#define HIL_KBDBUTTON 0x40 /* keyboard button event */ +#define HIL_MOUSEBUTTON 0x40 /* mouse button event */ +#define HIL_BUTTONBOX 0x60 /* button box event */ +#define HIL_TABLET 0x02 /* tablet motion event */ +#define HIL_KNOBBOX 0x03 /* knob box motion data */ + +/* For setting auto repeat on the keyboard */ +#define ar_format(x) ~((x - 10) / 10) +#define KBD_ARD 400 /* initial delay in msec (10 - 2560) */ +#define KBD_ARR 60 /* rate (10 - 2550 msec, 2551 == off) */ + +#ifdef hp300 +/* Magic */ +#define KBDNMISTAT ((volatile char *)IIOV(0x478005)) +#define KBDNMI 0x04 +#endif diff --git a/sys/arch/hp300/stand/include/hilvar.h b/sys/arch/hp300/stand/include/hilvar.h new file mode 100644 index 00000000000..56d6f9df31c --- /dev/null +++ b/sys/arch/hp300/stand/include/hilvar.h @@ -0,0 +1,141 @@ +/* $OpenBSD: hilvar.h,v 1.1 2005/01/19 17:09:32 miod Exp $ */ +/* $NetBSD: hilvar.h,v 1.14 1997/04/01 19:29:10 scottr Exp $ */ + +/* + * Copyright (c) 1988 University of Utah. + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * the Systems Programming Group of the University of Utah Computer + * Science Department. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * from: Utah $Hdr: hilvar.h 1.3 92/01/21$ + * + * @(#)hilvar.h 8.1 (Berkeley) 6/10/93 + */ + +#ifndef TRUE +#define TRUE 1 +#define FALSE 0 +#endif + +#define NHILD 8 /* 7 actual + loop pseudo (dev 0) */ +#define NHILQ 8 /* must be <= sizeof(int) */ + +#define HILBUFSIZE 40 /* size of interrupt poll buffer */ +#define HILMAXCLIST 1024 /* max chars in clists for HPUX io */ + +#define HILLOOPDEV 0 /* loop device index */ + +/* + * Minor device numbers. + * HP-UX uses 12 bits of the form: + * LLLLDDDD0000 + * where L is 4 bits of loop number, D 4 bits of device and 4 bits of 0. + * BSD uses 8 bits: + * LLLLDDDD + * Device files are in BSD format, we map device numbers to HP-UX format + * on stat calls. + */ +#define HILUNIT(d) ((d) & 0xF) +#define HILLOOP(d) (((d)>>4) & 0xF) + +#define hildevmask(d) (1 << (d)) +#define hilqmask(q) (1 << (q)) + +struct hiliqueue { + HILQ *hq_eventqueue; /* input queue shared with user */ + struct proc *hq_procp; /* process this queue belongs to */ + char hq_devmask; /* devices mapped to this queue */ +}; + +struct hilloopdev { + int hd_flags; /* device state */ + int hd_qmask; /* queues this device is mapped to */ + struct clist hd_queue; /* event queue for HPUX-style input */ + struct selinfo hd_selr; /* process read selecting */ + uid_t hd_uid; /* uid of mapping process */ +}; + +/* hd_flags */ +#define HIL_ALIVE 0x01 /* device is present */ +#define HIL_PSEUDO 0x02 /* device is virtual */ +#define HIL_READIN 0x04 /* device using read() input interface */ +#define HIL_QUEUEIN 0x08 /* device using shared Q input interface */ +#define HIL_OPENED 0x10 /* flag for first open */ +#define HIL_NOBLOCK 0x20 /* device is in non-blocking read mode */ +#define HIL_ASLEEP 0x40 /* process awaiting input on device */ +#define HIL_DERROR 0x80 /* loop has reconfigured, reality altered */ + +struct hil_softc { + struct hil_dev *hl_addr; /* base of hardware registers */ + u_char hl_cmddone; /* */ + u_char hl_cmdending; /* */ + u_char hl_actdev; /* current input device */ + u_char hl_cmddev; /* device to perform command on */ + u_char hl_pollbuf[HILBUFSIZE]; /* interrupt time input buffer */ + u_char hl_cmdbuf[HILBUFSIZE]; /* */ + u_char *hl_pollbp; /* pointer into hl_pollbuf */ + u_char *hl_cmdbp; /* pointer into hl_cmdbuf */ + struct hiliqueue hl_queue[NHILQ]; /* input queues */ + struct hilloopdev hl_device[NHILD]; /* device data */ + u_char hl_maxdev; /* number of devices on loop */ + u_char hl_kbddev; /* keyboard device on loop */ + u_char hl_kbdlang; /* keyboard language */ + u_char hl_kbdflags; /* keyboard state */ +}; + +/* hl_kbdflags */ +#define KBD_RAW 0x01 /* keyboard is raw */ +#define KBD_AR1 0x02 /* keyboard auto-repeat rate 1 */ +#define KBD_AR2 0x04 /* keyboard auto-repeat rate 2 */ + +#ifdef _KERNEL +void kbdbell(int); +void kbdenable(int); +void kbddisable(int); +int kbdgetc(int *); +void kbdcninit(void); + +int kbdnmi(void); + +void hilsoftinit(int, struct hil_dev *); +void hilinit(int, struct hil_dev *); + +void send_hil_cmd(struct hil_dev *, u_char, + u_char *, u_char, u_char *); +void send_hildev_cmd(struct hil_softc *, char, char); + +void polloff(struct hil_dev *); +void pollon(struct hil_dev *); + +#ifdef COMPAT_HPUX +int hpuxhilioctl(dev_t, int, caddr_t, int); +int hildevno(dev_t); +#endif /* COMPAT_HPUX */ +#endif /* _KERNEL */ diff --git a/sys/arch/hp300/stand/include/itereg.h b/sys/arch/hp300/stand/include/itereg.h new file mode 100644 index 00000000000..79a3fee4f5a --- /dev/null +++ b/sys/arch/hp300/stand/include/itereg.h @@ -0,0 +1,56 @@ +/* $OpenBSD: itereg.h,v 1.1 2005/01/19 17:09:32 miod Exp $ */ +/* $NetBSD: itereg.h,v 1.5 1994/10/26 07:24:39 cgd Exp $ */ + +/* + * Copyright (c) 1988 University of Utah. + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * the Systems Programming Group of the University of Utah Computer + * Science Department. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * from: Utah $Hdr: itereg.h 1.3 92/01/21$ + * + * @(#)itereg.h 8.1 (Berkeley) 6/10/93 + */ + +/* + * Offsets into the display ROM that is part of the first 4K of each + * display device. + */ +#define FONTROM 0x3B /* Offset of font information structure. */ +#define FONTADDR 0x4 /* Offset from FONTROM to font address. */ +#define FONTHEIGHT 0x0 /* Offset from font address to font height. */ +#define FONTWIDTH 0x2 /* Offset from font address to font width. */ +#define FONTDATA 0xA /* Offset from font address to font glyphs. */ + +#ifdef hp300 +#define FBBASE ((volatile u_char *)ip->fbbase) +#else +#define FBBASE ((volatile u_long *)ip->fbbase) +#endif diff --git a/sys/arch/hp300/stand/include/kbdmap.h b/sys/arch/hp300/stand/include/kbdmap.h new file mode 100644 index 00000000000..c48c2c6422e --- /dev/null +++ b/sys/arch/hp300/stand/include/kbdmap.h @@ -0,0 +1,70 @@ +/* $OpenBSD: kbdmap.h,v 1.1 2005/01/19 17:09:32 miod Exp $ */ +/* $NetBSD: kbdmap.h,v 1.7 1996/10/05 05:22:11 thorpej Exp $ */ + +/* + * Copyright (c) 1982, 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)kbdmap.h 8.1 (Berkeley) 6/10/93 + */ + +#define ESC '\033' +#define DEL '\177' + +struct kbdmap { + int kbd_code; + char *kbd_desc; + char *kbd_keymap; + char *kbd_shiftmap; + char *kbd_ctrlmap; + char *kbd_ctrlshiftmap; + char **kbd_stringmap; +}; + +/* kbd_code */ +#define KBD_SPECIAL 0x00 /* user defined */ +#define KBD_US 0x1F /* US ASCII */ +#define KBD_UK 0x17 /* United Kingdom */ +#define KBD_SE 0x0e /* Swedish */ + +#define KBD_DEFAULT KBD_US /* default type */ + +#ifdef _KERNEL +/* XXX: ITE interface */ +extern char *kbd_keymap; +extern char *kbd_shiftmap; +extern char *kbd_ctrlmap; +extern char *kbd_ctrlshiftmap; +extern char **kbd_stringmap; + +/* XXX: itecngetc() interface */ +extern char *kbd_cn_keymap; +extern char *kbd_cn_shiftmap; +extern char *kbd_cn_ctrlmap; + +extern struct kbdmap kbd_map[]; +#endif diff --git a/sys/arch/hp300/stand/uboot/clock.c b/sys/arch/hp300/stand/uboot/clock.c index 29b6315197e..bf200611bf4 100644 --- a/sys/arch/hp300/stand/uboot/clock.c +++ b/sys/arch/hp300/stand/uboot/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.3 2003/06/02 23:27:46 millert Exp $ */ +/* $OpenBSD: clock.c,v 1.4 2005/01/19 17:09:34 miod Exp $ */ /* $NetBSD: clock.c,v 1.3 1995/02/20 00:12:09 mycroft Exp $ */ /* @@ -42,8 +42,7 @@ #include <sys/param.h> #include "samachdep.h" - -#include <hp300/dev/hilreg.h> +#include "hilreg.h" #include <hp300/hp300/clockreg.h> static int month_days[12] = { @@ -53,7 +52,7 @@ static int month_days[12] = { u_char bbc_registers[13]; void read_bbc(); u_char read_bbc_reg(); -struct hil_dev *bbcaddr = BBCADDR; +struct hil_dev *bbcaddr = (struct hil_dev *)BBCADDR; u_long getsecs() |