ATPIC_MASTER
bus_set_resource(child, SYS_RES_IOPORT, ATPIC_MASTER, IO_ICU1, 2);
sc->sc_mask[icu] = 0xff - ((icu == ATPIC_MASTER) ? 4 : 0);
sc->sc_rid[ATPIC_MASTER] = 0;
sc->sc_res[ATPIC_MASTER] = bus_alloc_resource_any(dev, SYS_RES_IOPORT,
&sc->sc_rid[ATPIC_MASTER], RF_ACTIVE);
if (sc->sc_res[ATPIC_MASTER] == NULL)
atpic_init(sc, ATPIC_MASTER);
if (sc->sc_res[ATPIC_MASTER] != NULL)
sc->sc_rid[ATPIC_MASTER], sc->sc_res[ATPIC_MASTER]);
atpic_write(sc, ATPIC_MASTER, 0, OCW3_SEL | OCW3_P);
irq = atpic_read(sc, ATPIC_MASTER, 0);
atpic_write(sc, ATPIC_MASTER, 0, OCW3_SEL | OCW3_RR);
atpic_write(sc, ATPIC_MASTER, 0, OCW2_EOI);
sc->sc_mask[ATPIC_MASTER] |= 1 << irq;
atpic_write(sc, ATPIC_MASTER, 1, sc->sc_mask[ATPIC_MASTER]);
sc->sc_mask[ATPIC_MASTER] &= ~(1 << irq);
atpic_write(sc, ATPIC_MASTER, 1, sc->sc_mask[ATPIC_MASTER]);