CVS commit: src/sys/arch/hp300/dev

2021-07-11 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jul 11 13:00:53 UTC 2021

Modified Files:
src/sys/arch/hp300/dev: rd.c rdreg.h

Log Message:
Add Device and drive info of 2202A, 7908A, 7911A, and 7941A.

Geometries and description info are taken from hpdrive.ini.sample
in HPDrive.  Briefly tested on HPDisk.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/arch/hp300/dev/rd.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hp300/dev/rdreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/rd.c
diff -u src/sys/arch/hp300/dev/rd.c:1.108 src/sys/arch/hp300/dev/rd.c:1.109
--- src/sys/arch/hp300/dev/rd.c:1.108	Fri Jul  9 17:05:33 2021
+++ src/sys/arch/hp300/dev/rd.c	Sun Jul 11 13:00:52 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: rd.c,v 1.108 2021/07/09 17:05:33 tsutsui Exp $	*/
+/*	$NetBSD: rd.c,v 1.109 2021/07/11 13:00:52 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.108 2021/07/09 17:05:33 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.109 2021/07/11 13:00:52 tsutsui Exp $");
 
 #include "opt_useleds.h"
 
@@ -355,6 +355,42 @@ static const struct rdidentinfo rdidenti
 		.ri_ntpc = NRD2203ATRK,
 		.ri_ncyl = 1449,
 		.ri_nblocks = 1309896
+	},
+
+	[RD2202A] = {
+		.ri_hwid = RD2202AID,
+		.ri_desc = "2202A",
+		.ri_nbpt = NRD2202ABPT,
+		.ri_ntpc = NRD2202ATRK,
+		.ri_ncyl = 1449,
+		.ri_nblocks = 1309896
+	},
+
+	[RD7908A] = {
+		.ri_hwid = RD7908AID,
+		.ri_desc = "7908A",
+		.ri_nbpt = NRD7908ABPT,
+		.ri_ntpc = NRD7908ATRK,
+		.ri_ncyl = 185,
+		.ri_nblocks = 32375
+	},
+
+	[RD7911A] = {
+		.ri_hwid = RD7911AID,
+		.ri_desc = "7911A",
+		.ri_nbpt = NRD7911ABPT,
+		.ri_ntpc = NRD7911ATRK,
+		.ri_ncyl = 572,
+		.ri_nblocks = 54912
+	},
+
+	[RD7941A] = {
+		.ri_hwid = RD7946AID,
+		.ri_desc = "7941A",
+		.ri_nbpt = NRD7941ABPT,
+		.ri_ntpc = NRD7941ATRK,
+		.ri_ncyl = 968,
+		.ri_nblocks = 46464
 	}
 };
 static const int numrdidentinfo = __arraycount(rdidentinfo);
@@ -380,7 +416,11 @@ static const struct rdname2id rdname2id[
 	{ RD7958BNAME,	RD7958B },
 	{ RD7959BNAME,	RD7959B },
 	{ RD2200ANAME,	RD2200A },
-	{ RD2203ANAME,	RD2203A }
+	{ RD2203ANAME,	RD2203A },
+	{ RD2202ANAME,	RD2202A },
+	{ RD7908ANAME,	RD7908A },
+	{ RD7911ANAME,	RD7911A },
+	{ RD7941ANAME,	RD7941A }
 };
 static const int numrdname2id = __arraycount(rdname2id);
 
@@ -618,7 +658,7 @@ rdident(device_t parent, struct rd_softc
 
 	/*
 	 * Take care of a couple of anomolies:
-	 * 1. 7945A and 7946A both return same HW id
+	 * 1. 7945A, 7946A, and 7941A all return same HW id
 	 * 2. 9122S and 9134D both return same HW id
 	 * 3. 9122D and 9134L both return same HW id
 	 */
