summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-02-28 18:48:36 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-02-28 18:48:36 +0000
commita0ce354e234749f869a267fe01249d949cd6804a (patch)
tree912cdd382018af23c17c6a6d757021e6a566bc4e /sys/arch
parentdd1fcdbcbb034dcabbf48f0f3fd5a2a0dc5cece3 (diff)
SBus parallel port driver, from NetBSD but untested (no printer or cables);
this should hopefully stop people from asking me about it (-:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc64/conf/GENERIC3
-rw-r--r--sys/arch/sparc64/include/conf.h10
-rw-r--r--sys/arch/sparc64/sparc64/conf.c10
3 files changed, 12 insertions, 11 deletions
diff --git a/sys/arch/sparc64/conf/GENERIC b/sys/arch/sparc64/conf/GENERIC
index 67f5da81d57..5050c71b9fe 100644
--- a/sys/arch/sparc64/conf/GENERIC
+++ b/sys/arch/sparc64/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.166 2007/02/27 21:06:59 deraadt Exp $
+# $OpenBSD: GENERIC,v 1.167 2007/02/28 18:48:35 miod Exp $
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -228,6 +228,7 @@ wsmouse* at pmsi? # generic mouse
audioce* at ebus? # ebus cs4231
# parallel ports
+bpp* at sbus?
lpt* at ebus?
ppm* at ebus?
diff --git a/sys/arch/sparc64/include/conf.h b/sys/arch/sparc64/include/conf.h
index bdea4f9a9e9..9ec41269d8c 100644
--- a/sys/arch/sparc64/include/conf.h
+++ b/sys/arch/sparc64/include/conf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.h,v 1.14 2003/09/23 16:51:11 millert Exp $ */
+/* $OpenBSD: conf.h,v 1.15 2007/02/28 18:48:35 miod Exp $ */
/* $NetBSD: conf.h,v 1.9 2001/03/26 12:33:26 lukem Exp $ */
/*-
@@ -112,3 +112,11 @@ cdev_decl(mtty);
cdev_decl(mbpp);
cdev_decl(stty);
cdev_decl(sbpp);
+
+/* open, close, write, ioctl */
+#define cdev_bpp_init(c,n) { \
+ dev_init(c,n,open), dev_init(c,n,close), (dev_type_read((*))) enodev, \
+ dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) nullop, \
+ 0, seltrue, (dev_type_mmap((*))) enodev }
+
+cdev_decl(bpp);
diff --git a/sys/arch/sparc64/sparc64/conf.c b/sys/arch/sparc64/sparc64/conf.c
index 145ae064cd2..c8d0a0cc6e6 100644
--- a/sys/arch/sparc64/sparc64/conf.c
+++ b/sys/arch/sparc64/sparc64/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.40 2005/07/31 06:39:07 dlg Exp $ */
+/* $OpenBSD: conf.c,v 1.41 2007/02/28 18:48:35 miod Exp $ */
/* $NetBSD: conf.c,v 1.17 2001/03/26 12:33:26 lukem Exp $ */
/*
@@ -74,11 +74,7 @@
#include "pcons.h"
#include "com.h"
#include "lpt.h"
-#ifdef notyet
#include "bpp.h"
-#else
-#define NBPP 0
-#endif
#include "magma.h" /* has NMTTY and NMBPP */
#include "spif.h" /* has NSTTY and NSBPP */
#include "uperf.h"
@@ -267,11 +263,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 104 */
cdev_bpftun_init(NBPFILTER,bpf),/* 105: packet filter */
cdev_notdef(), /* 106 */
-#ifdef notyet
cdev_bpp_init(NBPP,bpp), /* 107: on-board parallel port */
-#else
- cdev_notdef(),
-#endif
cdev_tty_init(NSTTY,stty), /* 108: spif serial ports */
cdev_gen_init(NSBPP,sbpp), /* 109: spif parallel ports */
cdev_disk_init(NVND,vnd), /* 110: vnode disk driver */