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