Home | History | Annotate | Line # | Download | only in isa
pcppivar.h revision 1.10
      1  1.10       mrg /* $NetBSD: pcppivar.h,v 1.10 2011/05/03 04:27:13 mrg Exp $ */
      2   1.1  drochner 
      3   1.1  drochner /*
      4   1.1  drochner  * Copyright (c) 1996 Carnegie-Mellon University.
      5   1.1  drochner  * All rights reserved.
      6   1.1  drochner  *
      7   1.1  drochner  * Author: Chris G. Demetriou
      8   1.4     perry  *
      9   1.1  drochner  * Permission to use, copy, modify and distribute this software and
     10   1.1  drochner  * its documentation is hereby granted, provided that both the copyright
     11   1.1  drochner  * notice and this permission notice appear in all copies of the
     12   1.1  drochner  * software, derivative works or modified versions, and any portions
     13   1.1  drochner  * thereof, and that both notices appear in supporting documentation.
     14   1.4     perry  *
     15   1.4     perry  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
     16   1.4     perry  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
     17   1.1  drochner  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
     18   1.4     perry  *
     19   1.1  drochner  * Carnegie Mellon requests users of this software to return to
     20   1.1  drochner  *
     21   1.1  drochner  *  Software Distribution Coordinator  or  Software.Distribution (at) CS.CMU.EDU
     22   1.1  drochner  *  School of Computer Science
     23   1.1  drochner  *  Carnegie Mellon University
     24   1.1  drochner  *  Pittsburgh PA 15213-3890
     25   1.1  drochner  *
     26   1.1  drochner  * any improvements or extensions that they make and grant Carnegie the
     27   1.1  drochner  * rights to redistribute these changes.
     28   1.1  drochner  */
     29   1.1  drochner 
     30   1.5   xtraeme #ifndef _PCPPIVAR_H_
     31   1.5   xtraeme #define _PCPPIVAR_H_
     32   1.5   xtraeme 
     33   1.1  drochner typedef void *pcppi_tag_t;
     34   1.1  drochner 
     35   1.1  drochner struct pcppi_attach_args {
     36   1.1  drochner 	pcppi_tag_t pa_cookie;
     37   1.1  drochner };
     38   1.2   thorpej 
     39   1.5   xtraeme struct pcppi_softc {
     40  1.10       mrg 	device_t sc_dv;
     41   1.5   xtraeme 
     42  1.10       mrg 	bus_space_tag_t sc_iot;
     43  1.10       mrg 	bus_space_handle_t sc_ppi_ioh;
     44  1.10       mrg 	bus_size_t sc_size;
     45  1.10       mrg 	device_t sc_timer;
     46   1.5   xtraeme 
     47  1.10       mrg 	struct callout sc_bell_ch;
     48   1.5   xtraeme 
     49  1.10       mrg 	int sc_bellactive, sc_bellpitch;
     50  1.10       mrg 	int sc_slp;
     51  1.10       mrg 	int sc_timeout;
     52  1.10       mrg 
     53  1.10       mrg 	kmutex_t sc_lock;
     54  1.10       mrg 	kcondvar_t sc_stop_cv;
     55   1.5   xtraeme };
     56   1.5   xtraeme 
     57   1.5   xtraeme void pcppi_attach(struct pcppi_softc *);
     58   1.8    dyoung int pcppi_detach(device_t, int);
     59   1.5   xtraeme 
     60   1.2   thorpej #define	PCPPI_BELL_SLEEP	0x01	/* synchronous; sleep for complete */
     61   1.2   thorpej #define	PCPPI_BELL_POLL		0x02	/* synchronous; poll for complete */
     62   1.1  drochner 
     63   1.3     perry void pcppi_bell(pcppi_tag_t, int, int, int);
     64   1.5   xtraeme 
     65   1.5   xtraeme #endif /* ! _PCPPIVAR_H_ */
     66