* Our interrupt level must be as high as the highest * device using DMA (i.e. splbio). */ sc->sc_isr.isr_ipl = PSLTOIPL(hp300_bioipl);
dmainit(){	struct dma_softc *sc = &dma_softc;	struct dmareg *dma;	struct dma_channel *dc;	int i;	char rev;	/* There's just one. */	sc->sc_dmareg = (struct dmareg *)DMA_BASE;	dma = sc->sc_dmareg;	/*	 * Determine the DMA type.  A DMA_A or DMA_B will fail the	 * following probe.	 *	 * XXX Don't know how to easily differentiate the A and B cards,	 * so we just hope nobody has an A card (A cards will work if	 * splbio works out to ipl 3).	 */	if (badbaddr((char *)&dma->dma_id[2])) {		rev = 'B';#if !defined(HP320)		panic("dmainit: DMA card requires hp320 support");#endif	} else		rev = dma->dma_id[2];	sc->sc_type = (rev == 'B') ? DMA_B : DMA_C;	TAILQ_INIT(&sc->sc_queue);	for (i = 0; i < NDMACHAN; i++) {		dc = &sc->sc_chan[i];		dc->dm_job = NULL;		switch (i) {		case 0:			dc->dm_hwaddr = &dma->dma_chan0;			dc->dm_Bhwaddr = &dma->dma_Bchan0;			break;		case 1:			dc->dm_hwaddr = &dma->dma_chan1;			dc->dm_Bhwaddr = &dma->dma_Bchan1;			break;		default:			panic("dmainit: more than 2 channels?");			/* NOTREACHED */		}	}#ifdef DEBUG	/* make sure timeout is really not needed */	timeout_set(&sc->sc_timeout, dmatimeout, sc);	timeout_add(&sc->sc_timeout, 30 * hz);#endif	printf("98620%c, 2 channels, %d bit DMA\n",	    rev, (rev == 'B') ? 16 : 32);	/*	 * Our interrupt level must be as high as the highest	 * device using DMA (i.e. splbio).	 */	sc->sc_isr.isr_ipl = PSLTOIPL(hp300_bioipl);	/*	 * Defer hooking up our interrupt until the first	 * DMA-using controller has hooked up theirs.	 */	sc->sc_isr.isr_func = NULL;	sc->sc_isr.isr_arg = sc;	sc->sc_isr.isr_priority = IPL_BIO;}