Home | History | Annotate | Line # | Download | only in iomd
      1 /*	$NetBSD: iomdvar.h,v 1.4 2012/05/10 09:56:27 skrll Exp $	*/
      2 
      3 /*
      4  * Copyright (c) 1997 Mark Brinicombe.
      5  * Copyright (c) 1997 Causality Limited
      6  * All rights reserved.
      7  *
      8  * Redistribution and use in source and binary forms, with or without
      9  * modification, are permitted provided that the following conditions
     10  * are met:
     11  * 1. Redistributions of source code must retain the above copyright
     12  *    notice, this list of conditions and the following disclaimer.
     13  * 2. Redistributions in binary form must reproduce the above copyright
     14  *    notice, this list of conditions and the following disclaimer in the
     15  *    documentation and/or other materials provided with the distribution.
     16  * 3. All advertising materials mentioning features or use of this software
     17  *    must display the following acknowledgement:
     18  *	This product includes software developed by Mark Brinicombe
     19  * 4. The name of the company nor the name of the author may be used to
     20  *    endorse or promote products derived from this software without specific
     21  *    prior written permission.
     22  *
     23  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     24  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     25  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     26  * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
     27  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
     28  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
     29  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     30  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     32  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     33  * SUCH DAMAGE.
     34  *
     35  * RiscBSD kernel project
     36  *
     37  * iomd_bus.h
     38  *
     39  * Created      : 02/02/97
     40  */
     41 
     42 #include <sys/bus.h>
     43 
     44 /*
     45  * Attach args for iomd_clock device
     46  */
     47 
     48 struct clk_attach_args {
     49 	const char		*ca_name;	/* device name*/
     50 	bus_space_tag_t		ca_iot;		/* Bus tag */
     51 	bus_space_handle_t	ca_ioh;		/* Bus handle */
     52 	int			ca_irq;		/* IRQ number */
     53 };
     54 
     55 
     56 /*
     57  * Attach args for iomd device
     58  */
     59 
     60 /*
     61  * Attach args for qms device
     62  */
     63 
     64 struct qms_attach_args {
     65 	const char		*qa_name;	/* device name*/
     66 	bus_space_tag_t		qa_iot;		/* Bus tag */
     67 	bus_space_handle_t	qa_ioh;		/* Bus handle */
     68 	bus_space_handle_t	qa_ioh_but;	/* Bus handle */
     69 	int			qa_irq;		/* IRQ number */
     70 };
     71 
     72 /*
     73  * Attach args for opms device
     74  */
     75 
     76 struct opms_attach_args {
     77 	const char		*pa_name;	/* device name*/
     78 	bus_space_tag_t		pa_iot;		/* Bus tag */
     79 	bus_space_handle_t	pa_ioh;		/* Bus handle */
     80 	int			pa_irq;		/* IRQ number */
     81 };
     82 
     83 /*
     84  * Attach args for kbd device
     85  */
     86 
     87 struct kbd_attach_args {
     88 	const char		*ka_name;	/* device name*/
     89 	bus_space_tag_t		ka_iot;		/* Bus tag */
     90 	bus_space_handle_t	ka_ioh;		/* Bus handle */
     91 	int			ka_rxirq;	/* IRQ number */
     92 	int			ka_txirq;	/* IRQ number */
     93 };
     94 
     95 /*
     96  * Attach args for iic device
     97  */
     98 
     99 struct iic_attach_args {
    100 	const char		*ia_name;	/* device name */
    101 	bus_space_tag_t		ia_iot;		/* Bus tag */
    102 	bus_space_handle_t	ia_ioh;		/* Bus handle */
    103 	int			ia_irq;		/* IRQ number */
    104 };
    105 
    106 /*
    107  * NOTE: All these attach structures and a const char *name as the
    108  * first field for identification.
    109  */
    110 
    111 union iomd_attach_args {
    112 	struct kbd_attach_args		ia_kbd;
    113 	struct opms_attach_args		ia_opms;
    114 	struct qms_attach_args		ia_qms;
    115 	struct iic_attach_args		ia_iic;
    116 	struct clk_attach_args		ia_clk;
    117 };
    118 
    119 /*
    120  * IOMD_BASE register variable
    121  */
    122 extern uint32_t iomd_base;
    123 
    124 /* End of iomdvar.h */
    125