@@ -626,6 +666,8 @@ rdident(device_t parent, struct rd_softc
 	case RD7946AID:
 		if (memcmp(name, RD7945ANAME, RDNAMELEN) == 0)
 			id = RD7945A;
+		else if (memcmp(name, RD7941ANAME, RDNAMELEN) == 0)
+			id = RD7941A;
 		else
 			id = RD7946A;
 		break;

Index: src/sys/arch/hp300/dev/rdreg.h
diff -u src/sys/arch/hp300/dev/rdreg.h:1.16 src/sys/arch/hp300/dev/rdreg.h:1.17
--- src/sys/arch/hp300/dev/rdreg.h:1.16	Fri Jul  9 17:05:33 2021
+++ src/sys/arch/hp300/dev/rdreg.h	Sun Jul 11 13:00:52 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: rdreg.h,v 1.16 2021/07/09 17:05:33 tsutsui Exp $	*/
+/*	$NetBSD: rdreg.h,v 1.17 2021/07/11 13:00:52 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -104,7 +104,7 @@ struct	rd_clearcmd {
 } __attribute__((__packed__));
 
 /* HW ids */
-#define	RD7946AID	0x220	/* also 7945A */
+#define	RD7946AID	0x220	/* also 7945A and 7941A */
 #define	RD9134DID	0x221	/* also 9122S */
 #define	RD9134LID	0x222	/* also 9122D */
 #define	RD7912PID	0x209
@@ -120,6 +120,9 @@ struct	rd_clearcmd {
 #define	RD7959BID	0x22E	/* another guess based on 7958B */
 #define	RD2200AID	0x22F
 #define	RD2203AID	0x230	/* yet another guess */
+#define	RD2202AID	0x231	/* from hpdrive.ini.sample */
+#define	RD7908AID	0x200	/* from hpdrive.ini.sample */
+#define	RD7911AID	0x204	/* from hpdrive.ini.sample */
 
 /* Drive names -- per identify description structure */
 #define	RD7945ANAME	"079450"
@@ -140,6 +143,10 @@ struct	rd_clearcmd {
 #define	RD7959BNAME	"079591"
 #define	RD2200ANAME	"022000"
 #define	RD2203ANAME	"022030"
+#define	RD2202ANAME	"022020"
+#define	RD7908ANAME	"079080"
+#define	RD7911ANAME	"079110"
+#define	RD7941ANAME	"079410"
 
 #define	RDNAMELEN	6
 
@@ -163,6 +170,10 @@ struct	rd_clearcmd {
 #define	RD7959B		16
 #define	RD2200A		17
 #define	RD2203A		18
+#define	RD2202A		19
+#define	RD7908A		20
+#define	RD7911A		21
+#define	RD7941A		22
 
 #define	NRD7945ABPT	16
 #define	NRD7945ATRK	7
@@ -178,6 +189,10 @@ struct	rd_clearcmd {
 #define	NRD7933HTRK	13
 #define	NRD9134LBPT	16
 #define	NRD9134LTRK	5
+#define	NRD7911ABPT	32
+#define	NRD7911ATRK	3
+#define	NRD7941ABPT	16
+#define	NRD7941ATRK	3
 
 /*
  * Several HP 

CVS commit: src/sys/arch/hp300/dev

2021-07-09 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jul  9 17:05:33 UTC 2021

Modified Files:
src/sys/arch/hp300/dev: hpibvar.h rd.c rdreg.h rdvar.h

Log Message:
Add support of multiple rd(4) disks on all punits for HPDisk.

Special thanks to Anders Gustafsson, the author of "HPDisk"
(GPIB disk emulator) http://www.dalton.ax/hpdisk/
for providing bare boards and improving firmwares for NetBSD/hp300.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/hp300/dev/hpibvar.h
cvs rdiff -u -r1.107 -r1.108 src/sys/arch/hp300/dev/rd.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/hp300/dev/rdreg.h
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/hp300/dev/rdvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/hpibvar.h
diff -u src/sys/arch/hp300/dev/hpibvar.h:1.23 src/sys/arch/hp300/dev/hpibvar.h:1.24
--- src/sys/arch/hp300/dev/hpibvar.h:1.23	Mon Jul  5 14:51:23 2021
+++ src/sys/arch/hp300/dev/hpibvar.h	Fri Jul  9 17:05:33 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: hpibvar.h,v 1.23 2021/07/05 14:51:23 tsutsui Exp $	*/
+/*	$NetBSD: hpibvar.h,v 1.24 2021/07/09 17:05:33 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -167,7 +167,7 @@ struct hpibbus_attach_args {
 #define	hpibbuscf_punit		cf_loc[HPIBBUSCF_PUNIT]
 
 #define	HPIB_NSLAVES		8	/* number of slaves on a bus */
-#define	HPIB_NPUNITS		2	/* number of punits per slave */
+#define	HPIB_NPUNITS		15	/* number of punits per slave */
 
 /*
  * An HP-IB job queue entry.  Slave drivers have one of these used

Index: src/sys/arch/hp300/dev/rd.c
diff -u src/sys/arch/hp300/dev/rd.c:1.107 src/sys/arch/hp300/dev/rd.c:1.108
--- src/sys/arch/hp300/dev/rd.c:1.107	Mon Jul  5 14:51:23 2021
+++ src/sys/arch/hp300/dev/rd.c	Fri Jul  9 17:05:33 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: rd.c,v 1.107 2021/07/05 14:51:23 tsutsui Exp $	*/
+/*	$NetBSD: rd.c,v 1.108 2021/07/09 17:05:33 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.107 2021/07/05 14:51:23 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.108 2021/07/09 17:05:33 tsutsui Exp $");
 
 #include "opt_useleds.h"
 
@@ -186,65 +186,204 @@ int	rddebug = RDB_ERROR | RDB_IDENT;
  * Nothing really critical here, could do without it.
  */
 static const struct rdidentinfo rdidentinfo[] = {
-	{ RD7946AID,	0,	"7945A",	NRD7945ABPT,
-	  NRD7945ATRK,	968,	 108416 },
-
-	{ RD9134DID,	1,	"9134D",	NRD9134DBPT,
-	  NRD9134DTRK,	303,	  29088 },
-
-	{ RD9134LID,	1,	"9122S",	NRD9122SBPT,
-	  NRD9122STRK,	77,	   1232 },
-
-	{ RD7912PID,	0,	"7912P",	NRD7912PBPT,
-	  NRD7912PTRK,	572,	 128128 },
-
-	{ RD7914PID,	0,	"7914P",	NRD7914PBPT,
-	  NRD7914PTRK,	1152,	 258048 },
-
-	{ RD7958AID,	0,	"7958A",	NRD7958ABPT,
-	  NRD7958ATRK,	1013,	 255276 },
-
-	{ RD7957AID,	0,	"7957A",	NRD7957ABPT,
-	  NRD7957ATRK,	1036,	 159544 },
-
-	{ RD7933HID,	0,	"7933H",	NRD7933HBPT,
-	  NRD7933HTRK,	1321,	 789958 },
-
-	{ RD9134LID,	1,	"9134L",	NRD9134LBPT,
-	  NRD9134LTRK,	973,	  77840 },
-
-	{ RD7936HID,	0,	"7936H",	NRD7936HBPT,
-	  NRD7936HTRK,	698,	 600978 },
-
-	{ RD7937HID,	0,	"7937H",	NRD7937HBPT,
-	  NRD7937HTRK,	698,	1116102 },
-
-	{ RD7914CTID,	0,	"7914CT",	NRD7914PBPT,
-	  NRD7914PTRK,	1152,	 258048 },
-
-	{ RD7946AID,	0,	"7946A",	NRD7945ABPT,
-	  NRD7945ATRK,	968,	 108416 },
-
-	{ RD9134LID,	1,	"9122D",	NRD9122SBPT,
-	  NRD9122STRK,	77,	   1232 },
-
-	{ RD7957BID,	0,	"7957B",	NRD7957BBPT,
-	  NRD7957BTRK,	1269,	 159894 },
-
-	{ RD7958BID,	0,	"7958B",	NRD7958BBPT,
-	  NRD7958BTRK,	786,	 297108 },
-
-	{ RD7959BID,	0,	"7959B",	NRD7959BBPT,
-	  NRD7959BTRK,	1572,	 594216 },
-
-	{ RD2200AID,	0,	"2200A",	NRD2200ABPT,
-	  NRD2200ATRK,	1449,	 654948 },
-
-	{ RD2203AID,	0,	"2203A",	NRD2203ABPT,
-	  NRD2203ATRK,	1449,	1309896 }
+	[RD7945A] = {
+		.ri_hwid = RD7946AID,
+		.ri_desc = "7945A",
+		.ri_nbpt = NRD7945ABPT,
+		.ri_ntpc = NRD7945ATRK,
+		.ri_ncyl = 968,
+		.ri_nblocks = 108416
+	},
+
+	[RD9134D] = {
+		.ri_hwid = RD9134DID,
+		.ri_desc = "9134D",
+		.ri_nbpt = NRD9134DBPT,
+		.ri_ntpc = NRD9134DTRK,
+		.ri_ncyl = 303,
+		.ri_nblocks = 29088
+	},
+
+	[RD9122S] = {
+		.ri_hwid = RD9134LID,
+		.ri_desc = "9122S",
+		.ri_nbpt = NRD9122SBPT,
+		.ri_ntpc = NRD9122STRK,
+		.ri_ncyl = 77,
+		.ri_nblocks = 1232
+	},
+
+	[RD7912P] = {
+		.ri_hwid = RD7912PID,
+		.ri_desc = "7912P",
+		.ri_nbpt = NRD7912PBPT,
+		.ri_ntpc = NRD7912PTRK,
+		.ri_ncyl = 572,
+		.ri_nblocks = 128128
+	},
+
+	[RD7914P] = {
+		.ri_hwid = RD7914PID,
+		.ri_desc = "7914P",
+		.ri_nbpt = NRD7914PBPT,
+		.ri_ntpc = NRD7914PTRK,
+		.ri_ncyl = 1152,
+		.ri_nblocks = 258048
+	},
+
+	[RD7958A] = {
+		.ri_hwid = RD7958AID,
+		.ri_desc = "7958A",
+		.ri_nbpt = NRD7958ABPT,
+		.ri_ntpc = NRD7958ATRK,
+		.ri_ncyl = 1013,
+		.ri_nblocks = 255276
+	},
+
+	[RD7957A] = {
+		.ri_hwid = RD7957AID,
+		.ri_desc = "7957A",
+		.ri_nbpt = 

CVS commit: src/sys/arch/hp300/dev

2021-07-05 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Jul  5 14:15:16 UTC 2021

Modified Files:
src/sys/arch/hp300/dev: rd.c

Log Message:
Move attach messages from common rdident() to explicit rdattach().


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/arch/hp300/dev/rd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/rd.c
diff -u src/sys/arch/hp300/dev/rd.c:1.105 src/sys/arch/hp300/dev/rd.c:1.106
--- src/sys/arch/hp300/dev/rd.c:1.105	Mon Jul  5 14:03:46 2021
+++ src/sys/arch/hp300/dev/rd.c	Mon Jul  5 14:15:16 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: rd.c,v 1.105 2021/07/05 14:03:46 tsutsui Exp $	*/
+/*	$NetBSD: rd.c,v 1.106 2021/07/05 14:15:16 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.105 2021/07/05 14:03:46 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.106 2021/07/05 14:15:16 tsutsui Exp $");
 
 #include "opt_useleds.h"
 
@@ -320,6 +320,8 @@ rdattach(device_t parent, device_t self,
 {
 	struct rd_softc *sc = device_private(self);
 	struct hpibbus_attach_args *ha = aux;
+	int id;
+	char pbuf[9];
 
 	sc->sc_dev = self;
 	bufq_alloc(>sc_tab, "disksort", BUFQ_SORT_RAWBLOCK);
@@ -330,6 +332,21 @@ rdattach(device_t parent, device_t self,
 	}
 
 	/*
+	 * XXX We use DEV_BSIZE instead of the sector size value pulled
+	 * XXX off the driver because all of this code assumes 512 byte
+	 * XXX blocks.  ICK!
+	 */
+	id = sc->sc_type;
+	aprint_normal(": %s\n", rdidentinfo[id].ri_desc);
+	format_bytes(pbuf, sizeof(pbuf),
+	rdidentinfo[id].ri_nblocks * DEV_BSIZE);
+	aprint_normal_dev(sc->sc_dev, "%s, %d cyl, %d head, %d sec,"
+	" %d bytes/block x %u blocks\n",
+	pbuf, rdidentinfo[id].ri_ncyl, rdidentinfo[id].ri_ntpc,
+	rdidentinfo[id].ri_nbpt,
+	DEV_BSIZE, rdidentinfo[id].ri_nblocks);
+
+	/*
 	 * Initialize and attach the disk structure.
 	 */
 	memset(>sc_dkdev, 0, sizeof(sc->sc_dkdev));
@@ -366,7 +383,7 @@ rdident(device_t parent, struct rd_softc
 {
 	struct rd_describe *desc = sc != NULL ? >sc_rddesc : NULL;
 	u_char stat, cmd[3];
-	char name[7], pbuf[9];
+	char name[7];
 	int i, id, n, ctlr, slave;
 
 	ctlr = device_unit(parent);
@@ -464,20 +481,6 @@ rdident(device_t parent, struct rd_softc
 
 	sc->sc_type = id;
 
-	/*
-	 * XXX We use DEV_BSIZE instead of the sector size value pulled
-	 * XXX off the driver because all of this code assumes 512 byte
-	 * XXX blocks.  ICK!
-	 */
-	aprint_normal(": %s\n", rdidentinfo[id].ri_desc);
-	format_bytes(pbuf, sizeof(pbuf),
-	rdidentinfo[id].ri_nblocks * DEV_BSIZE);
-	aprint_normal_dev(sc->sc_dev, "%s, %d cyl, %d head, %d sec,"
-	" %d bytes/block x %u blocks\n",
-	pbuf, rdidentinfo[id].ri_ncyl, rdidentinfo[id].ri_ntpc,
-	rdidentinfo[id].ri_nbpt,
-	DEV_BSIZE, rdidentinfo[id].ri_nblocks);
-
 	return 1;
 }
 



CVS commit: src/sys/arch/hp300/dev

2021-07-05 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Jul  5 14:03:46 UTC 2021

Modified Files:
src/sys/arch/hp300/dev: ct.c hpib.c hpibvar.h mt.c rd.c

Log Message:
Pull HP-IB probe fixes from OpenBSD/hp300.

https://marc.info/?l=openbsd-cvs=113217630426615=2
> Overhaul the way HP-IB devices are probed. We will now do an exhaustive
> probe of the (slave, punit) tuple space, since this is the only way we
> can get a dual disk or dual tape enclosure to attach two devices of the
> same kind.

This allows using multiple rd(4) disk images on the same slave emulated
by HPDisk (and probably the real 9122D with dual floppy disk drives).

Thanks to Miod Vallat for suggesting this fix.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/hp300/dev/ct.c
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/hp300/dev/hpib.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/hp300/dev/hpibvar.h
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/hp300/dev/mt.c
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/hp300/dev/rd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/ct.c
diff -u src/sys/arch/hp300/dev/ct.c:1.61 src/sys/arch/hp300/dev/ct.c:1.62
--- src/sys/arch/hp300/dev/ct.c:1.61	Fri Jul 25 08:10:33 2014
+++ src/sys/arch/hp300/dev/ct.c	Mon Jul  5 14:03:46 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ct.c,v 1.61 2014/07/25 08:10:33 dholland Exp $	*/
+/*	$NetBSD: ct.c,v 1.62 2021/07/05 14:03:46 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ct.c,v 1.61 2014/07/25 08:10:33 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ct.c,v 1.62 2021/07/05 14:03:46 tsutsui Exp $");
 
 #include 
 #include 
@@ -270,13 +270,12 @@ ctident(device_t parent, struct ct_softc
 
 	/* Is it one of the tapes we support? */
 	for (id = 0; id < nctinfo; id++)
-		if (ha->ha_id == ctinfo[id].hwid)
+		if (ha->ha_id == ctinfo[id].hwid &&
+		ha->ha_punit == ctinfo[id].punit)
 			break;
 	if (id == nctinfo)
 		return 0;
 
-	ha->ha_punit = ctinfo[id].punit;
-
 	/*
 	 * So far, so good.  Get drive parameters.  Note command
 	 * is always issued to unit 0.

Index: src/sys/arch/hp300/dev/hpib.c
diff -u src/sys/arch/hp300/dev/hpib.c:1.42 src/sys/arch/hp300/dev/hpib.c:1.43
--- src/sys/arch/hp300/dev/hpib.c:1.42	Sat Apr 24 23:36:37 2021
+++ src/sys/arch/hp300/dev/hpib.c	Mon Jul  5 14:03:46 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: hpib.c,v 1.42 2021/04/24 23:36:37 thorpej Exp $	*/
+/*	$NetBSD: hpib.c,v 1.43 2021/07/05 14:03:46 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hpib.c,v 1.42 2021/04/24 23:36:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hpib.c,v 1.43 2021/07/05 14:03:46 tsutsui Exp $");
 
 #include 
 #include 
@@ -89,14 +89,9 @@ CFATTACH_DECL_NEW(hpibbus, sizeof(struct
 hpibbusmatch, hpibbusattach, NULL, NULL);
 
 static void	hpibbus_attach_children(struct hpibbus_softc *);
-static int	hpibbussearch(device_t, cfdata_t, const int *, void *);
+static int	hpibbussubmatch(device_t, cfdata_t, const int *ldesc, void *);
 static int	hpibbusprint(void *, const char *);
 
-static int	hpibbus_alloc(struct hpibbus_softc *, int, int);
-#if 0
-static void	hpibbus_free(struct hpibbus_softc *, int, int);
-#endif
-
 static void	hpibstart(void *);
 static void	hpibdone(void *);
 
@@ -121,17 +116,9 @@ int	hpibdmathresh = 3;	/* byte count bey
  * have ID tags, and often the host cannot even tell if such
  * a device is attached to the system!
  *
- * These two nasty bits mean that we have to treat HP-IB as
- * an indirect bus.  However, since we are given some ID
- * information, it is unreasonable to disallow cloning of
- * CS/80 devices.
- *
- * To deal with all of this, we use the semi-twisted scheme
- * in hpibbus_attach_children().  For each HP-IB slave, we loop
- * through all of the possibly-configured children, allowing
- * them to modify the punit parameter (but NOT the slave!).
- *
- * This is evil, but what can you do?
+ * * We nevertheless probe the whole (slave, punit) tuple space, since
+ * drivers for devices with a unique ID know exactly where to attach; 
+ * and we disallow ``star'' locators for other drivers.
  */
 
 static int
@@ -177,64 +164,51 @@ static void
 hpibbus_attach_children(struct hpibbus_softc *sc)
 {
 	struct hpibbus_attach_args ha;
-	int slave;
+	int id, slave, punit;
+	int i;
 
-	for (slave = 0; slave < 8; slave++) {
+	for (slave = 0; slave < HPIB_NSLAVES; slave++) {
 		/*
 		 * Get the ID tag for the device, if any.
 		 * Plotters won't identify themselves, and
 		 * get the same value as non-existent devices.
+		 * However, aging HP-IB drives are slow to respond; try up
+		 * to three times to get a valid ID.
 		 */
-		ha.ha_id = hpibid(device_unit(sc->sc_dev), slave);
-
-		ha.ha_slave = slave;	/* not to be modified by children */
-		

CVS commit: src/sys/arch/hp300/dev

2021-06-30 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Jun 30 14:54:03 UTC 2021

Modified Files:
src/sys/arch/hp300/dev: rd.c

Log Message:
No need to bother to use aprint_debug(9) inside #ifdef DEBUG block.


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/arch/hp300/dev/rd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/rd.c
diff -u src/sys/arch/hp300/dev/rd.c:1.103 src/sys/arch/hp300/dev/rd.c:1.104
--- src/sys/arch/hp300/dev/rd.c:1.103	Sun Jan 10 00:58:56 2021
+++ src/sys/arch/hp300/dev/rd.c	Wed Jun 30 14:54:03 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: rd.c,v 1.103 2021/01/10 00:58:56 tsutsui Exp $	*/
+/*	$NetBSD: rd.c,v 1.104 2021/06/30 14:54:03 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.103 2021/01/10 00:58:56 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.104 2021/06/30 14:54:03 tsutsui Exp $");
 
 #include "opt_useleds.h"
 
@@ -429,20 +429,20 @@ rdident(device_t parent, struct rd_softc
 
 #ifdef DEBUG
 	if (rddebug & RDB_IDENT) {
-		aprint_debug("\n");
-		aprint_debug_dev(sc->sc_dev, "name: %x ('%s')\n",
-		desc->d_name, name);
-		aprint_debug("  iuw %x, maxxfr %d, ctype %d\n",
+		aprint_normal("\n");
+		aprint_normal_dev(sc->sc_dev, "id: 0x%04x, name: %x ('%s')\n",
+		ha->ha_id, desc->d_name, name);
+		aprint_normal("  iuw %x, maxxfr %d, ctype %d\n",
 		desc->d_iuw, desc->d_cmaxxfr, desc->d_ctype);
-		aprint_debug("  utype %d, bps %d, blkbuf %d, burst %d,"
+		aprint_normal("  utype %d, bps %d, blkbuf %d, burst %d,"
 		" blktime %d\n",
 		desc->d_utype, desc->d_sectsize,
 		desc->d_blkbuf, desc->d_burstsize, desc->d_blocktime);
-		aprint_debug("  avxfr %d, ort %d, atp %d, maxint %d, fv %x"
+		aprint_normal("  avxfr %d, ort %d, atp %d, maxint %d, fv %x"
 		", rv %x\n",
 		desc->d_uavexfr, desc->d_retry, desc->d_access,
 		desc->d_maxint, desc->d_fvbyte, desc->d_rvbyte);
-		aprint_debug("  maxcyl/head/sect %d/%d/%d, maxvsect %d,"
+		aprint_normal("  maxcyl/head/sect %d/%d/%d, maxvsect %d,"
 		" inter %d\n",
 		desc->d_maxcyl, desc->d_maxhead, desc->d_maxsect,
 		desc->d_maxvsectl, desc->d_interleave);



CVS commit: src/sys/arch/hp300/dev

2021-06-04 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jun  4 17:12:08 UTC 2021

Modified Files:
src/sys/arch/hp300/dev: rdvar.h

Log Message:
Consistently use #define as rdreg.h.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/hp300/dev/rdvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/rdvar.h
diff -u src/sys/arch/hp300/dev/rdvar.h:1.23 src/sys/arch/hp300/dev/rdvar.h:1.24
--- src/sys/arch/hp300/dev/rdvar.h:1.23	Tue Apr 14 20:32:35 2015
+++ src/sys/arch/hp300/dev/rdvar.h	Fri Jun  4 17:12:08 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: rdvar.h,v 1.23 2015/04/14 20:32:35 riastradh Exp $	*/
+/*	$NetBSD: rdvar.h,v 1.24 2021/06/04 17:12:08 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -87,16 +87,16 @@ struct	rd_softc {
 /* sc_flags values */
 #define	RDF_ALIVE	0x01
 #define	RDF_SEEK	0x02
-#define RDF_SWAIT	0x04
-#define RDF_OPENING	0x08
-#define RDF_CLOSING	0x10
-#define RDF_WANTED	0x20
-#define RDF_WLABEL	0x40
+#define	RDF_SWAIT	0x04
+#define	RDF_OPENING	0x08
+#define	RDF_CLOSING	0x10
+#define	RDF_WANTED	0x20
+#define	RDF_WLABEL	0x40
 
 #define	rdunit(x)	((int)(minor(x) >> 3))
-#define rdpart(x)	((int)(minor(x) & 0x7))
+#define	rdpart(x)	((int)(minor(x) & 0x7))
 #define	rdpunit(x)	((x) & 7)
-#define rdlabdev(d)	(dev_t)(((int)(d)&~7)|2)	/* rd?c */
+#define	rdlabdev(d)	(dev_t)(((int)(d)&~7)|2)	/* rd?c */
 
 #define	RDRETRY		5
-#define RDWAITC		1	/* min time for timeout in seconds */
+#define	RDWAITC		1	/* min time for timeout in seconds */



CVS commit: src/sys/arch/hp300/dev

2021-05-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue May 18 15:21:41 UTC 2021

Modified Files:
src/sys/arch/hp300/dev: rdreg.h

Log Message:
Consistently use #define here.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hp300/dev/rdreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/rdreg.h
diff -u src/sys/arch/hp300/dev/rdreg.h:1.13 src/sys/arch/hp300/dev/rdreg.h:1.14
--- src/sys/arch/hp300/dev/rdreg.h:1.13	Tue Feb  8 20:20:13 2011
+++ src/sys/arch/hp300/dev/rdreg.h	Tue May 18 15:21:41 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: rdreg.h,v 1.13 2011/02/08 20:20:13 rmind Exp $	*/
+/*	$NetBSD: rdreg.h,v 1.14 2021/05/18 15:21:41 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -78,9 +78,9 @@ struct	rd_stat {
 		} cu_tva;
 	} c_pf;
 } __attribute__((__packed__));
-#define c_raw	c_pf.cu_raw
-#define c_blk	c_pf.cu_sva.cu_lsl	/* for now */
-#define c_tva	c_pf.cu_tva
+#define	c_raw	c_pf.cu_raw
+#define	c_blk	c_pf.cu_sva.cu_lsl	/* for now */
+#define	c_tva	c_pf.cu_tva
 
 struct	rd_ssmcmd {
 	char	c_unit;
@@ -132,18 +132,18 @@ struct rd_describe {
 #define	RD9134DID	0x221	/* also 9122S */
 #define	RD9134LID	0x222	/* also 9122D */
 #define	RD7912PID	0x209
-#define RD7914CTID	0x20A
+#define	RD7914CTID	0x20A
 #define	RD7914PID	0x20B
 #define	RD7958AID	0x22B
-#define RD7957AID	0x22A
+#define	RD7957AID	0x22A
 #define	RD7933HID	0x212
 #define	RD7936HID	0x213	/* just guessing -- as of yet unknown */
 #define	RD7937HID	0x214
-#define RD7957BID	0x22C	/* another guess based on 7958B */
-#define RD7958BID	0x22D
-#define RD7959BID	0x22E	/* another guess based on 7958B */
-#define RD2200AID	0x22F
-#define RD2203AID	0x230	/* yet another guess */
+#define	RD7957BID	0x22C	/* another guess based on 7958B */
+#define	RD7958BID	0x22D
+#define	RD7959BID	0x22E	/* another guess based on 7958B */
+#define	RD2200AID	0x22F
+#define	RD2203AID	0x230	/* yet another guess */
 
 /* SW ids -- indicies into rdidentinfo, order is arbitrary */
 #define	RD7945A		0
@@ -152,17 +152,17 @@ struct rd_describe {
 #define	RD7912P		3
 #define	RD7914P		4
 #define	RD7958A		5
-#define RD7957A		6
+#define	RD7957A		6
 #define	RD7933H		7
 #define	RD9134L		8
 #define	RD7936H		9
 #define	RD7937H		10
-#define RD7914CT	11
-#define RD7946A		12
-#define RD9122D		13
-#define RD7957B		14
-#define RD7958B		15
-#define RD7959B		16
+#define	RD7914CT	11
+#define	RD7946A		12
+#define	RD9122D		13
+#define	RD7957B		14
+#define	RD7958B		15
+#define	RD7959B		16
 
 #define	NRD7945ABPT	16
 #define	NRD7945ATRK	7
@@ -226,31 +226,31 @@ struct rd_describe {
 #define	RDCTLR		15
 
 /* convert 512 byte count into DEV_BSIZE count */
-#define RDSZ(x)		((x) >> (DEV_BSHIFT-9))
+#define	RDSZ(x)		((x) >> (DEV_BSHIFT-9))
 
 /* convert block number into sector number and back */
 #define	RDBTOS(x)	((x) << (DEV_BSHIFT-8))
-#define RDSTOB(x)	((x) >> (DEV_BSHIFT-8))
+#define	RDSTOB(x)	((x) >> (DEV_BSHIFT-8))
 
 /* extract cyl/head/sect info from three-vector address */
-#define RDCYL(tva)	((u_long)(tva).cu_cyhd >> 8)
-#define RDHEAD(tva)	((tva).cu_cyhd & 0xFF)
-#define RDSECT(tva)	((tva).cu_sect)
+#define	RDCYL(tva)	((u_long)(tva).cu_cyhd >> 8)
+#define	RDHEAD(tva)	((tva).cu_cyhd & 0xFF)
+#define	RDSECT(tva)	((tva).cu_sect)
 
 #define	REF_MASK	0x0
 #define	FEF_MASK	0x0
 #define	AEF_MASK	0x0
 #define	IEF_MASK	0xF970
 
-#define FEF_CU		0x4000	/* cross-unit */
-#define FEF_DR		0x0080	/* diagnostic result */
-#define FEF_IMR		0x0008	/* internal maintenance release */
+#define	FEF_CU		0x4000	/* cross-unit */
+#define	FEF_DR		0x0080	/* diagnostic result */
+#define	FEF_IMR		0x0008	/* internal maintenance release */
 #define	FEF_PF		0x0002	/* power fail */
 #define	FEF_REXMT	0x0001	/* retransmit */
-#define AEF_UD		0x0040	/* unrecoverable data */
-#define IEF_RRMASK	0xe000	/* request release bits */
-#define IEF_MD		0x0020	/* marginal data */
-#define IEF_RD		0x0010	/* recoverable data */
+#define	AEF_UD		0x0040	/* unrecoverable data */
+#define	IEF_RRMASK	0xe000	/* request release bits */
+#define	IEF_MD		0x0020	/* marginal data */
+#define	IEF_RD		0x0010	/* recoverable data */
 
 #define	C_READ		0x00
 #define	C_RAM		0x00	/* single vector (i.e. sector number) */
@@ -260,13 +260,13 @@ struct rd_describe {
 #define	C_SADDR		0x10
 #define	C_SLEN		0x18
 #define	C_SUNIT(x)	(0x20 | (x))
-#define C_SVOL(x)	(0x40 | (x))
+#define	C_SVOL(x)	(0x40 | (x))
 #define	C_NOP		0x34
-#define C_DESC		0x35
+#define	C_DESC		0x35
 #define	C_SREL		0x3b
 #define	C_SSM		0x3e
 #define	C_SRAM		0x48
-#define C_REL		0xc0
+#define	C_REL		0xc0
 
 #define	C_CMD		0x05
 #define	C_EXEC		0x0e



CVS commit: src/sys/arch/hp300/dev

2021-04-15 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Apr 15 14:43:19 UTC 2021

Modified Files:
src/sys/arch/hp300/dev: diofb.c topcat.c

Log Message:
Fix two problems on old topcat(4) framebuffers found on HP332/340.

- Fix panic on monochrome framebuffers. They don't have palette registers.
  The problem was reported from Anders Gustafsson and also Andrew Gillham
  back in 2013:
   https://mail-index.netbsd.org/port-hp300/2013/09/27/msg86.html
   https://mail-index.netbsd.org/port-hp300/2013/09/28/msg87.html
- Fix incorrect framebuffer width of 98542/98544 framebuffers on HP332.
  Reported from Andrew Gillham (98542) as above and Chris Hanson (98543):
   https://mail-index.netbsd.org/port-hp300/2013/09/27/msg83.html
   https://mail-index.netbsd.org/port-hp300/2020/05/01/msg000164.html

Worth to pullup to netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hp300/dev/diofb.c \
src/sys/arch/hp300/dev/topcat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/diofb.c
diff -u src/sys/arch/hp300/dev/diofb.c:1.4 src/sys/arch/hp300/dev/diofb.c:1.5
--- src/sys/arch/hp300/dev/diofb.c:1.4	Mon Mar 24 19:42:58 2014
+++ src/sys/arch/hp300/dev/diofb.c	Thu Apr 15 14:43:19 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: diofb.c,v 1.4 2014/03/24 19:42:58 christos Exp $	*/
+/*	$NetBSD: diofb.c,v 1.5 2021/04/15 14:43:19 tsutsui Exp $	*/
 /*	$OpenBSD: diofb.c,v 1.18 2010/12/26 15:40:59 miod Exp $	*/
 
 /*
@@ -146,6 +146,15 @@ diofb_fbinquire(struct diofb *fb, int sc
 	if (fb->dheight > fb->fbheight)
 		fb->dheight = fb->fbheight;
 
+	/*
+	 * Some displays, such as the HP332 and HP340 internal video
+	 * appear to return a display width of 1024 instead of 512.
+	 */
+	if (fbr->num_planes == 1 || fbr->num_planes == 4) {
+		if (fb->dwidth == 1024 && fb->dheight == 400)
+			fb->dwidth = 512;
+	}
+
 	fb->planes = fbr->num_planes;
 	if (fb->planes > 8)
 		fb->planes = 8;
Index: src/sys/arch/hp300/dev/topcat.c
diff -u src/sys/arch/hp300/dev/topcat.c:1.4 src/sys/arch/hp300/dev/topcat.c:1.5
--- src/sys/arch/hp300/dev/topcat.c:1.4	Fri Feb 18 19:15:43 2011
+++ src/sys/arch/hp300/dev/topcat.c	Thu Apr 15 14:43:19 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: topcat.c,v 1.4 2011/02/18 19:15:43 tsutsui Exp $	*/
+/*	$NetBSD: topcat.c,v 1.5 2021/04/15 14:43:19 tsutsui Exp $	*/
 /*	$OpenBSD: topcat.c,v 1.15 2006/08/11 18:33:13 miod Exp $	*/
 
 /*
@@ -274,7 +274,10 @@ topcat_end_attach(struct topcat_softc *s
 	case GID_TOPCAT:
 		switch (sc->sc_fb->planes) {
 		case 1:
-			fbname = "HP98544 topcat";
+			if (sc->sc_fb->dheight == 400)
+fbname = "HP98542 topcat";
+			else
+fbname = "HP98544 topcat";
 			break;
 		case 4:
 			if (sc->sc_fb->dheight == 400)
@@ -413,8 +416,12 @@ topcat_ioctl(void *v, void *vs, u_long c
 		*(u_int *)data = fb->ri.ri_stride;
 		return 0;
 	case WSDISPLAYIO_GETCMAP:
+		if (fb->planemask == 1)
+			return EPASSTHROUGH;
 		return diofb_getcmap(fb, (struct wsdisplay_cmap *)data);
 	case WSDISPLAYIO_PUTCMAP:
+		if (fb->planemask == 1)
+			return EPASSTHROUGH;
 		return topcat_setcmap(fb, (struct wsdisplay_cmap *)data);
 	case WSDISPLAYIO_GVIDEO:
 	case WSDISPLAYIO_SVIDEO:
@@ -429,6 +436,10 @@ topcat_setcolor(struct diofb *fb, u_int 
 {
 	volatile struct tcboxfb *tc = (struct tcboxfb *)fb->regkva;
 
+	/* No color map registers on monochrome framebuffers. */
+	if (fb->planemask == 1)
+		return;
+
 	if (tc->regs.fbid != GID_TOPCAT) {
 		tccm_waitbusy(tc);
 		tc->plane_mask = 0xff;



CVS commit: src/sys/arch/hp300/dev

2021-01-09 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jan 10 00:58:56 UTC 2021

Modified Files:
src/sys/arch/hp300/dev: rd.c

Log Message:
Print rd(4) capacity and geometry info as sd(4) and wd(4) do.

Before:
rd0 at hpibbus1 slave 0 punit 0: 7937H
rd0: 698 cylinders, 13 heads, 1116102 blocks, 512 bytes/block

After:
rd0 at hpibbus1 slave 0 punit 0: 7937H
rd0: 544 MB, 698 cyl, 13 head, 123 sec, 512 bytes/block x 1116102 blocks


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/arch/hp300/dev/rd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/rd.c
diff -u src/sys/arch/hp300/dev/rd.c:1.102 src/sys/arch/hp300/dev/rd.c:1.103
--- src/sys/arch/hp300/dev/rd.c:1.102	Tue Sep 29 02:49:56 2020
+++ src/sys/arch/hp300/dev/rd.c	Sun Jan 10 00:58:56 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: rd.c,v 1.102 2020/09/29 02:49:56 msaitoh Exp $	*/
+/*	$NetBSD: rd.c,v 1.103 2021/01/10 00:58:56 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.102 2020/09/29 02:49:56 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.103 2021/01/10 00:58:56 tsutsui Exp $");
 
 #include "opt_useleds.h"
 
@@ -384,7 +384,7 @@ rdident(device_t parent, struct rd_softc
 {
 	struct rd_describe *desc = sc != NULL ? >sc_rddesc : NULL;
 	u_char stat, cmd[3];
-	char name[7];
+	char name[7], pbuf[9];
 	int i, id, n, ctlr, slave;
 
 	ctlr = device_unit(parent);
@@ -487,11 +487,13 @@ rdident(device_t parent, struct rd_softc
 	 * XXX blocks.  ICK!
 	 */
 	aprint_normal(": %s\n", rdidentinfo[id].ri_desc);
-	aprint_normal_dev(sc->sc_dev, "%d cylinders, %d heads, %d blocks,"
-	" %d bytes/block\n",
-	rdidentinfo[id].ri_ncyl,
-	rdidentinfo[id].ri_ntpc, rdidentinfo[id].ri_nblocks,
-	DEV_BSIZE);
+	format_bytes(pbuf, sizeof(pbuf),
+	rdidentinfo[id].ri_nblocks * DEV_BSIZE);
+	aprint_normal_dev(sc->sc_dev, "%s, %d cyl, %d head, %d sec,"
+	" %d bytes/block x %u blocks\n",
+	pbuf, rdidentinfo[id].ri_ncyl, rdidentinfo[id].ri_ntpc,
+	rdidentinfo[id].ri_nbpt,
+	DEV_BSIZE, rdidentinfo[id].ri_nblocks);
 
 	return 1;
 }



CVS commit: src/sys/arch/hp300/dev

2020-12-29 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Dec 29 16:02:01 UTC 2020

Modified Files:
src/sys/arch/hp300/dev: dcm.c

Log Message:
Use C99 designated initializers for struct consdev.


To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/sys/arch/hp300/dev/dcm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/dcm.c
diff -u src/sys/arch/hp300/dev/dcm.c:1.88 src/sys/arch/hp300/dev/dcm.c:1.89
--- src/sys/arch/hp300/dev/dcm.c:1.88	Sat Nov 15 19:20:01 2014
+++ src/sys/arch/hp300/dev/dcm.c	Tue Dec 29 16:02:01 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: dcm.c,v 1.88 2014/11/15 19:20:01 christos Exp $	*/
+/*	$NetBSD: dcm.c,v 1.89 2020/12/29 16:02:01 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dcm.c,v 1.88 2014/11/15 19:20:01 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dcm.c,v 1.89 2020/12/29 16:02:01 tsutsui Exp $");
 
 #include "opt_kgdb.h"
 
@@ -306,16 +306,11 @@ static	int dcm_lastcnpri = CN_DEAD; 	/* 
 #endif
 
 static struct consdev dcm_cons = {
-	NULL,
-	NULL,
-	dcmcngetc,
-	dcmcnputc,
-	nullcnpollc,
-	NULL,
-	NULL,
-	NULL,
-	NODEV,
-	CN_REMOTE
+	.cn_getc = dcmcngetc,
+	.cn_putc = dcmcnputc,
+	.cn_pollc = nullcnpollc,
+	.cn_dev = NODEV,
+	.cn_pri = CN_REMOTE
 };
 int	dcmconscode;
 int	dcmdefaultrate = DEFAULT_BAUD_RATE;



CVS commit: src/sys/arch/hp300/dev

2020-12-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Dec 26 00:16:16 UTC 2020

Modified Files:
src/sys/arch/hp300/dev: dnkbd.c hil_intio.c

Log Message:
Fix a longstanding bug in hilkbd (and dnkbd) console attachment.

cn_tab->cn_dev is initialized in wsdisplay_emul_attach()
(but not in wsdiaplay_cnattach()) so it cannot be used
when hil(4) is attached before wsdisplay(4) is attached.
Instead, use exported wsdisplay_cnputc() that is actually
set in early wsdisplay_cnattach().

Now we can use ddb and RB_ASKNAME via HIL keyboard console.
Should be pulleld up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hp300/dev/dnkbd.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hp300/dev/hil_intio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/dnkbd.c
diff -u src/sys/arch/hp300/dev/dnkbd.c:1.10 src/sys/arch/hp300/dev/dnkbd.c:1.11
--- src/sys/arch/hp300/dev/dnkbd.c:1.10	Sat Apr  8 17:04:56 2017
+++ src/sys/arch/hp300/dev/dnkbd.c	Sat Dec 26 00:16:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: dnkbd.c,v 1.10 2017/04/08 17:04:56 tsutsui Exp $	*/
+/*	$NetBSD: dnkbd.c,v 1.11 2020/12/26 00:16:16 tsutsui Exp $	*/
 /*	$OpenBSD: dnkbd.c,v 1.17 2009/07/23 21:05:56 blambert Exp $	*/
 
 /*
@@ -69,6 +69,9 @@
 
 #include "opt_wsdisplay_compat.h"
 
+#include "wsdisplay.h"
+#include "wsmouse.h"
+
 #include 
 #include 
 #include 
@@ -87,7 +90,9 @@
 #include 
 #include 
 #include 
-#include "wsmouse.h"
+#if NWSDISPLAY > 0
+#include 
+#endif
 #if NWSMOUSE > 0
 #include 
 #endif
@@ -354,7 +359,8 @@ dnkbd_attach_subdevices(struct dnkbd_sof
 	 * plugged), unless the console keyboard has been claimed already
 	 * (i.e. late hotplug with hil keyboard plugged first).
 	 */
-	if (major(cn_tab->cn_dev) == devsw_name2chr("wsdisplay", NULL, 0)) {
+#if NWSDISPLAY > 0
+	if (cn_tab->cn_putc == wsdisplay_cnputc) {
 #if NHILKBD > 0
 		if (hil_is_console == -1) {
 			ka.console = 1;
@@ -365,7 +371,10 @@ dnkbd_attach_subdevices(struct dnkbd_sof
 		ka.console = 1;
 #endif
 	} else
+#endif
+	{
 		ka.console = 0;
+	}
 
 	ka.keymap = _keymapdata;
 	ka.accessops = _accessops;

Index: src/sys/arch/hp300/dev/hil_intio.c
diff -u src/sys/arch/hp300/dev/hil_intio.c:1.3 src/sys/arch/hp300/dev/hil_intio.c:1.4
--- src/sys/arch/hp300/dev/hil_intio.c:1.3	Sat Feb 19 05:36:49 2011
+++ src/sys/arch/hp300/dev/hil_intio.c	Sat Dec 26 00:16:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: hil_intio.c,v 1.3 2011/02/19 05:36:49 tsutsui Exp $	*/
+/*	$NetBSD: hil_intio.c,v 1.4 2020/12/26 00:16:16 tsutsui Exp $	*/
 /*	$OpenBSD: hil_intio.c,v 1.8 2007/01/06 20:10:57 miod Exp $	*/
 
 /*
@@ -28,6 +28,8 @@
  *
  */
 
+#include "wsdisplay.h"
+
 #include 
 #include 
 #include 
@@ -38,6 +40,9 @@
 #include 
 
 #include 
+#if NWSDISPLAY > 0
+#include 
+#endif
 
 #include 
 
@@ -88,8 +93,12 @@ hil_intio_attach(device_t parent, device
 	/*
 	 * Check that the configured console device is a wsdisplay.
 	 */
-	if (major(cn_tab->cn_dev) != devsw_name2chr("wsdisplay", NULL, 0))
+#if NWSDISPLAY > 0
+	if (cn_tab->cn_putc != wsdisplay_cnputc)
+#endif
+	{
 		hil_is_console = 0;
+	}
 
 	hil_attach(sc, _is_console);
 	intr_establish(hil_intr, sc, ia->ia_ipl, IPL_TTY);



CVS commit: src/sys/arch/hp300/dev

2020-12-23 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Dec 23 08:36:47 UTC 2020

Modified Files:
src/sys/arch/hp300/dev: sti_sgc.c

Log Message:
Add bitmap access ops support for SGC CRX (A1659-66001) framebuffer.

Also modify existing 425e EVRX attachment to use updated MI sti(4) ops
more efficiently.

The Xorg server and mlterm-wscons (that support wsdisplay bitmap) work
fine on SGC hp425t.

No particular comments on port-hp300@ and port-hppa@:
 https://mail-index.netbsd.org/port-hp300/2020/12/19/msg000184.html
 https://mail-index.netbsd.org/port-hp300/2020/12/20/msg000185.html

Special thanks to Miod Vallat again, for contributing the SGC CRX
framebuffer with the SGC connector and flexible cable for HP9000/425t.

He also contributed DIO-II "Hyperion" monochrome framebuffer and
1 plane grayscale SGC GRX (A1924-66001), and I've confirmed hyper(4)
just works even with Xorg server.  I will try GRX as the next project.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hp300/dev/sti_sgc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/sti_sgc.c
diff -u src/sys/arch/hp300/dev/sti_sgc.c:1.3 src/sys/arch/hp300/dev/sti_sgc.c:1.4
--- src/sys/arch/hp300/dev/sti_sgc.c:1.3	Mon May  4 06:52:53 2020
+++ src/sys/arch/hp300/dev/sti_sgc.c	Wed Dec 23 08:36:47 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sti_sgc.c,v 1.3 2020/05/04 06:52:53 tsutsui Exp $	*/
+/*	$NetBSD: sti_sgc.c,v 1.4 2020/12/23 08:36:47 tsutsui Exp $	*/
 /*	$OpenBSD: sti_sgc.c,v 1.14 2007/05/26 00:36:03 krw Exp $	*/
 
 /*
@@ -27,7 +27,7 @@
  *
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sti_sgc.c,v 1.3 2020/05/04 06:52:53 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sti_sgc.c,v 1.4 2020/12/23 08:36:47 tsutsui Exp $");
 
 #include 
 #include 
@@ -49,33 +49,40 @@ struct sti_sgc_softc {
 	struct sti_softc sc_sti;
 
 	paddr_t sc_bitmap;
-	bus_space_tag_t sc_bst;
-	bus_space_handle_t sc_ramdach;
 };
 
 /*
  * 425e EVRX specific hardware
  */
-#define STI_EVRX_RAMDACOFFSET	0x06
-#define STI_EVRX_RAMDACSIZE	0x000800
+/*
+ * EVRX RAMDAC (Bt458) is found at offset 0x06 from SGC bus PA and 
+ * offset 0x04 length 0x1c is mapped in MI sti via ROM region 2
+ */
+#define STI_EVRX_REGNO2OFFSET	0x02
 #define STI_EVRX_FBOFFSET	0x20
 
-#define EVRX_BT458_ADDR		(0x200 + 2)
-#define EVRX_BT458_CMAP		(0x204 + 2)
-#define EVRX_BT458_CTRL		(0x208 + 2)
-#define EVRX_BT458_OMAP		(0x20C + 2)
+#define EVRX_BT458_ADDR		(STI_EVRX_REGNO2OFFSET + 0x200 + 2)
+#define EVRX_BT458_CMAP		(STI_EVRX_REGNO2OFFSET + 0x204 + 2)
+#define EVRX_BT458_CTRL		(STI_EVRX_REGNO2OFFSET + 0x208 + 2)
+#define EVRX_BT458_OMAP		(STI_EVRX_REGNO2OFFSET + 0x20C + 2)
 
 /* from HP-UX /usr/lib/libddevrx.a */
-#define EVRX_MAGIC00		0x600
-#define EVRX_MAGIC04		0x604
-#define EVRX_MAGIC08		0x608
-#define EVRX_MAGIC0C		0x60c
-#define EVRX_MAGIC10		0x610
+#define EVRX_MAGIC00		(STI_EVRX_REGNO2OFFSET + 0x600)
+#define EVRX_MAGIC04		(STI_EVRX_REGNO2OFFSET + 0x604)
+#define EVRX_MAGIC08		(STI_EVRX_REGNO2OFFSET + 0x608)
+#define EVRX_MAGIC0C		(STI_EVRX_REGNO2OFFSET + 0x60c)
+#define EVRX_MAGIC10		(STI_EVRX_REGNO2OFFSET + 0x610)
 #define EVRX_MAGIC10_BSY	0x0001
-#define EVRX_MAGIC18		0x618
-#define EVRX_MAGIC1C		0x61c
+#define EVRX_MAGIC18		(STI_EVRX_REGNO2OFFSET + 0x618)
+#define EVRX_MAGIC1C		(STI_EVRX_REGNO2OFFSET + 0x61c)
+
+/*
+ * HP A1659A CRX specific hardware
+ */
+#define STI_CRX_FBOFFSET	0x0100
 
 static int sticonslot = -1;
+static struct bus_space_tag sticn_tag;
 static struct sti_rom sticn_rom;
 static struct sti_screen sticn_scr;
 static bus_addr_t sticn_bases[STI_REGION_MAX];
@@ -88,16 +95,16 @@ static int sti_sgc_probe(bus_space_tag_t
 CFATTACH_DECL_NEW(sti_sgc, sizeof(struct sti_sgc_softc),
 sti_sgc_match, sti_sgc_attach, NULL, NULL);
 
-/* 425e EVRX specific access functions */
-static int sti_evrx_setcmap(struct sti_sgc_softc *, struct wsdisplay_cmap *);
-static void sti_evrx_resetramdac(struct sti_sgc_softc *);
-static void sti_evrx_resetcmap(struct sti_sgc_softc *);
-static int sti_evrx_ioctl(void *, void *, u_long, void *, int, struct lwp *);
-static paddr_t sti_evrx_mmap(void *, void *, off_t, int);
-
-static const struct wsdisplay_accessops sti_evrx_accessops = {
-	sti_evrx_ioctl,
-	sti_evrx_mmap,
+/* 425e EVRX/CRX specific access functions */
+static int sti_evrx_putcmap(struct sti_screen *, u_int, u_int);
+static void sti_evrx_resetramdac(struct sti_screen *);
+static void sti_evrx_resetcmap(struct sti_screen *);
+static void sti_evrx_setupfb(struct sti_screen *);
+static paddr_t sti_m68k_mmap(void *, void *, off_t, int);
+
+static const struct wsdisplay_accessops sti_m68k_accessops = {
+	sti_ioctl,
+	sti_m68k_mmap,
 	sti_alloc_screen,
 	sti_free_screen,
 	sti_show_screen,
@@ -126,6 +133,7 @@ sti_sgc_attach(device_t parent, device_t
 	struct sti_softc *ssc = >sc_sti;
 	struct sgc_attach_args *saa = aux;
 	struct 

CVS commit: src/sys/arch/hp300/dev

2017-03-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Mar 25 22:09:45 UTC 2017

Modified Files:
src/sys/arch/hp300/dev: ppi.c

Log Message:
Include  for hz.

Compile test only. (no HP-IB devices here)


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/hp300/dev/ppi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/ppi.c
diff -u src/sys/arch/hp300/dev/ppi.c:1.45 src/sys/arch/hp300/dev/ppi.c:1.46
--- src/sys/arch/hp300/dev/ppi.c:1.45	Fri Jul 25 08:10:33 2014
+++ src/sys/arch/hp300/dev/ppi.c	Sat Mar 25 22:09:45 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ppi.c,v 1.45 2014/07/25 08:10:33 dholland Exp $	*/
+/*	$NetBSD: ppi.c,v 1.46 2017/03/25 22:09:45 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -65,10 +65,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ppi.c,v 1.45 2014/07/25 08:10:33 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ppi.c,v 1.46 2017/03/25 22:09:45 tsutsui Exp $");
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -486,7 +487,6 @@ ppiioctl(dev_t dev, u_long cmd, void *da
 static int
 ppihztoms(int h)
 {
-	extern int hz;
 	int m = h;
 
 	if (m > 0)
@@ -497,7 +497,6 @@ ppihztoms(int h)
 static int
 ppimstohz(int m)
 {
-	extern int hz;
 	int h = m;
 
 	if (h > 0) {



CVS commit: src/sys/arch/hp300/dev

2017-03-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Mar 25 22:08:27 UTC 2017

Modified Files:
src/sys/arch/hp300/dev: dnkbd.c

Log Message:
In RAWKBD mode, don't schedule autorepeat callout(9) after KEY_UP events.

Now Apollo Domain keyboard works propery on Xorg server on my 425t.
Changes are taken from sys/dev/hil/hilkbd.c.

Note as OpenBSD says in the following commit log:
 
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/arch/hp300/dev/Attic/dnkbd.c#rev1.18
>> Auto-repeat keys in WSKBD_RAW mode is not needed.
>> WSKBD_RAW mode used in X, but X independently implements auto-repeat keys.
these autorepeat code will be removed later, but I commit this fix first
for the record.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hp300/dev/dnkbd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/dnkbd.c
diff -u src/sys/arch/hp300/dev/dnkbd.c:1.8 src/sys/arch/hp300/dev/dnkbd.c:1.9
--- src/sys/arch/hp300/dev/dnkbd.c:1.8	Sat Mar 25 01:48:31 2017
+++ src/sys/arch/hp300/dev/dnkbd.c	Sat Mar 25 22:08:27 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: dnkbd.c,v 1.8 2017/03/25 01:48:31 tsutsui Exp $	*/
+/*	$NetBSD: dnkbd.c,v 1.9 2017/03/25 22:08:27 tsutsui Exp $	*/
 /*	$OpenBSD: dnkbd.c,v 1.17 2009/07/23 21:05:56 blambert Exp $	*/
 
 /*
@@ -706,8 +706,9 @@ dnevent_kbd_internal(struct dnkbd_softc 
 #ifdef WSDISPLAY_COMPAT_RAWKBD
 	if (sc->sc_rawkbd) {
 		u_char cbuf[2];
-		int c, j = 0;
+		int c, j, npress;
 
+		npress = j = 0;
 		c = dnkbd_raw[key];
 		if (c != 0) {
 			/* fake extended scancode if necessary */
@@ -718,7 +719,9 @@ dnevent_kbd_internal(struct dnkbd_softc 
 cbuf[j] |= 0x80;
 			else {
 /* remember pressed key for autorepeat */
-memcpy(sc->sc_rep, cbuf, sizeof(sc->sc_rep));
+if (c & 0x80)
+	sc->sc_rep[npress++] = 0xe0;
+sc->sc_rep[npress++] = c & 0x7f;
 			}
 			j++;
 		}
@@ -728,9 +731,11 @@ dnevent_kbd_internal(struct dnkbd_softc 
 			wskbd_rawinput(sc->sc_wskbddev, cbuf, j);
 			splx(s);
 			callout_stop(>sc_rawrepeat_ch);
-			sc->sc_nrep = j;
-			callout_schedule(>sc_rawrepeat_ch,
-			mstohz(REP_DELAY1));
+			sc->sc_nrep = npress;
+			if (npress != 0) {
+callout_schedule(>sc_rawrepeat_ch,
+mstohz(REP_DELAY1));
+			}
 		}
 	} else
 #endif



CVS commit: src/sys/arch/hp300/dev

2017-03-24 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Mar 25 01:48:31 UTC 2017

Modified Files:
src/sys/arch/hp300/dev: dnkbd.c

Log Message:
Send break signal to reset keyboard state before keyboard probe.

Now Apollo Domain keyboard is probed properly even after
any keys are typed before boot (i.e. on bootloader prompt).

Tested on 425e and A1630-82001 keyboard
(that were contributed by Miod Vallat).


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hp300/dev/dnkbd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/dnkbd.c
diff -u src/sys/arch/hp300/dev/dnkbd.c:1.7 src/sys/arch/hp300/dev/dnkbd.c:1.8
--- src/sys/arch/hp300/dev/dnkbd.c:1.7	Thu Apr 24 12:10:27 2014
+++ src/sys/arch/hp300/dev/dnkbd.c	Sat Mar 25 01:48:31 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: dnkbd.c,v 1.7 2014/04/24 12:10:27 tsutsui Exp $	*/
+/*	$NetBSD: dnkbd.c,v 1.8 2017/03/25 01:48:31 tsutsui Exp $	*/
 /*	$OpenBSD: dnkbd.c,v 1.17 2009/07/23 21:05:56 blambert Exp $	*/
 
 /*
@@ -263,6 +263,7 @@ static int	dnkbd_probe(struct dnkbd_soft
 static void	dnkbd_rawrepeat(void *);
 #endif
 static int	dnkbd_send(struct dnkbd_softc *, const uint8_t *, size_t);
+static void	dnkbd_break(struct dnkbd_softc *, int);
 
 int
 dnkbd_match(device_t parent, cfdata_t cf, void *aux)
@@ -309,6 +310,12 @@ dnkbd_attach(device_t parent, device_t s
 
 	frodo_intr_establish(parent, dnkbd_intr, sc, fa->fa_line, IPL_VM);
 
+	/* send break to reset keyboard state */
+	dnkbd_break(sc, 1);
+	delay(10 * 1000);	/* 10ms for 12 space bits */
+	dnkbd_break(sc, 0);
+	delay(10 * 1000);
+
 	/* probe for keyboard */
 	if (dnkbd_probe(sc) != 0) {
 		aprint_normal("no keyboard\n");
@@ -869,6 +876,24 @@ dnkbd_send(struct dnkbd_softc *sc, const
 	return 0;
 }
 
+void
+dnkbd_break(struct dnkbd_softc *sc, int onoff)
+{
+	bus_space_tag_t bst;
+	bus_space_handle_t bsh;
+	uint8_t reg;
+
+	bst = sc->sc_bst;
+	bsh = sc->sc_bsh;
+
+	reg = bus_space_read_1(bst, bsh, com_lctl);
+	if (onoff)
+		reg |= LCR_SBREAK;
+	else
+		reg &= ~LCR_SBREAK;
+	bus_space_write_1(bst, bsh, com_lctl, reg);
+}
+
 int
 dnkbd_intr(void *v)
 {



CVS commit: src/sys/arch/hp300/dev

2014-05-22 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Thu May 22 16:30:40 UTC 2014

Modified Files:
src/sys/arch/hp300/dev: dcmreg.h

Log Message:
Use uintptr_t so this file can be compile-tested on foreign arches.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hp300/dev/dcmreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/dcmreg.h
diff -u src/sys/arch/hp300/dev/dcmreg.h:1.9 src/sys/arch/hp300/dev/dcmreg.h:1.10
--- src/sys/arch/hp300/dev/dcmreg.h:1.9	Tue Feb  8 20:20:13 2011
+++ src/sys/arch/hp300/dev/dcmreg.h	Thu May 22 16:30:40 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: dcmreg.h,v 1.9 2011/02/08 20:20:13 rmind Exp $	*/
+/*	$NetBSD: dcmreg.h,v 1.10 2014/05/22 16:30:40 dholland Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -131,7 +131,7 @@ struct	dcmpreg {
 	u_char		pad3[7];	/* +12 */
 	vu_char	t_tail;			/* +19 */
 };
-#define	dcm_preg(d, p)	((struct dcmpreg *)((u_int)(d)+0x8e00+(p)*2))
+#define	dcm_preg(d, p)	((struct dcmpreg *)((uintptr_t)(d)+0x8e00+(p)*2))
 
 /* interface reset/id */
 #define DCMCON  0x80	/* REMOTE/LOCAL switch, read */



CVS commit: src/sys/arch/hp300/dev

2014-04-30 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Apr 30 15:53:09 UTC 2014

Modified Files:
src/sys/arch/hp300/dev: frodo.c

Log Message:
Probe mcclock only on 425e to avoid an extra not configured message.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/hp300/dev/frodo.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/frodo.c
diff -u src/sys/arch/hp300/dev/frodo.c:1.31 src/sys/arch/hp300/dev/frodo.c:1.32
--- src/sys/arch/hp300/dev/frodo.c:1.31	Sat Apr 19 05:37:54 2014
+++ src/sys/arch/hp300/dev/frodo.c	Wed Apr 30 15:53:09 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: frodo.c,v 1.31 2014/04/19 05:37:54 tsutsui Exp $	*/
+/*	$NetBSD: frodo.c,v 1.32 2014/04/30 15:53:09 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: frodo.c,v 1.31 2014/04/19 05:37:54 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: frodo.c,v 1.32 2014/04/30 15:53:09 tsutsui Exp $);
 
 #define	_HP300_INTR_H_PRIVATE
 
@@ -197,6 +197,11 @@ frodoattach(device_t parent, device_t se
 		if (fd-fd_offset == FRODO_APCI_OFFSET(1) 
 		mmuid != MMUID_425_E)
 			continue;
+		/*
+		 * The mcclock is available only on a 425e.
+		 */
+		if (fd-fd_offset == FRODO_CALENDAR  mmuid != MMUID_425_E)
+			continue;
 		fa.fa_name = fd-fd_name;
 		fa.fa_bst = bst;
 		fa.fa_base = ia-ia_iobase;



CVS commit: src/sys/arch/hp300/dev

2014-03-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 26 17:55:26 UTC 2014

Modified Files:
src/sys/arch/hp300/dev: dio.c

Log Message:
kill sprintf


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/hp300/dev/dio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/dio.c
diff -u src/sys/arch/hp300/dev/dio.c:1.38 src/sys/arch/hp300/dev/dio.c:1.39
--- src/sys/arch/hp300/dev/dio.c:1.38	Sun Mar  6 09:51:21 2011
+++ src/sys/arch/hp300/dev/dio.c	Wed Mar 26 13:55:26 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: dio.c,v 1.38 2011/03/06 14:51:21 tsutsui Exp $	*/
+/*	$NetBSD: dio.c,v 1.39 2014/03/26 17:55:26 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dio.c,v 1.38 2011/03/06 14:51:21 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: dio.c,v 1.39 2014/03/26 17:55:26 christos Exp $);
 
 #define	_HP300_INTR_H_PRIVATE
 
@@ -263,7 +263,8 @@ dio_devinfo(struct dio_attach_args *da, 
 }
 			} else {
 			foundit:
-sprintf(buf, %s, dio_devdescs[i].dd_desc);
+snprintf(buf, buflen, %s,
+dio_devdescs[i].dd_desc);
 return buf;
 			}
 		}
@@ -273,7 +274,7 @@ dio_devinfo(struct dio_attach_args *da, 
 	/*
 	 * Device is unknown.  Construct something reasonable.
 	 */
-	sprintf(buf, device id = 0x%x secid = 0x%x,
+	snprintf(buf, buflen, device id = 0x%x secid = 0x%x,
 	da-da_id, da-da_secid);
 	return buf;
 }



CVS commit: src/sys/arch/hp300/dev

2014-01-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 10 16:35:59 UTC 2014

Modified Files:
src/sys/arch/hp300/dev: Makefile

Log Message:
don't include bsd.sys.mk


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hp300/dev/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/Makefile
diff -u src/sys/arch/hp300/dev/Makefile:1.4 src/sys/arch/hp300/dev/Makefile:1.5
--- src/sys/arch/hp300/dev/Makefile:1.4	Tue Dec 28 05:15:49 2010
+++ src/sys/arch/hp300/dev/Makefile	Fri Jan 10 11:35:59 2014
@@ -1,7 +1,6 @@
-#	$NetBSD: Makefile,v 1.4 2010/12/28 10:15:49 tsutsui Exp $
+#	$NetBSD: Makefile,v 1.5 2014/01/10 16:35:59 christos Exp $
 
 .include bsd.own.mk
-.include bsd.sys.mk
 
 diodevs.h diodevs_data.h: diodevs devlist2h.awk
 	/bin/rm -f diodevs.h diodevs_data.h



CVS commit: src/sys/arch/hp300/dev

2011-07-27 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Thu Jul 28 03:42:21 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: ppi.c rd.c

Log Message:
dev_t is uint64_t; use PRIx64 to print it.  Fix DEBUG build.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/hp300/dev/ppi.c
cvs rdiff -u -r1.90 -r1.91 src/sys/arch/hp300/dev/rd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/ppi.c
diff -u src/sys/arch/hp300/dev/ppi.c:1.42 src/sys/arch/hp300/dev/ppi.c:1.43
--- src/sys/arch/hp300/dev/ppi.c:1.42	Wed Jun 18 12:25:13 2008
+++ src/sys/arch/hp300/dev/ppi.c	Thu Jul 28 03:42:20 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ppi.c,v 1.42 2008/06/18 12:25:13 tsutsui Exp $	*/
+/*	$NetBSD: ppi.c,v 1.43 2011/07/28 03:42:20 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ppi.c,v 1.42 2008/06/18 12:25:13 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: ppi.c,v 1.43 2011/07/28 03:42:20 uebayasi Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -206,7 +206,7 @@
 
 #ifdef DEBUG
 	if (ppidebug  PDB_FOLLOW)
-		printf(ppiopen(%x, %x): flags %x\n,
+		printf(ppiopen(%PRIx64, %x): flags %x\n,
 		   dev, flags, sc-sc_flags);
 #endif
 	if (sc-sc_flags  PPIF_OPEN)
@@ -226,7 +226,7 @@
 
 #ifdef DEBUG
 	if (ppidebug  PDB_FOLLOW)
-		printf(ppiclose(%x, %x): flags %x\n,
+		printf(ppiclose(%PRIx64, %x): flags %x\n,
 		   dev, flags, sc-sc_flags);
 #endif
 	sc-sc_flags = ~PPIF_OPEN;
@@ -265,7 +265,7 @@
 
 #ifdef DEBUG
 	if (ppidebug  PDB_FOLLOW)
-		printf(ppiread(%x, %p)\n, dev, uio);
+		printf(ppiread(%PRIx64, %p)\n, dev, uio);
 #endif
 	return ppirw(dev, uio);
 }
@@ -276,7 +276,7 @@
 
 #ifdef DEBUG
 	if (ppidebug  PDB_FOLLOW)
-		printf(ppiwrite(%x, %p)\n, dev, uio);
+		printf(ppiwrite(%PRIx64, %p)\n, dev, uio);
 #endif
 	return ppirw(dev, uio);
 }
@@ -299,7 +299,7 @@
 
 #ifdef DEBUG
 	if (ppidebug  (PDB_FOLLOW|PDB_IO))
-		printf(ppirw(%x, %p, %c): burst %d, timo %d, resid %x\n,
+		printf(ppirw(%PRIx64, %p, %c): burst %d, timo %d, resid %x\n,
 		   dev, uio, uio-uio_rw == UIO_READ ? 'R' : 'W',
 		   sc-sc_burst, sc-sc_timo, uio-uio_resid);
 #endif

Index: src/sys/arch/hp300/dev/rd.c
diff -u src/sys/arch/hp300/dev/rd.c:1.90 src/sys/arch/hp300/dev/rd.c:1.91
--- src/sys/arch/hp300/dev/rd.c:1.90	Tue Feb  8 20:20:13 2011
+++ src/sys/arch/hp300/dev/rd.c	Thu Jul 28 03:42:20 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rd.c,v 1.90 2011/02/08 20:20:13 rmind Exp $	*/
+/*	$NetBSD: rd.c,v 1.91 2011/07/28 03:42:20 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rd.c,v 1.90 2011/02/08 20:20:13 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: rd.c,v 1.91 2011/07/28 03:42:20 uebayasi Exp $);
 
 #include opt_useleds.h
 #include rnd.h
@@ -657,7 +657,7 @@
 
 #ifdef DEBUG
 	if (rddebug  RDB_FOLLOW)
-		printf(rdstrategy(%p): dev %x, bn %llx, bcount %x, %c\n,
+		printf(rdstrategy(%p): dev %PRIx64, bn %llx, bcount %x, %c\n,
 		   bp, bp-b_dev, bp-b_blkno, bp-b_bcount,
 		   (bp-b_flags  B_READ) ? 'R' : 'W');
 #endif



CVS commit: src/sys/arch/hp300/dev

2011-02-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Feb 18 16:02:48 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: topcat.c

Log Message:
Make local functions and variables static.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hp300/dev/topcat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/topcat.c
diff -u src/sys/arch/hp300/dev/topcat.c:1.2 src/sys/arch/hp300/dev/topcat.c:1.3
--- src/sys/arch/hp300/dev/topcat.c:1.2	Sat Feb 12 16:40:29 2011
+++ src/sys/arch/hp300/dev/topcat.c	Fri Feb 18 16:02:48 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: topcat.c,v 1.2 2011/02/12 16:40:29 tsutsui Exp $	*/
+/*	$NetBSD: topcat.c,v 1.3 2011/02/18 16:02:48 tsutsui Exp $	*/
 /*	$OpenBSD: topcat.c,v 1.15 2006/08/11 18:33:13 miod Exp $	*/
 
 /*
@@ -129,10 +129,10 @@
 	int		sc_scode;
 };
 
-int	topcat_dio_match(device_t, cfdata_t, void *);
-void	topcat_dio_attach(device_t, device_t, void *);
-int	topcat_intio_match(device_t, cfdata_t, void *);
-void	topcat_intio_attach(device_t, device_t, void *);
+static int	topcat_dio_match(device_t, cfdata_t, void *);
+static void	topcat_dio_attach(device_t, device_t, void *);
+static int	topcat_intio_match(device_t, cfdata_t, void *);
+static void	topcat_intio_attach(device_t, device_t, void *);
 
 CFATTACH_DECL_NEW(topcat_dio, sizeof(struct topcat_softc),
 topcat_dio_match, topcat_dio_attach, NULL, NULL);
@@ -140,17 +140,17 @@
 CFATTACH_DECL_NEW(topcat_intio, sizeof(struct topcat_softc),
 topcat_intio_match, topcat_intio_attach, NULL, NULL);
 
-void	topcat_end_attach(struct topcat_softc *, uint8_t);
-int	topcat_reset(struct diofb *, int, struct diofbreg *);
-void	topcat_restore(struct diofb *);
-int	topcat_setcmap(struct diofb *, struct wsdisplay_cmap *);
-void	topcat_setcolor(struct diofb *, u_int);
-int	topcat_windowmove(struct diofb *, uint16_t, uint16_t, uint16_t,
-	uint16_t, uint16_t, uint16_t, int16_t, int16_t);
+static void	topcat_end_attach(struct topcat_softc *, uint8_t);
+static int	topcat_reset(struct diofb *, int, struct diofbreg *);
+static void	topcat_restore(struct diofb *);
+static int	topcat_setcmap(struct diofb *, struct wsdisplay_cmap *);
+static void	topcat_setcolor(struct diofb *, u_int);
+static int	topcat_windowmove(struct diofb *, uint16_t, uint16_t, uint16_t,
+		uint16_t, uint16_t, uint16_t, int16_t, int16_t);
 
-int	topcat_ioctl(void *, void *, u_long, void *, int, struct lwp *);
+static int	topcat_ioctl(void *, void *, u_long, void *, int, struct lwp *);
 
-struct	wsdisplay_accessops	topcat_accessops = {
+static struct wsdisplay_accessops topcat_accessops = {
 	topcat_ioctl,
 	diofb_mmap,
 	diofb_alloc_screen,



CVS commit: src/sys/arch/hp300/dev

2011-02-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Feb 18 19:15:06 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: sgc.c

Log Message:
Make local functions static.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hp300/dev/sgc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/sgc.c
diff -u src/sys/arch/hp300/dev/sgc.c:1.1 src/sys/arch/hp300/dev/sgc.c:1.2
--- src/sys/arch/hp300/dev/sgc.c:1.1	Sat Feb 12 05:15:39 2011
+++ src/sys/arch/hp300/dev/sgc.c	Fri Feb 18 19:15:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: sgc.c,v 1.1 2011/02/12 05:15:39 tsutsui Exp $	*/
+/*	$NetBSD: sgc.c,v 1.2 2011/02/18 19:15:06 tsutsui Exp $	*/
 /*	$OpenBSD: sgc.c,v 1.6 2010/04/15 20:35:21 miod Exp $	*/
 
 /*
@@ -55,9 +55,9 @@
 	struct bus_space_tag sc_tag;
 };
 
-int	sgcmatch(device_t, cfdata_t, void *);
-void	sgcattach(device_t, device_t, void *);
-int	sgcprint(void *, const char *);
+static int	sgcmatch(device_t, cfdata_t, void *);
+static void	sgcattach(device_t, device_t, void *);
+static int	sgcprint(void *, const char *);
 
 CFATTACH_DECL_NEW(sgc, sizeof(struct sgc_softc),
 sgcmatch, sgcattach, NULL, NULL);



CVS commit: src/sys/arch/hp300/dev

2011-02-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Feb 18 19:15:44 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: diofb.c dnkbd.c dvbox.c gbox.c hyper.c rbox.c
topcat.c tvrx.c

Log Message:
Use aprint_normal(9) and variants.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hp300/dev/diofb.c \
src/sys/arch/hp300/dev/dvbox.c src/sys/arch/hp300/dev/gbox.c \
src/sys/arch/hp300/dev/hyper.c src/sys/arch/hp300/dev/rbox.c \
src/sys/arch/hp300/dev/tvrx.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/hp300/dev/dnkbd.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hp300/dev/topcat.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/diofb.c
diff -u src/sys/arch/hp300/dev/diofb.c:1.2 src/sys/arch/hp300/dev/diofb.c:1.3
--- src/sys/arch/hp300/dev/diofb.c:1.2	Sat Feb 12 16:40:29 2011
+++ src/sys/arch/hp300/dev/diofb.c	Fri Feb 18 19:15:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: diofb.c,v 1.2 2011/02/12 16:40:29 tsutsui Exp $	*/
+/*	$NetBSD: diofb.c,v 1.3 2011/02/18 19:15:43 tsutsui Exp $	*/
 /*	$OpenBSD: diofb.c,v 1.18 2010/12/26 15:40:59 miod Exp $	*/
 
 /*
@@ -305,16 +305,16 @@
 {
 	struct wsemuldisplaydev_attach_args waa;
 
-	printf(: %dx%d, fb-dwidth, fb-dheight);
+	aprint_normal(: %dx%d, fb-dwidth, fb-dheight);
 
 	if (fb-planes == 1)
-		printf( monochrome);
+		aprint_normal( monochrome);
 	else
-		printf(x%d, fb-planes);
+		aprint_normal(x%d, fb-planes);
 
 	if (descr != NULL)
-		printf( %s, descr);
-	printf( frame buffer\n);
+		aprint_normal( %s, descr);
+	aprint_normal( frame buffer\n);
 
 	fb-scrlist[0] = fb-wsd;
 	fb-wsl.nscreens = 1;
Index: src/sys/arch/hp300/dev/dvbox.c
diff -u src/sys/arch/hp300/dev/dvbox.c:1.2 src/sys/arch/hp300/dev/dvbox.c:1.3
--- src/sys/arch/hp300/dev/dvbox.c:1.2	Sat Feb 12 16:40:29 2011
+++ src/sys/arch/hp300/dev/dvbox.c	Fri Feb 18 19:15:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: dvbox.c,v 1.2 2011/02/12 16:40:29 tsutsui Exp $	*/
+/*	$NetBSD: dvbox.c,v 1.3 2011/02/18 19:15:43 tsutsui Exp $	*/
 /*	$OpenBSD: dvbox.c,v 1.13 2006/08/11 18:33:13 miod Exp $	*/
 
 /*
@@ -235,7 +235,7 @@
 		}
 		fbr = bus_space_vaddr(da-da_bst, bsh);
 		if (dvbox_reset(sc-sc_fb, sc-sc_scode, fbr) != 0) {
-			printf(: can't map framebuffer\n);
+			aprint_error(: can't reset framebuffer\n);
 			return;
 		}
 	}
Index: src/sys/arch/hp300/dev/gbox.c
diff -u src/sys/arch/hp300/dev/gbox.c:1.2 src/sys/arch/hp300/dev/gbox.c:1.3
--- src/sys/arch/hp300/dev/gbox.c:1.2	Sat Feb 12 16:40:29 2011
+++ src/sys/arch/hp300/dev/gbox.c	Fri Feb 18 19:15:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: gbox.c,v 1.2 2011/02/12 16:40:29 tsutsui Exp $	*/
+/*	$NetBSD: gbox.c,v 1.3 2011/02/18 19:15:43 tsutsui Exp $	*/
 /*	$OpenBSD: gbox.c,v 1.15 2007/01/07 15:13:52 miod Exp $	*/
 
 /*
@@ -244,7 +244,7 @@
 		}
 		fbr = bus_space_vaddr(da-da_bst, bsh);
 		if (gbox_reset(sc-sc_fb, sc-sc_scode, fbr) != 0) {
-			printf(: can't map framebuffer\n);
+			aprint_error(: can't reset framebuffer\n);
 			return;
 		}
 	}
Index: src/sys/arch/hp300/dev/hyper.c
diff -u src/sys/arch/hp300/dev/hyper.c:1.2 src/sys/arch/hp300/dev/hyper.c:1.3
--- src/sys/arch/hp300/dev/hyper.c:1.2	Sat Feb 12 16:40:29 2011
+++ src/sys/arch/hp300/dev/hyper.c	Fri Feb 18 19:15:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: hyper.c,v 1.2 2011/02/12 16:40:29 tsutsui Exp $	*/
+/*	$NetBSD: hyper.c,v 1.3 2011/02/18 19:15:43 tsutsui Exp $	*/
 /*	$OpenBSD: hyper.c,v 1.15 2006/04/14 21:05:43 miod Exp $	*/
 
 /*
@@ -187,7 +187,7 @@
 		}
 		fbr = bus_space_vaddr(da-da_bst, bsh);
 		if (hyper_reset(sc-sc_fb, sc-sc_scode, fbr) != 0) {
-			printf(: can't map framebuffer\n);
+			aprint_error(: can't reset framebuffer\n);
 			return;
 		}
 	}
Index: src/sys/arch/hp300/dev/rbox.c
diff -u src/sys/arch/hp300/dev/rbox.c:1.2 src/sys/arch/hp300/dev/rbox.c:1.3
--- src/sys/arch/hp300/dev/rbox.c:1.2	Sat Feb 12 16:40:29 2011
+++ src/sys/arch/hp300/dev/rbox.c	Fri Feb 18 19:15:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rbox.c,v 1.2 2011/02/12 16:40:29 tsutsui Exp $	*/
+/*	$NetBSD: rbox.c,v 1.3 2011/02/18 19:15:43 tsutsui Exp $	*/
 /*	$OpenBSD: rbox.c,v 1.14 2006/08/11 18:33:13 miod Exp $	*/
 
 /*
@@ -235,7 +235,7 @@
 		}
 		fbr = bus_space_vaddr(da-da_bst, bsh);
 		if (rbox_reset(sc-sc_fb, sc-sc_scode, fbr) != 0) {
-			printf(: can't map framebuffer\n);
+			aprint_error(: can't reset framebuffer\n);
 			return;
 		}
 	}
Index: src/sys/arch/hp300/dev/tvrx.c
diff -u src/sys/arch/hp300/dev/tvrx.c:1.2 src/sys/arch/hp300/dev/tvrx.c:1.3
--- src/sys/arch/hp300/dev/tvrx.c:1.2	Sat Feb 12 16:40:29 2011
+++ src/sys/arch/hp300/dev/tvrx.c	Fri Feb 18 19:15:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: tvrx.c,v 1.2 2011/02/12 16:40:29 tsutsui Exp $	*/
+/*	$NetBSD: tvrx.c,v 1.3 2011/02/18 19:15:43 tsutsui Exp $	*/
 /*	$OpenBSD: tvrx.c,v 1.1 2006/04/14 21:05:43 miod Exp $	*/
 
 /*
@@ -120,7 +120,7 @@
 		}
 		fbr = bus_space_vaddr(da-da_bst, bsh);
 		if (tvrx_reset(sc-sc_fb, sc-sc_scode, fbr) != 0) {
-			

CVS commit: src/sys/arch/hp300/dev

2011-02-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Feb 19 05:35:00 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: hil_intio.c

Log Message:
- make local functions static
- use aprint_erorr(9)
- some KNF


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hp300/dev/hil_intio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/hil_intio.c
diff -u src/sys/arch/hp300/dev/hil_intio.c:1.1 src/sys/arch/hp300/dev/hil_intio.c:1.2
--- src/sys/arch/hp300/dev/hil_intio.c:1.1	Sun Feb  6 18:26:51 2011
+++ src/sys/arch/hp300/dev/hil_intio.c	Sat Feb 19 05:34:59 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: hil_intio.c,v 1.1 2011/02/06 18:26:51 tsutsui Exp $	*/
+/*	$NetBSD: hil_intio.c,v 1.2 2011/02/19 05:34:59 tsutsui Exp $	*/
 /*	$OpenBSD: hil_intio.c,v 1.8 2007/01/06 20:10:57 miod Exp $	*/
 
 /*
@@ -44,8 +44,8 @@
 #include machine/hil_machdep.h
 #include dev/hil/hilvar.h
 
-int	hil_intio_match(device_t, cfdata_t, void *);
-void	hil_intio_attach(device_t, device_t, void *);
+static int	hil_intio_match(device_t, cfdata_t, void *);
+static void	hil_intio_attach(device_t, device_t, void *);
 
 CFATTACH_DECL_NEW(hil_intio, sizeof(struct hil_softc),
 hil_intio_match, hil_intio_attach, NULL, NULL);
@@ -61,12 +61,12 @@
 
 	/* Allow only one instance. */
 	if (hil_matched != 0)
-		return (0);
+		return 0;
 
 	if (badaddr((void *)ia-ia_addr))	/* should not happen! */
-		return (0);
+		return 0;
 
-	return (1);
+	return 1;
 }
 
 int hil_is_console = -1;	/* undecided */
@@ -81,7 +81,7 @@
 	sc-sc_bst = ia-ia_bst;
 	if (bus_space_map(sc-sc_bst, ia-ia_iobase,
 	HILMAPSIZE, 0, sc-sc_bsh) != 0) {
-		printf(: couldn't map hil controller\n);
+		aprint_error(: couldn't map hil controller\n);
 		return;
 	}
 



CVS commit: src/sys/arch/hp300/dev

2011-02-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Feb 19 05:36:50 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: hil_intio.c

Log Message:
Actually check that the configured console device is a wsdisplay.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hp300/dev/hil_intio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/hil_intio.c
diff -u src/sys/arch/hp300/dev/hil_intio.c:1.2 src/sys/arch/hp300/dev/hil_intio.c:1.3
--- src/sys/arch/hp300/dev/hil_intio.c:1.2	Sat Feb 19 05:34:59 2011
+++ src/sys/arch/hp300/dev/hil_intio.c	Sat Feb 19 05:36:49 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: hil_intio.c,v 1.2 2011/02/19 05:34:59 tsutsui Exp $	*/
+/*	$NetBSD: hil_intio.c,v 1.3 2011/02/19 05:36:49 tsutsui Exp $	*/
 /*	$OpenBSD: hil_intio.c,v 1.8 2007/01/06 20:10:57 miod Exp $	*/
 
 /*
@@ -88,7 +88,8 @@
 	/*
 	 * Check that the configured console device is a wsdisplay.
 	 */
-	hil_is_console = 1;
+	if (major(cn_tab-cn_dev) != devsw_name2chr(wsdisplay, NULL, 0))
+		hil_is_console = 0;
 
 	hil_attach(sc, hil_is_console);
 	intr_establish(hil_intr, sc, ia-ia_ipl, IPL_TTY);



CVS commit: src/sys/arch/hp300/dev

2011-02-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Feb 19 05:37:55 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: dnkbdmap.c dnkbdmap.h

Log Message:
u_int8_t - uint8_t


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hp300/dev/dnkbdmap.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hp300/dev/dnkbdmap.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/dnkbdmap.c
diff -u src/sys/arch/hp300/dev/dnkbdmap.c:1.2 src/sys/arch/hp300/dev/dnkbdmap.c:1.3
--- src/sys/arch/hp300/dev/dnkbdmap.c:1.2	Sat Feb 12 16:36:37 2011
+++ src/sys/arch/hp300/dev/dnkbdmap.c	Sat Feb 19 05:37:55 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: dnkbdmap.c,v 1.2 2011/02/12 16:36:37 tsutsui Exp $	*/
+/*	$NetBSD: dnkbdmap.c,v 1.3 2011/02/19 05:37:55 tsutsui Exp $	*/
 /*	$OpenBSD: dnkbdmap.c,v 1.2 2005/05/06 22:22:53 miod Exp $	*/
 /*
  * Copyright (c) 2005, Miodrag Vallat
@@ -40,7 +40,7 @@
  * Translate Domain keycodes to US keyboard XT scancodes, for proper
  * X11-over-wsmux operation.
  */
-const u_int8_t dnkbd_raw[0x80] = {
+const uint8_t dnkbd_raw[0x80] = {
 0x00, 0x00, 0x00, 0x00, 0x44, 0x3b, 0x3c, 0x3d,
 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x00, 0x00,
 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x01, 0x01,

Index: src/sys/arch/hp300/dev/dnkbdmap.h
diff -u src/sys/arch/hp300/dev/dnkbdmap.h:1.1 src/sys/arch/hp300/dev/dnkbdmap.h:1.2
--- src/sys/arch/hp300/dev/dnkbdmap.h:1.1	Sat Feb 12 15:49:01 2011
+++ src/sys/arch/hp300/dev/dnkbdmap.h	Sat Feb 19 05:37:55 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: dnkbdmap.h,v 1.1 2011/02/12 15:49:01 tsutsui Exp $	*/
+/*	$NetBSD: dnkbdmap.h,v 1.2 2011/02/19 05:37:55 tsutsui Exp $	*/
 /*	$OpenBSD: dnkbdmap.h,v 1.1 2005/04/22 11:59:11 miod Exp $	*/
 /*
  * Copyright (c) 2005, Miodrag Vallat
@@ -26,4 +26,4 @@
  */
 
 extern const struct wscons_keydesc dnkbd_keydesctab[];
-extern const u_int8_t dnkbd_raw[0x80];
+extern const uint8_t dnkbd_raw[0x80];



CVS commit: src/sys/arch/hp300/dev

2011-02-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Feb 19 05:40:59 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: diodevs

Log Message:
Move recently supported framebuffers out of the unsupported list.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hp300/dev/diodevs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/diodevs
diff -u src/sys/arch/hp300/dev/diodevs:1.13 src/sys/arch/hp300/dev/diodevs:1.14
--- src/sys/arch/hp300/dev/diodevs:1.13	Sun Feb  6 04:06:11 2011
+++ src/sys/arch/hp300/dev/diodevs	Sat Feb 19 05:40:58 2011
@@ -1,4 +1,4 @@
-$NetBSD: diodevs,v 1.13 2011/02/06 04:06:11 tsutsui Exp $
+$NetBSD: diodevs,v 1.14 2011/02/19 05:40:58 tsutsui Exp $
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -66,15 +66,15 @@
 framebuffer HRMCATSEYE	0x07	1	high-res mono catseye display
 framebuffer DAVINCI	0x08	2	98730/98731 (\davinci\) display
 framebuffer XXXCATSEYE	0x09	1	catseye display
+framebuffer TIGERSHARK	0x0c	3	TurboVRX (\tigershark\) display
 framebuffer HYPERION	0x0e	1	A1096A (\hyperion\) display
+framebuffer A1474MID	0x10	4	A1474-69511 on-board mid-res graphics
+framebuffer A147xVGA	0x11	4	A147x-69510 on-board VGA graphics
 
 /* Unsupported framebuffers. */
 
 framebuffer XGENESIS	0x0b	1	x-genesis display
-framebuffer TIGERSHARK	0x0c	3	TurboVRX (\tigershark\) display
 framebuffer YGENESIS	0x0d	1	y-genesis display
-framebuffer A1474MID	0x10	4	A1474-69511 on-board mid-res graphics
-framebuffer A147xVGA	0x11	4	A147x-69510 on-board VGA graphics
 /* No ID info about A1474-69515 on-board high-res graphics */
 
 /* Devices not yet supported.  Descriptions are lacking. */



CVS commit: src/sys/arch/hp300/dev

2011-02-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Feb 19 05:41:38 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: diodevs.h diodevs_data.h

Log Message:
Regen from diodevs rev 1.14:
 Move recently supported framebuffers out of the unsupported list.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/hp300/dev/diodevs.h \
src/sys/arch/hp300/dev/diodevs_data.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/diodevs.h
diff -u src/sys/arch/hp300/dev/diodevs.h:1.16 src/sys/arch/hp300/dev/diodevs.h:1.17
--- src/sys/arch/hp300/dev/diodevs.h:1.16	Sun Feb  6 04:06:58 2011
+++ src/sys/arch/hp300/dev/diodevs.h	Sat Feb 19 05:41:38 2011
@@ -1,10 +1,10 @@
-/*	$NetBSD: diodevs.h,v 1.16 2011/02/06 04:06:58 tsutsui Exp $	*/
+/*	$NetBSD: diodevs.h,v 1.17 2011/02/19 05:41:38 tsutsui Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: diodevs,v 1.13 2011/02/06 04:06:11 tsutsui Exp 
+ *	NetBSD: diodevs,v 1.14 2011/02/19 05:40:58 tsutsui Exp 
  */
 
 /*-
@@ -114,26 +114,26 @@
 #define	DIO_DEVICE_SECID_XXXCATSEYE	0x09
 #define	DIO_DEVICE_DESC_XXXCATSEYE	catseye display
 
+#define	DIO_DEVICE_SECID_TIGERSHARK	0x0c
+#define	DIO_DEVICE_DESC_TIGERSHARK	TurboVRX (\tigershark\) display
+
 #define	DIO_DEVICE_SECID_HYPERION	0x0e
 #define	DIO_DEVICE_DESC_HYPERION	A1096A (\hyperion\) display
 
+#define	DIO_DEVICE_SECID_A1474MID	0x10
+#define	DIO_DEVICE_DESC_A1474MID	A1474-69511 on-board mid-res graphics
+
+#define	DIO_DEVICE_SECID_A147xVGA	0x11
+#define	DIO_DEVICE_DESC_A147xVGA	A147x-69510 on-board VGA graphics
+
 /* Unsupported framebuffers. */
 
 
 #define	DIO_DEVICE_SECID_XGENESIS	0x0b
 #define	DIO_DEVICE_DESC_XGENESIS	x-genesis display
 
-#define	DIO_DEVICE_SECID_TIGERSHARK	0x0c
-#define	DIO_DEVICE_DESC_TIGERSHARK	TurboVRX (\tigershark\) display
-
 #define	DIO_DEVICE_SECID_YGENESIS	0x0d
 #define	DIO_DEVICE_DESC_YGENESIS	y-genesis display
-
-#define	DIO_DEVICE_SECID_A1474MID	0x10
-#define	DIO_DEVICE_DESC_A1474MID	A1474-69511 on-board mid-res graphics
-
-#define	DIO_DEVICE_SECID_A147xVGA	0x11
-#define	DIO_DEVICE_DESC_A147xVGA	A147x-69510 on-board VGA graphics
 /* No ID info about A1474-69515 on-board high-res graphics */
 
 /* Devices not yet supported.  Descriptions are lacking. */
Index: src/sys/arch/hp300/dev/diodevs_data.h
diff -u src/sys/arch/hp300/dev/diodevs_data.h:1.16 src/sys/arch/hp300/dev/diodevs_data.h:1.17
--- src/sys/arch/hp300/dev/diodevs_data.h:1.16	Sun Feb  6 04:06:58 2011
+++ src/sys/arch/hp300/dev/diodevs_data.h	Sat Feb 19 05:41:38 2011
@@ -1,10 +1,10 @@
-/*	$NetBSD: diodevs_data.h,v 1.16 2011/02/06 04:06:58 tsutsui Exp $	*/
+/*	$NetBSD: diodevs_data.h,v 1.17 2011/02/19 05:41:38 tsutsui Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: diodevs,v 1.13 2011/02/06 04:06:11 tsutsui Exp 
+ *	NetBSD: diodevs,v 1.14 2011/02/19 05:40:58 tsutsui Exp 
  */
 
 /*-
@@ -62,12 +62,12 @@
 	{ 0x39,	0x07,	1 },
 	{ 0x39,	0x08,	2 },
 	{ 0x39,	0x09,	1 },
-	{ 0x39,	0x0e,	1 },
-	{ 0x39,	0x0b,	1 },
 	{ 0x39,	0x0c,	3 },
-	{ 0x39,	0x0d,	1 },
+	{ 0x39,	0x0e,	1 },
 	{ 0x39,	0x10,	4 },
 	{ 0x39,	0x11,	4 },
+	{ 0x39,	0x0b,	1 },
+	{ 0x39,	0x0d,	1 },
 	{ 0x03,	0,	1 },
 	{ 0x04,	0,	1 },
 	{ 0x06,	0,	1 },
@@ -114,12 +114,12 @@
 	{ 0x39,	0x07,	DIO_DEVICE_DESC_HRMCATSEYE },
 	{ 0x39,	0x08,	DIO_DEVICE_DESC_DAVINCI },
 	{ 0x39,	0x09,	DIO_DEVICE_DESC_XXXCATSEYE },
-	{ 0x39,	0x0e,	DIO_DEVICE_DESC_HYPERION },
-	{ 0x39,	0x0b,	DIO_DEVICE_DESC_XGENESIS },
 	{ 0x39,	0x0c,	DIO_DEVICE_DESC_TIGERSHARK },
-	{ 0x39,	0x0d,	DIO_DEVICE_DESC_YGENESIS },
+	{ 0x39,	0x0e,	DIO_DEVICE_DESC_HYPERION },
 	{ 0x39,	0x10,	DIO_DEVICE_DESC_A1474MID },
 	{ 0x39,	0x11,	DIO_DEVICE_DESC_A147xVGA },
+	{ 0x39,	0x0b,	DIO_DEVICE_DESC_XGENESIS },
+	{ 0x39,	0x0d,	DIO_DEVICE_DESC_YGENESIS },
 	{ 0x03,	0,	DIO_DEVICE_DESC_MISC0 },
 	{ 0x04,	0,	DIO_DEVICE_DESC_MISC1 },
 	{ 0x06,	0,	DIO_DEVICE_DESC_PARALLEL },



CVS commit: src/sys/arch/hp300/dev

2011-02-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Feb 12 16:30:22 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: dnkbd.c

Log Message:
Make this compile properly with options WSDISPLAY_COMPAT_RAWKBD.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hp300/dev/dnkbd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/dnkbd.c
diff -u src/sys/arch/hp300/dev/dnkbd.c:1.1 src/sys/arch/hp300/dev/dnkbd.c:1.2
--- src/sys/arch/hp300/dev/dnkbd.c:1.1	Sat Feb 12 15:49:01 2011
+++ src/sys/arch/hp300/dev/dnkbd.c	Sat Feb 12 16:30:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: dnkbd.c,v 1.1 2011/02/12 15:49:01 tsutsui Exp $	*/
+/*	$NetBSD: dnkbd.c,v 1.2 2011/02/12 16:30:22 tsutsui Exp $	*/
 /*	$OpenBSD: dnkbd.c,v 1.17 2009/07/23 21:05:56 blambert Exp $	*/
 
 /*
@@ -31,6 +31,8 @@
  * Driver for the Apollo Domain keyboard and mouse.
  */
 
+#include opt_wsdisplay_compat.h
+
 #include sys/param.h
 #include sys/systm.h
 #include sys/device.h
@@ -681,7 +683,7 @@
 		int c, j = 0;
 
 		c = dnkbd_raw[key];
-		if (c != RAWKEY_Null) {
+		if (c != 0) {
 			/* fake extended scancode if necessary */
 			if (c  0x80)
 cbuf[j++] = 0xe0;



CVS commit: src/sys/arch/hp300/dev

2011-02-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Feb 12 16:36:37 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: dnkbdmap.c

Log Message:
Make sure to include opt_wsdisplay_compat.h for WSDISPLAY_COMPAT_RAWKBD.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hp300/dev/dnkbdmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/dnkbdmap.c
diff -u src/sys/arch/hp300/dev/dnkbdmap.c:1.1 src/sys/arch/hp300/dev/dnkbdmap.c:1.2
--- src/sys/arch/hp300/dev/dnkbdmap.c:1.1	Sat Feb 12 15:49:01 2011
+++ src/sys/arch/hp300/dev/dnkbdmap.c	Sat Feb 12 16:36:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: dnkbdmap.c,v 1.1 2011/02/12 15:49:01 tsutsui Exp $	*/
+/*	$NetBSD: dnkbdmap.c,v 1.2 2011/02/12 16:36:37 tsutsui Exp $	*/
 /*	$OpenBSD: dnkbdmap.c,v 1.2 2005/05/06 22:22:53 miod Exp $	*/
 /*
  * Copyright (c) 2005, Miodrag Vallat
@@ -25,6 +25,8 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include opt_wsdisplay_compat.h
+
 #include sys/types.h
 
 #include dev/wscons/wsksymdef.h



CVS commit: src/sys/arch/hp300/dev

2011-02-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Feb 12 16:37:33 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: dnkbd.c

Log Message:
Fix one more porting botch inside #ifdef WSDISPLAY_COMPAT_RAWKBD.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hp300/dev/dnkbd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/dnkbd.c
diff -u src/sys/arch/hp300/dev/dnkbd.c:1.2 src/sys/arch/hp300/dev/dnkbd.c:1.3
--- src/sys/arch/hp300/dev/dnkbd.c:1.2	Sat Feb 12 16:30:22 2011
+++ src/sys/arch/hp300/dev/dnkbd.c	Sat Feb 12 16:37:32 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: dnkbd.c,v 1.2 2011/02/12 16:30:22 tsutsui Exp $	*/
+/*	$NetBSD: dnkbd.c,v 1.3 2011/02/12 16:37:32 tsutsui Exp $	*/
 /*	$OpenBSD: dnkbd.c,v 1.17 2009/07/23 21:05:56 blambert Exp $	*/
 
 /*
@@ -991,7 +991,7 @@
 #ifdef WSDISPLAY_COMPAT_RAWKBD
 	case WSKBDIO_SETMODE:
 		sc-sc_rawkbd = *(int *)data == WSKBD_RAW;
-		timeout_del(sc-sc_rawrepeat_ch);
+		callout_stop(sc-sc_rawrepeat_ch);
 		return (0);
 #endif
 	}



CVS commit: src/sys/arch/hp300/dev

2011-02-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Feb 12 16:40:29 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: diofb.c diofb_mono.c diofbreg.h diofbvar.h
dvbox.c dvboxreg.h gbox.c gboxreg.h hyper.c hyperreg.h rbox.c
rboxreg.h topcat.c topcatreg.h tvrx.c

Log Message:
- make local functions static
- some KNF


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/hp300/dev/diofb.c \
src/sys/arch/hp300/dev/diofb_mono.c src/sys/arch/hp300/dev/dvbox.c \
src/sys/arch/hp300/dev/dvboxreg.h src/sys/arch/hp300/dev/gbox.c \
src/sys/arch/hp300/dev/gboxreg.h src/sys/arch/hp300/dev/hyper.c \
src/sys/arch/hp300/dev/hyperreg.h src/sys/arch/hp300/dev/rbox.c \
src/sys/arch/hp300/dev/rboxreg.h src/sys/arch/hp300/dev/topcat.c \
src/sys/arch/hp300/dev/topcatreg.h src/sys/arch/hp300/dev/tvrx.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hp300/dev/diofbreg.h \
src/sys/arch/hp300/dev/diofbvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/diofb.c
diff -u src/sys/arch/hp300/dev/diofb.c:1.1 src/sys/arch/hp300/dev/diofb.c:1.2
--- src/sys/arch/hp300/dev/diofb.c:1.1	Sun Feb  6 18:26:51 2011
+++ src/sys/arch/hp300/dev/diofb.c	Sat Feb 12 16:40:29 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: diofb.c,v 1.1 2011/02/06 18:26:51 tsutsui Exp $	*/
+/*	$NetBSD: diofb.c,v 1.2 2011/02/12 16:40:29 tsutsui Exp $	*/
 /*	$OpenBSD: diofb.c,v 1.18 2010/12/26 15:40:59 miod Exp $	*/
 
 /*
@@ -80,12 +80,12 @@
 #include hp300/dev/diofbreg.h
 #include hp300/dev/diofbvar.h
 
-void	diofb_do_cursor(struct rasops_info *);
-void	diofb_copycols(void *, int, int, int, int);
-void	diofb_erasecols(void *, int, int, int, long);
-void	diofb_copyrows(void *, int, int, int);
-void	diofb_eraserows(void *, int, int, long);
-int	diofb_allocattr(void *, int, int, int, long *);
+static void	diofb_do_cursor(struct rasops_info *);
+static void	diofb_copycols(void *, int, int, int, int);
+static void	diofb_erasecols(void *, int, int, int, long);
+static void	diofb_copyrows(void *, int, int, int);
+static void	diofb_eraserows(void *, int, int, long);
+static int	diofb_allocattr(void *, int, int, int, long *);
 
 struct diofb diofb_cn;
 
@@ -130,7 +130,7 @@
 		 */
 		fb-fbkva = iomap(fb-fbaddr, fb-fbsize);
 		if (fb-fbkva == NULL)
-			return (ENOMEM);
+			return ENOMEM;
 	}
 	if (fb-dwidth == 0 || fb-dheight == 0) {
 		fb-dwidth = (fbr-dwmsb  8) | fbr-dwlsb;
@@ -153,7 +153,7 @@
 
 	fb-mapmode = WSDISPLAYIO_MODE_DUMBFB;
 
-	return (0);
+	return 0;
 }
 
 /*
@@ -335,8 +335,9 @@
 int
 diofb_allocattr(void *cookie, int fg, int bg, int flg, long *attr)
 {
+
 	if ((flg  (WSATTR_BLINK | WSATTR_HILIT)) != 0)
-		return (EINVAL);
+		return EINVAL;
 
 	if ((flg  WSATTR_WSCOLORS) == 0) {
 		fg = WSCOL_WHITE;
@@ -460,14 +461,14 @@
 	struct rasops_info *ri = fb-ri;
 
 	if (fb-nscreens  0)
-		return (ENOMEM);
+		return ENOMEM;
 
 	*cookiep = ri;
 	*curxp = *curyp = 0;
 	ri-ri_ops.allocattr(ri, 0, 0, 0, attrp);
 	fb-nscreens++;
 
-	return (0);
+	return 0;
 }
 
 void
@@ -482,7 +483,8 @@
 diofb_show_screen(void *v, void *cookie, int waitok,
 void (*cb)(void *, int, int), void *cbarg)
 {
-	return (0);
+
+	return 0;
 }
 
 paddr_t
@@ -491,7 +493,7 @@
 	struct diofb *fb = v;
 
 	if ((offset  PAGE_MASK) != 0)
-		return (-1);
+		return -1;
 
 	switch (fb-mapmode) {
 	case WSDISPLAYIO_MODE_MAPPED:
@@ -505,7 +507,7 @@
 		break;
 	}
 
-	return (-1);
+	return -1;
 }
 
 int
@@ -516,14 +518,14 @@
 	int error;
 
 	if (index = colcount || count  colcount - index)
-		return (EINVAL);
+		return EINVAL;
 
 	if ((error = copyout(fb-cmap.r + index, cm-red, count)) != 0)
-		return (error);
+		return error;
 	if ((error = copyout(fb-cmap.g + index, cm-green, count)) != 0)
-		return (error);
+		return error;
 	if ((error = copyout(fb-cmap.b + index, cm-blue, count)) != 0)
-		return (error);
+		return error;
 
-	return (0);
+	return 0;
 }
Index: src/sys/arch/hp300/dev/diofb_mono.c
diff -u src/sys/arch/hp300/dev/diofb_mono.c:1.1 src/sys/arch/hp300/dev/diofb_mono.c:1.2
--- src/sys/arch/hp300/dev/diofb_mono.c:1.1	Sun Feb  6 18:26:51 2011
+++ src/sys/arch/hp300/dev/diofb_mono.c	Sat Feb 12 16:40:29 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: diofb_mono.c,v 1.1 2011/02/06 18:26:51 tsutsui Exp $	*/
+/*	$NetBSD: diofb_mono.c,v 1.2 2011/02/12 16:40:29 tsutsui Exp $	*/
 /*	$OpenBSD: diofb_mono.c,v 1.3 2006/08/11 18:33:13 miod Exp $	*/
 
 /*
@@ -115,8 +115,8 @@
 #include hp300/dev/maskbits.h
 
 int
-diofb_mono_windowmove(struct diofb *fb, u_int16_t sx, u_int16_t sy,
-u_int16_t dx, u_int16_t dy, u_int16_t cx, u_int16_t cy, int16_t rop,
+diofb_mono_windowmove(struct diofb *fb, uint16_t sx, uint16_t sy,
+uint16_t dx, uint16_t dy, uint16_t cx, uint16_t cy, int16_t rop,
 int16_t planemask /* ignored */)
 {
 	int width;		/* add to get to same position in next line */
@@ -271,5 +271,5 @@
 		}
 	}
 
-	return (0);
+	return 0;
 }
Index: 

CVS commit: src/sys/arch/hp300/dev

2011-02-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Feb 12 16:41:55 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: dnkbd.c

Log Message:
- make local functions static
- some KNF


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hp300/dev/dnkbd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/dnkbd.c
diff -u src/sys/arch/hp300/dev/dnkbd.c:1.3 src/sys/arch/hp300/dev/dnkbd.c:1.4
--- src/sys/arch/hp300/dev/dnkbd.c:1.3	Sat Feb 12 16:37:32 2011
+++ src/sys/arch/hp300/dev/dnkbd.c	Sat Feb 12 16:41:54 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: dnkbd.c,v 1.3 2011/02/12 16:37:32 tsutsui Exp $	*/
+/*	$NetBSD: dnkbd.c,v 1.4 2011/02/12 16:41:54 tsutsui Exp $	*/
 /*	$OpenBSD: dnkbd.c,v 1.17 2009/07/23 21:05:56 blambert Exp $	*/
 
 /*
@@ -140,7 +140,7 @@
 			sc_state, sc_prevstate;
 	u_int		sc_echolen;
 
-	u_int8_t	sc_mousepkt[3];	/* mouse packet being constructed */
+	uint8_t		sc_mousepkt[3];	/* mouse packet being constructed */
 	u_int		sc_mousepos;	/* index in above */
 
 	struct callout	sc_bellstop_tmo;
@@ -160,46 +160,46 @@
 #endif
 };
 
-int	dnkbd_match(device_t, cfdata_t, void *);
-void	dnkbd_attach(device_t, device_t, void *);
+static int	dnkbd_match(device_t, cfdata_t, void *);
+static void	dnkbd_attach(device_t, device_t, void *);
 
 CFATTACH_DECL_NEW(dnkbd, sizeof(struct dnkbd_softc),
 dnkbd_match, dnkbd_attach, NULL, NULL);
 
-void	dnkbd_init(struct dnkbd_softc *, uint16_t, uint16_t);
-int	dnkbd_enable(void *, int);
-void	dnkbd_set_leds(void *, int);
-int	dnkbd_ioctl(void *, u_long, void *, int, struct lwp *);
+static void	dnkbd_init(struct dnkbd_softc *, uint16_t, uint16_t);
+static int	dnkbd_enable(void *, int);
+static void	dnkbd_set_leds(void *, int);
+static int	dnkbd_ioctl(void *, u_long, void *, int, struct lwp *);
 
-const struct wskbd_accessops dnkbd_accessops = {
+static const struct wskbd_accessops dnkbd_accessops = {
 	dnkbd_enable,
 	dnkbd_set_leds,
 	dnkbd_ioctl
 };
 
 #if NWSMOUSE  0
-int	dnmouse_enable(void *);
-int	dnmouse_ioctl(void *, u_long, void *, int, struct lwp *);
-void	dnmouse_disable(void *);
+static int	dnmouse_enable(void *);
+static int	dnmouse_ioctl(void *, u_long, void *, int, struct lwp *);
+static void	dnmouse_disable(void *);
 
-const struct wsmouse_accessops dnmouse_accessops = {
+static const struct wsmouse_accessops dnmouse_accessops = {
 	dnmouse_enable,
 	dnmouse_ioctl,
 	dnmouse_disable
 };
 #endif
 
-void	dnkbd_bell(void *, u_int, u_int, u_int);
-void	dnkbd_cngetc(void *, u_int *, int *);
-void	dnkbd_cnpollc(void *, int);
+static void	dnkbd_bell(void *, u_int, u_int, u_int);
+static void	dnkbd_cngetc(void *, u_int *, int *);
+static void	dnkbd_cnpollc(void *, int);
 
-const struct wskbd_consops dnkbd_consops = {
+static const struct wskbd_consops dnkbd_consops = {
 	dnkbd_cngetc,
 	dnkbd_cnpollc,
 	dnkbd_bell
 };
 
-struct wskbd_mapdata dnkbd_keymapdata = {
+static struct wskbd_mapdata dnkbd_keymapdata = {
 	dnkbd_keydesctab,
 #ifdef DNKBD_LAYOUT
 	DNKBD_LAYOUT
@@ -210,21 +210,23 @@
 
 typedef enum { EVENT_NONE, EVENT_KEYBOARD, EVENT_MOUSE } dnevent;
 
-void	dnevent_kbd(struct dnkbd_softc *, int);
-void	dnevent_kbd_internal(struct dnkbd_softc *, int);
-void	dnevent_mouse(struct dnkbd_softc *, u_int8_t *);
-void	dnkbd_attach_subdevices(struct dnkbd_softc *);
-void	dnkbd_bellstop(void *);
-void	dnkbd_decode(int, u_int *, int *);
-dnevent	dnkbd_input(struct dnkbd_softc *, int);
-int	dnkbd_intr(void *);
-int	dnkbd_pollin(struct dnkbd_softc *, u_int);
-int	dnkbd_pollout(struct dnkbd_softc *, int);
-int	dnkbd_probe(struct dnkbd_softc *);
-void	dnkbd_rawrepeat(void *);
-int	dnkbd_send(struct dnkbd_softc *, const u_int8_t *, size_t);
-int	dnsubmatch_kbd(device_t, cfdata_t, const int *, void *);
-int	dnsubmatch_mouse(device_t, cfdata_t, const int *, void *);
+static void	dnevent_kbd(struct dnkbd_softc *, int);
+static void	dnevent_kbd_internal(struct dnkbd_softc *, int);
+static void	dnevent_mouse(struct dnkbd_softc *, uint8_t *);
+static void	dnkbd_attach_subdevices(struct dnkbd_softc *);
+static void	dnkbd_bellstop(void *);
+static void	dnkbd_decode(int, u_int *, int *);
+static dnevent	dnkbd_input(struct dnkbd_softc *, int);
+static int	dnkbd_intr(void *);
+static int	dnkbd_pollin(struct dnkbd_softc *, u_int);
+static int	dnkbd_pollout(struct dnkbd_softc *, int);
+static int	dnkbd_probe(struct dnkbd_softc *);
+#ifdef WSDISPLAY_COMPAT_RAWKBD
+static void	dnkbd_rawrepeat(void *);
+#endif
+static int	dnkbd_send(struct dnkbd_softc *, const uint8_t *, size_t);
+static int	dnsubmatch_kbd(device_t, cfdata_t, const int *, void *);
+static int	dnsubmatch_mouse(device_t, cfdata_t, const int *, void *);
 
 int
 dnkbd_match(device_t parent, cfdata_t cf, void *aux)
@@ -232,7 +234,7 @@
 	struct frodo_attach_args *fa = aux;
 
 	if (strcmp(fa-fa_name, dnkbd_cd.cd_name) != 0)
-		return (0);
+		return 0;
 
 	if (machineid == HP_382) {
 		

CVS commit: src/sys/arch/hp300/dev

2011-02-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Feb 12 22:48:05 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: frodo.c

Log Message:
Fix comment (362 doesn't have frodo).


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/hp300/dev/frodo.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/frodo.c
diff -u src/sys/arch/hp300/dev/frodo.c:1.29 src/sys/arch/hp300/dev/frodo.c:1.30
--- src/sys/arch/hp300/dev/frodo.c:1.29	Mon Apr 28 20:23:19 2008
+++ src/sys/arch/hp300/dev/frodo.c	Sat Feb 12 22:48:04 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: frodo.c,v 1.29 2008/04/28 20:23:19 martin Exp $	*/
+/*	$NetBSD: frodo.c,v 1.30 2011/02/12 22:48:04 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
@@ -56,12 +56,11 @@
 
 /*
  * Support for the Frodo (a.k.a. Apollo Utility) chip found
- * in HP Apollo 9000/4xx workstations, as well as
- * HP 9000/362 and 9000/382 controllers.
+ * in HP Apollo 9000/4xx workstations, as well as 9000/382 controllers.
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: frodo.c,v 1.29 2008/04/28 20:23:19 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: frodo.c,v 1.30 2011/02/12 22:48:04 tsutsui Exp $);
 
 #define	_HP300_INTR_H_PRIVATE
 



CVS commit: src/sys/arch/hp300/dev

2011-02-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Feb 12 23:10:22 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: spc.c

Log Message:
Handle LED_DISK per DMA xfer.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hp300/dev/spc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/spc.c
diff -u src/sys/arch/hp300/dev/spc.c:1.7 src/sys/arch/hp300/dev/spc.c:1.8
--- src/sys/arch/hp300/dev/spc.c:1.7	Wed May 14 13:29:28 2008
+++ src/sys/arch/hp300/dev/spc.c	Sat Feb 12 23:10:22 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: spc.c,v 1.7 2008/05/14 13:29:28 tsutsui Exp $ */
+/* $NetBSD: spc.c,v 1.8 2011/02/12 23:10:22 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2003 Izumi Tsutsui.  All rights reserved.
@@ -25,10 +25,11 @@
  */
 
 #include opt_ddb.h
+#include opt_useleds.h
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: spc.c,v 1.7 2008/05/14 13:29:28 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: spc.c,v 1.8 2011/02/12 23:10:22 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -55,6 +56,10 @@
 #include hp300/dev/dmareg.h
 #include hp300/dev/dmavar.h
 
+#ifdef USELEDS
+#include hp300/hp300/leds.h
+#endif
+
 static int	spc_dio_match(device_t, cfdata_t, void *);
 static void	spc_dio_attach(device_t, device_t, void *);
 static void	spc_dio_dmastart(struct spc_softc *, void *, size_t, int);
@@ -227,6 +232,9 @@
 	bus_space_write_1(iot, iohspc, SCMD, cmd);
 
 	sc-sc_flags |= SPC_DOINGDMA;
+#ifdef USELEDS
+	ledcontrol(LED_DISK, 0, 0);
+#endif
 }
 
 static void
@@ -270,6 +278,9 @@
 	sc-sc_dleft -= trans;
 
 	sc-sc_flags = ~SPC_DOINGDMA;
+#ifdef USELEDS
+	ledcontrol(0, LED_DISK, 0);
+#endif
 }
 
 static void
@@ -286,4 +297,7 @@
 
 	dsc-sc_dflags = ~SCSI_HAVEDMA;
 	sc-sc_flags = ~SPC_DOINGDMA;
+#ifdef USELEDS
+	ledcontrol(0, LED_DISK, 0);
+#endif
 }



CVS commit: src/sys/arch/hp300/dev

2011-02-05 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Feb  6 03:51:22 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: diodevs

Log Message:
RENASSIANCE - RENAISSANCE


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hp300/dev/diodevs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/diodevs
diff -u src/sys/arch/hp300/dev/diodevs:1.11 src/sys/arch/hp300/dev/diodevs:1.12
--- src/sys/arch/hp300/dev/diodevs:1.11	Fri Dec 31 22:48:59 2010
+++ src/sys/arch/hp300/dev/diodevs	Sun Feb  6 03:51:22 2011
@@ -1,4 +1,4 @@
-$NetBSD: diodevs,v 1.11 2010/12/31 22:48:59 tsutsui Exp $
+$NetBSD: diodevs,v 1.12 2011/02/06 03:51:22 tsutsui Exp $
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
 
 framebuffer GATORBOX	0x01	1	98700/98710 (\gatorbox\) display
 framebuffer TOPCAT	0x02	1	98544/98545/98547 (\topcat\) display
-framebuffer RENASSIANCE	0x04	2	98720/98721 (\renassiance\) display
+framebuffer RENAISSANCE	0x04	2	98720/98721 (\renaissance\) display
 framebuffer LRCATSEYE	0x05	1	low-res catseye display
 framebuffer HRCCATSEYE	0x06	1	high-res color catseye display
 framebuffer HRMCATSEYE	0x07	1	high-res mono catseye display



CVS commit: src/sys/arch/hp300/dev

2011-02-05 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Feb  6 03:51:58 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: diodevs.h diodevs_data.h

Log Message:
Regen from diodevs rev 1.12:
 RENASSIANCE - RENAISSANCE


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/hp300/dev/diodevs.h \
src/sys/arch/hp300/dev/diodevs_data.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/diodevs.h
diff -u src/sys/arch/hp300/dev/diodevs.h:1.14 src/sys/arch/hp300/dev/diodevs.h:1.15
--- src/sys/arch/hp300/dev/diodevs.h:1.14	Fri Dec 31 22:49:55 2010
+++ src/sys/arch/hp300/dev/diodevs.h	Sun Feb  6 03:51:58 2011
@@ -1,10 +1,10 @@
-/*	$NetBSD: diodevs.h,v 1.14 2010/12/31 22:49:55 tsutsui Exp $	*/
+/*	$NetBSD: diodevs.h,v 1.15 2011/02/06 03:51:58 tsutsui Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: diodevs,v 1.11 2010/12/31 22:48:59 tsutsui Exp 
+ *	NetBSD: diodevs,v 1.12 2011/02/06 03:51:22 tsutsui Exp 
  */
 
 /*-
@@ -96,8 +96,8 @@
 #define	DIO_DEVICE_SECID_TOPCAT	0x02
 #define	DIO_DEVICE_DESC_TOPCAT	98544/98545/98547 (\topcat\) display
 
-#define	DIO_DEVICE_SECID_RENASSIANCE	0x04
-#define	DIO_DEVICE_DESC_RENASSIANCE	98720/98721 (\renassiance\) display
+#define	DIO_DEVICE_SECID_RENAISSANCE	0x04
+#define	DIO_DEVICE_DESC_RENAISSANCE	98720/98721 (\renaissance\) display
 
 #define	DIO_DEVICE_SECID_LRCATSEYE	0x05
 #define	DIO_DEVICE_DESC_LRCATSEYE	low-res catseye display
Index: src/sys/arch/hp300/dev/diodevs_data.h
diff -u src/sys/arch/hp300/dev/diodevs_data.h:1.14 src/sys/arch/hp300/dev/diodevs_data.h:1.15
--- src/sys/arch/hp300/dev/diodevs_data.h:1.14	Fri Dec 31 22:49:55 2010
+++ src/sys/arch/hp300/dev/diodevs_data.h	Sun Feb  6 03:51:58 2011
@@ -1,10 +1,10 @@
-/*	$NetBSD: diodevs_data.h,v 1.14 2010/12/31 22:49:55 tsutsui Exp $	*/
+/*	$NetBSD: diodevs_data.h,v 1.15 2011/02/06 03:51:58 tsutsui Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: diodevs,v 1.11 2010/12/31 22:48:59 tsutsui Exp 
+ *	NetBSD: diodevs,v 1.12 2011/02/06 03:51:22 tsutsui Exp 
  */
 
 /*-
@@ -108,7 +108,7 @@
 	{ 0x39,	0,	DIO_DEVICE_DESC_FRAMEBUFFER },
 	{ 0x39,	0x01,	DIO_DEVICE_DESC_GATORBOX },
 	{ 0x39,	0x02,	DIO_DEVICE_DESC_TOPCAT },
-	{ 0x39,	0x04,	DIO_DEVICE_DESC_RENASSIANCE },
+	{ 0x39,	0x04,	DIO_DEVICE_DESC_RENAISSANCE },
 	{ 0x39,	0x05,	DIO_DEVICE_DESC_LRCATSEYE },
 	{ 0x39,	0x06,	DIO_DEVICE_DESC_HRCCATSEYE },
 	{ 0x39,	0x07,	DIO_DEVICE_DESC_HRMCATSEYE },



CVS commit: src/sys/arch/hp300/dev

2011-02-05 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Feb  6 03:53:25 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: grf_rb.c

Log Message:
RENASSIANCE - RENAISSANCE


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/hp300/dev/grf_rb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/grf_rb.c
diff -u src/sys/arch/hp300/dev/grf_rb.c:1.40 src/sys/arch/hp300/dev/grf_rb.c:1.41
--- src/sys/arch/hp300/dev/grf_rb.c:1.40	Mon Apr 28 20:23:19 2008
+++ src/sys/arch/hp300/dev/grf_rb.c	Sun Feb  6 03:53:25 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: grf_rb.c,v 1.40 2008/04/28 20:23:19 martin Exp $	*/
+/*	$NetBSD: grf_rb.c,v 1.41 2011/02/06 03:53:25 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -110,7 +110,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: grf_rb.c,v 1.40 2008/04/28 20:23:19 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: grf_rb.c,v 1.41 2011/02/06 03:53:25 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -200,7 +200,7 @@
 	grf = (struct grfreg *)ia-ia_addr;
 
 	if (grf-gr_id == DIO_DEVICE_ID_FRAMEBUFFER 
-	grf-gr_id2 == DIO_DEVICE_SECID_RENASSIANCE) {
+	grf-gr_id2 == DIO_DEVICE_SECID_RENAISSANCE) {
 		return 1;
 	}
 
@@ -229,7 +229,7 @@
 	struct dio_attach_args *da = aux;
 
 	if (da-da_id == DIO_DEVICE_ID_FRAMEBUFFER 
-	da-da_secid == DIO_DEVICE_SECID_RENASSIANCE)
+	da-da_secid == DIO_DEVICE_SECID_RENAISSANCE)
 		return 1;
 
 	return 0;



CVS commit: src/sys/arch/hp300/dev

2011-02-05 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Feb  6 04:06:12 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: diodevs

Log Message:
Pull description about TurboVRX (tigershark) display from OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hp300/dev/diodevs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/diodevs
diff -u src/sys/arch/hp300/dev/diodevs:1.12 src/sys/arch/hp300/dev/diodevs:1.13
--- src/sys/arch/hp300/dev/diodevs:1.12	Sun Feb  6 03:51:22 2011
+++ src/sys/arch/hp300/dev/diodevs	Sun Feb  6 04:06:11 2011
@@ -1,4 +1,4 @@
-$NetBSD: diodevs,v 1.12 2011/02/06 03:51:22 tsutsui Exp $
+$NetBSD: diodevs,v 1.13 2011/02/06 04:06:11 tsutsui Exp $
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
 /* Unsupported framebuffers. */
 
 framebuffer XGENESIS	0x0b	1	x-genesis display
-framebuffer TIGER	0x0c	1	tiger display
+framebuffer TIGERSHARK	0x0c	3	TurboVRX (\tigershark\) display
 framebuffer YGENESIS	0x0d	1	y-genesis display
 framebuffer A1474MID	0x10	4	A1474-69511 on-board mid-res graphics
 framebuffer A147xVGA	0x11	4	A147x-69510 on-board VGA graphics



CVS commit: src/sys/arch/hp300/dev

2011-02-05 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Feb  6 04:06:58 UTC 2011

Modified Files:
src/sys/arch/hp300/dev: diodevs.h diodevs_data.h

Log Message:
Regen from diodevs rev 1.13:
 Pull description about TurboVRX (tigershark) display from OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/hp300/dev/diodevs.h \
src/sys/arch/hp300/dev/diodevs_data.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/diodevs.h
diff -u src/sys/arch/hp300/dev/diodevs.h:1.15 src/sys/arch/hp300/dev/diodevs.h:1.16
--- src/sys/arch/hp300/dev/diodevs.h:1.15	Sun Feb  6 03:51:58 2011
+++ src/sys/arch/hp300/dev/diodevs.h	Sun Feb  6 04:06:58 2011
@@ -1,10 +1,10 @@
-/*	$NetBSD: diodevs.h,v 1.15 2011/02/06 03:51:58 tsutsui Exp $	*/
+/*	$NetBSD: diodevs.h,v 1.16 2011/02/06 04:06:58 tsutsui Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: diodevs,v 1.12 2011/02/06 03:51:22 tsutsui Exp 
+ *	NetBSD: diodevs,v 1.13 2011/02/06 04:06:11 tsutsui Exp 
  */
 
 /*-
@@ -123,8 +123,8 @@
 #define	DIO_DEVICE_SECID_XGENESIS	0x0b
 #define	DIO_DEVICE_DESC_XGENESIS	x-genesis display
 
-#define	DIO_DEVICE_SECID_TIGER	0x0c
-#define	DIO_DEVICE_DESC_TIGER	tiger display
+#define	DIO_DEVICE_SECID_TIGERSHARK	0x0c
+#define	DIO_DEVICE_DESC_TIGERSHARK	TurboVRX (\tigershark\) display
 
 #define	DIO_DEVICE_SECID_YGENESIS	0x0d
 #define	DIO_DEVICE_DESC_YGENESIS	y-genesis display
Index: src/sys/arch/hp300/dev/diodevs_data.h
diff -u src/sys/arch/hp300/dev/diodevs_data.h:1.15 src/sys/arch/hp300/dev/diodevs_data.h:1.16
--- src/sys/arch/hp300/dev/diodevs_data.h:1.15	Sun Feb  6 03:51:58 2011
+++ src/sys/arch/hp300/dev/diodevs_data.h	Sun Feb  6 04:06:58 2011
@@ -1,10 +1,10 @@
-/*	$NetBSD: diodevs_data.h,v 1.15 2011/02/06 03:51:58 tsutsui Exp $	*/
+/*	$NetBSD: diodevs_data.h,v 1.16 2011/02/06 04:06:58 tsutsui Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: diodevs,v 1.12 2011/02/06 03:51:22 tsutsui Exp 
+ *	NetBSD: diodevs,v 1.13 2011/02/06 04:06:11 tsutsui Exp 
  */
 
 /*-
@@ -64,7 +64,7 @@
 	{ 0x39,	0x09,	1 },
 	{ 0x39,	0x0e,	1 },
 	{ 0x39,	0x0b,	1 },
-	{ 0x39,	0x0c,	1 },
+	{ 0x39,	0x0c,	3 },
 	{ 0x39,	0x0d,	1 },
 	{ 0x39,	0x10,	4 },
 	{ 0x39,	0x11,	4 },
@@ -116,7 +116,7 @@
 	{ 0x39,	0x09,	DIO_DEVICE_DESC_XXXCATSEYE },
 	{ 0x39,	0x0e,	DIO_DEVICE_DESC_HYPERION },
 	{ 0x39,	0x0b,	DIO_DEVICE_DESC_XGENESIS },
-	{ 0x39,	0x0c,	DIO_DEVICE_DESC_TIGER },
+	{ 0x39,	0x0c,	DIO_DEVICE_DESC_TIGERSHARK },
 	{ 0x39,	0x0d,	DIO_DEVICE_DESC_YGENESIS },
 	{ 0x39,	0x10,	DIO_DEVICE_DESC_A1474MID },
 	{ 0x39,	0x11,	DIO_DEVICE_DESC_A147xVGA },



CVS commit: src/sys/arch/hp300/dev

2010-12-31 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Dec 31 22:41:55 UTC 2010

Modified Files:
src/sys/arch/hp300/dev: intio.c

Log Message:
According to the 362/382 Service Handbook by HP, only 382 has a utility chip
(i.e. frodo and apci) for RS-232C so don't try to attach frodo on HP362.

XXX: HP362 detection code in locore.s and bootloader still doesn't work
XXX: if on-board framebuffer is disabled by a jumper switch, though
XXX: it's still detected as HP360 and just works.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/hp300/dev/intio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/intio.c
diff -u src/sys/arch/hp300/dev/intio.c:1.28 src/sys/arch/hp300/dev/intio.c:1.29
--- src/sys/arch/hp300/dev/intio.c:1.28	Mon Apr 28 20:23:19 2008
+++ src/sys/arch/hp300/dev/intio.c	Fri Dec 31 22:41:55 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: intio.c,v 1.28 2008/04/28 20:23:19 martin Exp $	*/
+/*	$NetBSD: intio.c,v 1.29 2010/12/31 22:41:55 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1998, 2001 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intio.c,v 1.28 2008/04/28 20:23:19 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: intio.c,v 1.29 2010/12/31 22:41:55 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -70,15 +70,25 @@
 #define nintio_3xx_builtins	__arraycount(intio_3xx_builtins)
 #endif
 
-#if defined(HP362) || defined(HP382)
-static const struct intio_builtins intio_3x2_builtins[] = {
+#if defined(HP362)
+static const struct intio_builtins intio_362_builtins[] = {
+	{ rtc,	RTC_BASE,	-1},
+	{ hil,	HIL_BASE,	1},
+	{ hpib,	HPIB_BASE,	3},
+	{ dma,	DMA_BASE,	1},
+};
+#define nintio_362_builtins	__arraycount(intio_362_builtins)
+#endif
+
+#if defined(HP382)
+static const struct intio_builtins intio_382_builtins[] = {
 	{ rtc,	RTC_BASE,	-1},
 	{ frodo,	FRODO_BASE,	5},
 	{ hil,	HIL_BASE,	1},
 	{ hpib,	HPIB_BASE,	3},
 	{ dma,	DMA_BASE,	1},
 };
-#define nintio_3x2_builtins	__arraycount(intio_3x2_builtins)
+#define nintio_382_builtins	__arraycount(intio_382_builtins)
 #endif
 
 #if defined(HP400) || defined(HP425) || defined(HP433)
@@ -141,11 +151,16 @@
 		ndevs = nintio_3xx_builtins;
 		break;
 #endif
-#if defined(HP362) || defined(HP382)
+#if defined(HP362)
 	case HP_362:
+		ib = intio_362_builtins;
+		ndevs = nintio_362_builtins;
+		break;
+#endif
+#if defined(HP382)
 	case HP_382:
-		ib = intio_3x2_builtins;
-		ndevs = nintio_3x2_builtins;
+		ib = intio_382_builtins;
+		ndevs = nintio_382_builtins;
 		break;
 #endif
 #if defined(HP400) || defined(HP425) || defined(HP433)



CVS commit: src/sys/arch/hp300/dev

2010-12-31 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Dec 31 22:48:59 UTC 2010

Modified Files:
src/sys/arch/hp300/dev: diodevs

Log Message:
Use more specific info and names for 362/382 internal framebuffers.

Taken from various WWW pages (and my 362/382):
http://www.hpmuseum.net/collection_document.php
http://www.ambry.com/page/model.asp?model_nu=A1473A
http://mail-index.NetBSD.org/port-hp300/2003/11/03/0005.html
http://www.ambry.com/page/model.asp?model_nu=A1474A
http://mail-index.NetBSD.org/port-hp300/1999/07/16/.html
http://mail-index.NetBSD.org/port-hp300/1999/07/16/0001.html
http://mail-index.NetBSD.org/port-hp300/2009/04/30/msg18.html


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hp300/dev/diodevs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/diodevs
diff -u src/sys/arch/hp300/dev/diodevs:1.10 src/sys/arch/hp300/dev/diodevs:1.11
--- src/sys/arch/hp300/dev/diodevs:1.10	Tue Dec 28 10:19:24 2010
+++ src/sys/arch/hp300/dev/diodevs	Fri Dec 31 22:48:59 2010
@@ -1,4 +1,4 @@
-$NetBSD: diodevs,v 1.10 2010/12/28 10:19:24 tsutsui Exp $
+$NetBSD: diodevs,v 1.11 2010/12/31 22:48:59 tsutsui Exp $
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -73,8 +73,9 @@
 framebuffer XGENESIS	0x0b	1	x-genesis display
 framebuffer TIGER	0x0c	1	tiger display
 framebuffer YGENESIS	0x0d	1	y-genesis display
-framebuffer FB3X2_A	0x10	4	362/382 internal display #1
-framebuffer FB3X2_B	0x11	4	362/382 internal display #2
+framebuffer A1474MID	0x10	4	A1474-69511 on-board mid-res graphics
+framebuffer A147xVGA	0x11	4	A147x-69510 on-board VGA graphics
+/* No ID info about A1474-69515 on-board high-res graphics */
 
 /* Devices not yet supported.  Descriptions are lacking. */
 



CVS commit: src/sys/arch/hp300/dev

2010-12-31 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Dec 31 22:49:56 UTC 2010

Modified Files:
src/sys/arch/hp300/dev: diodevs.h diodevs_data.h

Log Message:
Regen from diodevs rev 1.11:
 Use more specific info and names for 362/382 internal framebuffers.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hp300/dev/diodevs.h \
src/sys/arch/hp300/dev/diodevs_data.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/diodevs.h
diff -u src/sys/arch/hp300/dev/diodevs.h:1.13 src/sys/arch/hp300/dev/diodevs.h:1.14
--- src/sys/arch/hp300/dev/diodevs.h:1.13	Tue Dec 28 10:20:27 2010
+++ src/sys/arch/hp300/dev/diodevs.h	Fri Dec 31 22:49:55 2010
@@ -1,10 +1,10 @@
-/*	$NetBSD: diodevs.h,v 1.13 2010/12/28 10:20:27 tsutsui Exp $	*/
+/*	$NetBSD: diodevs.h,v 1.14 2010/12/31 22:49:55 tsutsui Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: diodevs,v 1.10 2010/12/28 10:19:24 tsutsui Exp 
+ *	NetBSD: diodevs,v 1.11 2010/12/31 22:48:59 tsutsui Exp 
  */
 
 /*-
@@ -129,11 +129,12 @@
 #define	DIO_DEVICE_SECID_YGENESIS	0x0d
 #define	DIO_DEVICE_DESC_YGENESIS	y-genesis display
 
-#define	DIO_DEVICE_SECID_FB3X2_A	0x10
-#define	DIO_DEVICE_DESC_FB3X2_A	362/382 internal display #1
+#define	DIO_DEVICE_SECID_A1474MID	0x10
+#define	DIO_DEVICE_DESC_A1474MID	A1474-69511 on-board mid-res graphics
 
-#define	DIO_DEVICE_SECID_FB3X2_B	0x11
-#define	DIO_DEVICE_DESC_FB3X2_B	362/382 internal display #2
+#define	DIO_DEVICE_SECID_A147xVGA	0x11
+#define	DIO_DEVICE_DESC_A147xVGA	A147x-69510 on-board VGA graphics
+/* No ID info about A1474-69515 on-board high-res graphics */
 
 /* Devices not yet supported.  Descriptions are lacking. */
 
Index: src/sys/arch/hp300/dev/diodevs_data.h
diff -u src/sys/arch/hp300/dev/diodevs_data.h:1.13 src/sys/arch/hp300/dev/diodevs_data.h:1.14
--- src/sys/arch/hp300/dev/diodevs_data.h:1.13	Tue Dec 28 10:20:27 2010
+++ src/sys/arch/hp300/dev/diodevs_data.h	Fri Dec 31 22:49:55 2010
@@ -1,10 +1,10 @@
-/*	$NetBSD: diodevs_data.h,v 1.13 2010/12/28 10:20:27 tsutsui Exp $	*/
+/*	$NetBSD: diodevs_data.h,v 1.14 2010/12/31 22:49:55 tsutsui Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: diodevs,v 1.10 2010/12/28 10:19:24 tsutsui Exp 
+ *	NetBSD: diodevs,v 1.11 2010/12/31 22:48:59 tsutsui Exp 
  */
 
 /*-
@@ -118,8 +118,8 @@
 	{ 0x39,	0x0b,	DIO_DEVICE_DESC_XGENESIS },
 	{ 0x39,	0x0c,	DIO_DEVICE_DESC_TIGER },
 	{ 0x39,	0x0d,	DIO_DEVICE_DESC_YGENESIS },
-	{ 0x39,	0x10,	DIO_DEVICE_DESC_FB3X2_A },
-	{ 0x39,	0x11,	DIO_DEVICE_DESC_FB3X2_B },
+	{ 0x39,	0x10,	DIO_DEVICE_DESC_A1474MID },
+	{ 0x39,	0x11,	DIO_DEVICE_DESC_A147xVGA },
 	{ 0x03,	0,	DIO_DEVICE_DESC_MISC0 },
 	{ 0x04,	0,	DIO_DEVICE_DESC_MISC1 },
 	{ 0x06,	0,	DIO_DEVICE_DESC_PARALLEL },



CVS commit: src/sys/arch/hp300/dev

2010-12-28 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Dec 28 10:15:49 UTC 2010

Modified Files:
src/sys/arch/hp300/dev: Makefile

Log Message:
Include bsd.own.mk to pull ${TOOL_AWK}.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/hp300/dev/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/Makefile
diff -u src/sys/arch/hp300/dev/Makefile:1.3 src/sys/arch/hp300/dev/Makefile:1.4
--- src/sys/arch/hp300/dev/Makefile:1.3	Sun Oct 19 22:05:21 2008
+++ src/sys/arch/hp300/dev/Makefile	Tue Dec 28 10:15:49 2010
@@ -1,5 +1,6 @@
-#	$NetBSD: Makefile,v 1.3 2008/10/19 22:05:21 apb Exp $
+#	$NetBSD: Makefile,v 1.4 2010/12/28 10:15:49 tsutsui Exp $
 
+.include bsd.own.mk
 .include bsd.sys.mk
 
 diodevs.h diodevs_data.h: diodevs devlist2h.awk



CVS commit: src/sys/arch/hp300/dev

2010-12-28 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Dec 28 10:19:24 UTC 2010

Modified Files:
src/sys/arch/hp300/dev: diodevs

Log Message:
Add IDs for 362/382 internal displays. From OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hp300/dev/diodevs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/diodevs
diff -u src/sys/arch/hp300/dev/diodevs:1.9 src/sys/arch/hp300/dev/diodevs:1.10
--- src/sys/arch/hp300/dev/diodevs:1.9	Mon Apr 28 20:23:19 2008
+++ src/sys/arch/hp300/dev/diodevs	Tue Dec 28 10:19:24 2010
@@ -1,4 +1,4 @@
-$NetBSD: diodevs,v 1.9 2008/04/28 20:23:19 martin Exp $
+$NetBSD: diodevs,v 1.10 2010/12/28 10:19:24 tsutsui Exp $
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -73,6 +73,8 @@
 framebuffer XGENESIS	0x0b	1	x-genesis display
 framebuffer TIGER	0x0c	1	tiger display
 framebuffer YGENESIS	0x0d	1	y-genesis display
+framebuffer FB3X2_A	0x10	4	362/382 internal display #1
+framebuffer FB3X2_B	0x11	4	362/382 internal display #2
 
 /* Devices not yet supported.  Descriptions are lacking. */
 



CVS commit: src/sys/arch/hp300/dev

2010-12-28 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Dec 28 10:20:27 UTC 2010

Modified Files:
src/sys/arch/hp300/dev: diodevs.h diodevs_data.h

Log Message:
Regen from diodevs rev 1.10:
 Add IDs for 362/382 internal displays. From OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hp300/dev/diodevs.h \
src/sys/arch/hp300/dev/diodevs_data.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/diodevs.h
diff -u src/sys/arch/hp300/dev/diodevs.h:1.12 src/sys/arch/hp300/dev/diodevs.h:1.13
--- src/sys/arch/hp300/dev/diodevs.h:1.12	Mon Apr 28 20:23:19 2008
+++ src/sys/arch/hp300/dev/diodevs.h	Tue Dec 28 10:20:27 2010
@@ -1,10 +1,10 @@
-/*	$NetBSD: diodevs.h,v 1.12 2008/04/28 20:23:19 martin Exp $	*/
+/*	$NetBSD: diodevs.h,v 1.13 2010/12/28 10:20:27 tsutsui Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: diodevs,v 1.7 2003/11/23 01:57:35 tsutsui Exp 
+ *	NetBSD: diodevs,v 1.10 2010/12/28 10:19:24 tsutsui Exp 
  */
 
 /*-
@@ -129,6 +129,12 @@
 #define	DIO_DEVICE_SECID_YGENESIS	0x0d
 #define	DIO_DEVICE_DESC_YGENESIS	y-genesis display
 
+#define	DIO_DEVICE_SECID_FB3X2_A	0x10
+#define	DIO_DEVICE_DESC_FB3X2_A	362/382 internal display #1
+
+#define	DIO_DEVICE_SECID_FB3X2_B	0x11
+#define	DIO_DEVICE_DESC_FB3X2_B	362/382 internal display #2
+
 /* Devices not yet supported.  Descriptions are lacking. */
 
 
Index: src/sys/arch/hp300/dev/diodevs_data.h
diff -u src/sys/arch/hp300/dev/diodevs_data.h:1.12 src/sys/arch/hp300/dev/diodevs_data.h:1.13
--- src/sys/arch/hp300/dev/diodevs_data.h:1.12	Mon Apr 28 20:23:19 2008
+++ src/sys/arch/hp300/dev/diodevs_data.h	Tue Dec 28 10:20:27 2010
@@ -1,10 +1,10 @@
-/*	$NetBSD: diodevs_data.h,v 1.12 2008/04/28 20:23:19 martin Exp $	*/
+/*	$NetBSD: diodevs_data.h,v 1.13 2010/12/28 10:20:27 tsutsui Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: diodevs,v 1.7 2003/11/23 01:57:35 tsutsui Exp 
+ *	NetBSD: diodevs,v 1.10 2010/12/28 10:19:24 tsutsui Exp 
  */
 
 /*-
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#define DIO_NDEVICES	46
+#define DIO_NDEVICES	48
 
 struct dio_devdata dio_devdatas[] = {
 	{ 0x02,	0,	1 },
@@ -66,6 +66,8 @@
 	{ 0x39,	0x0b,	1 },
 	{ 0x39,	0x0c,	1 },
 	{ 0x39,	0x0d,	1 },
+	{ 0x39,	0x10,	4 },
+	{ 0x39,	0x11,	4 },
 	{ 0x03,	0,	1 },
 	{ 0x04,	0,	1 },
 	{ 0x06,	0,	1 },
@@ -116,6 +118,8 @@
 	{ 0x39,	0x0b,	DIO_DEVICE_DESC_XGENESIS },
 	{ 0x39,	0x0c,	DIO_DEVICE_DESC_TIGER },
 	{ 0x39,	0x0d,	DIO_DEVICE_DESC_YGENESIS },
+	{ 0x39,	0x10,	DIO_DEVICE_DESC_FB3X2_A },
+	{ 0x39,	0x11,	DIO_DEVICE_DESC_FB3X2_B },
 	{ 0x03,	0,	DIO_DEVICE_DESC_MISC0 },
 	{ 0x04,	0,	DIO_DEVICE_DESC_MISC1 },
 	{ 0x06,	0,	DIO_DEVICE_DESC_PARALLEL },



CVS commit: src/sys/arch/hp300/dev

2009-05-25 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Tue May 26 00:46:22 UTC 2009

Modified Files:
src/sys/arch/hp300/dev: mt.c

Log Message:
Build failure, reported by he@


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/hp300/dev/mt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/mt.c
diff -u src/sys/arch/hp300/dev/mt.c:1.47 src/sys/arch/hp300/dev/mt.c:1.48
--- src/sys/arch/hp300/dev/mt.c:1.47	Mon May 18 20:41:57 2009
+++ src/sys/arch/hp300/dev/mt.c	Tue May 26 00:46:22 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: mt.c,v 1.47 2009/05/18 20:41:57 ad Exp $	*/
+/*	$NetBSD: mt.c,v 1.48 2009/05/26 00:46:22 ad Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mt.c,v 1.47 2009/05/18 20:41:57 ad Exp $);
+__KERNEL_RCSID(0, $NetBSD: mt.c,v 1.48 2009/05/26 00:46:22 ad Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -425,18 +425,16 @@
 mtcommand(dev_t dev, int cmd, int cnt)
 {
 	struct mt_softc *sc = device_lookup_private(mt_cd,UNIT(dev));
-	struct buf *bp = sc-sc_bufstore;
 	int error = 0;
+	buf_t *bp;
 
-#if 1
-	if (bp-b_cflags  BC_BUSY)
-		return EBUSY;
-#endif
+	bp = getiobuf(NULL, true);
 	bp-b_cmd = cmd;
 	bp-b_dev = dev;
 	do {
 		bp-b_cflags = BC_BUSY;
 		bp-b_flags = B_CMD;
+		bp-b_oflags = 0;
 		mtstrategy(bp);
 		biowait(bp);
 		if (bp-b_error != 0) {
@@ -444,11 +442,8 @@
 			break;
 		}
 	} while (--cnt  0);
-#if 0
-	bp-b_flags = 0 /*= ~BC_BUSY*/;
-#else
-	bp-b_flags = ~BC_BUSY;
-#endif
+	putiobuf(bp);
+
 	return error;
 }
 
@@ -919,7 +914,6 @@
 static int
 mtread(dev_t dev, struct uio *uio, int flags)
 {
-	struct mt_softc *sc = device_lookup_private(mt_cd,UNIT(dev));
 
 	return physio(mtstrategy, NULL, dev, B_READ, minphys, uio);
 }
@@ -927,7 +921,6 @@
 static int
 mtwrite(dev_t dev, struct uio *uio, int flags)
 {
-	struct mt_softc *sc = device_lookup_private(mt_cd,UNIT(dev));
 
 	return physio(mtstrategy, NULL, dev, B_WRITE, minphys, uio);
 }



CVS commit: src/sys/arch/hp300/dev

2009-04-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Apr 18 17:56:24 UTC 2009

Modified Files:
src/sys/arch/hp300/dev: ite.c

Log Message:
- remove a cast against malloc
- (type *)0 - NULL
- misc KNF


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/hp300/dev/ite.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/dev/ite.c
diff -u src/sys/arch/hp300/dev/ite.c:1.82 src/sys/arch/hp300/dev/ite.c:1.83
--- src/sys/arch/hp300/dev/ite.c:1.82	Fri Jun 13 09:41:15 2008
+++ src/sys/arch/hp300/dev/ite.c	Sat Apr 18 17:56:24 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ite.c,v 1.82 2008/06/13 09:41:15 cegger Exp $	*/
+/*	$NetBSD: ite.c,v 1.83 2009/04/18 17:56:24 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -112,7 +112,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ite.c,v 1.82 2008/06/13 09:41:15 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: ite.c,v 1.83 2009/04/18 17:56:24 tsutsui Exp $);
 
 #include hil.h
 
@@ -336,7 +336,7 @@
 
 	ip-attribute = 0;
 	if (ip-attrbuf == NULL)
-		ip-attrbuf = (u_char *)malloc(ip-rows * ip-cols,
+		ip-attrbuf = malloc(ip-rows * ip-cols,
 		M_DEVBUF, M_WAITOK | M_ZERO);
 
 	ip-imode = 0;
@@ -429,7 +429,7 @@
 static int
 iteclose(dev_t dev, int flag, int mode, struct lwp *l)
 {
-	struct ite_softc *sc = device_lookup_private(ite_cd,ITEUNIT(dev));
+	struct ite_softc *sc = device_lookup_private(ite_cd, ITEUNIT(dev));
 	struct ite_data *ip = sc-sc_data;
 	struct tty *tp = ip-tty;
 
@@ -439,7 +439,7 @@
 #if 0
 	tty_detach(tp);
 	ttyfree(tp);
-	ip-tty = (struct tty *)0;
+	ip-tty = NULL;
 #endif
 	return 0;
 }
@@ -447,7 +447,7 @@
 static int
 iteread(dev_t dev, struct uio *uio, int flag)
 {
-	struct ite_softc *sc = device_lookup_private(ite_cd,ITEUNIT(dev));
+	struct ite_softc *sc = device_lookup_private(ite_cd, ITEUNIT(dev));
 	struct tty *tp = sc-sc_data-tty;
 
 	return (*tp-t_linesw-l_read)(tp, uio, flag);
@@ -456,7 +456,7 @@
 int
 itewrite(dev_t dev, struct uio *uio, int flag)
 {
-	struct ite_softc *sc = device_lookup_private(ite_cd,ITEUNIT(dev));
+	struct ite_softc *sc = device_lookup_private(ite_cd, ITEUNIT(dev));
 	struct tty *tp = sc-sc_data-tty;
 
 	return (*tp-t_linesw-l_write)(tp, uio, flag);
@@ -465,7 +465,7 @@
 int
 itepoll(dev_t dev, int events, struct lwp *l)
 {
-	struct ite_softc *sc = device_lookup_private(ite_cd,ITEUNIT(dev));
+	struct ite_softc *sc = device_lookup_private(ite_cd, ITEUNIT(dev));
 	struct tty *tp = sc-sc_data-tty;
 
 	return (*tp-t_linesw-l_poll)(tp, events, l);
@@ -474,7 +474,7 @@
 struct tty *
 itetty(dev_t dev)
 {
-	struct ite_softc *sc = device_lookup_private(ite_cd,ITEUNIT(dev));
+	struct ite_softc *sc = device_lookup_private(ite_cd, ITEUNIT(dev));
 
 	return sc-sc_data-tty;
 }
@@ -482,7 +482,7 @@
 int
 iteioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l)
 {
-	struct ite_softc *sc = device_lookup_private(ite_cd,ITEUNIT(dev));
+	struct ite_softc *sc = device_lookup_private(ite_cd, ITEUNIT(dev));
 	struct ite_data *ip = sc-sc_data;
 	struct tty *tp = ip-tty;
 	int error;
@@ -501,7 +501,7 @@
 	struct ite_softc *sc;
 	struct ite_data *ip;
 
-	sc = device_lookup_private(ite_cd,ITEUNIT(tp-t_dev));
+	sc = device_lookup_private(ite_cd, ITEUNIT(tp-t_dev));
 	ip = sc-sc_data;
 
 	s = splkbd();
@@ -884,6 +884,7 @@
 static void
 itecheckwrap(struct ite_data *ip, struct itesw *sp)
 {
+
 	if (++ip-curx == ip-cols) {
 		ip-curx = 0;
 		clr_attr(ip, ATTR_INV);
@@ -901,11 +902,12 @@
 static void
 ite_dchar(struct ite_data *ip, struct itesw *sp)
 {
+
 	if (ip-curx  ip-cols - 1) {
 		ite_erasecursor(ip, sp);
 		(*sp-ite_scroll)(ip, ip-cury, ip-curx + 1, 1, SCROLL_LEFT);
 		attrmov(ip, ip-cury, ip-curx + 1, ip-cury, ip-curx,
-			1, ip-cols - ip-curx - 1);
+		1, ip-cols - ip-curx - 1);
 	}
 	attrclr(ip, ip-cury, ip-cols - 1, 1, 1);
 	(*sp-ite_putc)(ip, ' ', ip-cury, ip-cols - 1, ATTR_NOR);
@@ -915,11 +917,12 @@
 static void
 ite_ichar(struct ite_data *ip, struct itesw *sp)
 {
+
 	if (ip-curx  ip-cols - 1) {
 		ite_erasecursor(ip, sp);
 		(*sp-ite_scroll)(ip, ip-cury, ip-curx, 1, SCROLL_RIGHT);
 		attrmov(ip, ip-cury, ip-curx, ip-cury, ip-curx + 1,
-			1, ip-cols - ip-curx - 1);
+		1, ip-cols - ip-curx - 1);
 	}
 	attrclr(ip, ip-cury, ip-curx, 1, 1);
 	(*sp-ite_putc)(ip, ' ', ip-cury, ip-curx, ATTR_NOR);
@@ -929,11 +932,12 @@
 static void
 ite_dline(struct ite_data *ip, struct itesw *sp)
 {
+
 	if (ip-cury  ip-rows - 1) {
 		ite_erasecursor(ip, sp);
 		(*sp-ite_scroll)(ip, ip-cury + 1, 0, 1, SCROLL_UP);
 		attrmov(ip, ip-cury + 1, 0, ip-cury, 0,
-			ip-rows - ip-cury - 1, ip-cols);
+		ip-rows - ip-cury - 1, ip-cols);
 	}
 	ite_clrtoeol(ip, sp, ip-rows - 1, 0);
 }
@@ -941,11 +945,12 @@
 static void
 ite_iline(struct ite_data *ip, struct itesw *sp)
 {
+
 	if (ip-cury  ip-rows - 1) {
 		ite_erasecursor(ip, sp);
 		(*sp-ite_scroll)(ip, ip-cury, 0, 1,