CVS commit: src/sys/arch/hp300/stand/common

2021-07-05 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Jul  5 13:41:08 UTC 2021

Modified Files:
src/sys/arch/hp300/stand/common: autoconf.c ite.c ite_tc.c
Removed Files:
src/sys/arch/hp300/stand/common: grfreg.h

Log Message:
Get rid of obsolete grfreg.h.  From OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hp300/stand/common/autoconf.c
cvs rdiff -u -r1.3 -r0 src/sys/arch/hp300/stand/common/grfreg.h
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/hp300/stand/common/ite.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hp300/stand/common/ite_tc.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/stand/common/autoconf.c
diff -u src/sys/arch/hp300/stand/common/autoconf.c:1.13 src/sys/arch/hp300/stand/common/autoconf.c:1.14
--- src/sys/arch/hp300/stand/common/autoconf.c:1.13	Tue Feb  8 20:20:14 2011
+++ src/sys/arch/hp300/stand/common/autoconf.c	Mon Jul  5 13:41:08 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.13 2011/02/08 20:20:14 rmind Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.14 2021/07/05 13:41:08 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -49,7 +49,6 @@
 #include 
 
 #include 
-#include 
 #include 
 
 /*

Index: src/sys/arch/hp300/stand/common/ite.c
diff -u src/sys/arch/hp300/stand/common/ite.c:1.18 src/sys/arch/hp300/stand/common/ite.c:1.19
--- src/sys/arch/hp300/stand/common/ite.c:1.18	Fri Feb 26 18:11:11 2016
+++ src/sys/arch/hp300/stand/common/ite.c	Mon Jul  5 13:41:08 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ite.c,v 1.18 2016/02/26 18:11:11 christos Exp $	*/
+/*	$NetBSD: ite.c,v 1.19 2021/07/05 13:41:08 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -47,7 +47,7 @@
 #include 
 #include 
 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -129,19 +129,19 @@ iteconfig(void)
 	int dtype, fboff, slotno, i;
 	uint8_t *va;
 	struct hp_hw *hw;
-	struct grfreg *gr;
+	struct diofbreg *fb;
 	struct ite_data *ip;
 
 	i = 0;
 	for (hw = sc_table; hw < _table[MAXCTLRS]; hw++) {
 	if (!HW_ISDEV(hw, D_BITMAP))
 			continue;
-		gr = (struct grfreg *) hw->hw_kva;
+		fb = (struct diofbreg *)hw->hw_kva;
 		/* XXX: redundent but safe */
-		if (badaddr((void *)gr) || gr->gr_id != GRFHWID)
+		if (badaddr((void *)fb) || fb->id != GRFHWID)
 			continue;
 		for (dtype = 0; dtype < nitesw; dtype++)
-			if (itesw[dtype].ite_hwid == gr->gr_id2)
+			if (itesw[dtype].ite_hwid == fb->fbid)
 break;
 		if (dtype == nitesw)
 			continue;
@@ -150,16 +150,16 @@ iteconfig(void)
 		ite_scode[i] = hw->hw_sc;
 		ip = _data[i];
 		ip->isw = [dtype];
-		ip->regbase = (void *) gr;
-		fboff = (gr->gr_fbomsb << 8) | gr->gr_fbolsb;
+		ip->regbase = (void *)fb;
+		fboff = (fb->fbomsb << 8) | fb->fbolsb;
 		ip->fbbase = (void *)(*((u_char *)ip->regbase + fboff) << 16);
 		/* DIO II: FB offset is relative to select code space */
 		if (ip->regbase >= (void *)DIOIIBASE)
 			ip->fbbase = (char*)ip->fbbase + (int)ip->regbase;
