/* $NetBSD: interrupts,v 1.1 1996/10/14 22:27:03 mark Exp $ */

/*
 * Copyright (c) 1996 Mark Brinicombe.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *	This product includes software developed by Mark Brinicombe.
 * 4. The name of the company nor the name of the author may be used to
 *    endorse or promote products derived from this software without specific
 *    prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

Notes on interrupts.

Ok since interrupts can be chained the return value from an interrupt
handler is important.

The following return values are defined :

-1	- interrupt may have been for us but not sure so pass it on
0	- interrupt no serviced (not ours)
	  interrupt serviced but pass on down the chain
1	- interrupt serviced do not pass on down the chain

The important bit is whether the interrupt should be passed on down
the chain of attached interrupt handlers.

For some interrupts and drivers where only a single device is
ever expected, the interrupt should be claimed if it has been serviced.
Passing it on down the chain may result in the stray interrupt handler
being called.
There are however some interrupt that should *always* be passed on down
the chain. These are interrupt which may commonly have multiple drivers
attached.

The following interrupts should always be passed on (return value of 0)

IRQ_TIMER0	
IRQ_TIMER1	
IRQ_VSYNC
IRQ_FLYBACK
IRQ_PODULE

IRQ_CLOCK	(RC7500)

The following interrupts are recommended to be passed on

IRQ_DMACH0
IRQ_DMACH1
IRQ_DMACH2
IRQ_DMACH3
IRQ_DMASCH0
IRQ_DMASCH1

IRQ_SDMA	(RC7500)

All other interrupts are not expected to be shared and may be claimed
when serviced. Stray IRQ handlers may or may not be attached to the end
of these irq chains.
