1*e2a71f6cSmatt /* $NetBSD: intr.h,v 1.34 2011/06/17 23:36:18 matt Exp $ */ 237eb9eebSnonaka 337eb9eebSnonaka /*- 4d974db0aSgarbled * Copyright (c) 2007 The NetBSD Foundation, Inc. 537eb9eebSnonaka * All rights reserved. 637eb9eebSnonaka * 737eb9eebSnonaka * This code is derived from software contributed to The NetBSD Foundation 8d974db0aSgarbled * by Tim Rightnour 937eb9eebSnonaka * 1037eb9eebSnonaka * Redistribution and use in source and binary forms, with or without 1137eb9eebSnonaka * modification, are permitted provided that the following conditions 1237eb9eebSnonaka * are met: 1337eb9eebSnonaka * 1. Redistributions of source code must retain the above copyright 1437eb9eebSnonaka * notice, this list of conditions and the following disclaimer. 1537eb9eebSnonaka * 2. Redistributions in binary form must reproduce the above copyright 1637eb9eebSnonaka * notice, this list of conditions and the following disclaimer in the 1737eb9eebSnonaka * documentation and/or other materials provided with the distribution. 1837eb9eebSnonaka * 1937eb9eebSnonaka * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 2037eb9eebSnonaka * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 2137eb9eebSnonaka * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2237eb9eebSnonaka * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 2337eb9eebSnonaka * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2437eb9eebSnonaka * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2537eb9eebSnonaka * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2637eb9eebSnonaka * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2737eb9eebSnonaka * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2837eb9eebSnonaka * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2937eb9eebSnonaka * POSSIBILITY OF SUCH DAMAGE. 3037eb9eebSnonaka */ 3137eb9eebSnonaka 3237eb9eebSnonaka #ifndef _PREP_INTR_H_ 3337eb9eebSnonaka #define _PREP_INTR_H_ 3437eb9eebSnonaka 3537eb9eebSnonaka #ifndef _LOCORE 36be39d725Sgarbled 3779e01c5fSnonaka void init_intr_ivr(void); 3879e01c5fSnonaka void init_intr_openpic(void); 39793a3b26Sgarbled void openpic_init(unsigned char *); 40dccc50daSnonaka void enable_intr(void); 41dccc50daSnonaka void disable_intr(void); 4237eb9eebSnonaka 43db6b1776Skleink extern vaddr_t prep_intr_reg; 44a59f110cSgarbled extern uint32_t prep_intr_reg_off; 4537eb9eebSnonaka 4637eb9eebSnonaka #define ICU_LEN 32 47be39d725Sgarbled 4837eb9eebSnonaka #define IRQ_SLAVE 2 49*e2a71f6cSmatt #define LEGAL_HWIRQ_P(x) ((u_int)(x) < ICU_LEN && (x) != IRQ_SLAVE) 5079e01c5fSnonaka #define I8259_INTR_NUM 16 5179e01c5fSnonaka #define OPENPIC_INTR_NUM ((ICU_LEN)-(I8259_INTR_NUM)) 5237eb9eebSnonaka 5337eb9eebSnonaka #define PREP_INTR_REG 0xbffff000 5437eb9eebSnonaka #define INTR_VECTOR_REG 0xff0 5537eb9eebSnonaka 5637eb9eebSnonaka #endif /* !_LOCORE */ 5737eb9eebSnonaka 58*e2a71f6cSmatt #include <powerpc/intr.h> 59*e2a71f6cSmatt 6037eb9eebSnonaka #endif /* !_PREP_INTR_H_ */ 61