-		ip->fbwidth  = gr->gr_fbwidth_h << 8 | gr->gr_fbwidth_l;
-		ip->fbheight = gr->gr_fbheight_h << 8 | gr->gr_fbheight_l;
-		ip->dwidth   = gr->gr_dwidth_h << 8 | gr->gr_dwidth_l;
-		ip->dheight  = gr->gr_dheight_h << 8 | gr->gr_dheight_l;
+		ip->fbwidth  = fb->fbwmsb << 8 | fb->fbwlsb;
+		ip->fbheight = fb->fbhmsb << 8 | fb->fbhlsb;
+		ip->dwidth   = fb->dwmsb  << 8 | fb->dwlsb;
+		ip->dheight  = fb->dhmsb  << 8 | fb->dhlsb;
 		/*
 		 * XXX some displays (e.g. the davinci) appear
 		 * to return a display height greater than the

Index: src/sys/arch/hp300/stand/common/ite_tc.c
diff -u src/sys/arch/hp300/stand/common/ite_tc.c:1.10 src/sys/arch/hp300/stand/common/ite_tc.c:1.11
--- src/sys/arch/hp300/stand/common/ite_tc.c:1.10	Thu Feb 10 12:46:22 2011
+++ src/sys/arch/hp300/stand/common/ite_tc.c	Mon Jul  5 13:41:08 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ite_tc.c,v 1.10 2011/02/10 12:46:22 tsutsui Exp $	*/
+/*	$NetBSD: ite_tc.c,v 1.11 2021/07/05 13:41:08 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -42,8 +42,8 @@
 
 #include 
 
+#include 
 #include 
-#include 
 #include 
 
 #include 



CVS commit: src/sys/arch/hp300/stand/common

2016-06-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jun  9 03:05:54 UTC 2016

Modified Files:
src/sys/arch/hp300/stand/common: tgets.c

Log Message:
return something


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hp300/stand/common/tgets.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/stand/common/tgets.c
diff -u src/sys/arch/hp300/stand/common/tgets.c:1.6 src/sys/arch/hp300/stand/common/tgets.c:1.7
--- src/sys/arch/hp300/stand/common/tgets.c:1.6	Sun Jun  5 13:43:02 2016
+++ src/sys/arch/hp300/stand/common/tgets.c	Wed Jun  8 23:05:54 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: tgets.c,v 1.6 2016/06/05 17:43:02 christos Exp $	*/
+/*	$NetBSD: tgets.c,v 1.7 2016/06/09 03:05:54 christos Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -48,7 +48,7 @@ tgets_s(char *buf, size_t size)
 if (lp - buf == size) {
 lp--;
 *lp = '\0';
-return; 
+return 0;
 }
 		c = tgetchar() & 0177;
 		if (c) {



CVS commit: src/sys/arch/hp300/stand/common

2016-02-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 26 18:11:11 UTC 2016

Modified Files:
src/sys/arch/hp300/stand/common: ite.c

Log Message:
PR/50852: David Binderman: make code more readable (although it was correct
anyway)


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/hp300/stand/common/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/stand/common/ite.c
diff -u src/sys/arch/hp300/stand/common/ite.c:1.17 src/sys/arch/hp300/stand/common/ite.c:1.18
--- src/sys/arch/hp300/stand/common/ite.c:1.17	Sun Apr 13 11:45:27 2014
+++ src/sys/arch/hp300/stand/common/ite.c	Fri Feb 26 13:11:11 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ite.c,v 1.17 2014/04/13 15:45:27 tsutsui Exp $	*/
+/*	$NetBSD: ite.c,v 1.18 2016/02/26 18:11:11 christos Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -236,7 +236,7 @@ iteprobe(struct consdev *cp)
 	int unit, pri;
 
 #ifdef CONSDEBUG
-	whichconsole = ++whichconsole % (NITE+1);
+	whichconsole = (whichconsole + 1) % (NITE+1);
 #endif
 
 	if (itecons != -1)



CVS commit: src/sys/arch/hp300/stand/common

2014-06-20 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 21 02:02:40 UTC 2014

Modified Files:
src/sys/arch/hp300/stand/common: dcm.c if_le.c

Log Message:
Appease gcc48 -Wunused-but-set-variable warnings.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hp300/stand/common/dcm.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hp300/stand/common/if_le.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/stand/common/dcm.c
diff -u src/sys/arch/hp300/stand/common/dcm.c:1.8 src/sys/arch/hp300/stand/common/dcm.c:1.9
--- src/sys/arch/hp300/stand/common/dcm.c:1.8	Tue Feb  8 20:20:14 2011
+++ src/sys/arch/hp300/stand/common/dcm.c	Sat Jun 21 02:02:40 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: dcm.c,v 1.8 2011/02/08 20:20:14 rmind Exp $	*/
+/*	$NetBSD: dcm.c,v 1.9 2014/06/21 02:02:40 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -112,7 +112,7 @@ dcmgetchar(dev_t dev)
 	struct dcmrfifo *fifo;
 	struct dcmpreg *pp;
 	unsigned int head;
-	int c, stat, port;
+	int c, port;
 
 	port = DCMCONUNIT;
 	pp = dcm_preg(dcm, port);
@@ -121,10 +121,10 @@ dcmgetchar(dev_t dev)
 		return 0;
 	fifo = dcm-dcm_rfifos[3-port][head1];
 	c = fifo-data_char;
-	stat = fifo-data_stat;
+	(void)fifo-data_stat;
 	pp-r_head = (head + 2)  RX_MASK;
 	SEM_LOCK(dcm);
-	stat = dcm-dcm_iir;
+	(void)dcm-dcm_iir;
 	SEM_UNLOCK(dcm);
 	return c;
 }
@@ -145,7 +145,7 @@ dcmputchar(dev_t dev, int c)
 	struct dcmpreg *pp;
 	int timo;
 	unsigned int tail;
-	int port, stat;
+	int port;
 
 	port = DCMCONUNIT;
 	pp = dcm_preg(dcm, port);
@@ -163,7 +163,7 @@ dcmputchar(dev_t dev, int c)
 	while (tail != (pp-t_head  TX_MASK)  --timo)
 		;
 	SEM_LOCK(dcm);
-	stat = dcm-dcm_iir;
+	(void)dcm-dcm_iir;
 	SEM_UNLOCK(dcm);
 }
 #endif

Index: src/sys/arch/hp300/stand/common/if_le.c
diff -u src/sys/arch/hp300/stand/common/if_le.c:1.12 src/sys/arch/hp300/stand/common/if_le.c:1.13
--- src/sys/arch/hp300/stand/common/if_le.c:1.12	Thu May  1 18:08:47 2014
+++ src/sys/arch/hp300/stand/common/if_le.c	Sat Jun 21 02:02:40 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_le.c,v 1.12 2014/05/01 18:08:47 tsutsui Exp $	*/
+/*	$NetBSD: if_le.c,v 1.13 2014/06/21 02:02:40 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1993 Adam Glass
@@ -531,7 +531,10 @@ le_put(struct iodesc *desc, void *pkt, s
 	int unit = /*nif-nif_unit*/0;
 	struct le_softc *sc = le_softc[unit];
 	volatile struct mds *cdm;
-	int timo, i, stat;
+	int timo, stat;
+#if 0
+	int i;
+#endif
 
  le_put_loop:
 	timo = 10;
