1*e2a71f6cSmatt /* $NetBSD: intr.h,v 1.15 2011/06/17 23:36:17 matt Exp $ */ 23dc55c12Smatt 33dc55c12Smatt /*- 43dc55c12Smatt * Copyright (c) 1998 The NetBSD Foundation, Inc. 53dc55c12Smatt * All rights reserved. 63dc55c12Smatt * 73dc55c12Smatt * This code is derived from software contributed to The NetBSD Foundation 83dc55c12Smatt * by Charles M. Hannum. 93dc55c12Smatt * 103dc55c12Smatt * Redistribution and use in source and binary forms, with or without 113dc55c12Smatt * modification, are permitted provided that the following conditions 123dc55c12Smatt * are met: 133dc55c12Smatt * 1. Redistributions of source code must retain the above copyright 143dc55c12Smatt * notice, this list of conditions and the following disclaimer. 153dc55c12Smatt * 2. Redistributions in binary form must reproduce the above copyright 163dc55c12Smatt * notice, this list of conditions and the following disclaimer in the 173dc55c12Smatt * documentation and/or other materials provided with the distribution. 183dc55c12Smatt * 193dc55c12Smatt * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 203dc55c12Smatt * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 213dc55c12Smatt * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 223dc55c12Smatt * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 233dc55c12Smatt * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 243dc55c12Smatt * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 253dc55c12Smatt * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 263dc55c12Smatt * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 273dc55c12Smatt * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 283dc55c12Smatt * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 293dc55c12Smatt * POSSIBILITY OF SUCH DAMAGE. 303dc55c12Smatt */ 313dc55c12Smatt 323dc55c12Smatt #ifndef _IBMNWS_INTR_H_ 333dc55c12Smatt #define _IBMNWS_INTR_H_ 343dc55c12Smatt 353dc55c12Smatt #ifndef _LOCORE 363dc55c12Smatt void init_intr_ivr(void); 37d974db0aSgarbled void init_intr_openpic(void); 38d974db0aSgarbled void openpic_init(unsigned char *); 393dc55c12Smatt void enable_intr(void); 403dc55c12Smatt void disable_intr(void); 413dc55c12Smatt 423dc55c12Smatt extern vaddr_t prep_intr_reg; 43d974db0aSgarbled extern uint32_t prep_intr_reg_off; 443dc55c12Smatt 453dc55c12Smatt #define ICU_LEN 32 46d2b0eb4eSrjs 473dc55c12Smatt #define IRQ_SLAVE 2 48*e2a71f6cSmatt #define LEGAL_HWIRQ_P(x) ((u_int)(x) < ICU_LEN && (x) != IRQ_SLAVE) 493dc55c12Smatt #define I8259_INTR_NUM 16 503dc55c12Smatt 513dc55c12Smatt #define PREP_INTR_REG 0xbffff000 523dc55c12Smatt #define INTR_VECTOR_REG 0xff0 533dc55c12Smatt 543dc55c12Smatt #endif /* !_LOCORE */ 553dc55c12Smatt 56*e2a71f6cSmatt #include <powerpc/intr.h> 57*e2a71f6cSmatt 583dc55c12Smatt #endif /* !_IBMNWS_INTR_H_ */ 59