11638Srgrimes/* $NetBSD: npxvar.h,v 1.7 2008/01/20 21:49:57 dyoung Exp $ */ 21638Srgrimes 31638Srgrimes/*- 41638Srgrimes * Copyright (c) 1991 The Regents of the University of California. 51638Srgrimes * All rights reserved. 61638Srgrimes * 71638Srgrimes * Redistribution and use in source and binary forms, with or without 81638Srgrimes * modification, are permitted provided that the following conditions 91638Srgrimes * are met: 101638Srgrimes * 1. Redistributions of source code must retain the above copyright 111638Srgrimes * notice, this list of conditions and the following disclaimer. 121638Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 131638Srgrimes * notice, this list of conditions and the following disclaimer in the 141638Srgrimes * documentation and/or other materials provided with the distribution. 151638Srgrimes * 3. Neither the name of the University nor the names of its contributors 161638Srgrimes * may be used to endorse or promote products derived from this software 171638Srgrimes * without specific prior written permission. 181638Srgrimes * 191638Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 201638Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 211638Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 221638Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 231638Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 241638Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 251638Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 261638Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 271638Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 281638Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 291638Srgrimes * SUCH DAMAGE. 301638Srgrimes * 311638Srgrimes * @(#)npx.c 7.2 (Berkeley) 5/12/91 321638Srgrimes */ 3350476Speter 341638Srgrimes/*- 351638Srgrimes * Copyright (c) 1994, 1995, 1998 Charles M. Hannum. All rights reserved. 361638Srgrimes * Copyright (c) 1990 William Jolitz. 3779538Sru * 381638Srgrimes * Redistribution and use in source and binary forms, with or without 391638Srgrimes * modification, are permitted provided that the following conditions 401638Srgrimes * are met: 411638Srgrimes * 1. Redistributions of source code must retain the above copyright 421638Srgrimes * notice, this list of conditions and the following disclaimer. 4368962Sru * 2. Redistributions in binary form must reproduce the above copyright 441638Srgrimes * notice, this list of conditions and the following disclaimer in the 451638Srgrimes * documentation and/or other materials provided with the distribution. 46131530Sru * 3. All advertising materials mentioning features or use of this software 47131530Sru * must display the following acknowledgement: 481638Srgrimes * This product includes software developed by the University of 491638Srgrimes * California, Berkeley and its contributors. 501638Srgrimes * 4. Neither the name of the University nor the names of its contributors 511638Srgrimes * may be used to endorse or promote products derived from this software 521638Srgrimes * without specific prior written permission. 531638Srgrimes * 541638Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 551638Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 56131530Sru * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 57131530Sru * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 581638Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 591638Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 601638Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 611638Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 621638Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 631638Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 641638Srgrimes * SUCH DAMAGE. 651638Srgrimes * 661638Srgrimes * @(#)npx.c 7.2 (Berkeley) 5/12/91 671638Srgrimes */ 6868962Sru 691638Srgrimesenum npx_type { 701638Srgrimes NPX_NONE = 0, 711638Srgrimes NPX_INTERRUPT, 721638Srgrimes NPX_EXCEPTION, 731638Srgrimes NPX_BROKEN, 741638Srgrimes NPX_CPUID 751638Srgrimes}; 761638Srgrimes 771638Srgrimesstruct npx_softc { 781638Srgrimes device_t sc_dev; 79140561Sru 80140561Sru bus_space_tag_t sc_iot; 81 bus_space_handle_t sc_ioh; 82 83 enum npx_type sc_type; 84 85 void *sc_ih; 86}; 87 88enum npx_type npxprobe1(bus_space_tag_t, bus_space_handle_t, int); 89void npxattach(struct npx_softc *); 90int npxdetach(device_t, int); 91int npxintr(void *, struct intrframe *); 92