@@ -545,8 +548,8 @@ le_put(struct iodesc *desc, void *pkt, s
 	if (stat  (LE_BABL | LE_CERR | LE_MISS | LE_MERR))
 		le_error(unit, le_put(way before xmit), stat);
 	cdm = sc-sc_td[sc-sc_next_td];
-	i = 0;
 #if 0
+	i = 0;
 	while (cdm-flags  LE_OWN) {
 		if ((i % 100) == 0)
 			printf(le%d: output buffer busy - flags=%x\n,



CVS commit: src/sys/arch/hp300/stand/common

2014-05-01 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu May  1 18:08:47 UTC 2014

Modified Files:
src/sys/arch/hp300/stand/common: if_le.c

Log Message:
Reduce a number of getsecs() calls in le_get() to make netboot a bit faster.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hp300/stand/common/if_le.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/stand/common/if_le.c
diff -u src/sys/arch/hp300/stand/common/if_le.c:1.11 src/sys/arch/hp300/stand/common/if_le.c:1.12
--- src/sys/arch/hp300/stand/common/if_le.c:1.11	Mon Jan 12 11:32:43 2009
+++ src/sys/arch/hp300/stand/common/if_le.c	Thu May  1 18:08:47 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_le.c,v 1.11 2009/01/12 11:32:43 tsutsui Exp $	*/
+/*	$NetBSD: if_le.c,v 1.12 2014/05/01 18:08:47 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1993 Adam Glass
@@ -631,10 +631,9 @@ le_get(struct iodesc *desc, void *pkt, s
 	int cc;
 
 	t = getsecs();
-	cc = 0;
-	while (((getsecs() - t)  timeout)  !cc) {
+	do {
 		cc = le_poll(desc, pkt, len);
-	}
+	} while (cc == 0  (getsecs() - t)  timeout);
 	return cc;
 }
 



CVS commit: src/sys/arch/hp300/stand/common

2014-04-10 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Apr 10 18:10:09 UTC 2014

Modified Files:
src/sys/arch/hp300/stand/common: apci.c

Log Message:
Fix a botch on switching from apci (and dca) to MI com(4) 10 years ago.

I.e. fix apci device address per FRODO_BASE macro change
in frodoreg.h rev 1.2.  Now bootloader works with serial console
on HP425e (which has only com at frodo).

Thanks to miod@openbsd for providing his 425e.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hp300/stand/common/apci.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/stand/common/apci.c
diff -u src/sys/arch/hp300/stand/common/apci.c:1.11 src/sys/arch/hp300/stand/common/apci.c:1.12
--- src/sys/arch/hp300/stand/common/apci.c:1.11	Tue Feb  8 20:20:14 2011
+++ src/sys/arch/hp300/stand/common/apci.c	Thu Apr 10 18:10:09 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: apci.c,v 1.11 2011/02/08 20:20:14 rmind Exp $	*/
+/*	$NetBSD: apci.c,v 1.12 2014/04/10 18:10:09 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1999 The NetBSD Foundation, Inc.
@@ -85,7 +85,8 @@ void
 apciprobe(struct consdev *cp)
 {
 
-	apcicnaddr = (void *)IIOV(FRODO_BASE + FRODO_APCI_OFFSET(1));
+	apcicnaddr =
+	(void *)IIOV(INTIOBASE + FRODO_BASE + FRODO_APCI_OFFSET(1));
 
 	cp-cn_pri = CN_DEAD;
 



CVS commit: src/sys/arch/hp300/stand/common

2014-01-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Jan  2 17:43:33 UTC 2014

Modified Files:
src/sys/arch/hp300/stand/common: scsi.c

Log Message:
Change the SCSI select timeout from 2ms to 250ms as kernel spc(4) driver does.

Noticed by miod@openbsd.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hp300/stand/common/scsi.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/stand/common/scsi.c
diff -u src/sys/arch/hp300/stand/common/scsi.c:1.10 src/sys/arch/hp300/stand/common/scsi.c:1.11
--- src/sys/arch/hp300/stand/common/scsi.c:1.10	Tue Feb  8 20:20:14 2011
+++ src/sys/arch/hp300/stand/common/scsi.c	Thu Jan  2 17:43:32 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: scsi.c,v 1.10 2011/02/08 20:20:14 rmind Exp $	*/
+/*	$NetBSD: scsi.c,v 1.11 2014/01/02 17:43:32 tsutsui Exp $	*/
 
 /*
  * This is reported to fix some odd failures when disklabeling
@@ -181,10 +181,10 @@ issue_select(volatile struct scsidevice 
 
 	hd-scsi_pctl = 0;
 	hd-scsi_temp = (1  target) | our_addr;
-	/* select timeout is hardcoded to 2ms */
-	hd-scsi_tch = 0;
-	hd-scsi_tcm = 32;
-	hd-scsi_tcl = 4;
+	/* select timeout is hardcoded to 250ms */
+	hd-scsi_tch = 2;
+	hd-scsi_tcm = 113;
+	hd-scsi_tcl = 3;
 
 	hd-scsi_scmd = SCMD_SELECT;
 	return 0;



CVS commit: src/sys/arch/hp300/stand/common

2012-07-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Jul 26 17:15:22 UTC 2012

Modified Files:
src/sys/arch/hp300/stand/common: if_lereg.h

Log Message:
Remove '__attribute__((__packed__))' from structure definisions
for Am7990 LANCE registers where no implicit padding is expected.

gcc 4.5.3 seems to generate strange and wrong instructions
(four moveb insns against u_short members) if packed attribute
is specified in this case, then netboot fails immediately.

Should be pulled up to netbsd-6.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/hp300/stand/common/if_lereg.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/stand/common/if_lereg.h
diff -u src/sys/arch/hp300/stand/common/if_lereg.h:1.5 src/sys/arch/hp300/stand/common/if_lereg.h:1.6
--- src/sys/arch/hp300/stand/common/if_lereg.h:1.5	Sun Dec 11 12:17:19 2005
+++ src/sys/arch/hp300/stand/common/if_lereg.h	Thu Jul 26 17:15:22 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_lereg.h,v 1.5 2005/12/11 12:17:19 christos Exp $	*/
+/*	$NetBSD: if_lereg.h,v 1.6 2012/07/26 17:15:22 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -50,7 +50,7 @@ struct lereg0 {
 	vu_char	ler0_id;	/* ID */
 	u_char	ler0_pad1;
 	vu_char	ler0_status;	/* interrupt enable/status */
-} __attribute__((__packed__));
+};
 
 /*
  * Control and status bits -- lereg0
@@ -65,7 +65,7 @@ struct lereg0 {
 struct lereg1 {
 	vu_short	ler1_rdp;	/* data port */
 	vu_short	ler1_rap;	/* register select port */
-} __attribute__((__packed__));
+};
 
 /*
  * Control and status bits -- lereg1



CVS commit: src/sys/arch/hp300/stand/common

2011-02-10 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Feb 10 10:44:23 UTC 2011

Modified Files:
src/sys/arch/hp300/stand/common: ite.c ite_subr.c itevar.h

Log Message:
All framebuffer drivers use common readbyte and writeglyph functions
so no need to put them into per driver function pointers. From OpenBSD.

Tested on HP382 (serial) and HP425t (topcat).


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hp300/stand/common/ite.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hp300/stand/common/ite_subr.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hp300/stand/common/itevar.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/stand/common/ite.c
diff -u src/sys/arch/hp300/stand/common/ite.c:1.11 src/sys/arch/hp300/stand/common/ite.c:1.12
--- src/sys/arch/hp300/stand/common/ite.c:1.11	Tue Feb  8 20:20:14 2011
+++ src/sys/arch/hp300/stand/common/ite.c	Thu Feb 10 10:44:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ite.c,v 1.11 2011/02/08 20:20:14 rmind Exp $	*/
+/*	$NetBSD: ite.c,v 1.12 2011/02/10 10:44:22 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -64,35 +64,35 @@
 struct itesw itesw[] = {
 	{ GID_TOPCAT,
 	topcat_init,	ite_deinit_noop, topcat_clear,	topcat_putc,
-	topcat_cursor,	topcat_scroll,	ite_readbyte,	ite_writeglyph },
+	topcat_cursor,	topcat_scroll },
 
 	{ GID_GATORBOX,
 	gbox_init,	ite_deinit_noop, gbox_clear,	gbox_putc,
-	gbox_cursor,	gbox_scroll,	ite_readbyte,	ite_writeglyph },
+	gbox_cursor,	gbox_scroll },
 
 	{ GID_RENAISSANCE,
 	rbox_init,	ite_deinit_noop, rbox_clear,	rbox_putc,
-	rbox_cursor,	rbox_scroll,	ite_readbyte,	ite_writeglyph },
+	rbox_cursor,	rbox_scroll },
 
 	{ GID_LRCATSEYE,
 	topcat_init,	ite_deinit_noop, topcat_clear,	topcat_putc,
-	topcat_cursor,	topcat_scroll,	ite_readbyte,	ite_writeglyph },
+	topcat_cursor,	topcat_scroll },
 
 	{ GID_HRCCATSEYE,
 	topcat_init,	ite_deinit_noop, topcat_clear,	topcat_putc,
-	topcat_cursor,	topcat_scroll,	ite_readbyte,	ite_writeglyph },
+	topcat_cursor,	topcat_scroll },
 
 	{ GID_HRMCATSEYE,
 	topcat_init,	ite_deinit_noop, topcat_clear,	topcat_putc,
-	topcat_cursor,	topcat_scroll,	ite_readbyte,	ite_writeglyph },
+	topcat_cursor,	topcat_scroll },
 
 	{ GID_DAVINCI,
   	dvbox_init,	ite_deinit_noop, dvbox_clear,	dvbox_putc,
-	dvbox_cursor,	dvbox_scroll,	ite_readbyte,	ite_writeglyph },
+	dvbox_cursor,	dvbox_scroll },
 
 	{ GID_HYPERION,
 	hyper_init,	ite_deinit_noop, hyper_clear,	hyper_putc,
-	hyper_cursor,	hyper_scroll,	ite_readbyte,	ite_writeglyph },
+	hyper_cursor,	hyper_scroll },
 };
 int	nitesw = sizeof(itesw) / sizeof(itesw[0]);
 

Index: src/sys/arch/hp300/stand/common/ite_subr.c
diff -u src/sys/arch/hp300/stand/common/ite_subr.c:1.7 src/sys/arch/hp300/stand/common/ite_subr.c:1.8
--- src/sys/arch/hp300/stand/common/ite_subr.c:1.7	Tue Feb  8 20:20:14 2011
+++ src/sys/arch/hp300/stand/common/ite_subr.c	Thu Feb 10 10:44:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ite_subr.c,v 1.7 2011/02/08 20:20:14 rmind Exp $	*/
+/*	$NetBSD: ite_subr.c,v 1.8 2011/02/10 10:44:22 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -47,6 +47,8 @@
 #include hp300/stand/common/samachdep.h
 #include hp300/stand/common/itevar.h
 
+static void ite_writeglyph(struct ite_data *, u_char *, u_char *);
+
 void
 ite_fontinfo(struct ite_data *ip)
 {
@@ -99,21 +101,11 @@
 			*dp++ = getbyte(ip, romp);
 			romp += 2;
 		}
-		writeglyph(ip, fbmem, fontbuf);
+		ite_writeglyph(ip, fbmem, fontbuf);
 	}
 }
 
-/*
- * Display independent versions of the readbyte and writeglyph routines.
- */
-u_char
-ite_readbyte(struct ite_data *ip, int disp)
-{
-
-	return (u_char)*(((u_char *)ip-regbase) + disp);
-}
-
-void
+static void
 ite_writeglyph(struct ite_data *ip, u_char *fbmem, u_char *glyphp)
 {
 	int bn;

Index: src/sys/arch/hp300/stand/common/itevar.h
diff -u src/sys/arch/hp300/stand/common/itevar.h:1.8 src/sys/arch/hp300/stand/common/itevar.h:1.9
--- src/sys/arch/hp300/stand/common/itevar.h:1.8	Tue Feb  8 20:20:14 2011
+++ src/sys/arch/hp300/stand/common/itevar.h	Thu Feb 10 10:44:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: itevar.h,v 1.8 2011/02/08 20:20:14 rmind Exp $	*/
+/*	$NetBSD: itevar.h,v 1.9 2011/02/10 10:44:23 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -45,14 +45,11 @@
 #define ITEUNIT(dev)   minor(dev)
 
 #define getbyte(ip, offset) \
-	((*(ip)-isw-ite_readbyte)(ip, offset))
+	*(((u_char *)(ip)-regbase) + (offset))
 
 #define getword(ip, offset) \
 	((getbyte(ip, offset)  8) | getbyte(ip, (offset) + 2))
 
-#define writeglyph(ip, offset, fontbuf) \
-	((*(ip)-isw-ite_writeglyph)((ip), (offset), (fontbuf)))
-
 struct ite_data {
 	int	flags;
 	struct	tty *tty;
@@ -84,8 +81,6 @@
 	void	(*ite_putc)(struct ite_data *, int, int, int, int);
 	void	(*ite_cursor)(struct ite_data *, int);
 	void	(*ite_scroll)(struct ite_data *, int, int, int, int);
-	u_char	(*ite_readbyte)(struct ite_data *, int);
-	void	

CVS commit: src/sys/arch/hp300/stand/common

2011-02-10 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Feb 10 10:52:01 UTC 2011

Modified Files:
src/sys/arch/hp300/stand/common: itevar.h

Log Message:
bcopy() - memmove()

How did this one survive several sweeps?


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hp300/stand/common/itevar.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/stand/common/itevar.h
diff -u src/sys/arch/hp300/stand/common/itevar.h:1.9 src/sys/arch/hp300/stand/common/itevar.h:1.10
--- src/sys/arch/hp300/stand/common/itevar.h:1.9	Thu Feb 10 10:44:23 2011
+++ src/sys/arch/hp300/stand/common/itevar.h	Thu Feb 10 10:52:01 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: itevar.h,v 1.9 2011/02/10 10:44:23 tsutsui Exp $	*/
+/*	$NetBSD: itevar.h,v 1.10 2011/02/10 10:52:01 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -99,9 +99,9 @@
 	memset(ip-attrbuf + ((sy) * ip-cols) + (sx), 0, (h) * (w))
   
 #define attrmov(ip, sy, sx, dy, dx, h, w) \
-	bcopy(ip-attrbuf + ((sy) * ip-cols) + (sx), \
-	  ip-attrbuf + ((dy) * ip-cols) + (dx), \
-	  (h) * (w))
+	memmove(ip-attrbuf + ((dy) * ip-cols) + (dx), \
+	ip-attrbuf + ((sy) * ip-cols) + (sx), \
+	(h) * (w))
 
 #define attrtest(ip, attr) \
 	((* (u_char *) attrloc(ip, ip-cury, ip-curx))  attr)



CVS commit: src/sys/arch/hp300/stand/common

2011-02-10 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Feb 10 11:08:24 UTC 2011

Modified Files:
src/sys/arch/hp300/stand/common: ite_dv.c ite_gb.c ite_hy.c ite_rb.c
ite_subr.c ite_tc.c itevar.h

Log Message:
Move and renamve hyper_ite_fontinit() to ite_fontinit1bpp() to share it
among all monochrome framebuffers.  Also rename ite_fontinit() to
ite_fontinit8bpp(). From OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hp300/stand/common/ite_dv.c \
src/sys/arch/hp300/stand/common/ite_gb.c \
src/sys/arch/hp300/stand/common/ite_subr.c \
src/sys/arch/hp300/stand/common/ite_tc.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hp300/stand/common/ite_hy.c \
src/sys/arch/hp300/stand/common/itevar.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hp300/stand/common/ite_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/stand/common/ite_dv.c
diff -u src/sys/arch/hp300/stand/common/ite_dv.c:1.8 src/sys/arch/hp300/stand/common/ite_dv.c:1.9
--- src/sys/arch/hp300/stand/common/ite_dv.c:1.8	Tue Feb  8 20:20:14 2011
+++ src/sys/arch/hp300/stand/common/ite_dv.c	Thu Feb 10 11:08:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ite_dv.c,v 1.8 2011/02/08 20:20:14 rmind Exp $	*/
+/*	$NetBSD: ite_dv.c,v 1.9 2011/02/10 11:08:23 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -115,7 +115,7 @@
 	db_waitbusy(regbase);
 
 	ite_fontinfo(ip);
-	ite_fontinit(ip);
+	ite_fontinit8bpp(ip);
 
 	/*
 	 * Clear the (visible) framebuffer.
Index: src/sys/arch/hp300/stand/common/ite_gb.c
diff -u src/sys/arch/hp300/stand/common/ite_gb.c:1.8 src/sys/arch/hp300/stand/common/ite_gb.c:1.9
--- src/sys/arch/hp300/stand/common/ite_gb.c:1.8	Tue Feb  8 20:20:14 2011
+++ src/sys/arch/hp300/stand/common/ite_gb.c	Thu Feb 10 11:08:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ite_gb.c,v 1.8 2011/02/08 20:20:14 rmind Exp $	*/
+/*	$NetBSD: ite_gb.c,v 1.9 2011/02/10 11:08:23 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -91,7 +91,7 @@
 	gbcm_waitbusy(regbase);
 
 	ite_fontinfo(ip);
-	ite_fontinit(ip);
+	ite_fontinit8bpp(ip);
 
 	/*
 	 * Clear the display. This used to be before the font unpacking
Index: src/sys/arch/hp300/stand/common/ite_subr.c
diff -u src/sys/arch/hp300/stand/common/ite_subr.c:1.8 src/sys/arch/hp300/stand/common/ite_subr.c:1.9
--- src/sys/arch/hp300/stand/common/ite_subr.c:1.8	Thu Feb 10 10:44:22 2011
+++ src/sys/arch/hp300/stand/common/ite_subr.c	Thu Feb 10 11:08:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ite_subr.c,v 1.8 2011/02/10 10:44:22 tsutsui Exp $	*/
+/*	$NetBSD: ite_subr.c,v 1.9 2011/02/10 11:08:23 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -82,7 +82,35 @@
 }
 
 void
-ite_fontinit(struct ite_data *ip)
+ite_fontinit1bpp(struct ite_data *ip)
+{
+	u_char *fbmem, *dp;
+	int c, l, b;
+	int stride, width;
+
+	dp = (u_char *)(getword(ip, getword(ip, FONTROM) + FONTADDR) +
+	(char *)ip-regbase) + FONTDATA;
+	stride = ip-fbwidth  3;
+	width = (ip-ftwidth + 7) / 8;
+
+	for (c = 0; c  128; c++) {
+		fbmem = (u_char *) FBBASE +
+			(ip-fonty + (c / ip-cpl) * ip-ftheight) *
+			stride;
+		fbmem += (ip-fontx  3) + (c % ip-cpl) * width;
+		for (l = 0; l  ip-ftheight; l++) {
+			for (b = 0; b  width; b++) {
+*fbmem++ = *dp;
+dp += 2;
+			}
+			fbmem -= width;
+			fbmem += stride;
+		}
+	}
+}
+
+void
+ite_fontinit8bpp(struct ite_data *ip)
 {
 	int bytewidth = (((ip-ftwidth - 1) / 8) + 1);
 	int glyphsize = bytewidth * ip-ftheight;
Index: src/sys/arch/hp300/stand/common/ite_tc.c
diff -u src/sys/arch/hp300/stand/common/ite_tc.c:1.8 src/sys/arch/hp300/stand/common/ite_tc.c:1.9
--- src/sys/arch/hp300/stand/common/ite_tc.c:1.8	Tue Feb  8 20:20:14 2011
+++ src/sys/arch/hp300/stand/common/ite_tc.c	Thu Feb 10 11:08:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ite_tc.c,v 1.8 2011/02/08 20:20:14 rmind Exp $	*/
+/*	$NetBSD: ite_tc.c,v 1.9 2011/02/10 11:08:23 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -99,7 +99,7 @@
 	topcat_windowmove(ip, 0, 0, 0, 0, ip-fbheight, ip-fbwidth, RR_CLEAR);
 	tc_waitbusy(regbase, ip-planemask);
 
-	ite_fontinit(ip);
+	ite_fontinit8bpp(ip);
 
 	/*
 	 * Stash the inverted cursor.

Index: src/sys/arch/hp300/stand/common/ite_hy.c
diff -u src/sys/arch/hp300/stand/common/ite_hy.c:1.10 src/sys/arch/hp300/stand/common/ite_hy.c:1.11
--- src/sys/arch/hp300/stand/common/ite_hy.c:1.10	Tue Feb  8 20:20:14 2011
+++ src/sys/arch/hp300/stand/common/ite_hy.c	Thu Feb 10 11:08:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ite_hy.c,v 1.10 2011/02/08 20:20:14 rmind Exp $	*/
+/*	$NetBSD: ite_hy.c,v 1.11 2011/02/10 11:08:23 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -55,7 +55,6 @@
 #define	charX(ip,c)	\
 	(((c) % (ip)-cpl) * ip)-ftwidth + 7) / 8) * 8) + (ip)-fontx)
 
-void hyper_ite_fontinit(struct ite_data *);
 void hyper_windowmove(struct ite_data *, int, int, int, int, int, int, int);
 
 

CVS commit: src/sys/arch/hp300/stand/common

2011-02-10 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Feb 10 11:17:21 UTC 2011

Modified Files:
src/sys/arch/hp300/stand/common: ite.c itevar.h

Log Message:
Remove unused deinit functions. From OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hp300/stand/common/ite.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hp300/stand/common/itevar.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/stand/common/ite.c
diff -u src/sys/arch/hp300/stand/common/ite.c:1.12 src/sys/arch/hp300/stand/common/ite.c:1.13
--- src/sys/arch/hp300/stand/common/ite.c:1.12	Thu Feb 10 10:44:22 2011
+++ src/sys/arch/hp300/stand/common/ite.c	Thu Feb 10 11:17:21 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ite.c,v 1.12 2011/02/10 10:44:22 tsutsui Exp $	*/
+/*	$NetBSD: ite.c,v 1.13 2011/02/10 11:17:21 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -57,41 +57,40 @@
 #include hp300/stand/common/samachdep.h
 
 static void iteconfig(void);
-static void ite_deinit_noop(struct ite_data *);
 static void ite_clrtoeol(struct ite_data *, struct itesw *, int, int);
 static void itecheckwrap(struct ite_data *, struct itesw *);
 
 struct itesw itesw[] = {
 	{ GID_TOPCAT,
-	topcat_init,	ite_deinit_noop, topcat_clear,	topcat_putc,
+	topcat_init,	topcat_clear,	topcat_putc,
 	topcat_cursor,	topcat_scroll },
 
 	{ GID_GATORBOX,
-	gbox_init,	ite_deinit_noop, gbox_clear,	gbox_putc,
+	gbox_init,	gbox_clear,	gbox_putc,
 	gbox_cursor,	gbox_scroll },
 
 	{ GID_RENAISSANCE,
-	rbox_init,	ite_deinit_noop, rbox_clear,	rbox_putc,
+	rbox_init,	rbox_clear,	rbox_putc,
 	rbox_cursor,	rbox_scroll },
 
 	{ GID_LRCATSEYE,
-	topcat_init,	ite_deinit_noop, topcat_clear,	topcat_putc,
+	topcat_init,	topcat_clear,	topcat_putc,
 	topcat_cursor,	topcat_scroll },
 
 	{ GID_HRCCATSEYE,
-	topcat_init,	ite_deinit_noop, topcat_clear,	topcat_putc,
+	topcat_init,	topcat_clear,	topcat_putc,
 	topcat_cursor,	topcat_scroll },
 
 	{ GID_HRMCATSEYE,
-	topcat_init,	ite_deinit_noop, topcat_clear,	topcat_putc,
+	topcat_init,	topcat_clear,	topcat_putc,
 	topcat_cursor,	topcat_scroll },
 
 	{ GID_DAVINCI,
-  	dvbox_init,	ite_deinit_noop, dvbox_clear,	dvbox_putc,
+  	dvbox_init,	dvbox_clear,	dvbox_putc,
 	dvbox_cursor,	dvbox_scroll },
 
 	{ GID_HYPERION,
-	hyper_init,	ite_deinit_noop, hyper_clear,	hyper_putc,
+	hyper_init,	hyper_clear,	hyper_putc,
 	hyper_cursor,	hyper_scroll },
 };
 int	nitesw = sizeof(itesw) / sizeof(itesw[0]);
@@ -303,9 +302,3 @@
 #endif
 }
 #endif
-
-/* ARGSUSED */
-static void
-ite_deinit_noop(struct ite_data *ip)
-{
-}

Index: src/sys/arch/hp300/stand/common/itevar.h
diff -u src/sys/arch/hp300/stand/common/itevar.h:1.11 src/sys/arch/hp300/stand/common/itevar.h:1.12
--- src/sys/arch/hp300/stand/common/itevar.h:1.11	Thu Feb 10 11:08:23 2011
+++ src/sys/arch/hp300/stand/common/itevar.h	Thu Feb 10 11:17:21 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: itevar.h,v 1.11 2011/02/10 11:08:23 tsutsui Exp $	*/
+/*	$NetBSD: itevar.h,v 1.12 2011/02/10 11:17:21 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -76,7 +76,6 @@
 struct itesw {
 	int	ite_hwid;
 	void	(*ite_init)(struct ite_data *);
-	void	(*ite_deinit)(struct ite_data *);
 	void	(*ite_clear)(struct ite_data *, int, int, int, int);
 	void	(*ite_putc)(struct ite_data *, int, int, int, int);
 	void	(*ite_cursor)(struct ite_data *, int);



CVS commit: src/sys/arch/hp300/stand/common

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

Modified Files:
src/sys/arch/hp300/stand/common: ite.c ite_dv.c ite_gb.c ite_hy.c
ite_rb.c ite_subr.c ite_tc.c itevar.h

Log Message:
Pull OpenBSD's standalone ITE driver reorganization:
 - merge similar clear, putc, cursor, and scroll ops for all DIO framebuffers
 - rename and move hyper_windowmove() to ite_dio_windowmove1bpp()
   to use it among all dumb monochrome framebuffers
 - ditto hyper_putc() to ite_dio_putc1bpp()
 - remove unnecessary flags, macro, function args, and structure members
 - remove trailing spaces and tabs

Also misc cosmetics to reduce diffs from OpenBSD,
and some KNF that generates diffs from OpenBSD.

Tested on HP382 and HP425t.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hp300/stand/common/ite.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/hp300/stand/common/ite_dv.c \
src/sys/arch/hp300/stand/common/ite_gb.c \
src/sys/arch/hp300/stand/common/ite_subr.c \
src/sys/arch/hp300/stand/common/ite_tc.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/hp300/stand/common/ite_hy.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hp300/stand/common/ite_rb.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hp300/stand/common/itevar.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/stand/common/ite.c
diff -u src/sys/arch/hp300/stand/common/ite.c:1.13 src/sys/arch/hp300/stand/common/ite.c:1.14
--- src/sys/arch/hp300/stand/common/ite.c:1.13	Thu Feb 10 11:17:21 2011
+++ src/sys/arch/hp300/stand/common/ite.c	Thu Feb 10 12:46:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ite.c,v 1.13 2011/02/10 11:17:21 tsutsui Exp $	*/
+/*	$NetBSD: ite.c,v 1.14 2011/02/10 12:46:22 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -62,36 +62,36 @@
 
 struct itesw itesw[] = {
 	{ GID_TOPCAT,
-	topcat_init,	topcat_clear,	topcat_putc,
-	topcat_cursor,	topcat_scroll },
+	topcat_init,	ite_dio_clear,	ite_dio_putc8bpp,
+	ite_dio_cursor,	ite_dio_scroll },
 
 	{ GID_GATORBOX,
-	gbox_init,	gbox_clear,	gbox_putc,
-	gbox_cursor,	gbox_scroll },
+	gbox_init,	ite_dio_clear,	ite_dio_putc8bpp,
+	ite_dio_cursor,	gbox_scroll },
 
 	{ GID_RENAISSANCE,
-	rbox_init,	rbox_clear,	rbox_putc,
-	rbox_cursor,	rbox_scroll },
+	rbox_init,	ite_dio_clear,	ite_dio_putc8bpp,
+	ite_dio_cursor,	ite_dio_scroll },
 
 	{ GID_LRCATSEYE,
-	topcat_init,	topcat_clear,	topcat_putc,
-	topcat_cursor,	topcat_scroll },
+	topcat_init,	ite_dio_clear,	ite_dio_putc8bpp,
+	ite_dio_cursor,	ite_dio_scroll },
 
 	{ GID_HRCCATSEYE,
-	topcat_init,	topcat_clear,	topcat_putc,
-	topcat_cursor,	topcat_scroll },
+	topcat_init,	ite_dio_clear,	ite_dio_putc8bpp,
+	ite_dio_cursor,	ite_dio_scroll },
 
 	{ GID_HRMCATSEYE,
-	topcat_init,	topcat_clear,	topcat_putc,
-	topcat_cursor,	topcat_scroll },
+	topcat_init,	ite_dio_clear,	ite_dio_putc8bpp,
+	ite_dio_cursor,	ite_dio_scroll },
 
 	{ GID_DAVINCI,
-  	dvbox_init,	dvbox_clear,	dvbox_putc,
-	dvbox_cursor,	dvbox_scroll },
+  	dvbox_init,	ite_dio_clear,	ite_dio_putc8bpp,
+	ite_dio_cursor,	ite_dio_scroll },
 
 	{ GID_HYPERION,
-	hyper_init,	hyper_clear,	hyper_putc,
-	hyper_cursor,	hyper_scroll },
+	hyper_init,	ite_dio_clear,	ite_dio_putc1bpp,
+	ite_dio_cursor,	ite_dio_scroll },
 };
 int	nitesw = sizeof(itesw) / sizeof(itesw[0]);
 
@@ -150,7 +150,7 @@
 			ip-dwidth = ip-fbwidth;
 		if (ip-dheight  ip-fbheight)
 			ip-dheight = ip-fbheight;
-		ip-flags = ITE_ALIVE|ITE_CONSOLE;
+		ip-alive = 1;
 		i++;
 	}
 }
@@ -186,8 +186,7 @@
 			continue;
 #endif
 		ip = ite_data[ite];
-		if ((ip-flags  (ITE_ALIVE|ITE_CONSOLE))
-		!= (ITE_ALIVE|ITE_CONSOLE))
+		if (ip-alive == 0)
 			continue;
 		if ((int)ip-regbase == INTIOBASE + FB_BASE) {
 			pri = CN_INTERNAL;
@@ -238,7 +237,7 @@
 	case '\n':
 		if (++ip-cury == ip-rows) {
 			ip-cury--;
-			(*sp-ite_scroll)(ip, 1, 0, 1, SCROLL_UP);
+			(*sp-ite_scroll)(ip);
 			ite_clrtoeol(ip, sp, ip-cury, 0);
 		}
 		else
@@ -260,7 +259,7 @@
 	default:
 		if (c  ' ' || c == 0177)
 			break;
-		(*sp-ite_putc)(ip, c, ip-cury, ip-curx, ATTR_NOR);
+		(*sp-ite_putc)(ip, c, ip-cury, ip-curx);
 		(*sp-ite_cursor)(ip, DRAW_CURSOR);
 		itecheckwrap(ip, sp);
 		break;
@@ -274,7 +273,7 @@
 		ip-curx = 0;
 		if (++ip-cury == ip-rows) {
 			--ip-cury;
-			(*sp-ite_scroll)(ip, 1, 0, 1, SCROLL_UP);
+			(*sp-ite_scroll)(ip);
 			ite_clrtoeol(ip, sp, ip-cury, 0);
 			return;
 		}

Index: src/sys/arch/hp300/stand/common/ite_dv.c
diff -u src/sys/arch/hp300/stand/common/ite_dv.c:1.9 src/sys/arch/hp300/stand/common/ite_dv.c:1.10
--- src/sys/arch/hp300/stand/common/ite_dv.c:1.9	Thu Feb 10 11:08:23 2011
+++ src/sys/arch/hp300/stand/common/ite_dv.c	Thu Feb 10 12:46:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ite_dv.c,v 1.9 2011/02/10 11:08:23 tsutsui Exp $	*/
+/*	$NetBSD: ite_dv.c,v 1.10 2011/02/10 12:46:22 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -48,8 +48,6 @@