static void sbscn_attach(struct device *parent, struct device *self, void *aux) { struct sbscn_softc *sc = (struct sbscn_softc *)self; struct sbobio_attach_args *sap = aux; int i; sc->sc_addr = sap->sa_base + sap->sa_locs.sa_offset; printf("\n"); for (i = 0; i < 2; i++) sbscn_attach_channel(sc, i, sap->sa_locs.sa_intr[i]); /* init duart_opcr */ WRITE_REG(MIPS_PHYS_TO_KSEG1(sc->sc_addr + 0x270), 0); /* init duart_aux_ctrl */ WRITE_REG(MIPS_PHYS_TO_KSEG1(sc->sc_addr + 0x210), 0x0f); /* XXX */ }
static void sbscn_attach(device_t parent, device_t self, void *aux) { struct sbscn_softc *sc = device_private(self); struct sbobio_attach_args *sa = aux; int i; sc->sc_dev = self; sc->sc_addr = sa->sa_base + sa->sa_locs.sa_offset; aprint_normal("\n"); for (i = 0; i < 2; i++) sbscn_attach_channel(sc, i, sa->sa_locs.sa_intr[i]); /* init duart_opcr */ WRITE_REG(MIPS_PHYS_TO_KSEG1(sc->sc_addr + 0x270), 0); /* init duart_aux_ctrl */ WRITE_REG(MIPS_PHYS_TO_KSEG1(sc->sc_addr + 0x210), 0x0f); /* XXX */ }