11.1Sreinoud/* $NetBSD: interrupts,v 1.1 2001/10/18 00:05:01 reinoud Exp $ */ 21.1Sreinoud 31.1Sreinoud/* 41.1Sreinoud * Copyright (c) 1996 Mark Brinicombe. 51.1Sreinoud * All rights reserved. 61.1Sreinoud * 71.1Sreinoud * Redistribution and use in source and binary forms, with or without 81.1Sreinoud * modification, are permitted provided that the following conditions 91.1Sreinoud * are met: 101.1Sreinoud * 1. Redistributions of source code must retain the above copyright 111.1Sreinoud * notice, this list of conditions and the following disclaimer. 121.1Sreinoud * 2. Redistributions in binary form must reproduce the above copyright 131.1Sreinoud * notice, this list of conditions and the following disclaimer in the 141.1Sreinoud * documentation and/or other materials provided with the distribution. 151.1Sreinoud * 3. All advertising materials mentioning features or use of this software 161.1Sreinoud * must display the following acknowledgement: 171.1Sreinoud * This product includes software developed by Mark Brinicombe. 181.1Sreinoud * 4. The name of the company nor the name of the author may be used to 191.1Sreinoud * endorse or promote products derived from this software without specific 201.1Sreinoud * prior written permission. 211.1Sreinoud * 221.1Sreinoud * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 231.1Sreinoud * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 241.1Sreinoud * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 251.1Sreinoud * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 261.1Sreinoud * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 271.1Sreinoud * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 281.1Sreinoud * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 291.1Sreinoud * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 301.1Sreinoud * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 311.1Sreinoud * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 321.1Sreinoud * SUCH DAMAGE. 331.1Sreinoud */ 341.1Sreinoud 351.1SreinoudNotes on interrupts. 361.1Sreinoud 371.1SreinoudOk since interrupts can be chained the return value from an interrupt 381.1Sreinoudhandler is important. 391.1Sreinoud 401.1SreinoudThe following return values are defined : 411.1Sreinoud 421.1Sreinoud-1 - interrupt may have been for us but not sure so pass it on 431.1Sreinoud0 - interrupt no serviced (not ours) 441.1Sreinoud interrupt serviced but pass on down the chain 451.1Sreinoud1 - interrupt serviced do not pass on down the chain 461.1Sreinoud 471.1SreinoudThe important bit is whether the interrupt should be passed on down 481.1Sreinoudthe chain of attached interrupt handlers. 491.1Sreinoud 501.1SreinoudFor some interrupts and drivers where only a single device is 511.1Sreinoudever expected, the interrupt should be claimed if it has been serviced. 521.1SreinoudPassing it on down the chain may result in the stray interrupt handler 531.1Sreinoudbeing called. 541.1SreinoudThere are however some interrupt that should *always* be passed on down 551.1Sreinoudthe chain. These are interrupt which may commonly have multiple drivers 561.1Sreinoudattached. 571.1Sreinoud 581.1SreinoudThe following interrupts should always be passed on (return value of 0) 591.1Sreinoud 601.1SreinoudIRQ_TIMER0 611.1SreinoudIRQ_TIMER1 621.1SreinoudIRQ_VSYNC 631.1SreinoudIRQ_FLYBACK 641.1SreinoudIRQ_PODULE 651.1Sreinoud 661.1SreinoudIRQ_CLOCK (RC7500) 671.1Sreinoud 681.1SreinoudThe following interrupts are recommended to be passed on 691.1Sreinoud 701.1SreinoudIRQ_DMACH0 711.1SreinoudIRQ_DMACH1 721.1SreinoudIRQ_DMACH2 731.1SreinoudIRQ_DMACH3 741.1SreinoudIRQ_DMASCH0 751.1SreinoudIRQ_DMASCH1 761.1Sreinoud 771.1SreinoudIRQ_SDMA (RC7500) 781.1Sreinoud 791.1SreinoudAll other interrupts are not expected to be shared and may be claimed 801.1Sreinoudwhen serviced. Stray IRQ handlers may or may not be attached to the end 811.1Sreinoudof these irq chains. 82