Home | History | Annotate | Line # | Download | only in dev
auxiovar.h revision 1.4.6.2
      1  1.4.6.2  bouyer /*	$NetBSD: auxiovar.h,v 1.4.6.2 2000/11/20 20:26:42 bouyer Exp $	*/
      2  1.4.6.2  bouyer 
      3  1.4.6.2  bouyer /*
      4  1.4.6.2  bouyer  * Copyright (c) 2000 Matthew R. Green
      5  1.4.6.2  bouyer  * All rights reserved.
      6  1.4.6.2  bouyer  *
      7  1.4.6.2  bouyer  * Redistribution and use in source and binary forms, with or without
      8  1.4.6.2  bouyer  * modification, are permitted provided that the following conditions
      9  1.4.6.2  bouyer  * are met:
     10  1.4.6.2  bouyer  * 1. Redistributions of source code must retain the above copyright
     11  1.4.6.2  bouyer  *    notice, this list of conditions and the following disclaimer.
     12  1.4.6.2  bouyer  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.4.6.2  bouyer  *    notice, this list of conditions and the following disclaimer in the
     14  1.4.6.2  bouyer  *    documentation and/or other materials provided with the distribution.
     15  1.4.6.2  bouyer  * 3. The name of the author may not be used to endorse or promote products
     16  1.4.6.2  bouyer  *    derived from this software without specific prior written permission.
     17  1.4.6.2  bouyer  *
     18  1.4.6.2  bouyer  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     19  1.4.6.2  bouyer  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     20  1.4.6.2  bouyer  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     21  1.4.6.2  bouyer  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     22  1.4.6.2  bouyer  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
     23  1.4.6.2  bouyer  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
     24  1.4.6.2  bouyer  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
     25  1.4.6.2  bouyer  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
     26  1.4.6.2  bouyer  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     27  1.4.6.2  bouyer  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     28  1.4.6.2  bouyer  * SUCH DAMAGE.
     29  1.4.6.2  bouyer  */
     30  1.4.6.2  bouyer 
     31  1.4.6.2  bouyer /*
     32  1.4.6.2  bouyer  * on sun4u, auxio exists with one register (LED) on the sbus, and 5
     33  1.4.6.2  bouyer  * registers on the ebus2 (pci) (LED, PCIMODE, FREQUENCY, SCSI
     34  1.4.6.2  bouyer  * OSCILLATOR, and TEMP SENSE.
     35  1.4.6.2  bouyer  *
     36  1.4.6.2  bouyer  * clients of the auxio registers (eg, blinken lights, or the sbus
     37  1.4.6.2  bouyer  * floppy) should search in auxio_cd for their matching auxio register
     38  1.4.6.2  bouyer  * (to deal with multiple auxio's that may appear.)
     39  1.4.6.2  bouyer  */
     40  1.4.6.2  bouyer 
     41  1.4.6.2  bouyer struct auxio_registers {
     42  1.4.6.2  bouyer #if 0	/* these do not exist on the Ebus2 */
     43  1.4.6.2  bouyer 	volatile u_int32_t *auxio_fd;
     44  1.4.6.2  bouyer 	volatile u_int32_t *auxio_audio;
     45  1.4.6.2  bouyer 	volatile u_int32_t *auxio_power;
     46  1.4.6.2  bouyer #endif
     47  1.4.6.2  bouyer 	volatile u_int32_t *auxio_led;
     48  1.4.6.2  bouyer 	volatile u_int32_t *auxio_pci;
     49  1.4.6.2  bouyer 	volatile u_int32_t *auxio_freq;
     50  1.4.6.2  bouyer 	volatile u_int32_t *auxio_scsi;
     51  1.4.6.2  bouyer 	volatile u_int32_t *auxio_temp;
     52  1.4.6.2  bouyer };
     53  1.4.6.2  bouyer 
     54  1.4.6.2  bouyer struct auxio_softc {
     55  1.4.6.2  bouyer 	struct device		sc_dev;
     56  1.4.6.2  bouyer 	struct auxio_registers	sc_registers;
     57  1.4.6.2  bouyer 	int			sc_flags;
     58  1.4.6.2  bouyer #define	AUXIO_LEDONLY		0x1
     59  1.4.6.2  bouyer #define	AUXIO_EBUS		0x2
     60  1.4.6.2  bouyer #define	AUXIO_SBUS		0x4
     61  1.4.6.2  bouyer };
     62  1.4.6.2  bouyer 
     63  1.4.6.2  bouyer /*
     64  1.4.6.2  bouyer  * XXX: old interfaces.  we set auxio_reg the first auxio we attach.
     65  1.4.6.2  bouyer  */
     66  1.4.6.2  bouyer #ifndef _LOCORE
     67  1.4.6.2  bouyer /*
     68  1.4.6.2  bouyer  * Copy of AUXIO_REG for the benefit of assembler modules (eg. trap handlers)
     69  1.4.6.2  bouyer  * as AUXREG_VA depends on NBPG which is not a constant.
     70  1.4.6.2  bouyer  */
     71  1.4.6.2  bouyer volatile u_char *auxio_reg;
     72  1.4.6.2  bouyer unsigned int auxregbisc __P((int, int));
     73  1.4.6.2  bouyer #endif
     74