void dw750_attach(struct device *parent, struct device *self, void *aux) { struct uba_vsoftc *sc = (void *)self; struct sbi_attach_args *sa = aux; printf(": DW750\n"); /* * Fill in bus specific data. */ sc->uv_sc.uh_ubainit = dw750_init; #ifdef notyet sc->uv_sc.uh_ubapurge = dw750_purge; #endif sc->uv_sc.uh_iot = &vax_mem_bus_space; sc->uv_sc.uh_dmat = &sc->uv_dmat; /* * Fill in variables used by the sgmap system. */ sc->uv_size = UBAPAGES * VAX_NBPG; sc->uv_uba = (void *)sa->sa_ioh; /* Map registers is in adaptor */ uba_dma_init(sc); uba_attach(&sc->uv_sc, UIOPAGE(sa->sa_type == NEX_UBA1)); }
void dw750_attach(device_t parent, device_t self, void *aux) { struct uba_vsoftc * const sc = device_private(self); struct sbi_attach_args * const sa = aux; aprint_normal(": DW750\n"); sc->uv_sc.uh_dev = self; /* * Fill in bus specific data. */ sc->uv_sc.uh_ubainit = dw750_init; #ifdef notyet sc->uv_sc.uh_ubapurge = dw750_purge; #endif sc->uv_sc.uh_iot = sa->sa_iot; sc->uv_sc.uh_dmat = &sc->uv_dmat; sc->uv_sc.uh_type = UBA_UBA; sc->uv_sc.uh_nr = sa->sa_type == NEX_UBA1; /* * Fill in variables used by the sgmap system. */ sc->uv_size = UBAPAGES * VAX_NBPG; sc->uv_uba = (void *)sa->sa_ioh; /* Map registers is in adaptor */ uba_dma_init(sc); uba_attach(&sc->uv_sc, UIOPAGE(sa->sa_type == NEX_UBA1)); }
void uba_bi_attach(device_t parent, device_t self, void *aux) { struct uba_softc *sc = device_private(self); struct bi_attach_args *ba = aux; volatile int timo; if (ba->ba_node->biic.bi_dtype == BIDT_DWBUA) printf(": DWBUA\n"); else printf(": KLESI-B\n"); /* * Fill in bus specific data. */ sc->uh_dev = self; sc->uh_uba = (void *)ba->ba_node; sc->uh_nbdp = NBDPBUA; /* sc->uh_nr is 0; uninteresting here */ /* sc->uh_afterscan; not used */ /* sc->uh_errchk; not used */ /* sc->uh_beforescan */ sc->uh_ubapurge = bua_purge; sc->uh_ubainit = bua_init; /* sc->uh_type not used */ sc->uh_memsize = UBAPAGES; sc->uh_mr = BUA(sc->uh_uba)->bn_map; #ifdef notdef /* Can we get separate interrupts? */ scb->scb_nexvec[1][ba->ba_nodenr] = &sc->sc_ivec; #endif BUA(sc->uh_uba)->bn_biic.bi_csr |= BICSR_ARB_NONE; BUA(sc->uh_uba)->bn_biic.bi_csr |= BICSR_STS | BICSR_INIT; DELAY(1000); timo = 1000; while (BUA(sc->uh_uba)->bn_biic.bi_csr & BICSR_BROKE) if (timo == 0) { aprint_error_dev(self, "BROKE bit set\n"); return; } BUA(sc->uh_uba)->bn_biic.bi_intrdes = ba->ba_intcpu; BUA(sc->uh_uba)->bn_biic.bi_csr = (BUA(sc->uh_uba)->bn_biic.bi_csr&~BICSR_ARB_MASK) | BICSR_ARB_HIGH; BUA(sc->uh_uba)->bn_vor = VAX_NBPG + (VAX_NBPG * allocvec++); uba_attach(sc, BUA(sc->uh_uba)->bn_biic.bi_sadr + UBAPAGES * VAX_NBPG); }