Lines Matching refs:csc
214 struct ex_cardbus_softc *csc = device_private(self);
215 struct ex_softc *sc = &csc->sc_softc;
224 csc->sc_ct = ca->ca_ct;
225 csc->sc_tag = ca->ca_tag;
236 csc->sc_cardtype = ecp->ecp_cardtype;
237 csc->sc_csr = ecp->ecp_csr;
240 &sc->sc_iot, &sc->sc_ioh, &adr, &csc->sc_mapsize) == 0) {
241 csc->sc_bar_reg = PCI_BAR0;
242 csc->sc_bar_val = adr | PCI_MAPREG_TYPE_IO;
244 if (csc->sc_cardtype == EX_CB_CYCLONE) {
249 &csc->sc_funct, &csc->sc_funch,
250 &adr1, &csc->sc_funcsize) == 0) {
252 csc->sc_bar_reg1 =
254 csc->sc_bar_val1 =
279 ex_cardbus_setup(csc);
283 if (csc->sc_cardtype == EX_CB_CYCLONE)
284 bus_space_write_4(csc->sc_funct, csc->sc_funch,
287 Cardbus_function_disable(csc->sc_ct);
293 struct ex_cardbus_softc *csc = (struct ex_cardbus_softc *)sc;
295 bus_space_write_4(csc->sc_funct, csc->sc_funch, EX_CB_INTR,
302 struct ex_cardbus_softc *csc = device_private(self);
303 struct ex_softc *sc = &csc->sc_softc;
304 struct cardbus_devfunc *ct = csc->sc_ct;
321 if (csc->sc_cardtype == EX_CB_CYCLONE) {
324 csc->sc_funct, csc->sc_funch, csc->sc_funcsize);
328 sc->sc_ioh, csc->sc_mapsize);
335 struct ex_cardbus_softc *csc = (struct ex_cardbus_softc *)sc;
337 Cardbus_function_enable(csc->sc_ct);
338 ex_cardbus_setup(csc);
340 sc->sc_ih = Cardbus_intr_establish(csc->sc_ct, IPL_NET, ex_intr, sc);
352 struct ex_cardbus_softc *csc = (struct ex_cardbus_softc *)sc;
355 Cardbus_intr_disestablish(csc->sc_ct, sc->sc_ih);
359 Cardbus_function_disable(csc->sc_ct);
364 ex_cardbus_setup(struct ex_cardbus_softc *csc)
366 cardbus_devfunc_t ct = csc->sc_ct;
369 (void)cardbus_set_powerstate(ct, csc->sc_tag, PCI_PWR_D0);
372 Cardbus_conf_write(ct, csc->sc_tag, csc->sc_bar_reg, csc->sc_bar_val);
374 if (csc->sc_cardtype == EX_CB_CYCLONE) {
376 Cardbus_conf_write(ct, csc->sc_tag,
377 csc->sc_bar_reg1, csc->sc_bar_val1);
386 reg = Cardbus_conf_read(ct, csc->sc_tag, PCI_COMMAND_STATUS_REG);
387 reg |= csc->sc_csr;
388 Cardbus_conf_write(ct, csc->sc_tag, PCI_COMMAND_STATUS_REG, reg);
393 reg = Cardbus_conf_read(ct, csc->sc_tag, PCI_BHLC_REG);
400 Cardbus_conf_write(ct, csc->sc_tag, PCI_BHLC_REG, reg);