Home | History | Annotate | Line # | Download | only in dev
      1 /* $NetBSD: aupscvar.h,v 1.4 2012/01/03 07:36:02 kiyohara Exp $ */
      2 
      3 /*-
      4  * Copyright (c) 2006 Shigeyuki Fukushima.
      5  * All rights reserved.
      6  *
      7  * Written by Shigeyuki Fukushima.
      8  *
      9  * Redistribution and use in source and binary forms, with or without
     10  * modification, are permitted provided that the following conditions
     11  * are met:
     12  * 1. Redistributions of source code must retain the above copyright
     13  *    notice, this list of conditions and the following disclaimer.
     14  * 2. Redistributions in binary form must reproduce the above
     15  *    copyright notice, this list of conditions and the following
     16  *    disclaimer in the documentation and/or other materials provided
     17  *    with the distribution.
     18  * 3. The name of the author may not be used to endorse or promote
     19  *    products derived from this software without specific prior
     20  *    written permission.
     21  *
     22  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
     23  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     24  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     25  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
     26  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
     28  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     29  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     30  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
     31  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
     32  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     33  */
     34 
     35 #ifndef _MIPS_ALCHEMY_DEV_AUPSCVAR_H_
     36 #define	_MIPS_ALCHEMY_DEV_AUPSCVAR_H_
     37 
     38 struct aupsc_controller {
     39 	bus_space_tag_t		psc_bust;	/* Bus space tag */
     40 	bus_space_handle_t	psc_bush;	/* Bus space handle */
     41 	int *			psc_sel;	/* current protocol selection */
     42 	void			(*psc_enable)(void *, int);
     43 	void			(*psc_disable)(void *);
     44 	void			(*psc_suspend)(void *);
     45 };
     46 
     47 struct aupsc_attach_args {
     48 	const char *		aupsc_name;
     49 	struct aupsc_controller	aupsc_ctrl;
     50 	bus_addr_t		aupsc_addr;	/* Bus address */
     51 	int			aupsc_irq;
     52 };
     53 
     54 struct aupsc_protocol_device {
     55 	device_t		sc_dev;
     56 	struct aupsc_controller	sc_ctrl;
     57 };
     58 
     59 #endif	/* _MIPS_ALCHEMY_DEV_AUPSCVAR_H_ */
     60