intr.h revision 1.1
11.1Sichiro/* 	$NetBSD: intr.h,v 1.1 2001/02/23 03:48:16 ichiro Exp $	*/
21.1Sichiro
31.1Sichiro/*
41.1Sichiro * Copyright (c) 1997 Mark Brinicombe.
51.1Sichiro * All rights reserved.
61.1Sichiro *
71.1Sichiro * Redistribution and use in source and binary forms, with or without
81.1Sichiro * modification, are permitted provided that the following conditions
91.1Sichiro * are met:
101.1Sichiro * 1. Redistributions of source code must retain the above copyright
111.1Sichiro *    notice, this list of conditions and the following disclaimer.
121.1Sichiro * 2. Redistributions in binary form must reproduce the above copyright
131.1Sichiro *    notice, this list of conditions and the following disclaimer in the
141.1Sichiro *    documentation and/or other materials provided with the distribution.
151.1Sichiro * 3. All advertising materials mentioning features or use of this software
161.1Sichiro *    must display the following acknowledgement:
171.1Sichiro *	This product includes software developed by Mark Brinicombe
181.1Sichiro *	for the NetBSD Project.
191.1Sichiro * 4. The name of the company nor the name of the author may be used to
201.1Sichiro *    endorse or promote products derived from this software without specific
211.1Sichiro *    prior written permission.
221.1Sichiro *
231.1Sichiro * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
241.1Sichiro * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
251.1Sichiro * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
261.1Sichiro * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
271.1Sichiro * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
281.1Sichiro * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
291.1Sichiro * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
301.1Sichiro * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
311.1Sichiro * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
321.1Sichiro * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
331.1Sichiro * SUCH DAMAGE.
341.1Sichiro */
351.1Sichiro
361.1Sichiro#ifndef _ARM32_INTR_H_
371.1Sichiro#define _ARM32_INTR_H_
381.1Sichiro
391.1Sichiro/* Define the various Interrupt Priority Levels */
401.1Sichiro
411.1Sichiro/* Hardware Interrupt Priority Levels are not mutually exclusive. */
421.1Sichiro
431.1Sichiro#define IPL_BIO		0	/* block I/O */
441.1Sichiro#define IPL_NET		1	/* network */
451.1Sichiro#define IPL_TTY		2	/* terminal */
461.1Sichiro#define IPL_IMP		3	/* memory allocation */
471.1Sichiro#define IPL_AUDIO	4	/* audio */
481.1Sichiro#define IPL_CLOCK	5	/* clock */
491.1Sichiro#define IPL_HIGH	6	/*  */
501.1Sichiro#define IPL_SERIAL	7	/* serial */
511.1Sichiro#define IPL_NONE	8
521.1Sichiro
531.1Sichiro#define NIPL		9
541.1Sichiro
551.1Sichiro#define	IST_UNUSABLE	-1	/* interrupt cannot be used */
561.1Sichiro#define	IST_NONE	0	/* none (dummy) */
571.1Sichiro#define	IST_PULSE	1	/* pulsed */
581.1Sichiro#define	IST_EDGE	2	/* edge-triggered */
591.1Sichiro#define	IST_LEVEL	3	/* level-triggered */
601.1Sichiro
611.1Sichiro/* Software interrupt priority levels */
621.1Sichiro
631.1Sichiro#define SOFTIRQ_CLOCK	0
641.1Sichiro#define SOFTIRQ_NET	1
651.1Sichiro#define SOFTIRQ_SERIAL	2
661.1Sichiro
671.1Sichiro#define SOFTIRQ_BIT(x)	(1 << x)
681.1Sichiro
691.1Sichiro#include <machine/irqhandler.h>
701.1Sichiro
711.1Sichiro#endif	/* _ARM32_INTR_H */
72