xref: /netbsd-src/sys/arch/acorn32/doc/interrupts (revision 492b11d1341c20e5c0b836f52d904efe3bed232d)
1*492b11d1Sreinoud/* $NetBSD: interrupts,v 1.1 2001/10/18 00:05:01 reinoud Exp $ */
2*492b11d1Sreinoud
3*492b11d1Sreinoud/*
4*492b11d1Sreinoud * Copyright (c) 1996 Mark Brinicombe.
5*492b11d1Sreinoud * All rights reserved.
6*492b11d1Sreinoud *
7*492b11d1Sreinoud * Redistribution and use in source and binary forms, with or without
8*492b11d1Sreinoud * modification, are permitted provided that the following conditions
9*492b11d1Sreinoud * are met:
10*492b11d1Sreinoud * 1. Redistributions of source code must retain the above copyright
11*492b11d1Sreinoud *    notice, this list of conditions and the following disclaimer.
12*492b11d1Sreinoud * 2. Redistributions in binary form must reproduce the above copyright
13*492b11d1Sreinoud *    notice, this list of conditions and the following disclaimer in the
14*492b11d1Sreinoud *    documentation and/or other materials provided with the distribution.
15*492b11d1Sreinoud * 3. All advertising materials mentioning features or use of this software
16*492b11d1Sreinoud *    must display the following acknowledgement:
17*492b11d1Sreinoud *	This product includes software developed by Mark Brinicombe.
18*492b11d1Sreinoud * 4. The name of the company nor the name of the author may be used to
19*492b11d1Sreinoud *    endorse or promote products derived from this software without specific
20*492b11d1Sreinoud *    prior written permission.
21*492b11d1Sreinoud *
22*492b11d1Sreinoud * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
23*492b11d1Sreinoud * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
24*492b11d1Sreinoud * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25*492b11d1Sreinoud * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
26*492b11d1Sreinoud * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27*492b11d1Sreinoud * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28*492b11d1Sreinoud * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29*492b11d1Sreinoud * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30*492b11d1Sreinoud * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31*492b11d1Sreinoud * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32*492b11d1Sreinoud * SUCH DAMAGE.
33*492b11d1Sreinoud */
34*492b11d1Sreinoud
35*492b11d1SreinoudNotes on interrupts.
36*492b11d1Sreinoud
37*492b11d1SreinoudOk since interrupts can be chained the return value from an interrupt
38*492b11d1Sreinoudhandler is important.
39*492b11d1Sreinoud
40*492b11d1SreinoudThe following return values are defined :
41*492b11d1Sreinoud
42*492b11d1Sreinoud-1	- interrupt may have been for us but not sure so pass it on
43*492b11d1Sreinoud0	- interrupt no serviced (not ours)
44*492b11d1Sreinoud	  interrupt serviced but pass on down the chain
45*492b11d1Sreinoud1	- interrupt serviced do not pass on down the chain
46*492b11d1Sreinoud
47*492b11d1SreinoudThe important bit is whether the interrupt should be passed on down
48*492b11d1Sreinoudthe chain of attached interrupt handlers.
49*492b11d1Sreinoud
50*492b11d1SreinoudFor some interrupts and drivers where only a single device is
51*492b11d1Sreinoudever expected, the interrupt should be claimed if it has been serviced.
52*492b11d1SreinoudPassing it on down the chain may result in the stray interrupt handler
53*492b11d1Sreinoudbeing called.
54*492b11d1SreinoudThere are however some interrupt that should *always* be passed on down
55*492b11d1Sreinoudthe chain. These are interrupt which may commonly have multiple drivers
56*492b11d1Sreinoudattached.
57*492b11d1Sreinoud
58*492b11d1SreinoudThe following interrupts should always be passed on (return value of 0)
59*492b11d1Sreinoud
60*492b11d1SreinoudIRQ_TIMER0
61*492b11d1SreinoudIRQ_TIMER1
62*492b11d1SreinoudIRQ_VSYNC
63*492b11d1SreinoudIRQ_FLYBACK
64*492b11d1SreinoudIRQ_PODULE
65*492b11d1Sreinoud
66*492b11d1SreinoudIRQ_CLOCK	(RC7500)
67*492b11d1Sreinoud
68*492b11d1SreinoudThe following interrupts are recommended to be passed on
69*492b11d1Sreinoud
70*492b11d1SreinoudIRQ_DMACH0
71*492b11d1SreinoudIRQ_DMACH1
72*492b11d1SreinoudIRQ_DMACH2
73*492b11d1SreinoudIRQ_DMACH3
74*492b11d1SreinoudIRQ_DMASCH0
75*492b11d1SreinoudIRQ_DMASCH1
76*492b11d1Sreinoud
77*492b11d1SreinoudIRQ_SDMA	(RC7500)
78*492b11d1Sreinoud
79*492b11d1SreinoudAll other interrupts are not expected to be shared and may be claimed
80*492b11d1Sreinoudwhen serviced. Stray IRQ handlers may or may not be attached to the end
81*492b11d1Sreinoudof these irq chains.
82