Exemple #1
0
void b1_reset(iavc_softc_t *sc)
{
    b1io_outp(sc, B1_RESET, 0);
    DELAY(55*2*1000);

    b1io_outp(sc, B1_RESET, 1);
    DELAY(55*2*1000);

    b1io_outp(sc, B1_RESET, 0);
    DELAY(55*2*1000);
}
Exemple #2
0
/*---------------------------------------------------------------------------*
 *	setup interrupt
 *---------------------------------------------------------------------------*/
void
b1isa_setup_irq(struct iavc_softc *sc)
{
	int irq = rman_get_start(sc->sc_resources.irq);
	
	if(bootverbose)
		kprintf("iavc%d: using irq %d\n", sc->sc_unit, irq);

	/* enable the interrupt */

	b1io_outp(sc, B1_INSTAT, 0x00);
	b1io_outp(sc, B1_RESET, b1_irq_table[irq]);
	b1io_outp(sc, B1_INSTAT, 0x02);
}	
Exemple #3
0
int b1_detect(iavc_softc_t *sc)
{
    if ((iavc_read_port(sc, B1_INSTAT) & 0xfc) ||
	(iavc_read_port(sc, B1_OUTSTAT) & 0xfc))
	return (1);

    b1io_outp(sc, B1_INSTAT, 0x02);
    b1io_outp(sc, B1_OUTSTAT, 0x02);
    if ((iavc_read_port(sc, B1_INSTAT) & 0xfe) != 2 ||
	(iavc_read_port(sc, B1_OUTSTAT) & 0xfe) != 2)
	return (2);

    b1io_outp(sc, B1_INSTAT, 0x00);
    b1io_outp(sc, B1_OUTSTAT, 0x00);
    if ((iavc_read_port(sc, B1_INSTAT) & 0xfe) ||
	(iavc_read_port(sc, B1_OUTSTAT) & 0xfe))
	return (3);

    return (0); /* found */
}
Exemple #4
0
void
iavc_b1_disable_irq(iavc_softc_t *sc)
{
    b1io_outp(sc, B1_INSTAT, 0x00);
}