/* main DMABRG irq handler. It acks irqs and then handles every set and unmasked bit sequentially. No locking and no validity checks; it should be as fast as possible (audio!)  */
static irqreturn_t dmabrg_irq(int irq, void *data)
/* main DMABRG irq handler. It acks irqs and then handles every set and unmasked bit sequentially. No locking and no validity checks; it should be as fast as possible (audio!)  */
static irqreturn_t dmabrg_irq(int irq, void *data)
{
	unsigned long dcr;
	unsigned int i;
	dcr = ctrl_inl(DMABRGCR);
	ctrl_outl(dcr & ~0x00ff0003, DMABRGCR);
	dcr &= dcr >> 8;
	if (dcr & 1)
		dmabrg_call_handler(DMABRGIRQ_USBDMA);
	if (dcr & 2)
		dmabrg_call_handler(DMABRGIRQ_USBDMAERR);
	dcr >>= 16;
	while (dcr) {
		i = __ffs(dcr);
		dcr &= dcr - 1;
		dmabrg_call_handler(i + DMABRGIRQ_A0TXF);
	}
	return IRQ_HANDLED;
}