summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev/magmareg.h
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-06-02 06:37:19 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-06-02 06:37:19 +0000
commit6e99aec8788fbc4a0478d9ceca57920aa2d7bcda (patch)
tree516614624d8aab2efb4144f814b7f8630f53dd31 /sys/arch/sparc/dev/magmareg.h
parente22665b32da4d75dad6c333e4554a61ed517d84f (diff)
newer fixes from plunky@skate.demon.co.uk
Diffstat (limited to 'sys/arch/sparc/dev/magmareg.h')
-rw-r--r--sys/arch/sparc/dev/magmareg.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/sys/arch/sparc/dev/magmareg.h b/sys/arch/sparc/dev/magmareg.h
index 97857dd5a7a..94d9d0a6ecb 100644
--- a/sys/arch/sparc/dev/magmareg.h
+++ b/sys/arch/sparc/dev/magmareg.h
@@ -158,7 +158,7 @@ struct mtty_softc {
struct mtty_port ms_port[MAGMA_MAX_TTY];
};
-#define MBPP_TXBUF_SIZE (CD1400_PAR_FIFO_SIZE * 10)
+#define MBPP_RX_FIFO_THRESHOLD 25
struct mbpp_port {
struct cd1400 *mp_cd1400; /* for LC2+1Sp card */
@@ -166,19 +166,20 @@ struct mbpp_port {
int mp_flags;
- int mp_read_strobe; /* strobe width in ns */
- int mp_read_timeout; /* timeout after this many seconds */
+ struct bpp_param mp_param;
+#define mp_burst mp_param.bp_burst
+#define mp_timeout mp_param.bp_timeout
+#define mp_delay mp_param.bp_delay
- int mp_write_strobe; /* strobe width in ns */
- int mp_write_timeout; /* timeout after this many seconds */
-
- u_char *mp_txbuf; /* transmit buffer */
- u_char *mp_txp; /* transmit pointer */
- int mp_txc; /* transmit counter */
+ u_char *mp_ptr; /* pointer to io data */
+ int mp_cnt; /* count of io chars */
};
#define MBPPF_OPEN (1<<0)
-#define MBPPF_DONE (1<<1)
+#define MBPPF_TIMEOUT (1<<1)
+#define MBPPF_UIO (1<<2)
+#define MBPPF_DELAY (1<<3)
+#define MBPPF_WAKEUP (1<<4)
struct mbpp_softc {
struct device ms_dev; /* device info */
@@ -192,7 +193,6 @@ struct mbpp_softc {
#define SET(t, f) ((t) |= (f))
#define CLR(t, f) ((t) &= ~(f))
#define ISSET(t, f) ((t) & (f))
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
/* internal function prototypes */
@@ -215,3 +215,10 @@ void mtty_start __P((struct tty *));
int mbpp_match __P((struct device *, void *, void *));
void mbpp_attach __P((struct device *, struct device *, void *));
+int mbpp_rw __P((dev_t, struct uio *));
+void mbpp_timeout __P((void *));
+void mbpp_start __P((void *));
+int mbpp_send __P((struct mbpp_port *, caddr_t, int));
+int mbpp_recv __P((struct mbpp_port *, caddr_t, int));
+int mbpp_hztoms __P((int));
+int mbpp_mstohz __P((int));