intr.h revision 1.30
11.30Smatt/*	$NetBSD: intr.h,v 1.30 2011/06/17 23:36:17 matt Exp $	*/
21.1Ssakamoto
31.6Smycroft/*-
41.6Smycroft * Copyright (c) 1998 The NetBSD Foundation, Inc.
51.6Smycroft * All rights reserved.
61.6Smycroft *
71.6Smycroft * This code is derived from software contributed to The NetBSD Foundation
81.6Smycroft * by Charles M. Hannum.
91.1Ssakamoto *
101.1Ssakamoto * Redistribution and use in source and binary forms, with or without
111.1Ssakamoto * modification, are permitted provided that the following conditions
121.1Ssakamoto * are met:
131.1Ssakamoto * 1. Redistributions of source code must retain the above copyright
141.1Ssakamoto *    notice, this list of conditions and the following disclaimer.
151.1Ssakamoto * 2. Redistributions in binary form must reproduce the above copyright
161.1Ssakamoto *    notice, this list of conditions and the following disclaimer in the
171.1Ssakamoto *    documentation and/or other materials provided with the distribution.
181.1Ssakamoto *
191.6Smycroft * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
201.6Smycroft * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
211.6Smycroft * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
221.6Smycroft * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
231.6Smycroft * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
241.6Smycroft * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
251.6Smycroft * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
261.6Smycroft * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
271.6Smycroft * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
281.6Smycroft * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
291.6Smycroft * POSSIBILITY OF SUCH DAMAGE.
301.1Ssakamoto */
311.1Ssakamoto
321.26Sgarbled
331.1Ssakamoto#ifndef _BEBOX_INTR_H_
341.1Ssakamoto#define _BEBOX_INTR_H_
351.1Ssakamoto
361.26Sgarbled#include <powerpc/intr.h>
371.1Ssakamoto
381.1Ssakamoto#ifndef _LOCORE
391.1Ssakamoto
401.26Sgarbledvoid enable_intr(void);
411.26Sgarbledvoid disable_intr(void);
421.2Ssakamoto
431.26Sgarbledextern paddr_t bebox_mb_reg;
441.24Syamt
451.30Smatt#define ICU_LEN			32
461.30Smatt#define IRQ_SLAVE		2
471.30Smatt#define LEGAL_HWIRQ_P(x)	((u_int)(x) < ICU_LEN && (x) != IRQ_SLAVE)
481.24Syamt
491.30Smatt#define BEBOX_INTR_REG		0x7ffff000
501.30Smatt#define INTR_VECTOR_REG		0xff0
511.1Ssakamoto
521.1Ssakamoto#endif /* !_LOCORE */
531.1Ssakamoto
541.1Ssakamoto#endif /* !_BEBOX_INTR_H_ */
55