CVS commit: src/sys/dev/tc

2024-02-16 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Feb 17 06:35:25 UTC 2024

Modified Files:
src/sys/dev/tc: zskbd.c

Log Message:
Fix another fatal typo that causes zskbd_cngetc() to stall as dzkbd.

Tested on my DEC 3000/300 and LK421.
Should be pulled up to netbsd-10 and netbsd-9.

XXX: sys/arch/vax/uba/qvkbd.c seems missed in the following lk201 changes:
 https://mail-index.netbsd.org/source-changes/2015/01/02/msg062024.html


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/tc/zskbd.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/dev/tc/zskbd.c
diff -u src/sys/dev/tc/zskbd.c:1.21 src/sys/dev/tc/zskbd.c:1.22
--- src/sys/dev/tc/zskbd.c:1.21	Sat Aug  7 16:19:16 2021
+++ src/sys/dev/tc/zskbd.c	Sat Feb 17 06:35:25 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: zskbd.c,v 1.21 2021/08/07 16:19:16 thorpej Exp $	*/
+/*	$NetBSD: zskbd.c,v 1.22 2024/02/17 06:35:25 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: zskbd.c,v 1.21 2021/08/07 16:19:16 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zskbd.c,v 1.22 2024/02/17 06:35:25 tsutsui Exp $");
 
 #include 
 #include 
@@ -281,7 +281,7 @@ zskbd_cngetc(void *v, u_int *type, int *
 
 	do {
 		c = zs_getc(zsi->zsi_cs);
-	} while (!lk201_decode(>zsi_ks, 0, c, type, data) == LKD_NODATA);
+	} while (lk201_decode(>zsi_ks, 0, c, type, data) == LKD_NODATA);
 }
 
 static void



CVS commit: src/sys/dev/tc

2024-02-16 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Feb 17 06:35:25 UTC 2024

Modified Files:
src/sys/dev/tc: zskbd.c

Log Message:
Fix another fatal typo that causes zskbd_cngetc() to stall as dzkbd.

Tested on my DEC 3000/300 and LK421.
Should be pulled up to netbsd-10 and netbsd-9.

XXX: sys/arch/vax/uba/qvkbd.c seems missed in the following lk201 changes:
 https://mail-index.netbsd.org/source-changes/2015/01/02/msg062024.html


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/tc/zskbd.c

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



CVS commit: src/sys/dev/tc

2022-09-25 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Sep 25 21:28:51 UTC 2022

Modified Files:
src/sys/dev/tc: tcds.c

Log Message:
Remove unnecessary include of .


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/tc/tcds.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/dev/tc/tcds.c
diff -u src/sys/dev/tc/tcds.c:1.28 src/sys/dev/tc/tcds.c:1.29
--- src/sys/dev/tc/tcds.c:1.28	Sat Aug  7 16:19:16 2021
+++ src/sys/dev/tc/tcds.c	Sun Sep 25 21:28:51 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: tcds.c,v 1.28 2021/08/07 16:19:16 thorpej Exp $ */
+/* $NetBSD: tcds.c,v 1.29 2022/09/25 21:28:51 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -58,13 +58,12 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tcds.c,v 1.28 2021/08/07 16:19:16 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcds.c,v 1.29 2022/09/25 21:28:51 thorpej Exp $");
 
 #include 
 #include 
 #include 
 #include 
-#include 
 
 #ifdef __alpha__
 #include 



CVS commit: src/sys/dev/tc

2022-09-25 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Sep 25 21:28:51 UTC 2022

Modified Files:
src/sys/dev/tc: tcds.c

Log Message:
Remove unnecessary include of .


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

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



CVS commit: src/sys/dev/tc

2022-07-20 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jul 20 14:19:39 UTC 2022

Modified Files:
src/sys/dev/tc: zs_ioasic.c

Log Message:
No need to test for __alpha__ || alpha ... just one will suffice.


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

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



CVS commit: src/sys/dev/tc

2022-07-20 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jul 20 14:19:39 UTC 2022

Modified Files:
src/sys/dev/tc: zs_ioasic.c

Log Message:
No need to test for __alpha__ || alpha ... just one will suffice.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/tc/zs_ioasic.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/dev/tc/zs_ioasic.c
diff -u src/sys/dev/tc/zs_ioasic.c:1.45 src/sys/dev/tc/zs_ioasic.c:1.46
--- src/sys/dev/tc/zs_ioasic.c:1.45	Sat May 28 10:36:23 2022
+++ src/sys/dev/tc/zs_ioasic.c	Wed Jul 20 14:19:38 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: zs_ioasic.c,v 1.45 2022/05/28 10:36:23 andvar Exp $ */
+/* $NetBSD: zs_ioasic.c,v 1.46 2022/07/20 14:19:38 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: zs_ioasic.c,v 1.45 2022/05/28 10:36:23 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zs_ioasic.c,v 1.46 2022/07/20 14:19:38 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -73,7 +73,7 @@ __KERNEL_RCSID(0, "$NetBSD: zs_ioasic.c,
 
 #include 
 
-#if defined(__alpha__) || defined(alpha)
+#if defined(__alpha__)
 #include 
 #endif
 #if defined(pmax)
@@ -113,7 +113,7 @@ int zs_def_cflag = (TTYDEF_CFLAG & ~(CSI
 
 /* The layout of this is hardware-dependent (padding, order). */
 struct zshan {
-#if defined(__alpha__) || defined(alpha)
+#if defined(__alpha__)
 	volatile u_int	zc_csr;		/* ctrl,status, and indirect access */
 	u_int		zc_pad0;
 	volatile u_int	zc_data;	/* data */
@@ -158,7 +158,7 @@ zs_ioasic_get_chan_addr(tc_addr_t zsaddr
 	struct zsdevice *addr;
 	struct zshan *zc;
 
-#if defined(__alpha__) || defined(alpha)
+#if defined(__alpha__)
 	addr = (struct zsdevice *)TC_DENSE_TO_SPARSE(zsaddr);
 #endif
 #if defined(pmax)
@@ -343,7 +343,7 @@ zs_ioasic_attach(device_t parent, device
 	/* master interrupt control (enable) */
 	zs_write_reg(zs->zsc_cs[0], 9, zs_ioasic_init_reg[9]);
 	zs_write_reg(zs->zsc_cs[1], 9, zs_ioasic_init_reg[9]);
-#if defined(__alpha__) || defined(alpha)
+#if defined(__alpha__)
 	/* ioasic interrupt enable */
 	*(volatile u_int *)(ioasic_base + IOASIC_IMSK) |=
 		IOASIC_INTR_SCC_1 | IOASIC_INTR_SCC_0;
@@ -394,7 +394,7 @@ zs_ioasic_submatch(device_t parent, cfda
 		else if (systype == DS_MAXINE)
 			return (0);
 #endif
-#if defined(__alpha__) || defined(alpha)
+#if defined(__alpha__)
 		else if (cputype == ST_DEC_3000_300)
 			return (0);
 #endif
@@ -719,7 +719,7 @@ zs_ioasic_cninit(tc_addr_t ioasic_addr, 
 	 * Compute the physical address of the chip, "map" it via
 	 * K0SEG, and then get the address of the actual channel.
 	 */
-#if defined(__alpha__) || defined(alpha)
+#if defined(__alpha__)
 	zs_addr = ALPHA_PHYS_TO_K0SEG(ioasic_addr + zs_offset);
 #endif
 #if defined(pmax)



CVS commit: src/sys/dev/tc

2021-12-06 Thread David Brownlee
Module Name:src
Committed By:   abs
Date:   Mon Dec  6 17:43:50 UTC 2021

Modified Files:
src/sys/dev/tc: sfbplus.c

Log Message:
Add WSDISPLAYIO_GET_FBINFO support to sfbplus TURBOchannel framebuffer

Missed in previous change to cfb, mfb, sfb, tfb and xcfb


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/tc/sfbplus.c

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



CVS commit: src/sys/dev/tc

2021-12-06 Thread David Brownlee
Module Name:src
Committed By:   abs
Date:   Mon Dec  6 17:43:50 UTC 2021

Modified Files:
src/sys/dev/tc: sfbplus.c

Log Message:
Add WSDISPLAYIO_GET_FBINFO support to sfbplus TURBOchannel framebuffer

Missed in previous change to cfb, mfb, sfb, tfb and xcfb


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/tc/sfbplus.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/dev/tc/sfbplus.c
diff -u src/sys/dev/tc/sfbplus.c:1.41 src/sys/dev/tc/sfbplus.c:1.42
--- src/sys/dev/tc/sfbplus.c:1.41	Sat Aug  7 16:19:16 2021
+++ src/sys/dev/tc/sfbplus.c	Mon Dec  6 17:43:50 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: sfbplus.c,v 1.41 2021/08/07 16:19:16 thorpej Exp $ */
+/* $NetBSD: sfbplus.c,v 1.42 2021/12/06 17:43:50 abs Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sfbplus.c,v 1.41 2021/08/07 16:19:16 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sfbplus.c,v 1.42 2021/12/06 17:43:50 abs Exp $");
 
 #include 
 #include 
@@ -431,6 +431,11 @@ sfbioctl(void *v, void *vs, u_long cmd, 
 		*(u_int *)data = WSDISPLAY_TYPE_SFBP;
 		return (0);
 
+	case WSDISPLAYIO_GET_FBINFO: {
+		struct wsdisplayio_fbinfo *fbi = data;
+		return wsdisplayio_get_fbinfo(sc->sc_ri, fbi);
+	}
+
 	case WSDISPLAYIO_GINFO:
 #define	wsd_fbip ((struct wsdisplay_fbinfo *)data)
 		wsd_fbip->height = ri->ri_height;



CVS commit: src/sys/dev/tc

2021-12-06 Thread David Brownlee
Module Name:src
Committed By:   abs
Date:   Mon Dec  6 16:00:07 UTC 2021

Modified Files:
src/sys/dev/tc: cfb.c mfb.c sfb.c tfb.c xcfb.c

Log Message:
Add WSDISPLAYIO_GET_FBINFO support to most TURBOchannel framebuffers

This adds WSDISPLAYIO_GET_FBINFO to cfb, mfb, sfb, tfb and xcfb
TURBOchannel framebuffers as used by pmax and alpha

It does not add support to px and pxg (they handle ioctls in common
code in stic.c and more careful wiring is required)

These changes allow an Xswfb X server to use the framebuffer
directly, albeit without any special acceleration

A subsequent change will re-enable X server building on pmax, and
also hopefully switch alpha from Xorg 1.10 to 1.20


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/tc/cfb.c src/sys/dev/tc/tfb.c
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/tc/mfb.c
cvs rdiff -u -r1.88 -r1.89 src/sys/dev/tc/sfb.c
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/tc/xcfb.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/dev/tc/cfb.c
diff -u src/sys/dev/tc/cfb.c:1.65 src/sys/dev/tc/cfb.c:1.66
--- src/sys/dev/tc/cfb.c:1.65	Sat Aug  7 16:19:16 2021
+++ src/sys/dev/tc/cfb.c	Mon Dec  6 16:00:07 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: cfb.c,v 1.65 2021/08/07 16:19:16 thorpej Exp $ */
+/* $NetBSD: cfb.c,v 1.66 2021/12/06 16:00:07 abs Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cfb.c,v 1.65 2021/08/07 16:19:16 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cfb.c,v 1.66 2021/12/06 16:00:07 abs Exp $");
 
 #include 
 #include 
@@ -363,6 +363,11 @@ cfbioctl(void *v, void *vs, u_long cmd, 
 		*(u_int *)data = WSDISPLAY_TYPE_CFB;
 		return (0);
 
+	case WSDISPLAYIO_GET_FBINFO: {
+		struct wsdisplayio_fbinfo *fbi = data;
+		return wsdisplayio_get_fbinfo(sc->sc_ri, fbi);
+	}
+
 	case WSDISPLAYIO_GINFO:
 #define	wsd_fbip ((struct wsdisplay_fbinfo *)data)
 		wsd_fbip->height = ri->ri_height;
Index: src/sys/dev/tc/tfb.c
diff -u src/sys/dev/tc/tfb.c:1.65 src/sys/dev/tc/tfb.c:1.66
--- src/sys/dev/tc/tfb.c:1.65	Sat Aug  7 16:19:16 2021
+++ src/sys/dev/tc/tfb.c	Mon Dec  6 16:00:07 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: tfb.c,v 1.65 2021/08/07 16:19:16 thorpej Exp $ */
+/* $NetBSD: tfb.c,v 1.66 2021/12/06 16:00:07 abs Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tfb.c,v 1.65 2021/08/07 16:19:16 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tfb.c,v 1.66 2021/12/06 16:00:07 abs Exp $");
 
 #include 
 #include 
@@ -397,6 +397,11 @@ tfbioctl(void *v, void *vs, u_long cmd, 
 		*(u_int *)data = WSDISPLAY_TYPE_TX;
 		return (0);
 
+	case WSDISPLAYIO_GET_FBINFO: {
+		struct wsdisplayio_fbinfo *fbi = data;
+		return wsdisplayio_get_fbinfo(sc->sc_ri, fbi);
+	}
+
 	case WSDISPLAYIO_GINFO:
 #define	wsd_fbip ((struct wsdisplay_fbinfo *)data)
 		wsd_fbip->height = ri->ri_height;

Index: src/sys/dev/tc/mfb.c
diff -u src/sys/dev/tc/mfb.c:1.63 src/sys/dev/tc/mfb.c:1.64
--- src/sys/dev/tc/mfb.c:1.63	Sat Aug  7 16:19:16 2021
+++ src/sys/dev/tc/mfb.c	Mon Dec  6 16:00:07 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: mfb.c,v 1.63 2021/08/07 16:19:16 thorpej Exp $ */
+/* $NetBSD: mfb.c,v 1.64 2021/12/06 16:00:07 abs Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mfb.c,v 1.63 2021/08/07 16:19:16 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfb.c,v 1.64 2021/12/06 16:00:07 abs Exp $");
 
 #include 
 #include 
@@ -327,6 +327,11 @@ mfbioctl(void *v, void *vs, u_long cmd, 
 		*(u_int *)data = WSDISPLAY_TYPE_MFB;
 		return (0);
 
+	case WSDISPLAYIO_GET_FBINFO: {
+		struct wsdisplayio_fbinfo *fbi = data;
+		return wsdisplayio_get_fbinfo(sc->sc_ri, fbi);
+	}
+
 	case WSDISPLAYIO_GINFO:
 #define	wsd_fbip ((struct wsdisplay_fbinfo *)data)
 		wsd_fbip->height = ri->ri_height;

Index: src/sys/dev/tc/sfb.c
diff -u src/sys/dev/tc/sfb.c:1.88 src/sys/dev/tc/sfb.c:1.89
--- src/sys/dev/tc/sfb.c:1.88	Sat Aug  7 16:19:16 2021
+++ src/sys/dev/tc/sfb.c	Mon Dec  6 16:00:07 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: sfb.c,v 1.88 2021/08/07 16:19:16 thorpej Exp $ */
+/* $NetBSD: sfb.c,v 1.89 2021/12/06 16:00:07 abs Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sfb.c,v 1.88 2021/08/07 16:19:16 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sfb.c,v 1.89 2021/12/06 16:00:07 abs Exp $");
 
 #include 
 #include 
@@ -397,6 +397,11 @@ sfbioctl(void *v, void *vs, u_long cmd, 
 		*(u_int *)data = WSDISPLAY_TYPE_SFB;
 		return (0);
 
+	case WSDISPLAYIO_GET_FBINFO: {
+		struct wsdisplayio_fbinfo *fbi = data;
+		return wsdisplayio_get_fbinfo(sc->sc_ri, fbi);
+	}
+
 	case WSDISPLAYIO_GINFO:
 #define	wsd_fbip ((struct wsdisplay_fbinfo *)data)
 		wsd_fbip->height = ri->ri_height;

Index: 

CVS commit: src/sys/dev/tc

2021-12-06 Thread David Brownlee
Module Name:src
Committed By:   abs
Date:   Mon Dec  6 16:00:07 UTC 2021

Modified Files:
src/sys/dev/tc: cfb.c mfb.c sfb.c tfb.c xcfb.c

Log Message:
Add WSDISPLAYIO_GET_FBINFO support to most TURBOchannel framebuffers

This adds WSDISPLAYIO_GET_FBINFO to cfb, mfb, sfb, tfb and xcfb
TURBOchannel framebuffers as used by pmax and alpha

It does not add support to px and pxg (they handle ioctls in common
code in stic.c and more careful wiring is required)

These changes allow an Xswfb X server to use the framebuffer
directly, albeit without any special acceleration

A subsequent change will re-enable X server building on pmax, and
also hopefully switch alpha from Xorg 1.10 to 1.20


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/tc/cfb.c src/sys/dev/tc/tfb.c
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/tc/mfb.c
cvs rdiff -u -r1.88 -r1.89 src/sys/dev/tc/sfb.c
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/tc/xcfb.c

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



CVS commit: src/sys/dev/tc

2021-05-07 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri May  7 16:55:58 UTC 2021

Modified Files:
src/sys/dev/tc: ioasic_subr.c ioasicvar.h tc.c tcvar.h

Log Message:
A small bit of const poisoning.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/tc/ioasic_subr.c
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/tc/ioasicvar.h
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/tc/tc.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/tc/tcvar.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/dev/tc/ioasic_subr.c
diff -u src/sys/dev/tc/ioasic_subr.c:1.14 src/sys/dev/tc/ioasic_subr.c:1.15
--- src/sys/dev/tc/ioasic_subr.c:1.14	Sat Apr 24 23:36:59 2021
+++ src/sys/dev/tc/ioasic_subr.c	Fri May  7 16:55:58 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ioasic_subr.c,v 1.14 2021/04/24 23:36:59 thorpej Exp $	*/
+/*	$NetBSD: ioasic_subr.c,v 1.15 2021/05/07 16:55:58 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -29,7 +29,7 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ioasic_subr.c,v 1.14 2021/04/24 23:36:59 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ioasic_subr.c,v 1.15 2021/05/07 16:55:58 thorpej Exp $");
 
 #include 
 #include 
@@ -53,8 +53,8 @@ ioasicprint(void *aux, const char *pnp)
 }
 
 void
-ioasic_attach_devs(struct ioasic_softc *sc, struct ioasic_dev *ioasic_devs,
-int ioasic_ndevs)
+ioasic_attach_devs(struct ioasic_softc *sc,
+const struct ioasic_dev *ioasic_devs, int ioasic_ndevs)
 {
 	struct ioasicdev_attach_args idev;
 	int i;

Index: src/sys/dev/tc/ioasicvar.h
diff -u src/sys/dev/tc/ioasicvar.h:1.22 src/sys/dev/tc/ioasicvar.h:1.23
--- src/sys/dev/tc/ioasicvar.h:1.22	Sat Jun  4 01:49:44 2011
+++ src/sys/dev/tc/ioasicvar.h	Fri May  7 16:55:58 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ioasicvar.h,v 1.22 2011/06/04 01:49:44 tsutsui Exp $	*/
+/*	$NetBSD: ioasicvar.h,v 1.23 2021/05/07 16:55:58 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
@@ -67,6 +67,6 @@ voidioasic_intr_establish(device_t, 
 	int, int (*)(void *), void *);
 voidioasic_intr_disestablish(device_t, void *);
 void	ioasic_attach_devs(struct ioasic_softc *,
-	struct ioasic_dev *, int);
+	const struct ioasic_dev *, int);
 
 #endif /* _DEV_TC_IOASICVAR_ */

Index: src/sys/dev/tc/tc.c
diff -u src/sys/dev/tc/tc.c:1.57 src/sys/dev/tc/tc.c:1.58
--- src/sys/dev/tc/tc.c:1.57	Sat Apr 24 23:36:59 2021
+++ src/sys/dev/tc/tc.c	Fri May  7 16:55:58 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: tc.c,v 1.57 2021/04/24 23:36:59 thorpej Exp $	*/
+/*	$NetBSD: tc.c,v 1.58 2021/05/07 16:55:58 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.57 2021/04/24 23:36:59 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.58 2021/05/07 16:55:58 thorpej Exp $");
 
 #include "opt_tcverbose.h"
 
@@ -73,7 +73,7 @@ tcattach(device_t parent, device_t self,
 	struct tcbus_attach_args *tba = aux;
 	struct tc_attach_args ta;
 	const struct tc_builtin *builtin;
-	struct tc_slotdesc *slot;
+	const struct tc_slotdesc *slot;
 	tc_addr_t tcaddr;
 	int i;
 	int locs[TCCF_NLOCS];
@@ -129,7 +129,8 @@ tcattach(device_t parent, device_t self,
 		/*
 		 * Mark the slot as used, so we don't check it later.
 		 */
-		sc->sc_slots[builtin->tcb_slot].tcs_used = 1;
+		KASSERT(builtin->tcb_slot >=0 && builtin->tcb_slot <= 31);
+		sc->sc_slots_used |= __BIT(builtin->tcb_slot);
 
 		locs[TCCF_SLOT] = builtin->tcb_slot;
 		locs[TCCF_OFFSET] = builtin->tcb_offset;
@@ -149,7 +150,7 @@ tcattach(device_t parent, device_t self,
 		slot = >sc_slots[i];
 
 		/* If already checked above, don't look again now. */
-		if (slot->tcs_used)
+		if (sc->sc_slots_used & __BIT(i))
 			continue;
 
 		/*
@@ -175,7 +176,7 @@ tcattach(device_t parent, device_t self,
 		/*
 		 * Mark the slot as used.
 		 */
-		slot->tcs_used = 1;
+		sc->sc_slots_used |= __BIT(i);
 
 		locs[TCCF_SLOT] = i;
 		locs[TCCF_OFFSET] = 0;

Index: src/sys/dev/tc/tcvar.h
diff -u src/sys/dev/tc/tcvar.h:1.27 src/sys/dev/tc/tcvar.h:1.28
--- src/sys/dev/tc/tcvar.h:1.27	Fri Jun  9 17:55:18 2017
+++ src/sys/dev/tc/tcvar.h	Fri May  7 16:55:58 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: tcvar.h,v 1.27 2017/06/09 17:55:18 flxd Exp $ */
+/* $NetBSD: tcvar.h,v 1.28 2021/05/07 16:55:58 thorpej Exp $ */
 
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
@@ -68,7 +68,8 @@ struct tc_softc {
 
 	int	sc_speed;
 	int	sc_nslots;
-	struct tc_slotdesc *sc_slots;
+	const struct tc_slotdesc *sc_slots;
+	uint32_t sc_slots_used;
 
 	const struct evcnt *(*sc_intr_evcnt)(device_t, void *);
 	void	(*sc_intr_establish)(device_t, void *,
@@ -87,7 +88,7 @@ struct tcbus_attach_args {
 	/* Bus information */
 	u_int		tba_speed;		/* see TC_SPEED_* below */
 	u_int		tba_nslots;
-	struct tc_slotdesc *tba_slots;
+	const struct tc_slotdesc *tba_slots;
 	u_int		tba_nbuiltins;
 	const struct tc_builtin 

CVS commit: src/sys/dev/tc

2021-05-07 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri May  7 16:55:58 UTC 2021

Modified Files:
src/sys/dev/tc: ioasic_subr.c ioasicvar.h tc.c tcvar.h

Log Message:
A small bit of const poisoning.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/tc/ioasic_subr.c
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/tc/ioasicvar.h
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/tc/tc.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/tc/tcvar.h

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



CVS commit: src/sys/dev/tc

2020-09-12 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sat Sep 12 16:44:41 UTC 2020

Modified Files:
src/sys/dev/tc: sticio.h

Log Message:
Restrict stic_xmap to the kernel namespace

Otherwise this header is not includable on ports without the definition
of NBPG. This fixes build of sanitizers. In practice only pmax might be
interested in using this device driver.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/tc/sticio.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/dev/tc/sticio.h
diff -u src/sys/dev/tc/sticio.h:1.5 src/sys/dev/tc/sticio.h:1.6
--- src/sys/dev/tc/sticio.h:1.5	Sun Sep  6 06:01:01 2015
+++ src/sys/dev/tc/sticio.h	Sat Sep 12 16:44:41 2020
@@ -1,4 +1,4 @@
-/* 	$NetBSD: sticio.h,v 1.5 2015/09/06 06:01:01 dholland Exp $	*/
+/* 	$NetBSD: sticio.h,v 1.6 2020/09/12 16:44:41 kamil Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -72,6 +72,7 @@ struct stic_xcomm {
 	u_int	sxc_done[16];		/* packet completion semaphores */
 };
 
+#ifdef _KERNEL
 /*
  * stic_xmap: a description of the area returned by mapping the board.
  * sxm_xcomm and sxm_buf are physically contigious and of variable size as a
@@ -82,6 +83,7 @@ struct stic_xmap {
 	u_int8_t	sxm_poll[0xc];		/* poll registers */
 	u_int8_t	sxm_xcomm[256 * 1024];		/* X comms area */
 };
+#endif
 
 /*
  * ioctl interface.



CVS commit: src/sys/dev/tc

2020-09-12 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Sat Sep 12 16:44:41 UTC 2020

Modified Files:
src/sys/dev/tc: sticio.h

Log Message:
Restrict stic_xmap to the kernel namespace

Otherwise this header is not includable on ports without the definition
of NBPG. This fixes build of sanitizers. In practice only pmax might be
interested in using this device driver.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/tc/sticio.h

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



CVS commit: src/sys/dev/tc

2020-08-28 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sat Aug 29 03:24:31 UTC 2020

Modified Files:
src/sys/dev/tc: bba.c

Log Message:
Fix white space and indent.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/tc/bba.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/dev/tc/bba.c
diff -u src/sys/dev/tc/bba.c:1.44 src/sys/dev/tc/bba.c:1.45
--- src/sys/dev/tc/bba.c:1.44	Sat Jun  8 08:02:38 2019
+++ src/sys/dev/tc/bba.c	Sat Aug 29 03:24:31 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: bba.c,v 1.44 2019/06/08 08:02:38 isaki Exp $ */
+/* $NetBSD: bba.c,v 1.45 2020/08/29 03:24:31 isaki Exp $ */
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
 /* maxine/alpha baseboard audio (bba) */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bba.c,v 1.44 2019/06/08 08:02:38 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bba.c,v 1.45 2020/08/29 03:24:31 isaki Exp $");
 
 #include 
 #include 
@@ -230,7 +230,7 @@ bba_attach(device_t parent, device_t sel
 
 	printf("\n");
 
-	bba_reset(sc,1);
+	bba_reset(sc, 1);
 
 	/*
 	 * Set up glue for MI code early; we use some of it here.
@@ -285,7 +285,6 @@ bba_reset(struct bba_softc *sc, int rese
 		ssr |= IOASIC_CSR_ISDN_ENABLE;
 		bus_space_write_4(sc->sc_bst, sc->sc_bsh, IOASIC_CSR, ssr);
 	}
-
 }
 
 
@@ -468,7 +467,7 @@ bba_trigger_output(void *addr, void *sta
 
 	if (bus_dmamap_load(sc->sc_dmat, d->dmam, start,
 	(char *)end - (char *)start, NULL, BUS_DMA_WRITE|BUS_DMA_NOWAIT)) {
-	printf("bba_trigger_output: can't load DMA map\n");
+		printf("bba_trigger_output: can't load DMA map\n");
 		goto bad;
 	}
 	state |= 2;



CVS commit: src/sys/dev/tc

2020-08-28 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sat Aug 29 03:24:31 UTC 2020

Modified Files:
src/sys/dev/tc: bba.c

Log Message:
Fix white space and indent.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/tc/bba.c

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



CVS commit: src/sys/dev/tc

2017-06-22 Thread Felix Deichmann
Module Name:src
Committed By:   flxd
Date:   Thu Jun 22 17:01:34 UTC 2017

Modified Files:
src/sys/dev/tc: tcdevs.h tcdevs_data.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/tc/tcdevs.h \
src/sys/dev/tc/tcdevs_data.h

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



CVS commit: src/sys/dev/tc

2017-06-22 Thread Felix Deichmann
Module Name:src
Committed By:   flxd
Date:   Thu Jun 22 17:01:34 UTC 2017

Modified Files:
src/sys/dev/tc: tcdevs.h tcdevs_data.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/tc/tcdevs.h \
src/sys/dev/tc/tcdevs_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/dev/tc/tcdevs.h
diff -u src/sys/dev/tc/tcdevs.h:1.24 src/sys/dev/tc/tcdevs.h:1.25
--- src/sys/dev/tc/tcdevs.h:1.24	Fri Oct 14 15:01:39 2016
+++ src/sys/dev/tc/tcdevs.h	Thu Jun 22 17:01:34 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: tcdevs.h,v 1.24 2016/10/14 15:01:39 flxd Exp $	*/
+/*	$NetBSD: tcdevs.h,v 1.25 2017/06/22 17:01:34 flxd Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: tcdevs,v 1.22 2016/08/11 09:05:42 christos Exp
+ *	NetBSD: tcdevs,v 1.23 2017/06/22 16:46:53 flxd Exp
  */
 
 /*
@@ -150,7 +150,7 @@
 #define	TC_DESCRIPTION_PMAP_AA	"Prestoserve"
 
 #define	TC_DEVICE_PMAT_AA	"tra"
-#define	TC_DESCRIPTION_PMAT_AA	"DEC TurboChannel Token Ring Controller"
+#define	TC_DESCRIPTION_PMAT_AA	"DEC TURBOchannel Token Ring Controller"
 
 #define	TC_DEVICE_PMAZ_AA	"asc"
 #define	TC_DESCRIPTION_PMAZ_AA	"53c94 SCSI"
@@ -177,10 +177,10 @@
 #define	TC_DESCRIPTION_PMTNV_AA	"Non-volatile RAM option card"
 
 #define	TC_DEVICE_T1D4PKT	"ds"
-#define	TC_DESCRIPTION_T1D4PKT	"DECWRL Turbochannel T1"
+#define	TC_DESCRIPTION_T1D4PKT	"DECWRL TURBOchannel T1"
 
 #define	TC_DEVICE_T3PKT	"tt"
-#define	TC_DESCRIPTION_T3PKT	"DECWRL Turbochannel T3"
+#define	TC_DESCRIPTION_T3PKT	"DECWRL TURBOchannel T3"
 
 #define	TC_DEVICE_TC_USB	"tcu"
 #define	TC_DESCRIPTION_TC_USB	"flxd TC-USB"
Index: src/sys/dev/tc/tcdevs_data.h
diff -u src/sys/dev/tc/tcdevs_data.h:1.24 src/sys/dev/tc/tcdevs_data.h:1.25
--- src/sys/dev/tc/tcdevs_data.h:1.24	Fri Oct 14 15:01:39 2016
+++ src/sys/dev/tc/tcdevs_data.h	Thu Jun 22 17:01:34 2017
@@ -1,10 +1,10 @@
-/*	$NetBSD: tcdevs_data.h,v 1.24 2016/10/14 15:01:39 flxd Exp $	*/
+/*	$NetBSD: tcdevs_data.h,v 1.25 2017/06/22 17:01:34 flxd Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: tcdevs,v 1.22 2016/08/11 09:05:42 christos Exp
+ *	NetBSD: tcdevs,v 1.23 2017/06/22 16:46:53 flxd Exp
  */
 
 /*



CVS commit: src/sys/dev/tc

2017-06-10 Thread Felix Deichmann
Module Name:src
Committed By:   flxd
Date:   Sat Jun 10 12:03:30 UTC 2017

Modified Files:
src/sys/dev/tc: tc.c

Log Message:
Fix missing TC bus speed.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/tc/tc.c

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



CVS commit: src/sys/dev/tc

2017-06-10 Thread Felix Deichmann
Module Name:src
Committed By:   flxd
Date:   Sat Jun 10 12:03:30 UTC 2017

Modified Files:
src/sys/dev/tc: tc.c

Log Message:
Fix missing TC bus speed.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/tc/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/dev/tc/tc.c
diff -u src/sys/dev/tc/tc.c:1.55 src/sys/dev/tc/tc.c:1.56
--- src/sys/dev/tc/tc.c:1.55	Fri Jun  9 17:55:18 2017
+++ src/sys/dev/tc/tc.c	Sat Jun 10 12:03:30 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: tc.c,v 1.55 2017/06/09 17:55:18 flxd Exp $	*/
+/*	$NetBSD: tc.c,v 1.56 2017/06/10 12:03:30 flxd Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.55 2017/06/09 17:55:18 flxd Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.56 2017/06/10 12:03:30 flxd Exp $");
 
 #include "opt_tcverbose.h"
 
@@ -168,6 +168,7 @@ tcattach(device_t parent, device_t self,
 		ta.ta_offset = 0;
 		ta.ta_addr = tcaddr;
 		ta.ta_cookie = slot->tcs_cookie;
+		ta.ta_busspeed = sc->sc_speed;
 
 		/*
 		 * Mark the slot as used.



CVS commit: src/sys/dev/tc

2016-12-03 Thread Felix Deichmann
Module Name:src
Committed By:   flxd
Date:   Sat Dec  3 18:18:12 UTC 2016

Modified Files:
src/sys/dev/tc: tcu.c

Log Message:
newline


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/tc/tcu.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/dev/tc/tcu.c
diff -u src/sys/dev/tc/tcu.c:1.3 src/sys/dev/tc/tcu.c:1.4
--- src/sys/dev/tc/tcu.c:1.3	Sat Dec  3 18:12:50 2016
+++ src/sys/dev/tc/tcu.c	Sat Dec  3 18:18:12 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: tcu.c,v 1.3 2016/12/03 18:12:50 flxd Exp $ */
+/* $NetBSD: tcu.c,v 1.4 2016/12/03 18:18:12 flxd Exp $ */
 
 /*-
  * Copyright (c) 2016, Felix Deichmann
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tcu.c,v 1.3 2016/12/03 18:12:50 flxd Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcu.c,v 1.4 2016/12/03 18:18:12 flxd Exp $");
 
 #include 
 #include 
@@ -143,7 +143,7 @@ tcu_attach(device_t parent, device_t sel
 
 	if ((cfg & TCU_CFG_S1_1) != 0 && ta->ta_busspeed != TC_SPEED_12_5_MHZ)
 		aprint_error_dev(self, "warning: switch S1-1 asserted with "
-		"clock != 12.5 MHz");
+		"clock != 12.5 MHz\n");
 
 #if NSLHCI_TCU > 0
 	/* Attach slhci. */



CVS commit: src/sys/dev/tc

2016-12-03 Thread Felix Deichmann
Module Name:src
Committed By:   flxd
Date:   Sat Dec  3 18:18:12 UTC 2016

Modified Files:
src/sys/dev/tc: tcu.c

Log Message:
newline


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

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



CVS commit: src/sys/dev/tc

2016-12-03 Thread Felix Deichmann
Module Name:src
Committed By:   flxd
Date:   Sat Dec  3 18:12:50 UTC 2016

Modified Files:
src/sys/dev/tc: tcu.c

Log Message:
Print warning for problematic switch configuration.


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

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



CVS commit: src/sys/dev/tc

2016-12-03 Thread Felix Deichmann
Module Name:src
Committed By:   flxd
Date:   Sat Dec  3 18:12:50 UTC 2016

Modified Files:
src/sys/dev/tc: tcu.c

Log Message:
Print warning for problematic switch configuration.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/tc/tcu.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/dev/tc/tcu.c
diff -u src/sys/dev/tc/tcu.c:1.2 src/sys/dev/tc/tcu.c:1.3
--- src/sys/dev/tc/tcu.c:1.2	Tue Sep 13 16:54:26 2016
+++ src/sys/dev/tc/tcu.c	Sat Dec  3 18:12:50 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: tcu.c,v 1.2 2016/09/13 16:54:26 christos Exp $ */
+/* $NetBSD: tcu.c,v 1.3 2016/12/03 18:12:50 flxd Exp $ */
 
 /*-
  * Copyright (c) 2016, Felix Deichmann
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tcu.c,v 1.2 2016/09/13 16:54:26 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcu.c,v 1.3 2016/12/03 18:12:50 flxd Exp $");
 
 #include 
 #include 
@@ -54,6 +54,10 @@ __KERNEL_RCSID(0, "$NetBSD: tcu.c,v 1.2 
 
 #define TCU_CFG		0x0
 #define   TCU_CFG_RUN	__BIT(7)	/* write-only */
+#define   TCU_CFG_S1_1	__BIT(3)	/* read-only */
+#define   TCU_CFG_S1_2	__BIT(2)	/* read-only */
+#define   TCU_CFG_S1_3	__BIT(1)	/* read-only */
+#define   TCU_CFG_S1_4	__BIT(0)	/* read-only */
 #define TCU_GPIO_DIR	0x4
 #define TCU_GPIO_IN	0x8
 #define TCU_GPIO_OUT	0xc
@@ -137,6 +141,10 @@ tcu_attach(device_t parent, device_t sel
 	"\0", cfg);
 	aprint_normal_dev(self, "config %s\n", buf);
 
+	if ((cfg & TCU_CFG_S1_1) != 0 && ta->ta_busspeed != TC_SPEED_12_5_MHZ)
+		aprint_error_dev(self, "warning: switch S1-1 asserted with "
+		"clock != 12.5 MHz");
+
 #if NSLHCI_TCU > 0
 	/* Attach slhci. */
 	(void)config_found_ia(self, "tcu", aux, tcu_print);



CVS commit: src/sys/dev/tc

2016-10-14 Thread Felix Deichmann
Module Name:src
Committed By:   flxd
Date:   Fri Oct 14 15:01:39 UTC 2016

Modified Files:
src/sys/dev/tc: tcdevs.h tcdevs_data.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/tc/tcdevs.h \
src/sys/dev/tc/tcdevs_data.h

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



CVS commit: src/sys/dev/tc

2016-10-14 Thread Felix Deichmann
Module Name:src
Committed By:   flxd
Date:   Fri Oct 14 15:01:39 UTC 2016

Modified Files:
src/sys/dev/tc: tcdevs.h tcdevs_data.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/tc/tcdevs.h \
src/sys/dev/tc/tcdevs_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/dev/tc/tcdevs.h
diff -u src/sys/dev/tc/tcdevs.h:1.23 src/sys/dev/tc/tcdevs.h:1.24
--- src/sys/dev/tc/tcdevs.h:1.23	Thu Apr 12 21:39:24 2007
+++ src/sys/dev/tc/tcdevs.h	Fri Oct 14 15:01:39 2016
@@ -1,10 +1,10 @@
-/*	$NetBSD: tcdevs.h,v 1.23 2007/04/12 21:39:24 matt Exp $	*/
+/*	$NetBSD: tcdevs.h,v 1.24 2016/10/14 15:01:39 flxd Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: tcdevs,v 1.20 2005/12/11 12:24:00 christos Exp
+ *	NetBSD: tcdevs,v 1.22 2016/08/11 09:05:42 christos Exp
  */
 
 /*
@@ -181,3 +181,6 @@
 
 #define	TC_DEVICE_T3PKT	"tt"
 #define	TC_DESCRIPTION_T3PKT	"DECWRL Turbochannel T3"
+
+#define	TC_DEVICE_TC_USB	"tcu"
+#define	TC_DESCRIPTION_TC_USB	"flxd TC-USB"
Index: src/sys/dev/tc/tcdevs_data.h
diff -u src/sys/dev/tc/tcdevs_data.h:1.23 src/sys/dev/tc/tcdevs_data.h:1.24
--- src/sys/dev/tc/tcdevs_data.h:1.23	Thu Apr 12 21:39:24 2007
+++ src/sys/dev/tc/tcdevs_data.h	Fri Oct 14 15:01:39 2016
@@ -1,10 +1,10 @@
-/*	$NetBSD: tcdevs_data.h,v 1.23 2007/04/12 21:39:24 matt Exp $	*/
+/*	$NetBSD: tcdevs_data.h,v 1.24 2016/10/14 15:01:39 flxd Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: tcdevs,v 1.20 2005/12/11 12:24:00 christos Exp
+ *	NetBSD: tcdevs,v 1.22 2016/08/11 09:05:42 christos Exp
  */
 
 /*
@@ -279,5 +279,10 @@ const struct tc_knowndev tc_knowndevs[] 
 	TC_DEVICE_T3PKT,
 	TC_DESCRIPTION_T3PKT,
 	},
+	{
+	"TC-USB  ",
+	TC_DEVICE_TC_USB,
+	TC_DESCRIPTION_TC_USB,
+	},
 	{ NULL, NULL, NULL, }
 };



CVS commit: src/sys/dev/tc

2016-09-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Sep 13 16:54:26 UTC 2016

Modified Files:
src/sys/dev/tc: tcu.c

Log Message:
Adapt driver to final CPLD implementation. (Felix Deichmann)


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

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



CVS commit: src/sys/dev/tc

2016-09-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Sep 13 16:54:26 UTC 2016

Modified Files:
src/sys/dev/tc: tcu.c

Log Message:
Adapt driver to final CPLD implementation. (Felix Deichmann)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/tc/tcu.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/dev/tc/tcu.c
diff -u src/sys/dev/tc/tcu.c:1.1 src/sys/dev/tc/tcu.c:1.2
--- src/sys/dev/tc/tcu.c:1.1	Thu Aug 11 05:05:42 2016
+++ src/sys/dev/tc/tcu.c	Tue Sep 13 12:54:26 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: tcu.c,v 1.1 2016/08/11 09:05:42 christos Exp $ */
+/* $NetBSD: tcu.c,v 1.2 2016/09/13 16:54:26 christos Exp $ */
 
 /*-
  * Copyright (c) 2016, Felix Deichmann
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tcu.c,v 1.1 2016/08/11 09:05:42 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcu.c,v 1.2 2016/09/13 16:54:26 christos Exp $");
 
 #include 
 #include 
@@ -48,11 +48,15 @@ __KERNEL_RCSID(0, "$NetBSD: tcu.c,v 1.1 
 #include "slhci_tcu.h"
 
 #define TCU_GPIO_NPINS	8
-#define TCU_GPIO_OFFS	0x80
-#define TCU_GPIO_SIZE	(3 * 4)
-#define TCU_GPIO_DIR	0x0
-#define TCU_GPIO_IN	0x4
-#define TCU_GPIO_OUT	0x8
+
+#define TCU_CPLD_OFFS	0x80
+#define TCU_CPLD_SIZE	(4 * 4)
+
+#define TCU_CFG		0x0
+#define   TCU_CFG_RUN	__BIT(7)	/* write-only */
+#define TCU_GPIO_DIR	0x4
+#define TCU_GPIO_IN	0x8
+#define TCU_GPIO_OUT	0xc
 
 struct tcu_softc {
 #if NGPIO > 0
@@ -94,8 +98,45 @@ tcu_match(device_t parent, cfdata_t cf, 
 static void
 tcu_attach(device_t parent, device_t self, void *aux)
 {
+	struct tc_attach_args *ta = aux;
+	bus_space_tag_t iot = ta->ta_memt;
+	bus_space_handle_t ioh;
+	int error;
+	uint8_t cfg;
+	char buf[30];
 
 	printf(": TC-USB\n");
+
+	error = bus_space_map(iot, ta->ta_addr + TCU_CPLD_OFFS, TCU_CPLD_SIZE,
+	0, );
+	if (error) {
+		aprint_error_dev(self, "bus_space_map() failed (%d)\n", error);
+		return;
+	}
+
+	/*
+	 * Force reset in case system didn't. SL811 reset pulse and hold time
+	 * must be min. 16 clocks long (at 48 MHz clock) each.
+	 */
+	bus_space_write_1(iot, ioh, TCU_CFG, 0);
+	DELAY(1000);
+	bus_space_write_1(iot, ioh, TCU_CFG, TCU_CFG_RUN);
+	DELAY(1000);
+
+	cfg = bus_space_read_1(iot, ioh, TCU_CFG);
+
+	bus_space_unmap(iot, ioh, TCU_CPLD_SIZE);
+
+	/* Display DIP switch configuration. */
+	(void)snprintb(buf, sizeof(buf),
+	"\177\020"
+	"b\3S1-1\0"
+	"b\2S1-2\0"
+	"b\1S1-3\0"
+	"b\0S1-4\0"
+	"\0", cfg);
+	aprint_normal_dev(self, "config %s\n", buf);
+
 #if NSLHCI_TCU > 0
 	/* Attach slhci. */
 	(void)config_found_ia(self, "tcu", aux, tcu_print);
@@ -132,7 +173,7 @@ tcu_gpio_attach(device_t parent, device_
 
 	sc->sc_gpio_iot = iot;
 
-	error = bus_space_map(iot, ta->ta_addr + TCU_GPIO_OFFS, TCU_GPIO_SIZE,
+	error = bus_space_map(iot, ta->ta_addr + TCU_CPLD_OFFS, TCU_CPLD_SIZE,
 	0, >sc_gpio_ioh);
 	if (error) {
 		aprint_error_dev(self, "bus_space_map() failed (%d)\n", error);



CVS commit: src/sys/dev/tc

2016-08-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 11 09:05:43 UTC 2016

Modified Files:
src/sys/dev/tc: files.tc tcdevs
Added Files:
src/sys/dev/tc: slhci_tcu.c tcu.c

Log Message:
TURBOchannel usb/gpio driver from Felix Deichmann


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/tc/files.tc
cvs rdiff -u -r0 -r1.1 src/sys/dev/tc/slhci_tcu.c src/sys/dev/tc/tcu.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/tc/tcdevs

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



CVS commit: src/sys/dev/tc

2016-08-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Aug 11 09:05:43 UTC 2016

Modified Files:
src/sys/dev/tc: files.tc tcdevs
Added Files:
src/sys/dev/tc: slhci_tcu.c tcu.c

Log Message:
TURBOchannel usb/gpio driver from Felix Deichmann


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/tc/files.tc
cvs rdiff -u -r0 -r1.1 src/sys/dev/tc/slhci_tcu.c src/sys/dev/tc/tcu.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/tc/tcdevs

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

Modified files:

Index: src/sys/dev/tc/files.tc
diff -u src/sys/dev/tc/files.tc:1.33 src/sys/dev/tc/files.tc:1.34
--- src/sys/dev/tc/files.tc:1.33	Wed Feb 27 18:49:11 2008
+++ src/sys/dev/tc/files.tc	Thu Aug 11 05:05:42 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: files.tc,v 1.33 2008/02/27 23:49:11 matt Exp $
+#	$NetBSD: files.tc,v 1.34 2016/08/11 09:05:42 christos Exp $
 #
 # Config file and device description for machine-independent
 # TURBOchannel code.  Included by ports that need it.
@@ -100,3 +100,11 @@ file   dev/tc/pxg.cp
 device	sfbp: wsemuldisplaydev, rasops32, rasops8
 attach	sfbp at tc
 file	dev/tc/sfbplus.c		sfbp needs-flag
+
+# TC-USB
+device	tcu { } : gpiobus
+attach	tcu at tc
+file	dev/tc/tcu.c			tcu
+
+attach	slhci at tcu with slhci_tcu
+file	dev/tc/slhci_tcu.c		slhci_tcu needs-flag

Index: src/sys/dev/tc/tcdevs
diff -u src/sys/dev/tc/tcdevs:1.21 src/sys/dev/tc/tcdevs:1.22
--- src/sys/dev/tc/tcdevs:1.21	Wed Jan 21 09:34:18 2009
+++ src/sys/dev/tc/tcdevs	Thu Aug 11 05:05:42 2016
@@ -1,4 +1,4 @@
-$NetBSD: tcdevs,v 1.21 2009/01/21 14:34:18 jnemeth Exp $
+$NetBSD: tcdevs,v 1.22 2016/08/11 09:05:42 christos Exp $
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou
@@ -83,6 +83,7 @@ device	PMAZC-AA	tcds	53c94 TCDS Fast SCS
 device	PMTNV-AA	???	Non-volatile RAM option card
 device	T1D4PKT		ds	DECWRL Turbochannel T1
 device	T3PKT		tt	DECWRL Turbochannel T3
+device	TC-USB  	tcu	flxd TC-USB
 
 # the following entries are unconfirmed
 #device	PMAF-CA		fza	DEC FDDIcontroller 700C (DEFZA; copper)

Added files:

Index: src/sys/dev/tc/slhci_tcu.c
diff -u /dev/null src/sys/dev/tc/slhci_tcu.c:1.1
--- /dev/null	Thu Aug 11 05:05:43 2016
+++ src/sys/dev/tc/slhci_tcu.c	Thu Aug 11 05:05:42 2016
@@ -0,0 +1,101 @@
+/* $NetBSD: slhci_tcu.c,v 1.1 2016/08/11 09:05:42 christos Exp $ */
+
+/*-
+ * Copyright (c) 2016, Felix Deichmann
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * flxd TC-USB - TURBOchannel USB host option
+ */
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: slhci_tcu.c,v 1.1 2016/08/11 09:05:42 christos Exp $");
+
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+
+struct slhci_tcu_softc {
+	struct slhci_softc sc;
+};
+
+static int  slhci_tcu_match(device_t, cfdata_t, void *);
+static void slhci_tcu_attach(device_t, device_t, void *);
+
+CFATTACH_DECL_NEW(slhci_tcu, sizeof(struct slhci_tcu_softc),
+slhci_tcu_match, slhci_tcu_attach, NULL, slhci_activate);
+
+static int
+slhci_tcu_match(device_t parent, cfdata_t cf, void *aux)
+{
+
+	/* Always match. */
+	return 1;
+}
+
+#define SLHCI_TCU_STRIDE	4
+#define SLHCI_TCU_IMAX		500 /* mA */
+
+static void
+slhci_tcu_attach(device_t parent, device_t self, void *aux)
+{
+	struct slhci_tcu_softc *tsc = device_private(self);
+	struct slhci_softc *sc = >sc;
+	struct tc_attach_args *ta = aux;
+	bus_space_tag_t iot = ta->ta_memt;
+	bus_space_handle_t ioh;
+	int error;
+
+	sc->sc_dev = self;
+	sc->sc_bus.ub_hcpriv = sc;
+
+	aprint_normal("\n");
+
+	error = bus_space_map(iot, ta->ta_addr,
+	SLHCI_TCU_STRIDE * 

CVS commit: src/sys/dev/tc

2016-07-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 19 18:27:27 UTC 2016

Modified Files:
src/sys/dev/tc: tc.c

Log Message:
make the check work with widths other than 4, Felix Deichmann


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/dev/tc/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/dev/tc/tc.c
diff -u src/sys/dev/tc/tc.c:1.52 src/sys/dev/tc/tc.c:1.53
--- src/sys/dev/tc/tc.c:1.52	Tue Jul 19 12:58:05 2016
+++ src/sys/dev/tc/tc.c	Tue Jul 19 14:27:27 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: tc.c,v 1.52 2016/07/19 16:58:05 christos Exp $	*/
+/*	$NetBSD: tc.c,v 1.53 2016/07/19 18:27:27 christos Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.52 2016/07/19 16:58:05 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.53 2016/07/19 18:27:27 christos Exp $");
 
 #include "opt_tcverbose.h"
 
@@ -212,7 +212,7 @@ tc_check_romp(const struct tc_rommap *ro
 	if (romp->tcr_stride.v != 4)
 		return 0;
 
-	for (size_t j = 0; j < 4; j++) {
+	for (size_t j = 0; j < romp->tcr_width.v; j++) {
 		if (romp->tcr_test[j + 0 * romp->tcr_stride.v] != 0x55 ||
 		romp->tcr_test[j + 1 * romp->tcr_stride.v] != 0x00 ||
 		romp->tcr_test[j + 2 * romp->tcr_stride.v] != 0xaa ||



CVS commit: src/sys/dev/tc

2016-07-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 19 18:27:27 UTC 2016

Modified Files:
src/sys/dev/tc: tc.c

Log Message:
make the check work with widths other than 4, Felix Deichmann


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/dev/tc/tc.c

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



CVS commit: src/sys/dev/tc

2016-07-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 19 16:58:06 UTC 2016

Modified Files:
src/sys/dev/tc: tc.c

Log Message:
PR/50849: Felix Deichmann: Relax TC option ROM header check for ROM widths < 4


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/tc/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/dev/tc/tc.c
diff -u src/sys/dev/tc/tc.c:1.51 src/sys/dev/tc/tc.c:1.52
--- src/sys/dev/tc/tc.c:1.51	Fri Jun  3 21:57:34 2011
+++ src/sys/dev/tc/tc.c	Tue Jul 19 12:58:05 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: tc.c,v 1.51 2011/06/04 01:57:34 tsutsui Exp $	*/
+/*	$NetBSD: tc.c,v 1.52 2016/07/19 16:58:05 christos Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.51 2011/06/04 01:57:34 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.52 2016/07/19 16:58:05 christos Exp $");
 
 #include "opt_tcverbose.h"
 
@@ -206,6 +206,22 @@ static const tc_offset_t tc_slot_romoffs
 #endif
 };
 
+static int
+tc_check_romp(const struct tc_rommap *romp)
+{
+	if (romp->tcr_stride.v != 4)
+		return 0;
+
+	for (size_t j = 0; j < 4; j++) {
+		if (romp->tcr_test[j + 0 * romp->tcr_stride.v] != 0x55 ||
+		romp->tcr_test[j + 1 * romp->tcr_stride.v] != 0x00 ||
+		romp->tcr_test[j + 2 * romp->tcr_stride.v] != 0xaa ||
+		romp->tcr_test[j + 3 * romp->tcr_stride.v] != 0xff)
+			return 0;
+	}
+	return 1;
+}
+
 int
 tc_checkslot(tc_addr_t slotbase, char *namep)
 {
@@ -226,16 +242,9 @@ tc_checkslot(tc_addr_t slotbase, char *n
 			continue;
 		}
 
-		if (romp->tcr_stride.v != 4)
+		if (!tc_check_romp(romp))
 			continue;
 
-		for (j = 0; j < 4; j++)
-			if (romp->tcr_test[j+0*romp->tcr_stride.v] != 0x55 ||
-			romp->tcr_test[j+1*romp->tcr_stride.v] != 0x00 ||
-			romp->tcr_test[j+2*romp->tcr_stride.v] != 0xaa ||
-			romp->tcr_test[j+3*romp->tcr_stride.v] != 0xff)
-continue;
-
 		for (j = 0; j < TC_ROM_LLEN; j++)
 			namep[j] = romp->tcr_modname[j].v;
 		namep[j] = '\0';



CVS commit: src/sys/dev/tc

2016-07-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 19 16:58:06 UTC 2016

Modified Files:
src/sys/dev/tc: tc.c

Log Message:
PR/50849: Felix Deichmann: Relax TC option ROM header check for ROM widths < 4


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/tc/tc.c

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



CVS commit: src/sys/dev/tc

2013-11-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Nov  4 16:53:09 UTC 2013

Modified Files:
src/sys/dev/tc: mfb.c px.c pxg.c

Log Message:
add __USE() for unused volatile variables, so that we generate the same code.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/tc/mfb.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/tc/px.c
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/tc/pxg.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/dev/tc/mfb.c
diff -u src/sys/dev/tc/mfb.c:1.58 src/sys/dev/tc/mfb.c:1.59
--- src/sys/dev/tc/mfb.c:1.58	Wed Jan 11 16:12:36 2012
+++ src/sys/dev/tc/mfb.c	Mon Nov  4 11:53:09 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: mfb.c,v 1.58 2012/01/11 21:12:36 macallan Exp $ */
+/* $NetBSD: mfb.c,v 1.59 2013/11/04 16:53:09 christos Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mfb.c,v 1.58 2012/01/11 21:12:36 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: mfb.c,v 1.59 2013/11/04 16:53:09 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -260,6 +260,7 @@ mfbattach(device_t parent, device_t self
 	/* clear any pending interrupts */
 	*(uint8_t *)((char *)ri-ri_hw + MX_IREQ_OFFSET) = 0;
 	junk = *(uint8_t *)((char *)ri-ri_hw + MX_IREQ_OFFSET);
+	__USE(junk);
 	*(uint8_t *)((char *)ri-ri_hw + MX_IREQ_OFFSET) = 1;
 
 	waa.console = console;
@@ -471,6 +472,7 @@ mfbintr(void *arg)
 
 	base = (void *)sc-sc_ri-ri_hw;
 	junk = *(uint8_t *)(base + MX_IREQ_OFFSET);
+	__USE(junk);
 #if 0
 	*(uint8_t *)(base + MX_IREQ_OFFSET) = 0;
 #endif

Index: src/sys/dev/tc/px.c
diff -u src/sys/dev/tc/px.c:1.39 src/sys/dev/tc/px.c:1.40
--- src/sys/dev/tc/px.c:1.39	Sat Oct 27 13:18:38 2012
+++ src/sys/dev/tc/px.c	Mon Nov  4 11:53:09 2013
@@ -1,4 +1,4 @@
-/* 	$NetBSD: px.c,v 1.39 2012/10/27 17:18:38 chs Exp $	*/
+/* 	$NetBSD: px.c,v 1.40 2013/11/04 16:53:09 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: px.c,v 1.39 2012/10/27 17:18:38 chs Exp $);
+__KERNEL_RCSID(0, $NetBSD: px.c,v 1.40 2013/11/04 16:53:09 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -344,6 +344,7 @@ px_pbuf_post(struct stic_info *si, uint3
 			sr-sr_ipdvint = STIC_INT_P_WE;
 			tc_wmb();
 			junk = *poll;
+			__USE(junk);
 			return (0);
 		}
 		DELAY(STAMP_DELAY);

Index: src/sys/dev/tc/pxg.c
diff -u src/sys/dev/tc/pxg.c:1.34 src/sys/dev/tc/pxg.c:1.35
--- src/sys/dev/tc/pxg.c:1.34	Tue Mar 13 14:40:34 2012
+++ src/sys/dev/tc/pxg.c	Mon Nov  4 11:53:09 2013
@@ -1,4 +1,4 @@
-/* 	$NetBSD: pxg.c,v 1.34 2012/03/13 18:40:34 elad Exp $	*/
+/* 	$NetBSD: pxg.c,v 1.35 2013/11/04 16:53:09 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pxg.c,v 1.34 2012/03/13 18:40:34 elad Exp $);
+__KERNEL_RCSID(0, $NetBSD: pxg.c,v 1.35 2013/11/04 16:53:09 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -338,6 +338,7 @@ pxg_pbuf_post(struct stic_info *si, uint
 			sr-sr_ipdvint = STIC_INT_P_WE;
 			tc_wmb();
 			junk = *poll;
+			__USE(junk);
 			return (0);
 		}
 		DELAY(STAMP_DELAY);



CVS commit: src/sys/dev/tc

2012-10-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Oct 29 13:19:15 UTC 2012

Removed Files:
src/sys/dev/tc: ascvar.h

Log Message:
remove unused file.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r0 src/sys/dev/tc/ascvar.h

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



CVS commit: src/sys/dev/tc

2012-10-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Oct 29 13:19:15 UTC 2012

Removed Files:
src/sys/dev/tc: ascvar.h

Log Message:
remove unused file.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r0 src/sys/dev/tc/ascvar.h

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



CVS commit: src/sys/dev/tc

2012-01-11 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Jan 11 21:12:37 UTC 2012

Modified Files:
src/sys/dev/tc: cfb.c mfb.c sfb.c sfbplus.c stic.c tfb.c xcfb.c

Log Message:
adjust wsfont_find()


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/dev/tc/cfb.c src/sys/dev/tc/tfb.c
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/tc/mfb.c
cvs rdiff -u -r1.83 -r1.84 src/sys/dev/tc/sfb.c
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/tc/sfbplus.c
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/tc/stic.c
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/tc/xcfb.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/dev/tc/cfb.c
diff -u src/sys/dev/tc/cfb.c:1.60 src/sys/dev/tc/cfb.c:1.61
--- src/sys/dev/tc/cfb.c:1.60	Sat Nov 13 13:52:12 2010
+++ src/sys/dev/tc/cfb.c	Wed Jan 11 21:12:36 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: cfb.c,v 1.60 2010/11/13 13:52:12 uebayasi Exp $ */
+/* $NetBSD: cfb.c,v 1.61 2012/01/11 21:12:36 macallan Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cfb.c,v 1.60 2010/11/13 13:52:12 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: cfb.c,v 1.61 2012/01/11 21:12:36 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -332,10 +332,10 @@ cfb_common_init(struct rasops_info *ri)
 	wsfont_init();
 	/* prefer 12 pixel wide font */
 	cookie = wsfont_find(NULL, 12, 0, 0, WSDISPLAY_FONTORDER_L2R,
-	WSDISPLAY_FONTORDER_L2R);
+	WSDISPLAY_FONTORDER_L2R, WSFONT_FIND_BITMAP);
 	if (cookie = 0)
 		cookie = wsfont_find(NULL, 0, 0, 0, WSDISPLAY_FONTORDER_L2R,
-		WSDISPLAY_FONTORDER_L2R);
+		WSDISPLAY_FONTORDER_L2R, WSFONT_FIND_BITMAP);
 	if (cookie = 0) {
 		printf(cfb: font table is empty\n);
 		return;
Index: src/sys/dev/tc/tfb.c
diff -u src/sys/dev/tc/tfb.c:1.60 src/sys/dev/tc/tfb.c:1.61
--- src/sys/dev/tc/tfb.c:1.60	Sat Nov 13 13:52:12 2010
+++ src/sys/dev/tc/tfb.c	Wed Jan 11 21:12:36 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: tfb.c,v 1.60 2010/11/13 13:52:12 uebayasi Exp $ */
+/* $NetBSD: tfb.c,v 1.61 2012/01/11 21:12:36 macallan Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tfb.c,v 1.60 2010/11/13 13:52:12 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: tfb.c,v 1.61 2012/01/11 21:12:36 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -350,10 +350,10 @@ tfb_common_init(struct rasops_info *ri)
 	wsfont_init();
 	/* prefer 12 pixel wide font */
 	cookie = wsfont_find(NULL, 12, 0, 0, WSDISPLAY_FONTORDER_L2R,
-	WSDISPLAY_FONTORDER_L2R);
+	WSDISPLAY_FONTORDER_L2R, WSFONT_FIND_BITMAP);
 	if (cookie = 0)
 		cookie = wsfont_find(NULL, 0, 0, 0, WSDISPLAY_FONTORDER_L2R,
-		WSDISPLAY_FONTORDER_L2R);
+		WSDISPLAY_FONTORDER_L2R, WSFONT_FIND_BITMAP);
 	if (cookie = 0) {
 		printf(tfb: font table is empty\n);
 		return;

Index: src/sys/dev/tc/mfb.c
diff -u src/sys/dev/tc/mfb.c:1.57 src/sys/dev/tc/mfb.c:1.58
--- src/sys/dev/tc/mfb.c:1.57	Sat Nov 13 13:52:12 2010
+++ src/sys/dev/tc/mfb.c	Wed Jan 11 21:12:36 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: mfb.c,v 1.57 2010/11/13 13:52:12 uebayasi Exp $ */
+/* $NetBSD: mfb.c,v 1.58 2012/01/11 21:12:36 macallan Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mfb.c,v 1.57 2010/11/13 13:52:12 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: mfb.c,v 1.58 2012/01/11 21:12:36 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -296,10 +296,10 @@ mfb_common_init(struct rasops_info *ri)
 	wsfont_init();
 	/* prefer 12 pixel wide font */
 	cookie = wsfont_find(NULL, 12, 0, 0, WSDISPLAY_FONTORDER_L2R,
-	WSDISPLAY_FONTORDER_L2R);
+	WSDISPLAY_FONTORDER_L2R, WSFONT_FIND_BITMAP);
 	if (cookie = 0)
 		cookie = wsfont_find(NULL, 0, 0, 0, WSDISPLAY_FONTORDER_L2R,
-		WSDISPLAY_FONTORDER_L2R);
+		WSDISPLAY_FONTORDER_L2R, WSFONT_FIND_BITMAP);
 	if (cookie = 0) {
 		printf(mfb: font table is empty\n);
 		return;

Index: src/sys/dev/tc/sfb.c
diff -u src/sys/dev/tc/sfb.c:1.83 src/sys/dev/tc/sfb.c:1.84
--- src/sys/dev/tc/sfb.c:1.83	Sat Nov 13 13:52:12 2010
+++ src/sys/dev/tc/sfb.c	Wed Jan 11 21:12:36 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: sfb.c,v 1.83 2010/11/13 13:52:12 uebayasi Exp $ */
+/* $NetBSD: sfb.c,v 1.84 2012/01/11 21:12:36 macallan Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sfb.c,v 1.83 2010/11/13 13:52:12 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: sfb.c,v 1.84 2012/01/11 21:12:36 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -358,10 +358,10 @@ sfb_common_init(struct rasops_info *ri)
 	wsfont_init();
 	/* prefer 12 pixel wide font */
 	cookie = wsfont_find(NULL, 12, 0, 0, WSDISPLAY_FONTORDER_R2L,
-	

CVS commit: src/sys/dev/tc

2012-01-11 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Jan 11 21:12:37 UTC 2012

Modified Files:
src/sys/dev/tc: cfb.c mfb.c sfb.c sfbplus.c stic.c tfb.c xcfb.c

Log Message:
adjust wsfont_find()


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/dev/tc/cfb.c src/sys/dev/tc/tfb.c
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/tc/mfb.c
cvs rdiff -u -r1.83 -r1.84 src/sys/dev/tc/sfb.c
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/tc/sfbplus.c
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/tc/stic.c
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/tc/xcfb.c

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



CVS commit: src/sys/dev/tc

2011-02-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Feb 20 08:03:22 UTC 2011

Modified Files:
src/sys/dev/tc: ioasicvar.h tcvar.h

Log Message:
Add some missing includes of sys/device.h


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/tc/ioasicvar.h
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/tc/tcvar.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/dev/tc/ioasicvar.h
diff -u src/sys/dev/tc/ioasicvar.h:1.20 src/sys/dev/tc/ioasicvar.h:1.21
--- src/sys/dev/tc/ioasicvar.h:1.20	Tue May 12 14:47:04 2009
+++ src/sys/dev/tc/ioasicvar.h	Sun Feb 20 08:03:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ioasicvar.h,v 1.20 2009/05/12 14:47:04 cegger Exp $	*/
+/*	$NetBSD: ioasicvar.h,v 1.21 2011/02/20 08:03:22 matt Exp $	*/
 
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
@@ -30,6 +30,8 @@
 #ifndef _DEV_TC_IOASICVAR_H_
 #define _DEV_TC_IOASICVAR_H_
 
+#include sys/device.h
+
 struct ioasic_dev {
 	const char	*iad_modname;
 	tc_offset_t	iad_offset;

Index: src/sys/dev/tc/tcvar.h
diff -u src/sys/dev/tc/tcvar.h:1.24 src/sys/dev/tc/tcvar.h:1.25
--- src/sys/dev/tc/tcvar.h:1.24	Tue May 12 14:47:04 2009
+++ src/sys/dev/tc/tcvar.h	Sun Feb 20 08:03:22 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: tcvar.h,v 1.24 2009/05/12 14:47:04 cegger Exp $ */
+/* $NetBSD: tcvar.h,v 1.25 2011/02/20 08:03:22 matt Exp $ */
 
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
@@ -35,6 +35,7 @@
  */
 
 #include sys/bus.h
+#include sys/device.h
 #include dev/tc/tcreg.h
 
 /*



CVS commit: src/sys/dev/tc

2011-02-20 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Sun Feb 20 08:03:22 UTC 2011

Modified Files:
src/sys/dev/tc: ioasicvar.h tcvar.h

Log Message:
Add some missing includes of sys/device.h


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/tc/ioasicvar.h
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/tc/tcvar.h

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



CVS commit: src/sys/dev/tc

2010-11-06 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov  6 10:58:13 UTC 2010

Modified Files:
src/sys/dev/tc: px.c

Log Message:
Include uvm/uvm.h to access UVM internal.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/tc/px.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/dev/tc/px.c
diff -u src/sys/dev/tc/px.c:1.37 src/sys/dev/tc/px.c:1.38
--- src/sys/dev/tc/px.c:1.37	Sat Aug 22 17:38:06 2009
+++ src/sys/dev/tc/px.c	Sat Nov  6 10:58:12 2010
@@ -1,4 +1,4 @@
-/* 	$NetBSD: px.c,v 1.37 2009/08/22 17:38:06 tsutsui Exp $	*/
+/* 	$NetBSD: px.c,v 1.38 2010/11/06 10:58:12 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: px.c,v 1.37 2009/08/22 17:38:06 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: px.c,v 1.38 2010/11/06 10:58:12 uebayasi Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -42,7 +42,7 @@
 #include sys/malloc.h
 #include sys/callout.h
 
-#include uvm/uvm_extern.h
+#include uvm/uvm.h	/* XXX uvm_pageboot_alloc */
 
 #if defined(pmax)
 #include mips/cpuregs.h



CVS commit: src/sys/dev/tc

2010-11-06 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Nov  6 10:58:13 UTC 2010

Modified Files:
src/sys/dev/tc: px.c

Log Message:
Include uvm/uvm.h to access UVM internal.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/tc/px.c

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



CVS commit: src/sys/dev/tc

2010-05-15 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat May 15 07:01:38 UTC 2010

Modified Files:
src/sys/dev/tc: cfb.c mfb.c sfb.c sfbplus.c tfb.c xcfb.c

Log Message:
Set RI_NO_AUTO in ri_flg if *fb_common_init() is invoked from cnattach.
Untested.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/tc/cfb.c src/sys/dev/tc/tfb.c
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/tc/mfb.c
cvs rdiff -u -r1.80 -r1.81 src/sys/dev/tc/sfb.c
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/tc/sfbplus.c
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/tc/xcfb.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/dev/tc/cfb.c
diff -u src/sys/dev/tc/cfb.c:1.57 src/sys/dev/tc/cfb.c:1.58
--- src/sys/dev/tc/cfb.c:1.57	Sat Aug 22 17:38:06 2009
+++ src/sys/dev/tc/cfb.c	Sat May 15 07:01:37 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: cfb.c,v 1.57 2009/08/22 17:38:06 tsutsui Exp $ */
+/* $NetBSD: cfb.c,v 1.58 2010/05/15 07:01:37 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cfb.c,v 1.57 2009/08/22 17:38:06 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: cfb.c,v 1.58 2010/05/15 07:01:37 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -319,6 +319,8 @@
 	cfbhwinit(base);
 
 	ri-ri_flg = RI_CENTER;
+	if (ri == cfb_console_ri)
+		ri-ri_flg |= RI_NO_AUTO;
 	ri-ri_depth = 8;
 	ri-ri_width = 1024;
 	ri-ri_height = 864;
Index: src/sys/dev/tc/tfb.c
diff -u src/sys/dev/tc/tfb.c:1.57 src/sys/dev/tc/tfb.c:1.58
--- src/sys/dev/tc/tfb.c:1.57	Sat Aug 22 17:38:06 2009
+++ src/sys/dev/tc/tfb.c	Sat May 15 07:01:37 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: tfb.c,v 1.57 2009/08/22 17:38:06 tsutsui Exp $ */
+/* $NetBSD: tfb.c,v 1.58 2010/05/15 07:01:37 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tfb.c,v 1.57 2009/08/22 17:38:06 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: tfb.c,v 1.58 2010/05/15 07:01:37 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -337,6 +337,8 @@
 	tfbhwinit(base);
 
 	ri-ri_flg = RI_CENTER;
+	if (ri == tfb_console_ri)
+		ri-ri_flg |= RI_NO_AUTO;
 	ri-ri_depth = 8;
 	ri-ri_width = 1280;
 	ri-ri_height = 1024;

Index: src/sys/dev/tc/mfb.c
diff -u src/sys/dev/tc/mfb.c:1.54 src/sys/dev/tc/mfb.c:1.55
--- src/sys/dev/tc/mfb.c:1.54	Sat Aug 22 17:38:06 2009
+++ src/sys/dev/tc/mfb.c	Sat May 15 07:01:37 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: mfb.c,v 1.54 2009/08/22 17:38:06 tsutsui Exp $ */
+/* $NetBSD: mfb.c,v 1.55 2010/05/15 07:01:37 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mfb.c,v 1.54 2009/08/22 17:38:06 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: mfb.c,v 1.55 2010/05/15 07:01:37 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -283,6 +283,8 @@
 	mfbhwinit(base);
 
 	ri-ri_flg = RI_CENTER | RI_FORCEMONO;
+	if (ri == mfb_console_ri)
+		ri-ri_flg |= RI_NO_AUTO;
 	ri-ri_depth = 8;	/* !! watch out !! */
 	ri-ri_width = 1280;
 	ri-ri_height = 1024;

Index: src/sys/dev/tc/sfb.c
diff -u src/sys/dev/tc/sfb.c:1.80 src/sys/dev/tc/sfb.c:1.81
--- src/sys/dev/tc/sfb.c:1.80	Sat Aug 22 17:38:06 2009
+++ src/sys/dev/tc/sfb.c	Sat May 15 07:01:37 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: sfb.c,v 1.80 2009/08/22 17:38:06 tsutsui Exp $ */
+/* $NetBSD: sfb.c,v 1.81 2010/05/15 07:01:37 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sfb.c,v 1.80 2009/08/22 17:38:06 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: sfb.c,v 1.81 2010/05/15 07:01:37 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -345,6 +345,8 @@
 	sfbhwinit(base);
 
 	ri-ri_flg = RI_CENTER;
+	if (ri == sfb_console_ri)
+		ri-ri_flg |= RI_NO_AUTO;
 	ri-ri_depth = 8;
 	ri-ri_width = (hsetup  0x1ff)  2;
 	ri-ri_height = (vsetup  0x7ff);

Index: src/sys/dev/tc/sfbplus.c
diff -u src/sys/dev/tc/sfbplus.c:1.33 src/sys/dev/tc/sfbplus.c:1.34
--- src/sys/dev/tc/sfbplus.c:1.33	Sat Aug 22 17:38:06 2009
+++ src/sys/dev/tc/sfbplus.c	Sat May 15 07:01:37 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: sfbplus.c,v 1.33 2009/08/22 17:38:06 tsutsui Exp $ */
+/* $NetBSD: sfbplus.c,v 1.34 2010/05/15 07:01:37 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sfbplus.c,v 1.33 2009/08/22 17:38:06 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: sfbplus.c,v 1.34 2010/05/15 07:01:37 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -369,6 +369,8 @@
 	}
 
 	ri-ri_flg = RI_CENTER;
+	if (ri == sfbp_console_ri)
+		ri-ri_flg |= RI_NO_AUTO;
 	ri-ri_flg = 0;			/* XXX 32bpp RI_CENTER fails XXX */
 	ri-ri_depth = depth;
 	ri-ri_width = (hsetup  0x1ff)  

CVS commit: src/sys/dev/tc

2009-08-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Aug 22 17:36:13 UTC 2009

Modified Files:
src/sys/dev/tc: sfbplus.c

Log Message:
MALLOC() - malloc()


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/tc/sfbplus.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/dev/tc/sfbplus.c
diff -u src/sys/dev/tc/sfbplus.c:1.31 src/sys/dev/tc/sfbplus.c:1.32
--- src/sys/dev/tc/sfbplus.c:1.31	Wed Jul  9 13:19:33 2008
+++ src/sys/dev/tc/sfbplus.c	Sat Aug 22 17:36:12 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: sfbplus.c,v 1.31 2008/07/09 13:19:33 joerg Exp $ */
+/* $NetBSD: sfbplus.c,v 1.32 2009/08/22 17:36:12 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sfbplus.c,v 1.31 2008/07/09 13:19:33 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: sfbplus.c,v 1.32 2009/08/22 17:36:12 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -263,8 +263,7 @@
 		sc-nscreens = 1;
 	}
 	else {
-		MALLOC(ri, struct rasops_info *, sizeof(struct rasops_info),
-			M_DEVBUF, M_NOWAIT);
+		ri = malloc(sizeof(struct rasops_info), M_DEVBUF, M_NOWAIT);
 		if (ri == NULL) {
 			printf(: can't alloc memory\n);
 			return;



CVS commit: src/sys/dev/tc

2009-08-20 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Aug 20 12:55:26 UTC 2009

Modified Files:
src/sys/dev/tc: sfb.c

Log Message:
Use volatile on device register access.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/dev/tc/sfb.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/dev/tc/sfb.c
diff -u src/sys/dev/tc/sfb.c:1.78 src/sys/dev/tc/sfb.c:1.79
--- src/sys/dev/tc/sfb.c:1.78	Wed Dec 17 20:51:35 2008
+++ src/sys/dev/tc/sfb.c	Thu Aug 20 12:55:26 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: sfb.c,v 1.78 2008/12/17 20:51:35 cegger Exp $ */
+/* $NetBSD: sfb.c,v 1.79 2009/08/20 12:55:26 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sfb.c,v 1.78 2008/12/17 20:51:35 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: sfb.c,v 1.79 2009/08/20 12:55:26 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -330,8 +330,8 @@
 
 	base = (void *)ri-ri_hw;
 	asic = base + SFB_ASIC_OFFSET;
-	hsetup = *(u_int32_t *)(asic + SFB_ASIC_VIDEO_HSETUP);
-	vsetup = *(u_int32_t *)(asic + SFB_ASIC_VIDEO_VSETUP);
+	hsetup = *(volatile u_int32_t *)(asic + SFB_ASIC_VIDEO_HSETUP);
+	vsetup = *(volatile u_int32_t *)(asic + SFB_ASIC_VIDEO_VSETUP);
 
 	vbase = 1;
 	SFBWRITE32(asic, SFB_ASIC_VIDEO_BASE, vbase);



CVS commit: src/sys/dev/tc

2009-05-12 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Tue May 12 13:21:22 UTC 2009

Modified Files:
src/sys/dev/tc: bba.c if_fta.c px.c pxg.c tc.c xcfb.c zs_ioasic.c

Log Message:
struct cfdata * - cfdata_t, no functional changes intended.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/tc/bba.c src/sys/dev/tc/px.c
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/tc/if_fta.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/tc/pxg.c
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/tc/tc.c src/sys/dev/tc/xcfb.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/tc/zs_ioasic.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/dev/tc/bba.c
diff -u src/sys/dev/tc/bba.c:1.34 src/sys/dev/tc/bba.c:1.35
--- src/sys/dev/tc/bba.c:1.34	Mon Apr 28 20:23:58 2008
+++ src/sys/dev/tc/bba.c	Tue May 12 13:21:22 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: bba.c,v 1.34 2008/04/28 20:23:58 martin Exp $ */
+/* $NetBSD: bba.c,v 1.35 2009/05/12 13:21:22 cegger Exp $ */
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
 /* maxine/alpha baseboard audio (bba) */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bba.c,v 1.34 2008/04/28 20:23:58 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: bba.c,v 1.35 2009/05/12 13:21:22 cegger Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -92,7 +92,7 @@
 	struct bba_dma_state sc_rx_dma_state;
 };
 
-static int	bba_match(struct device *, struct cfdata *, void *);
+static int	bba_match(struct device *, cfdata_t, void *);
 static void	bba_attach(struct device *, struct device *, void *);
 
 CFATTACH_DECL(bba, sizeof(struct bba_softc),
@@ -190,7 +190,7 @@
 static uint8_t	bba_codec_dread(struct am7930_softc *, int);
 
 static int
-bba_match(struct device *parent, struct cfdata *cf, void *aux)
+bba_match(struct device *parent, cfdata_t cf, void *aux)
 {
 	struct ioasicdev_attach_args *ia;
 
Index: src/sys/dev/tc/px.c
diff -u src/sys/dev/tc/px.c:1.34 src/sys/dev/tc/px.c:1.35
--- src/sys/dev/tc/px.c:1.34	Wed Jul  9 13:19:33 2008
+++ src/sys/dev/tc/px.c	Tue May 12 13:21:22 2009
@@ -1,4 +1,4 @@
-/* 	$NetBSD: px.c,v 1.34 2008/07/09 13:19:33 joerg Exp $	*/
+/* 	$NetBSD: px.c,v 1.35 2009/05/12 13:21:22 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: px.c,v 1.34 2008/07/09 13:19:33 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: px.c,v 1.35 2009/05/12 13:21:22 cegger Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -94,7 +94,7 @@
 static void	px_init(struct stic_info *, int);
 static int	px_ioctl(struct stic_info *, u_long, void *, int,
 			 struct lwp *);
-static int	px_match(struct device *, struct cfdata *, void *);
+static int	px_match(struct device *, cfdata_t, void *);
 
 static int	px_intr(void *);
 static uint32_t	*px_pbuf_get(struct stic_info *);

Index: src/sys/dev/tc/if_fta.c
diff -u src/sys/dev/tc/if_fta.c:1.25 src/sys/dev/tc/if_fta.c:1.26
--- src/sys/dev/tc/if_fta.c:1.25	Sat Apr  5 16:44:41 2008
+++ src/sys/dev/tc/if_fta.c	Tue May 12 13:21:22 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_fta.c,v 1.25 2008/04/05 16:44:41 cegger Exp $	*/
+/*	$NetBSD: if_fta.c,v 1.26 2009/05/12 13:21:22 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1996 Matt Thomas m...@3am-software.com
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_fta.c,v 1.25 2008/04/05 16:44:41 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_fta.c,v 1.26 2009/05/12 13:21:22 cegger Exp $);
 
 #include opt_inet.h
 
@@ -66,7 +66,7 @@
 static int
 pdq_tc_match(
 struct device *parent,
-struct cfdata *match,
+cfdata_t match,
 void *aux)
 {
 struct tc_attach_args *ta = (struct tc_attach_args *) aux;

Index: src/sys/dev/tc/pxg.c
diff -u src/sys/dev/tc/pxg.c:1.30 src/sys/dev/tc/pxg.c:1.31
--- src/sys/dev/tc/pxg.c:1.30	Wed Jul  9 13:19:33 2008
+++ src/sys/dev/tc/pxg.c	Tue May 12 13:21:22 2009
@@ -1,4 +1,4 @@
-/* 	$NetBSD: pxg.c,v 1.30 2008/07/09 13:19:33 joerg Exp $	*/
+/* 	$NetBSD: pxg.c,v 1.31 2009/05/12 13:21:22 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pxg.c,v 1.30 2008/07/09 13:19:33 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: pxg.c,v 1.31 2009/05/12 13:21:22 cegger Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -82,7 +82,7 @@
 
 static void	pxg_attach(struct device *, struct device *, void *);
 static int	pxg_intr(void *);
-static int	pxg_match(struct device *, struct cfdata *, void *);
+static int	pxg_match(struct device *, cfdata_t, void *);
 
 static void	pxg_init(struct stic_info *);
 static int	pxg_ioctl(struct stic_info *, u_long, void *, int, struct lwp *);

Index: src/sys/dev/tc/tc.c
diff -u src/sys/dev/tc/tc.c:1.48 src/sys/dev/tc/tc.c:1.49
--- src/sys/dev/tc/tc.c:1.48	Wed Jun 11 16:46:11 2008
+++ src/sys/dev/tc/tc.c	Tue May 12 13:21:22 2009
@@ -1,4 +1,4 

CVS commit: src/sys/dev/tc

2009-05-12 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Tue May 12 14:47:05 UTC 2009

Modified Files:
src/sys/dev/tc: bba.c if_fta.c ioasicvar.h px.c pxg.c tc.c tcdsvar.h
tcvar.h xcfb.c zskbd.c zsms.c

Log Message:
struct device * - device_t, no functional changes intended.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/tc/bba.c src/sys/dev/tc/px.c
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/tc/if_fta.c
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/tc/ioasicvar.h
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/tc/pxg.c
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/tc/tc.c src/sys/dev/tc/xcfb.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/tc/tcdsvar.h
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/tc/tcvar.h
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/tc/zskbd.c
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/tc/zsms.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/dev/tc/bba.c
diff -u src/sys/dev/tc/bba.c:1.35 src/sys/dev/tc/bba.c:1.36
--- src/sys/dev/tc/bba.c:1.35	Tue May 12 13:21:22 2009
+++ src/sys/dev/tc/bba.c	Tue May 12 14:47:04 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: bba.c,v 1.35 2009/05/12 13:21:22 cegger Exp $ */
+/* $NetBSD: bba.c,v 1.36 2009/05/12 14:47:04 cegger Exp $ */
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
 /* maxine/alpha baseboard audio (bba) */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bba.c,v 1.35 2009/05/12 13:21:22 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: bba.c,v 1.36 2009/05/12 14:47:04 cegger Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -92,8 +92,8 @@
 	struct bba_dma_state sc_rx_dma_state;
 };
 
-static int	bba_match(struct device *, cfdata_t, void *);
-static void	bba_attach(struct device *, struct device *, void *);
+static int	bba_match(device_t, cfdata_t, void *);
+static void	bba_attach(device_t, device_t, void *);
 
 CFATTACH_DECL(bba, sizeof(struct bba_softc),
 bba_match, bba_attach, NULL, NULL);
@@ -190,7 +190,7 @@
 static uint8_t	bba_codec_dread(struct am7930_softc *, int);
 
 static int
-bba_match(struct device *parent, cfdata_t cf, void *aux)
+bba_match(device_t parent, cfdata_t cf, void *aux)
 {
 	struct ioasicdev_attach_args *ia;
 
@@ -204,7 +204,7 @@
 
 
 static void
-bba_attach(struct device *parent, struct device *self, void *aux)
+bba_attach(device_t parent, device_t self, void *aux)
 {
 	struct ioasicdev_attach_args *ia;
 	struct bba_softc *sc;
Index: src/sys/dev/tc/px.c
diff -u src/sys/dev/tc/px.c:1.35 src/sys/dev/tc/px.c:1.36
--- src/sys/dev/tc/px.c:1.35	Tue May 12 13:21:22 2009
+++ src/sys/dev/tc/px.c	Tue May 12 14:47:04 2009
@@ -1,4 +1,4 @@
-/* 	$NetBSD: px.c,v 1.35 2009/05/12 13:21:22 cegger Exp $	*/
+/* 	$NetBSD: px.c,v 1.36 2009/05/12 14:47:04 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: px.c,v 1.35 2009/05/12 13:21:22 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: px.c,v 1.36 2009/05/12 14:47:04 cegger Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -90,11 +90,11 @@
 
 #define	PXF_QUEUE	0x01
 
-static void	px_attach(struct device *, struct device *, void *);
+static void	px_attach(device_t, device_t, void *);
 static void	px_init(struct stic_info *, int);
 static int	px_ioctl(struct stic_info *, u_long, void *, int,
 			 struct lwp *);
-static int	px_match(struct device *, cfdata_t, void *);
+static int	px_match(device_t, cfdata_t, void *);
 
 static int	px_intr(void *);
 static uint32_t	*px_pbuf_get(struct stic_info *);

Index: src/sys/dev/tc/if_fta.c
diff -u src/sys/dev/tc/if_fta.c:1.26 src/sys/dev/tc/if_fta.c:1.27
--- src/sys/dev/tc/if_fta.c:1.26	Tue May 12 13:21:22 2009
+++ src/sys/dev/tc/if_fta.c	Tue May 12 14:47:04 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_fta.c,v 1.26 2009/05/12 13:21:22 cegger Exp $	*/
+/*	$NetBSD: if_fta.c,v 1.27 2009/05/12 14:47:04 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1996 Matt Thomas m...@3am-software.com
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_fta.c,v 1.26 2009/05/12 13:21:22 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_fta.c,v 1.27 2009/05/12 14:47:04 cegger Exp $);
 
 #include opt_inet.h
 
@@ -65,7 +65,7 @@
 
 static int
 pdq_tc_match(
-struct device *parent,
+device_t parent,
 cfdata_t match,
 void *aux)
 {
@@ -79,8 +79,8 @@
 
 static void
 pdq_tc_attach(
-struct device * const parent,
-struct device * const self,
+device_t  const parent,
+device_t  const self,
 void *const aux)
 {
 pdq_softc_t * const sc = device_private(self);

Index: src/sys/dev/tc/ioasicvar.h
diff -u src/sys/dev/tc/ioasicvar.h:1.19 src/sys/dev/tc/ioasicvar.h:1.20
--- src/sys/dev/tc/ioasicvar.h:1.19	Sun Dec 11 12:24:00 2005
+++ src/sys/dev/tc/ioasicvar.h	Tue May 12 14:47:04 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: ioasicvar.h,v 1.19 2005/12/11 12:24:00 christos Exp $	*/
+/*	$NetBSD: ioasicvar.h,v 1.20 2009/05/12 14:47:04