intr.h revision 1.5
11.5Stoshii/* $NetBSD: intr.h,v 1.5 2001/06/20 02:26:30 toshii 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.3Stoshii#ifndef _HPCARM_INTR_H_ 371.3Stoshii#define _HPCARM_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.5Stoshii#define IPL_SOFTCLOCK 0 441.5Stoshii#define IPL_SOFTNET 1 451.5Stoshii#define IPL_BIO 2 /* block I/O */ 461.5Stoshii#define IPL_NET 3 /* network */ 471.5Stoshii#define IPL_SOFTSERIAL 4 481.5Stoshii#define IPL_TTY 5 /* terminal */ 491.5Stoshii#define IPL_IMP 6 /* memory allocation */ 501.5Stoshii#define IPL_AUDIO 7 /* audio */ 511.5Stoshii#define IPL_CLOCK 8 /* clock */ 521.5Stoshii#define IPL_HIGH 9 /* */ 531.5Stoshii#define IPL_SERIAL 10 /* serial */ 541.5Stoshii#define IPL_NONE 11 551.1Sichiro 561.5Stoshii#define NIPL 12 571.1Sichiro 581.1Sichiro#define IST_UNUSABLE -1 /* interrupt cannot be used */ 591.1Sichiro#define IST_NONE 0 /* none (dummy) */ 601.1Sichiro#define IST_PULSE 1 /* pulsed */ 611.1Sichiro#define IST_EDGE 2 /* edge-triggered */ 621.1Sichiro#define IST_LEVEL 3 /* level-triggered */ 631.1Sichiro 641.1Sichiro/* Software interrupt priority levels */ 651.1Sichiro 661.1Sichiro#define SOFTIRQ_CLOCK 0 671.1Sichiro#define SOFTIRQ_NET 1 681.1Sichiro#define SOFTIRQ_SERIAL 2 691.1Sichiro 701.1Sichiro#define SOFTIRQ_BIT(x) (1 << x) 711.1Sichiro 721.1Sichiro#include <machine/irqhandler.h> 731.2Stoshii#include <machine/psl.h> 741.4Stoshii 751.4Stoshii#ifndef _LOCORE 761.5Stoshiivoid *softintr_establish(int, void (*)(void *), void *); 771.4Stoshiivoid softintr_disestablish(void *); 781.4Stoshiivoid softintr_schedule(void *); 791.4Stoshii#endif 801.1Sichiro 811.3Stoshii#endif /* _HPCARM_INTR_H */ 82