16238d5faSjnemeth /* $OpenBSD: auxiovar.h,v 1.7 2005/03/09 18:41:48 miod Exp $ */ 2*7e689e2dSmartin /* $NetBSD: auxiovar.h,v 1.8 2015/10/06 16:40:36 martin Exp $ */ 36238d5faSjnemeth 46238d5faSjnemeth /* 56238d5faSjnemeth * Copyright (c) 2000 Matthew R. Green 66238d5faSjnemeth * All rights reserved. 76238d5faSjnemeth * 86238d5faSjnemeth * Redistribution and use in source and binary forms, with or without 96238d5faSjnemeth * modification, are permitted provided that the following conditions 106238d5faSjnemeth * are met: 116238d5faSjnemeth * 1. Redistributions of source code must retain the above copyright 126238d5faSjnemeth * notice, this list of conditions and the following disclaimer. 136238d5faSjnemeth * 2. Redistributions in binary form must reproduce the above copyright 146238d5faSjnemeth * notice, this list of conditions and the following disclaimer in the 156238d5faSjnemeth * documentation and/or other materials provided with the distribution. 166238d5faSjnemeth * 176238d5faSjnemeth * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 186238d5faSjnemeth * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 196238d5faSjnemeth * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 206238d5faSjnemeth * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 216238d5faSjnemeth * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 226238d5faSjnemeth * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 236238d5faSjnemeth * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 246238d5faSjnemeth * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 256238d5faSjnemeth * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 266238d5faSjnemeth * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 276238d5faSjnemeth * SUCH DAMAGE. 286238d5faSjnemeth */ 296238d5faSjnemeth 306238d5faSjnemeth #ifndef _LOCORE 31*7e689e2dSmartin 32*7e689e2dSmartin /* 33*7e689e2dSmartin * on sun4u, auxio exists with one register (LED) on the sbus, and 5 34*7e689e2dSmartin * registers on the ebus2 (pci) (LED, PCIMODE, FREQUENCY, SCSI 35*7e689e2dSmartin * OSCILLATOR, and TEMP SENSE. 36*7e689e2dSmartin */ 37*7e689e2dSmartin 38*7e689e2dSmartin struct auxio_softc { 39*7e689e2dSmartin device_t sc_dev; 40*7e689e2dSmartin 41*7e689e2dSmartin kmutex_t sc_lock; 42*7e689e2dSmartin 43*7e689e2dSmartin /* parent's tag */ 44*7e689e2dSmartin bus_space_tag_t sc_tag; 45*7e689e2dSmartin 46*7e689e2dSmartin /* handles to the various auxio register sets */ 47*7e689e2dSmartin bus_space_handle_t sc_led; 48*7e689e2dSmartin bus_space_handle_t sc_pci; 49*7e689e2dSmartin bus_space_handle_t sc_freq; 50*7e689e2dSmartin bus_space_handle_t sc_scsi; 51*7e689e2dSmartin bus_space_handle_t sc_temp; 52*7e689e2dSmartin 53*7e689e2dSmartin int sc_flags; 54*7e689e2dSmartin #define AUXIO_LEDONLY 0x1 // only sc_led is valid 55*7e689e2dSmartin #define AUXIO_EBUS 0x2 56*7e689e2dSmartin }; 57*7e689e2dSmartin 58*7e689e2dSmartin #define AUXIO_ROM_NAME "auxio" 59*7e689e2dSmartin 60*7e689e2dSmartin void auxio_attach_common(struct auxio_softc *); 616238d5faSjnemeth int auxio_fd_control(u_int32_t); 62*7e689e2dSmartin 636238d5faSjnemeth #endif 64