Annotation of sys/arch/sparc/dev/spifvar.h, Revision 1.1
1.1 ! nbrk 1: /* $OpenBSD: spifvar.h,v 1.4 2006/06/02 20:00:54 miod Exp $ */
! 2:
! 3: /*
! 4: * Copyright (c) 1999 Jason L. Wright (jason@thought.net)
! 5: * All rights reserved.
! 6: *
! 7: * Redistribution and use in source and binary forms, with or without
! 8: * modification, are permitted provided that the following conditions
! 9: * are met:
! 10: * 1. Redistributions of source code must retain the above copyright
! 11: * notice, this list of conditions and the following disclaimer.
! 12: * 2. Redistributions in binary form must reproduce the above copyright
! 13: * notice, this list of conditions and the following disclaimer in the
! 14: * documentation and/or other materials provided with the distribution.
! 15: *
! 16: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
! 17: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
! 18: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
! 19: * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
! 20: * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
! 21: * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
! 22: * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
! 23: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
! 24: * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
! 25: * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
! 26: * POSSIBILITY OF SUCH DAMAGE.
! 27: */
! 28:
! 29: #define SPIF_MAX_SERIAL 8
! 30: #define SPIF_MAX_PARALLEL 1
! 31:
! 32: struct stty_port {
! 33: struct tty *sp_tty; /* tty device */
! 34: struct spif_softc *sp_sc; /* pointer back to registers */
! 35: int sp_channel; /* channel number */
! 36: u_char *sp_rbuf; /* ring buffer start */
! 37: u_char *sp_rend; /* ring buffer end */
! 38: u_char *sp_rget; /* ring buffer read pointer */
! 39: u_char *sp_rput; /* ring buffer write pointer */
! 40: u_char *sp_txp; /* transmit character pointer */
! 41: int sp_txc; /* transmit character counter */
! 42:
! 43: int sp_openflags; /* open flags */
! 44: int sp_carrier; /* software carrier status */
! 45: int sp_flags; /* software state */
! 46: char sp_dtr; /* software dtr status */
! 47: };
! 48:
! 49: struct stty_softc {
! 50: struct device sc_dev; /* base device */
! 51: int sc_nports; /* number of serial ports */
! 52: struct stty_port sc_port[SPIF_MAX_SERIAL];
! 53: };
! 54:
! 55: struct sbpp_softc {
! 56: struct device sc_dev; /* base device */
! 57: int sc_nports; /* number of parallel ports */
! 58: };
! 59:
! 60: struct spif_softc {
! 61: struct device sc_dev; /* base device */
! 62: struct intrhand sc_stcih; /* stc interrupt vectoring */
! 63: struct intrhand sc_ppcih; /* ppc interrupt vectoring */
! 64: struct intrhand sc_softih; /* hard interrupt vectoring */
! 65: int sc_rev; /* revision level */
! 66: int sc_osc; /* oscillator speed (hz) */
! 67: int sc_node; /* which sbus node */
! 68: int sc_nser; /* number of serial ports */
! 69: int sc_npar; /* number of parallel ports */
! 70: int sc_rev2; /* cd180 chip revision */
! 71: struct spifregs *sc_regs; /* registers */
! 72: struct stty_softc *sc_ttys; /* our ttys */
! 73: struct sbpp_softc *sc_bpps; /* our ttys */
! 74: };
! 75:
CVSweb