auxiovar.h revision 1.8 1 1.6 jnemeth /* $OpenBSD: auxiovar.h,v 1.7 2005/03/09 18:41:48 miod Exp $ */
2 1.8 martin /* $NetBSD: auxiovar.h,v 1.8 2015/10/06 16:40:36 martin Exp $ */
3 1.1 mrg
4 1.1 mrg /*
5 1.2 mrg * Copyright (c) 2000 Matthew R. Green
6 1.1 mrg * All rights reserved.
7 1.1 mrg *
8 1.1 mrg * Redistribution and use in source and binary forms, with or without
9 1.1 mrg * modification, are permitted provided that the following conditions
10 1.1 mrg * are met:
11 1.1 mrg * 1. Redistributions of source code must retain the above copyright
12 1.1 mrg * notice, this list of conditions and the following disclaimer.
13 1.1 mrg * 2. Redistributions in binary form must reproduce the above copyright
14 1.1 mrg * notice, this list of conditions and the following disclaimer in the
15 1.1 mrg * documentation and/or other materials provided with the distribution.
16 1.1 mrg *
17 1.1 mrg * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 1.1 mrg * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 1.1 mrg * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 1.1 mrg * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 1.1 mrg * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22 1.1 mrg * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 1.1 mrg * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
24 1.1 mrg * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 1.1 mrg * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 1.1 mrg * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 1.1 mrg * SUCH DAMAGE.
28 1.1 mrg */
29 1.1 mrg
30 1.4 mrg #ifndef _LOCORE
31 1.8 martin
32 1.8 martin /*
33 1.8 martin * on sun4u, auxio exists with one register (LED) on the sbus, and 5
34 1.8 martin * registers on the ebus2 (pci) (LED, PCIMODE, FREQUENCY, SCSI
35 1.8 martin * OSCILLATOR, and TEMP SENSE.
36 1.8 martin */
37 1.8 martin
38 1.8 martin struct auxio_softc {
39 1.8 martin device_t sc_dev;
40 1.8 martin
41 1.8 martin kmutex_t sc_lock;
42 1.8 martin
43 1.8 martin /* parent's tag */
44 1.8 martin bus_space_tag_t sc_tag;
45 1.8 martin
46 1.8 martin /* handles to the various auxio register sets */
47 1.8 martin bus_space_handle_t sc_led;
48 1.8 martin bus_space_handle_t sc_pci;
49 1.8 martin bus_space_handle_t sc_freq;
50 1.8 martin bus_space_handle_t sc_scsi;
51 1.8 martin bus_space_handle_t sc_temp;
52 1.8 martin
53 1.8 martin int sc_flags;
54 1.8 martin #define AUXIO_LEDONLY 0x1 // only sc_led is valid
55 1.8 martin #define AUXIO_EBUS 0x2
56 1.8 martin };
57 1.8 martin
58 1.8 martin #define AUXIO_ROM_NAME "auxio"
59 1.8 martin
60 1.8 martin void auxio_attach_common(struct auxio_softc *);
61 1.6 jnemeth int auxio_fd_control(u_int32_t);
62 1.8 martin
63 1.4 mrg #endif
64