diff --git a/sys/arch/hpcmips/conf/files.hpcmips b/sys/arch/hpcmips/conf/files.hpcmips index 31cb911297bd..d062d4eb88f6 100644 --- a/sys/arch/hpcmips/conf/files.hpcmips +++ b/sys/arch/hpcmips/conf/files.hpcmips @@ -1,4 +1,4 @@ -# $NetBSD: files.hpcmips,v 1.50 2001/02/21 16:34:00 uch Exp $ +# $NetBSD: files.hpcmips,v 1.51 2001/02/22 18:37:57 uch Exp $ # maxpartitions must be first item in files.${ARCH}. maxpartitions 8 @@ -56,46 +56,19 @@ file arch/hpcmips/hpcmips/procfs_machdep.c procfs # H/PC Platform common files. # include "arch/hpc/conf/files.hpc" -include "dev/hpc/files.bicons" file arch/hpc/hpc/disksubr.c disk +include "dev/hpc/files.bicons" +include "dev/hpc/files.hpcfb" +include "dev/hpc/files.hpckbd" +include "dev/hpc/files.hpctp" # Console autoconfiguration code: selects between a framebuffers file dev/cons.c -# Raster operations -include "dev/rasops/files.rasops" -include "dev/wsfont/files.wsfont" - # # Workstation Console # include "dev/wscons/files.wscons" -file dev/pckbc/wskbdmap_mfii.c btnmgr | hpckbd -file arch/hpcmips/dev/pckbd_encode.c btnmgr | hpckbd -defopt PCKBD_LAYOUT - -# Simple framebuffer interface for wsdisplay -define hpcfbif {} -device hpcfb: wsemuldisplaydev, rasops1, rasops2, rasops4, rasops8, rasops15, rasops16 -attach hpcfb at hpcfbif -file arch/hpcmips/dev/hpcfb.c hpcfb needs-flag - -# Simple keyboard interface for wskbd -device hpckbdif {} -device hpckbd: wskbddev -attach hpckbd at hpckbdif -file arch/hpcmips/dev/hpckbd.c hpckbd - -device bivideo: hpcfbif -file arch/hpcmips/dev/bivideo.c bivideo needs-flag -file arch/hpcmips/dev/hpccmap.c bivideo -attach bivideo at mainbus - -device btnmgr: wskbddev -attach btnmgr at mainbus -file arch/hpcmips/dev/btnmgr.c btnmgr - -file arch/hpcmips/dev/video_subr.c tx3912video | plumvideo # # power management @@ -169,10 +142,6 @@ device vrled attach vrled at vrip file arch/hpcmips/vr/vrled.c vrled needs-flag -define tpcalib -file arch/hpcmips/dev/tpcalib.c tpcalib -file arch/hpcmips/dev/mra.c tpcalib - device vrpiu: wsmousedev attach vrpiu at vrip: tpcalib file arch/hpcmips/vr/vrpiu.c vrpiu @@ -341,6 +310,8 @@ file arch/hpcmips/dev/plumohci.c plumohci needs-flag #attach txisab at txcsbus #file arch/hpcmips/isa/txisa_machdep.c txisab +file dev/hpc/video_subr.c tx3912video | plumvideo + # # Real-time clock (not optional) # diff --git a/sys/arch/hpcmips/dev/hpckbdvar.h b/sys/arch/hpcmips/dev/hpckbdvar.h deleted file mode 100644 index f1d6ad83f45e..000000000000 --- a/sys/arch/hpcmips/dev/hpckbdvar.h +++ /dev/null @@ -1,63 +0,0 @@ -/* $NetBSD: hpckbdvar.h,v 1.1 2000/09/21 14:17:29 takemura Exp $ */ - -/* - * Copyright (c) 1999, by UCHIYAMA Yasushi - * 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. The name of the developer may NOT be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - * - */ - -/* - * chip interface - */ -struct hpckbd_if; -struct hpckbd_ic_if { - void *hii_ctx; - int (*hii_establish) __P((void*, struct hpckbd_if *)); - int (*hii_poll) __P((void*)); -}; - -#define hpckbd_ic_establish(ic, kbdif) \ - (*(ic)->hii_establish)((ic)->hii_ctx, (kbdif)) -#define hpckbd_ic_poll(ic) \ - (*(ic)->hii_poll)((ic)->hii_ctx) - -/* - * hpckbd interface - */ -struct hpckbd_if { - void *hi_ctx; - void (*hi_input_hook) __P((void*)); - int (*hi_input) __P((void*, int, int)); -}; - -#define hpckbd_input_hook(i) \ - (*(i)->hi_input_hook)((i)->hi_ctx) -#define hpckbd_input(i, f, a) \ - (*(i)->hi_input)((i)->hi_ctx, (f), (a)) - -struct hpckbd_attach_args { - struct hpckbd_ic_if *haa_ic; -}; - -int hpckbd_print __P((void*, const char*)); -int hpckbd_cnattach __P((struct hpckbd_ic_if*)); diff --git a/sys/arch/hpcmips/dev/ite8181.c b/sys/arch/hpcmips/dev/ite8181.c index b2d5a16df105..c73d5cee3e65 100644 --- a/sys/arch/hpcmips/dev/ite8181.c +++ b/sys/arch/hpcmips/dev/ite8181.c @@ -1,4 +1,4 @@ -/* $NetBSD: ite8181.c,v 1.6 2001/02/15 09:17:18 sato Exp $ */ +/* $NetBSD: ite8181.c,v 1.7 2001/02/22 18:38:00 uch Exp $ */ /*- * Copyright (c) 2000 SATO Kazumi @@ -49,10 +49,9 @@ #include #include "bivideo.h" #if NBIVIDEO > 0 -#include +#include #endif -#include - +#include #define ITE8181DEBUG #ifdef ITE8181DEBUG diff --git a/sys/arch/hpcmips/dev/ite8181var.h b/sys/arch/hpcmips/dev/ite8181var.h index 070e2bc2811e..0fa5f262482d 100644 --- a/sys/arch/hpcmips/dev/ite8181var.h +++ b/sys/arch/hpcmips/dev/ite8181var.h @@ -1,4 +1,4 @@ -/* $NetBSD: ite8181var.h,v 1.1 2000/10/02 03:57:54 sato Exp $ */ +/* $NetBSD: ite8181var.h,v 1.2 2001/02/22 18:38:00 uch Exp $ */ /*- * Copyright (c) 2000 SATO Kazumi @@ -33,8 +33,8 @@ #include #include -#include -#include +#include +#include struct ite8181_softc { struct device sc_dev; diff --git a/sys/arch/hpcmips/dev/m38813c.c b/sys/arch/hpcmips/dev/m38813c.c index 4ce9c92cacea..24271005f482 100644 --- a/sys/arch/hpcmips/dev/m38813c.c +++ b/sys/arch/hpcmips/dev/m38813c.c @@ -1,29 +1,39 @@ -/* $NetBSD: m38813c.c,v 1.3 2000/09/21 14:17:29 takemura Exp $ */ +/* $NetBSD: m38813c.c,v 1.4 2001/02/22 18:38:00 uch Exp $ */ -/* - * Copyright (c) 1999, 2000, by UCHIYAMA Yasushi +/*- + * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc. * All rights reserved. * + * This code is derived from software contributed to The NetBSD Foundation + * by UCHIYAMA Yasushi. + * * 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. The name of the developer may NOT be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ /* @@ -40,11 +50,11 @@ #include #include +#include + #include #include - #include -#include struct m38813c_chip { bus_space_tag_t scc_cst; diff --git a/sys/arch/hpcmips/dev/mq200.c b/sys/arch/hpcmips/dev/mq200.c index 5fe231c00bc1..c1f04b06cbc0 100644 --- a/sys/arch/hpcmips/dev/mq200.c +++ b/sys/arch/hpcmips/dev/mq200.c @@ -1,4 +1,4 @@ -/* $NetBSD: mq200.c,v 1.8 2001/02/15 09:17:18 sato Exp $ */ +/* $NetBSD: mq200.c,v 1.9 2001/02/22 18:38:00 uch Exp $ */ /*- * Copyright (c) 2000 Takemura Shin @@ -50,7 +50,7 @@ #include #include "bivideo.h" #if NBIVIDEO > 0 -#include +#include #endif #define MQ200DEBUG diff --git a/sys/arch/hpcmips/dev/mq200var.h b/sys/arch/hpcmips/dev/mq200var.h index 18c2e4d52c18..28e92975fe91 100644 --- a/sys/arch/hpcmips/dev/mq200var.h +++ b/sys/arch/hpcmips/dev/mq200var.h @@ -1,4 +1,4 @@ -/* $NetBSD: mq200var.h,v 1.1 2000/07/22 08:53:37 takemura Exp $ */ +/* $NetBSD: mq200var.h,v 1.2 2001/02/22 18:38:00 uch Exp $ */ /*- * Copyright (c) 2000 Takemura Shin @@ -35,8 +35,8 @@ #include #include -#include -#include +#include +#include struct mq200_softc { struct device sc_dev; diff --git a/sys/arch/hpcmips/dev/plumvideo.c b/sys/arch/hpcmips/dev/plumvideo.c index 249845e48511..0e3e2ddb9044 100644 --- a/sys/arch/hpcmips/dev/plumvideo.c +++ b/sys/arch/hpcmips/dev/plumvideo.c @@ -1,4 +1,4 @@ -/* $NetBSD: plumvideo.c,v 1.16 2000/12/03 13:43:40 takemura Exp $ */ +/* $NetBSD: plumvideo.c,v 1.17 2001/02/22 18:38:01 uch Exp $ */ /*- * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. @@ -64,11 +64,11 @@ #include #include -#include +#include #include -#include -#include +#include +#include #ifdef PLUMVIDEODEBUG int plumvideo_debug = 1; diff --git a/sys/arch/hpcmips/dev/tc5165buf.c b/sys/arch/hpcmips/dev/tc5165buf.c index f3b669262caa..d249b74d3b01 100644 --- a/sys/arch/hpcmips/dev/tc5165buf.c +++ b/sys/arch/hpcmips/dev/tc5165buf.c @@ -1,29 +1,39 @@ -/* $NetBSD: tc5165buf.c,v 1.6 2000/09/21 14:17:29 takemura Exp $ */ +/* $NetBSD: tc5165buf.c,v 1.7 2001/02/22 18:38:01 uch Exp $ */ -/* - * Copyright (c) 1999, 2000, by UCHIYAMA Yasushi +/*- + * Copyright (c) 1999-2001 The NetBSD Foundation, Inc. * All rights reserved. * + * This code is derived from software contributed to The NetBSD Foundation + * by UCHIYAMA Yasushi. + * * 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. The name of the developer may NOT be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ /* @@ -42,11 +52,11 @@ #include #include +#include + #include #include - #include -#include #define TC5165_ROW_MAX 16 #define TC5165_COLUMN_MAX 8 diff --git a/sys/arch/hpcmips/dev/ucbtp.c b/sys/arch/hpcmips/dev/ucbtp.c index 113496b8c1e4..33aae2f37538 100644 --- a/sys/arch/hpcmips/dev/ucbtp.c +++ b/sys/arch/hpcmips/dev/ucbtp.c @@ -1,7 +1,11 @@ -/* $NetBSD: ucbtp.c,v 1.4 2000/05/22 17:17:45 uch Exp $ */ +/* $NetBSD: ucbtp.c,v 1.5 2001/02/22 18:38:02 uch Exp $ */ /*- - * Copyright (c) 2000 UCHIYAMA Yasushi. All rights reserved. + * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by UCHIYAMA Yasushi. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -11,19 +15,25 @@ * 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. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation 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 AUTHOR ``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 AUTHOR 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. + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ /* @@ -46,7 +56,7 @@ #include #include -#include +#include #include #include @@ -57,7 +67,7 @@ #include #include -#include /* debug */ +#include /* debug */ #ifdef UCBTPDEBUG int ucbtp_debug = 0; diff --git a/sys/arch/hpcmips/tx/tx3912video.c b/sys/arch/hpcmips/tx/tx3912video.c index 8bee51e8148d..400e2c27d884 100644 --- a/sys/arch/hpcmips/tx/tx3912video.c +++ b/sys/arch/hpcmips/tx/tx3912video.c @@ -1,4 +1,4 @@ -/* $NetBSD: tx3912video.c,v 1.21 2000/12/03 13:43:40 takemura Exp $ */ +/* $NetBSD: tx3912video.c,v 1.22 2001/02/22 18:38:04 uch Exp $ */ /*- * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. @@ -64,11 +64,11 @@ /* CLUT */ #include #include -#include +#include #include -#include -#include +#include +#include #ifdef TX3912VIDEO_DEBUG int tx3912video_debug = 1; diff --git a/sys/arch/hpcmips/vr/ite8181_vrip.c b/sys/arch/hpcmips/vr/ite8181_vrip.c index 9454edab2f5b..638ee8d827be 100644 --- a/sys/arch/hpcmips/vr/ite8181_vrip.c +++ b/sys/arch/hpcmips/vr/ite8181_vrip.c @@ -1,4 +1,4 @@ -/* $NetBSD: ite8181_vrip.c,v 1.1 2000/10/02 04:14:59 sato Exp $ */ +/* $NetBSD: ite8181_vrip.c,v 1.2 2001/02/22 18:38:04 uch Exp $ */ /*- * Copyright (c) 2000 SATO Kazumi @@ -41,7 +41,7 @@ #include #include "bivideo.h" #if NBIVIDEO > 0 -#include +#include #endif #include "locators.h" diff --git a/sys/arch/hpcmips/vr/mq200_vrip.c b/sys/arch/hpcmips/vr/mq200_vrip.c index cfebc3d84cc6..e8a414311436 100644 --- a/sys/arch/hpcmips/vr/mq200_vrip.c +++ b/sys/arch/hpcmips/vr/mq200_vrip.c @@ -1,4 +1,4 @@ -/* $NetBSD: mq200_vrip.c,v 1.2 2000/10/02 04:15:51 sato Exp $ */ +/* $NetBSD: mq200_vrip.c,v 1.3 2001/02/22 18:38:04 uch Exp $ */ /*- * Copyright (c) 2000 Takemura Shin @@ -41,7 +41,7 @@ #include #include "bivideo.h" #if NBIVIDEO > 0 -#include +#include #endif diff --git a/sys/arch/hpcmips/vr/vr.c b/sys/arch/hpcmips/vr/vr.c index 3ac5c34c1939..39b535da209c 100644 --- a/sys/arch/hpcmips/vr/vr.c +++ b/sys/arch/hpcmips/vr/vr.c @@ -1,4 +1,4 @@ -/* $NetBSD: vr.c,v 1.19 2000/07/22 06:02:46 takemura Exp $ */ +/* $NetBSD: vr.c,v 1.20 2001/02/22 18:38:04 uch Exp $ */ /*- * Copyright (c) 1999 @@ -95,7 +95,7 @@ #endif #if NHPCFB > 0 -#include +#include #endif #if NVRKIU > 0 diff --git a/sys/arch/hpcmips/vr/vrkiu.c b/sys/arch/hpcmips/vr/vrkiu.c index 7fc0266d3126..42ececbedf17 100644 --- a/sys/arch/hpcmips/vr/vrkiu.c +++ b/sys/arch/hpcmips/vr/vrkiu.c @@ -1,4 +1,4 @@ -/* $NetBSD: vrkiu.c,v 1.25 2000/09/21 14:17:35 takemura Exp $ */ +/* $NetBSD: vrkiu.c,v 1.26 2001/02/22 18:38:05 uch Exp $ */ /*- * Copyright (c) 1999 SASAKI Takesi All rights reserved. @@ -54,7 +54,7 @@ #include #include #include -#include +#include #include "opt_wsdisplay_compat.h" #include "opt_pckbd_layout.h" @@ -64,7 +64,7 @@ #include #include #ifdef WSDISPLAY_COMPAT_RAWKBD -#include +#include #endif #define VRKIUDEBUG diff --git a/sys/arch/hpcmips/vr/vrpiu.c b/sys/arch/hpcmips/vr/vrpiu.c index a1066c2713d2..d7ead48eaf44 100644 --- a/sys/arch/hpcmips/vr/vrpiu.c +++ b/sys/arch/hpcmips/vr/vrpiu.c @@ -1,4 +1,4 @@ -/* $NetBSD: vrpiu.c,v 1.10 2001/01/21 05:00:28 takemura Exp $ */ +/* $NetBSD: vrpiu.c,v 1.11 2001/02/22 18:38:05 uch Exp $ */ /* * Copyright (c) 1999 Shin Takemura All rights reserved. @@ -47,9 +47,9 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/sys/arch/hpcmips/dev/bivideo.c b/sys/dev/hpc/bivideo.c similarity index 97% rename from sys/arch/hpcmips/dev/bivideo.c rename to sys/dev/hpc/bivideo.c index 2d410c5ae934..9270d92326f0 100644 --- a/sys/arch/hpcmips/dev/bivideo.c +++ b/sys/dev/hpc/bivideo.c @@ -1,4 +1,4 @@ -/* $NetBSD: bivideo.c,v 1.17 2001/02/15 09:17:18 sato Exp $ */ +/* $NetBSD: bivideo.c,v 1.1 2001/02/22 18:37:54 uch Exp $ */ /*- * Copyright (c) 1999 @@ -37,7 +37,7 @@ static const char _copyright[] __attribute__ ((unused)) = "Copyright (c) 1999 Shin Takemura. All rights reserved."; static const char _rcsid[] __attribute__ ((unused)) = - "$Id: bivideo.c,v 1.17 2001/02/15 09:17:18 sato Exp $"; + "$Id: bivideo.c,v 1.1 2001/02/22 18:37:54 uch Exp $"; #include #include @@ -63,10 +63,10 @@ static const char _rcsid[] __attribute__ ((unused)) = #include -#include -#include -#include -#include +#include +#include +#include +#include #define VPRINTF(arg) do { if (bootverbose) printf arg; } while(0); diff --git a/sys/arch/hpcmips/dev/bivideovar.h b/sys/dev/hpc/bivideovar.h similarity index 95% rename from sys/arch/hpcmips/dev/bivideovar.h rename to sys/dev/hpc/bivideovar.h index d431dea6e499..609ada62ad87 100644 --- a/sys/arch/hpcmips/dev/bivideovar.h +++ b/sys/dev/hpc/bivideovar.h @@ -1,4 +1,4 @@ -/* $NetBSD: bivideovar.h,v 1.2 2000/07/22 08:53:35 takemura Exp $ */ +/* $NetBSD: bivideovar.h,v 1.1 2001/02/22 18:37:54 uch Exp $ */ /* * Copyright (c) 2000 Takemura Shin diff --git a/sys/arch/hpcmips/dev/btnmgr.c b/sys/dev/hpc/btnmgr.c similarity index 98% rename from sys/arch/hpcmips/dev/btnmgr.c rename to sys/dev/hpc/btnmgr.c index 1d5c18c91acb..ec4147a44a4f 100644 --- a/sys/arch/hpcmips/dev/btnmgr.c +++ b/sys/dev/hpc/btnmgr.c @@ -1,4 +1,4 @@ -/* $NetBSD: btnmgr.c,v 1.11 2001/01/26 03:44:33 sato Exp $ */ +/* $NetBSD: btnmgr.c,v 1.1 2001/02/22 18:37:54 uch Exp $ */ /*- * Copyright (c) 1999 @@ -48,7 +48,7 @@ #include #include #ifdef WSDISPLAY_COMPAT_RAWKBD -#include +#include #endif #include diff --git a/sys/dev/hpc/files.bicons b/sys/dev/hpc/files.bicons index 05c5ffad8528..142b64978cfa 100644 --- a/sys/dev/hpc/files.bicons +++ b/sys/dev/hpc/files.bicons @@ -1,7 +1,8 @@ -# $NetBSD: files.bicons,v 1.2 2001/02/12 17:55:09 uch Exp $ +# $NetBSD: files.bicons,v 1.3 2001/02/22 18:37:54 uch Exp $ +# H/PC builtin console defpseudo biconsdev + file dev/hpc/biconsdev.c biconsdev needs-count file dev/hpc/bicons.c biconsdev file dev/hpc/bifont.c biconsdev - diff --git a/sys/dev/hpc/files.hpcfb b/sys/dev/hpc/files.hpcfb new file mode 100644 index 000000000000..a98ea7673fc1 --- /dev/null +++ b/sys/dev/hpc/files.hpcfb @@ -0,0 +1,17 @@ +# $NetBSD: files.hpcfb,v 1.1 2001/02/22 18:37:54 uch Exp $ +# H/PC framebuffer interface for wsdisplay + +# Raster operations +include "dev/rasops/files.rasops" +include "dev/wsfont/files.wsfont" + +define hpcfbif {} +device hpcfb: wsemuldisplaydev, rasops1, rasops2, rasops4, rasops8, rasops15, rasops16 +attach hpcfb at hpcfbif +file dev/hpc/hpcfb.c hpcfb needs-flag + +device bivideo: hpcfbif +attach bivideo at mainbus +file dev/hpc/bivideo.c bivideo needs-flag +file dev/hpc/hpccmap.c bivideo + diff --git a/sys/dev/hpc/files.hpckbd b/sys/dev/hpc/files.hpckbd new file mode 100644 index 000000000000..8417db6330b1 --- /dev/null +++ b/sys/dev/hpc/files.hpckbd @@ -0,0 +1,16 @@ +# $NetBSD: files.hpckbd,v 1.1 2001/02/22 18:37:55 uch Exp $ +# H/PC keyboard interface for wskbd + +defopt PCKBD_LAYOUT + +device hpckbdif {} +device hpckbd: wskbddev +attach hpckbd at hpckbdif +file dev/hpc/hpckbd.c hpckbd + +device btnmgr: wskbddev +attach btnmgr at mainbus +file dev/hpc/btnmgr.c btnmgr + +file dev/pckbc/wskbdmap_mfii.c btnmgr | hpckbd +file dev/hpc/pckbd_encode.c btnmgr | hpckbd diff --git a/sys/dev/hpc/files.hpctp b/sys/dev/hpc/files.hpctp new file mode 100644 index 000000000000..7fc6e2361978 --- /dev/null +++ b/sys/dev/hpc/files.hpctp @@ -0,0 +1,7 @@ +# $NetBSD: files.hpctp,v 1.1 2001/02/22 18:37:55 uch Exp $ +# H/PC touch panel interface. + +define tpcalib +file dev/hpc/tpcalib.c tpcalib +file dev/hpc/mra.c tpcalib + diff --git a/sys/arch/hpcmips/dev/fontconv.c b/sys/dev/hpc/fontconv.c similarity index 98% rename from sys/arch/hpcmips/dev/fontconv.c rename to sys/dev/hpc/fontconv.c index ae033403ef50..63a488fcf381 100644 --- a/sys/arch/hpcmips/dev/fontconv.c +++ b/sys/dev/hpc/fontconv.c @@ -1,4 +1,4 @@ -/* $NetBSD: fontconv.c,v 1.2 2000/01/05 18:49:13 ad Exp $ */ +/* $NetBSD: fontconv.c,v 1.1 2001/02/22 18:37:55 uch Exp $ */ #include diff --git a/sys/arch/hpcmips/dev/hpccmap.c b/sys/dev/hpc/hpccmap.c similarity index 98% rename from sys/arch/hpcmips/dev/hpccmap.c rename to sys/dev/hpc/hpccmap.c index 6ec4cb6c3748..ca0a18afce68 100644 --- a/sys/arch/hpcmips/dev/hpccmap.c +++ b/sys/dev/hpc/hpccmap.c @@ -1,4 +1,4 @@ -/* $Id: hpccmap.c,v 1.1 2000/03/20 10:47:33 takemura Exp $ */ +/* $Id: hpccmap.c,v 1.1 2001/02/22 18:37:55 uch Exp $ */ /*- * Copyright (c) 1999 @@ -37,7 +37,7 @@ * Do not edit. * This file is automatically generated by hpccmap_gen. */ -#include +#include unsigned char bivideo_cmap_r[256] = { 0,127, 0,127, 0,127, 0,199,127,255, 0,255, 0,255, 0,255, 0, 17, 34, 51, 68, 85,102,119,136,153,170,187,204,221,238,255, diff --git a/sys/arch/hpcmips/dev/hpccmap_gen.c b/sys/dev/hpc/hpccmap_gen.c similarity index 97% rename from sys/arch/hpcmips/dev/hpccmap_gen.c rename to sys/dev/hpc/hpccmap_gen.c index 4513ba68498c..4d410b57a3ac 100644 --- a/sys/arch/hpcmips/dev/hpccmap_gen.c +++ b/sys/dev/hpc/hpccmap_gen.c @@ -1,4 +1,4 @@ -/* $Id: hpccmap_gen.c,v 1.1 2000/03/20 10:47:33 takemura Exp $ */ +/* $Id: hpccmap_gen.c,v 1.1 2001/02/22 18:37:55 uch Exp $ */ /*- * Copyright (c) 1999 @@ -56,7 +56,7 @@ main(ac, av) printf(" * Do not edit.\n"); printf(" * This file is automatically generated by hpccmap_gen.\n"); printf(" */\n"); - printf("#include \n"); + printf("#include \n"); for (i = 0; i < 3; i++) { printf("unsigned char bivideo_cmap_%c[256] = {\n", rgb[i]); cmap_gen(rgb_separate_out, (void*)i); diff --git a/sys/arch/hpcmips/dev/hpccmapvar.h b/sys/dev/hpc/hpccmapvar.h similarity index 96% rename from sys/arch/hpcmips/dev/hpccmapvar.h rename to sys/dev/hpc/hpccmapvar.h index 126637a2d089..8312f406ab75 100644 --- a/sys/arch/hpcmips/dev/hpccmapvar.h +++ b/sys/dev/hpc/hpccmapvar.h @@ -1,4 +1,4 @@ -/* $Id: hpccmapvar.h,v 1.1 2000/03/20 10:47:33 takemura Exp $ */ +/* $Id: hpccmapvar.h,v 1.1 2001/02/22 18:37:55 uch Exp $ */ /*- * Copyright (c) 1999 diff --git a/sys/arch/hpcmips/dev/hpcfb.c b/sys/dev/hpc/hpcfb.c similarity index 99% rename from sys/arch/hpcmips/dev/hpcfb.c rename to sys/dev/hpc/hpcfb.c index 94d849a09692..51330711a85f 100644 --- a/sys/arch/hpcmips/dev/hpcfb.c +++ b/sys/dev/hpc/hpcfb.c @@ -1,4 +1,4 @@ -/* $NetBSD: hpcfb.c,v 1.38 2001/02/02 08:31:04 sato Exp $ */ +/* $NetBSD: hpcfb.c,v 1.1 2001/02/22 18:37:55 uch Exp $ */ /*- * Copyright (c) 1999 @@ -46,7 +46,7 @@ static const char _copyright[] __attribute__ ((unused)) = "Copyright (c) 1999 Shin Takemura. All rights reserved."; static const char _rcsid[] __attribute__ ((unused)) = - "$Id: hpcfb.c,v 1.38 2001/02/02 08:31:04 sato Exp $"; + "$Id: hpcfb.c,v 1.1 2001/02/22 18:37:55 uch Exp $"; #include #include @@ -75,12 +75,12 @@ static const char _rcsid[] __attribute__ ((unused)) = #include #include -#include -#include +#include +#include #include "bivideo.h" #if NBIVIDEO > 0 -#include +#include #endif #ifdef FBDEBUG diff --git a/sys/arch/hpcmips/dev/hpcfbio.h b/sys/dev/hpc/hpcfbio.h similarity index 99% rename from sys/arch/hpcmips/dev/hpcfbio.h rename to sys/dev/hpc/hpcfbio.h index 0f8c722b02fc..6581a6fb922d 100644 --- a/sys/arch/hpcmips/dev/hpcfbio.h +++ b/sys/dev/hpc/hpcfbio.h @@ -1,4 +1,4 @@ -/* $NetBSD: hpcfbio.h,v 1.2 2000/12/03 13:43:40 takemura Exp $ */ +/* $NetBSD: hpcfbio.h,v 1.1 2001/02/22 18:37:55 uch Exp $ */ /*- * Copyright (c) 1999 diff --git a/sys/arch/hpcmips/dev/hpcfbvar.h b/sys/dev/hpc/hpcfbvar.h similarity index 97% rename from sys/arch/hpcmips/dev/hpcfbvar.h rename to sys/dev/hpc/hpcfbvar.h index dfa614d49a67..cd4bc57201b0 100644 --- a/sys/arch/hpcmips/dev/hpcfbvar.h +++ b/sys/dev/hpc/hpcfbvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: hpcfbvar.h,v 1.6 2000/12/25 10:09:31 sato Exp $ */ +/* $NetBSD: hpcfbvar.h,v 1.1 2001/02/22 18:37:55 uch Exp $ */ /*- * Copyright (c) 1999 diff --git a/sys/arch/hpcmips/dev/hpckbd.c b/sys/dev/hpc/hpckbd.c similarity index 70% rename from sys/arch/hpcmips/dev/hpckbd.c rename to sys/dev/hpc/hpckbd.c index 2aadf1a0aa5a..013f366c2a62 100644 --- a/sys/arch/hpcmips/dev/hpckbd.c +++ b/sys/dev/hpc/hpckbd.c @@ -1,7 +1,11 @@ -/* $NetBSD: hpckbd.c,v 1.5 2001/01/10 08:43:13 sato Exp $ */ +/* $NetBSD: hpckbd.c,v 1.1 2001/02/22 18:37:55 uch Exp $ */ /*- - * Copyright (c) 1999, 2000 UCHIYAMA Yasushi. All rights reserved. + * Copyright (c) 1999-2001 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by UCHIYAMA Yasushi. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -11,21 +15,26 @@ * 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. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation 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 AUTHOR ``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 AUTHOR 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. + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ -#include "opt_tx39xx.h" #include #include @@ -49,16 +58,11 @@ #include #include #ifdef WSDISPLAY_COMPAT_RAWKBD -#include +#include #endif -#include -#include - -#ifdef TX39XX -#include -#include -#endif +#include +#include struct hpckbd_softc; @@ -93,32 +97,31 @@ struct hpckbd_softc { struct hpckbd_core sc_coredata; }; -int hpckbd_match __P((struct device*, struct cfdata*, void*)); -void hpckbd_attach __P((struct device*, struct device*, void*)); +int hpckbd_match(struct device *, struct cfdata *, void *); +void hpckbd_attach(struct device *, struct device *, void *); -void hpckbd_initcore __P((struct hpckbd_core*, struct hpckbd_ic_if*, - int)); -void hpckbd_initif __P((struct hpckbd_core*)); -int hpckbd_getevent __P((struct hpckbd_core*, u_int*, int*)); -int hpckbd_putevent __P((struct hpckbd_core*, u_int, int)); -void hpckbd_keymap_lookup __P((struct hpckbd_core*)); -void hpckbd_keymap_setup __P((struct hpckbd_core *, const keysym_t *, int)); -int __hpckbd_input __P((void*, int, int)); -void __hpckbd_input_hook __P((void*)); +void hpckbd_initcore(struct hpckbd_core *, struct hpckbd_ic_if *, int); +void hpckbd_initif(struct hpckbd_core *); +int hpckbd_getevent(struct hpckbd_core *, u_int *, int *); +int hpckbd_putevent(struct hpckbd_core *, u_int, int); +void hpckbd_keymap_lookup(struct hpckbd_core*); +void hpckbd_keymap_setup(struct hpckbd_core *, const keysym_t *, int); +int __hpckbd_input(void *, int, int); +void __hpckbd_input_hook(void*); struct cfattach hpckbd_ca = { sizeof(struct hpckbd_softc), hpckbd_match, hpckbd_attach }; /* wskbd accessopts */ -int hpckbd_enable __P((void *, int)); -void hpckbd_set_leds __P((void *, int)); -int hpckbd_ioctl __P((void *, u_long, caddr_t, int, struct proc *)); +int hpckbd_enable(void *, int); +void hpckbd_set_leds(void *, int); +int hpckbd_ioctl(void *, u_long, caddr_t, int, struct proc *); /* consopts */ struct hpckbd_core hpckbd_consdata; -void hpckbd_cngetc __P((void*, u_int*, int*)); -void hpckbd_cnpollc __P((void *, int)); +void hpckbd_cngetc(void *, u_int *, int*); +void hpckbd_cnpollc(void *, int); const struct wskbd_accessops hpckbd_accessops = { hpckbd_enable, @@ -141,19 +144,13 @@ struct wskbd_mapdata hpckbd_keymapdata = { }; int -hpckbd_match(parent, cf, aux) - struct device *parent; - struct cfdata *cf; - void *aux; +hpckbd_match(struct device *parent, struct cfdata *cf, void *aux) { return (1); } void -hpckbd_attach(parent, self, aux) - struct device *parent; - struct device *self; - void *aux; +hpckbd_attach(struct device *parent, struct device *self, void *aux) { struct hpckbd_attach_args *haa = aux; struct hpckbd_softc *sc = (void*)self; @@ -192,18 +189,13 @@ hpckbd_attach(parent, self, aux) } int -hpckbd_print(aux, pnp) - void *aux; - const char *pnp; +hpckbd_print(void *aux, const char *pnp) { return (pnp ? QUIET : UNCONF); } void -hpckbd_initcore(hc, ic, console) - struct hpckbd_core *hc; - struct hpckbd_ic_if *ic; - int console; +hpckbd_initcore(struct hpckbd_core *hc, struct hpckbd_ic_if *ic, int console) { hc->hc_polling = 0; hc->hc_console = console; @@ -217,8 +209,7 @@ hpckbd_initcore(hc, ic, console) } void -hpckbd_initif(hc) - struct hpckbd_core *hc; +hpckbd_initif(struct hpckbd_core *hc) { struct hpckbd_if *kbdif = &hc->hc_if; @@ -229,10 +220,7 @@ hpckbd_initif(hc) } int -hpckbd_putevent(hc, type, data) - struct hpckbd_core* hc; - u_int type; - int data; +hpckbd_putevent(struct hpckbd_core* hc, u_int type, int data) { if (hc->hc_nevents == NEVENTQ) return (0); /* queue is full */ @@ -247,10 +235,7 @@ hpckbd_putevent(hc, type, data) } int -hpckbd_getevent(hc, type, data) - struct hpckbd_core* hc; - u_int *type; - int *data; +hpckbd_getevent(struct hpckbd_core* hc, u_int *type, int *data) { if (hc->hc_nevents == 0) return (0); /* queue is empty */ @@ -265,10 +250,7 @@ hpckbd_getevent(hc, type, data) } void -hpckbd_keymap_setup(hc, map, mapsize) - struct hpckbd_core *hc; - const keysym_t *map; - int mapsize; +hpckbd_keymap_setup(struct hpckbd_core *hc, const keysym_t *map, int mapsize) { int i; struct wscons_keydesc *desc; @@ -286,8 +268,7 @@ hpckbd_keymap_setup(hc, map, mapsize) } void -hpckbd_keymap_lookup(hc) - struct hpckbd_core *hc; +hpckbd_keymap_lookup(struct hpckbd_core *hc) { const struct hpckbd_keymap_table *tab; platid_mask_t mask; @@ -324,8 +305,7 @@ hpckbd_keymap_lookup(hc) } void -__hpckbd_input_hook(arg) - void *arg; +__hpckbd_input_hook(void *arg) { #if 0 struct hpckbd_core *hc = arg; @@ -337,17 +317,12 @@ __hpckbd_input_hook(arg) } int -__hpckbd_input(arg, flag, scancode) - void *arg; - int flag, scancode; +__hpckbd_input(void *arg, int flag, int scancode) { struct hpckbd_core *hc = arg; int type, key; if (flag) { -#ifdef TX39XX - tx_sound_click(tx_conf_get_tag()); -#endif type = WSCONS_EVENT_KEY_DOWN; } else { type = WSCONS_EVENT_KEY_UP; @@ -403,8 +378,7 @@ __hpckbd_input(arg, flag, scancode) * console support routines */ int -hpckbd_cnattach(ic) - struct hpckbd_ic_if *ic; +hpckbd_cnattach(struct hpckbd_ic_if *ic) { struct hpckbd_core *hc = &hpckbd_consdata; @@ -420,10 +394,7 @@ hpckbd_cnattach(ic) } void -hpckbd_cngetc(arg, type, data) - void *arg; - u_int *type; - int *data; +hpckbd_cngetc(void *arg, u_int *type, int *data) { struct hpckbd_core *hc = arg; int s; @@ -438,9 +409,7 @@ hpckbd_cngetc(arg, type, data) } void -hpckbd_cnpollc(arg, on) - void *arg; - int on; +hpckbd_cnpollc(void *arg, int on) { struct hpckbd_core *hc = arg; int s = splimp(); @@ -451,9 +420,7 @@ hpckbd_cnpollc(arg, on) } int -hpckbd_enable(arg, on) - void *arg; - int on; +hpckbd_enable(void *arg, int on) { struct hpckbd_core *hc = arg; @@ -471,20 +438,13 @@ hpckbd_enable(arg, on) } void -hpckbd_set_leds(arg, leds) - void *arg; - int leds; +hpckbd_set_leds(void *arg, int leds) { /* Can you find any LED which tells you about keyboard? */ } int -hpckbd_ioctl(arg, cmd, data, flag, p) - void *arg; - u_long cmd; - caddr_t data; - int flag; - struct proc *p; +hpckbd_ioctl(void *arg, u_long cmd, caddr_t data, int flag, struct proc *p) { #ifdef WSDISPLAY_COMPAT_RAWKBD struct hpckbd_core *hc = arg; diff --git a/sys/arch/hpcmips/dev/hpckbdkeymap.h b/sys/dev/hpc/hpckbdkeymap.h similarity index 90% rename from sys/arch/hpcmips/dev/hpckbdkeymap.h rename to sys/dev/hpc/hpckbdkeymap.h index 195f7d994aa0..3bd36a38279e 100644 --- a/sys/arch/hpcmips/dev/hpckbdkeymap.h +++ b/sys/dev/hpc/hpckbdkeymap.h @@ -1,7 +1,7 @@ -/* $NetBSD: hpckbdkeymap.h,v 1.6 2000/10/19 01:08:15 takemura Exp $ */ +/* $NetBSD: hpckbdkeymap.h,v 1.1 2001/02/22 18:37:56 uch Exp $ */ -/* - * Copyright (c) 1999, 2000, by UCHIYAMA Yasushi +/*- + * Copyright (c) 1999-2001 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -9,26 +9,34 @@ * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. - * 2. The name of the developer may NOT be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ -#define UNK 255 /* unknown */ -#define IGN 254 /* ignore */ -#define SPL 253 /* special key */ -#define KC(n) KS_KEYCODE(n) + +#define UNK 255 /* unknown */ +#define IGN 254 /* ignore */ +#define SPL 253 /* special key */ +#define KC(n) KS_KEYCODE(n) #define CMDMAP(map) { map, (sizeof(map)/sizeof(keysym_t)) } #define NULLCMDMAP { NULL, 0 } @@ -60,6 +68,7 @@ const int default_special_keymap[] = { [KEY_SPECIAL_LIGHT] = -1 }; +#ifdef hpcmips const u_int8_t tc5165_mobilon_keymap[] = { /* 0 1 2 3 4 5 6 7 */ /* 0 */ 37 , 45 , 44 , UNK, 9 , 51 , 23 , UNK, @@ -412,6 +421,7 @@ static const keysym_t sigmarion_cmdmap[] = { KC(52), KS_Cmd_ContrastUp, KS_period, KS_greater, KC(57), KS_Cmd_BacklightToggle,KS_space, }; +#endif /* hpcmips */ const struct hpckbd_keymap_table { platid_t *ht_platform; @@ -423,6 +433,7 @@ const struct hpckbd_keymap_table { } ht_cmdmap; kbd_t ht_layout; } hpckbd_keymap_table[] = { +#ifdef hpcmips { &platid_mask_MACH_COMPAQ_C, tc5165_compaq_c_jp_keymap, tc5165_compaq_c_jp_special_keymap, @@ -508,5 +519,6 @@ const struct hpckbd_keymap_table { NULL, NULLCMDMAP, KB_JP }, +#endif /* hpcmips */ { NULL } /* end mark */ }; diff --git a/sys/dev/hpc/hpckbdvar.h b/sys/dev/hpc/hpckbdvar.h new file mode 100644 index 000000000000..19e72e84c0ef --- /dev/null +++ b/sys/dev/hpc/hpckbdvar.h @@ -0,0 +1,73 @@ +/* $NetBSD: hpckbdvar.h,v 1.1 2001/02/22 18:37:56 uch Exp $ */ + +/*- + * Copyright (c) 1999-2001 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by UCHIYAMA Yasushi. + * + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + */ + +/* + * chip interface + */ +struct hpckbd_if; +struct hpckbd_ic_if { + void *hii_ctx; + int (*hii_establish)(void *, struct hpckbd_if *); + int (*hii_poll)(void *); +}; + +#define hpckbd_ic_establish(ic, kbdif) \ + (*(ic)->hii_establish)((ic)->hii_ctx, (kbdif)) +#define hpckbd_ic_poll(ic) \ + (*(ic)->hii_poll)((ic)->hii_ctx) + +/* + * hpckbd interface + */ +struct hpckbd_if { + void *hi_ctx; + void (*hi_input_hook)(void *); + int (*hi_input)(void *, int, int); +}; + +#define hpckbd_input_hook(i) \ + (*(i)->hi_input_hook)((i)->hi_ctx) +#define hpckbd_input(i, f, a) \ + (*(i)->hi_input)((i)->hi_ctx, (f), (a)) + +struct hpckbd_attach_args { + struct hpckbd_ic_if *haa_ic; +}; + +int hpckbd_print(void *, const char *); +int hpckbd_cnattach(struct hpckbd_ic_if *); diff --git a/sys/arch/hpcmips/dev/mra.c b/sys/dev/hpc/mra.c similarity index 98% rename from sys/arch/hpcmips/dev/mra.c rename to sys/dev/hpc/mra.c index 6b8da0c49d03..6a865f4e8211 100644 --- a/sys/arch/hpcmips/dev/mra.c +++ b/sys/dev/hpc/mra.c @@ -1,4 +1,4 @@ -/* $NetBSD: mra.c,v 1.1 2000/01/10 14:07:58 takemura Exp $ */ +/* $NetBSD: mra.c,v 1.1 2001/02/22 18:37:56 uch Exp $ */ /* * Copyright (c) 1999 Shin Takemura All rights reserved. diff --git a/sys/arch/hpcmips/dev/pckbd_encode.c b/sys/dev/hpc/pckbd_encode.c similarity index 92% rename from sys/arch/hpcmips/dev/pckbd_encode.c rename to sys/dev/hpc/pckbd_encode.c index 73e6bbcf83c7..99c017034bf4 100644 --- a/sys/arch/hpcmips/dev/pckbd_encode.c +++ b/sys/dev/hpc/pckbd_encode.c @@ -1,4 +1,4 @@ -/* $NetBSD: pckbd_encode.c,v 1.1 2000/05/04 08:20:26 takemura Exp $ */ +/* $NetBSD: pckbd_encode.c,v 1.1 2001/02/22 18:37:56 uch Exp $ */ /*- * Copyright (c) 2000 TAKEMRUA, Shin All rights reserved. @@ -39,16 +39,13 @@ #include #include #include -#include +#include /* * pckbd_encode() is inverse function of pckbd_decode() in dev/pckbc/pckbd.c. */ int -pckbd_encode(type, datain, dataout) - u_int type; - int datain; - u_char *dataout; +pckbd_encode(u_int type, int datain, u_char *dataout) { int res; u_char updown; diff --git a/sys/arch/hpcmips/dev/pckbd_encode.h b/sys/dev/hpc/pckbd_encode.h similarity index 93% rename from sys/arch/hpcmips/dev/pckbd_encode.h rename to sys/dev/hpc/pckbd_encode.h index 44749844a6f5..c905eff999a8 100644 --- a/sys/arch/hpcmips/dev/pckbd_encode.h +++ b/sys/dev/hpc/pckbd_encode.h @@ -1,4 +1,4 @@ -/* $NetBSD: pckbd_encode.h,v 1.1 2000/05/04 08:20:26 takemura Exp $ */ +/* $NetBSD: pckbd_encode.h,v 1.1 2001/02/22 18:37:56 uch Exp $ */ /*- * Copyright (c) 2000 TAKEMRUA, Shin All rights reserved. @@ -33,4 +33,4 @@ * */ -extern int pckbd_encode __P((u_int, int, u_char *)); +extern int pckbd_encode(u_int, int, u_char *); diff --git a/sys/arch/hpcmips/dev/tpcalib.c b/sys/dev/hpc/tpcalib.c similarity index 97% rename from sys/arch/hpcmips/dev/tpcalib.c rename to sys/dev/hpc/tpcalib.c index 41cc8ada5035..3f7b1d57474b 100644 --- a/sys/arch/hpcmips/dev/tpcalib.c +++ b/sys/dev/hpc/tpcalib.c @@ -1,4 +1,4 @@ -/* $NetBSD: tpcalib.c,v 1.3 2000/02/28 12:34:32 takemura Exp $ */ +/* $NetBSD: tpcalib.c,v 1.1 2001/02/22 18:37:56 uch Exp $ */ /* * Copyright (c) 1999 Shin Takemura All rights reserved. @@ -32,7 +32,7 @@ #include #include #include -#include +#include #define TPCALIBDEBUG #ifdef TPCALIBDEBUG diff --git a/sys/arch/hpcmips/dev/tpcalibvar.h b/sys/dev/hpc/tpcalibvar.h similarity index 96% rename from sys/arch/hpcmips/dev/tpcalibvar.h rename to sys/dev/hpc/tpcalibvar.h index e3003aa35db8..6c68c3448454 100644 --- a/sys/arch/hpcmips/dev/tpcalibvar.h +++ b/sys/dev/hpc/tpcalibvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: tpcalibvar.h,v 1.1 2000/01/10 14:08:00 takemura Exp $ */ +/* $NetBSD: tpcalibvar.h,v 1.1 2001/02/22 18:37:56 uch Exp $ */ /* * Copyright (c) 1999 Shin Takemura All rights reserved. diff --git a/sys/arch/hpcmips/dev/video_subr.c b/sys/dev/hpc/video_subr.c similarity index 98% rename from sys/arch/hpcmips/dev/video_subr.c rename to sys/dev/hpc/video_subr.c index df5bf02a62bd..ddfb7bc8e8bc 100644 --- a/sys/arch/hpcmips/dev/video_subr.c +++ b/sys/dev/hpc/video_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: video_subr.c,v 1.3 2000/10/22 10:33:01 uch Exp $ */ +/* $NetBSD: video_subr.c,v 1.1 2001/02/22 18:37:56 uch Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ #include -#include +#include #define BPP2 ({ \ u_int8_t bitmap; \ diff --git a/sys/arch/hpcmips/dev/video_subr.h b/sys/dev/hpc/video_subr.h similarity index 96% rename from sys/arch/hpcmips/dev/video_subr.h rename to sys/dev/hpc/video_subr.h index ae632c163c35..62835a2de48e 100644 --- a/sys/arch/hpcmips/dev/video_subr.h +++ b/sys/dev/hpc/video_subr.h @@ -1,4 +1,4 @@ -/* $NetBSD: video_subr.h,v 1.4 2000/10/22 10:33:01 uch Exp $ */ +/* $NetBSD: video_subr.h,v 1.1 2001/02/22 18:37:57 uch Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ void cmap_work_free(u_int8_t *, u_int8_t *, u_int8_t *, u_int32_t *); void rgb24_compose(u_int32_t *, u_int8_t *, u_int8_t *, u_int8_t *, int); void rgb24_decompose(u_int32_t *, u_int8_t *, u_int8_t *, u_int8_t *, int); -/* debug function for TX. VR will need `line bytes' */ +/* debug function */ struct video_chip; struct video_chip { void *vc_v; /* CPU/chipset dependent goo */ diff --git a/sys/arch/hpcmips/dev/vt220l8x10.h b/sys/dev/hpc/vt220l8x10.h similarity index 100% rename from sys/arch/hpcmips/dev/vt220l8x10.h rename to sys/dev/hpc/vt220l8x10.h