| /openbsd/src/sys/arch/armv7/omap/ |
| D | omohci.c | 100 struct ohci_softc sc; member 131 struct omohci_softc *sc = (struct omohci_softc *)self; in omohci_attach() local 135 sc->sc.iot = aa->aa_iot; in omohci_attach() 136 sc->sc.sc_bus.dmatag = aa->aa_dmat; in omohci_attach() 137 sc->sc_ih0 = NULL; in omohci_attach() 138 sc->sc_ih1 = NULL; in omohci_attach() 139 sc->sc_ihc0 = NULL; in omohci_attach() 140 sc->sc_ihc1 = NULL; in omohci_attach() 141 sc->sc_ihc2 = NULL; in omohci_attach() 142 sc->sc_ihotg = NULL; in omohci_attach() [all …]
|
| D | if_cpsw.c | 219 cpsw_set_txdesc_next(struct cpsw_softc * const sc, const u_int i, uint32_t n) in cpsw_set_txdesc_next() argument 222 bus_space_write_4(sc->sc_bst, sc->sc_bsh_txdescs, o, n); in cpsw_set_txdesc_next() 226 cpsw_set_rxdesc_next(struct cpsw_softc * const sc, const u_int i, uint32_t n) in cpsw_set_rxdesc_next() argument 229 bus_space_write_4(sc->sc_bst, sc->sc_bsh_rxdescs, o, n); in cpsw_set_rxdesc_next() 233 cpsw_get_txdesc(struct cpsw_softc * const sc, const u_int i, in cpsw_get_txdesc() argument 237 bus_space_read_region_4(sc->sc_bst, sc->sc_bsh_txdescs, o, in cpsw_get_txdesc() 242 cpsw_set_txdesc(struct cpsw_softc * const sc, const u_int i, in cpsw_set_txdesc() argument 246 bus_space_write_region_4(sc->sc_bst, sc->sc_bsh_txdescs, o, in cpsw_set_txdesc() 251 cpsw_get_rxdesc(struct cpsw_softc * const sc, const u_int i, in cpsw_get_rxdesc() argument 255 bus_space_read_region_4(sc->sc_bst, sc->sc_bsh_rxdescs, o, in cpsw_get_rxdesc() [all …]
|
| D | omehci.c | 75 struct ehci_softc sc; member 87 void omehci_soft_phy_reset(struct omehci_softc *sc, unsigned int port); 109 struct omehci_softc *sc = (struct omehci_softc *)self; in omehci_attach() local 112 char *devname = sc->sc.sc_bus.bdev.dv_xname; in omehci_attach() 122 sc->sc.iot = faa->fa_iot; in omehci_attach() 123 sc->sc.sc_bus.dmatag = faa->fa_dmat; in omehci_attach() 127 sc->port_mode[i] = EHCI_HCD_OMAP_MODE_UNKNOWN; in omehci_attach() 140 sc->port_mode[i] = EHCI_HCD_OMAP_MODE_PHY; in omehci_attach() 142 sc->port_mode[i] = EHCI_HCD_OMAP_MODE_HSIC; in omehci_attach() 144 sc->port_mode[i] = EHCI_HCD_OMAP_MODE_TLL ; in omehci_attach() [all …]
|
| /openbsd/src/sys/dev/ic/ |
| D | i82596.c | 209 i82596_probe(sc) in i82596_probe() argument 210 struct ie_softc *sc; in i82596_probe() 214 sc->scp = sc->sc_msize - IE_SCP_SZ; 215 sc->iscp = 0; 216 sc->scb = 32; 218 (sc->ie_bus_write16)(sc, IE_ISCP_BUSY(sc->iscp), 1); 219 (sc->ie_bus_write16)(sc, IE_ISCP_SCB(sc->iscp), sc->scb); 220 (sc->ie_bus_write24)(sc, IE_ISCP_BASE(sc->iscp), sc->sc_maddr); 221 (sc->ie_bus_write24)(sc, IE_SCP_ISCP(sc->scp), sc->sc_maddr); 222 (sc->ie_bus_write16)(sc, IE_SCP_BUS_USE(sc->scp), sc->sysbus); [all …]
|
| D | qlw.c | 70 void qlw_host_cmd(struct qlw_softc *sc, u_int16_t); 127 #define qlw_dump_iocb(sc, h, fl) do { /* nothing */ } while (0) argument 128 #define qlw_dump_iocb_segs(sc, h, fl) do { /* nothing */ } while (0) argument 132 qlw_xs_bus(struct qlw_softc *sc, struct scsi_xfer *xs) in qlw_xs_bus() argument 140 if ((sc->sc_scsibus[0] == NULL) || in qlw_xs_bus() 141 (xs->sc_link->bus == sc->sc_scsibus[0])) in qlw_xs_bus() 148 qlw_swap16(struct qlw_softc *sc, u_int16_t value) in qlw_swap16() argument 150 if (sc->sc_isp_gen == QLW_GEN_ISP1000) in qlw_swap16() 157 qlw_swap32(struct qlw_softc *sc, u_int32_t value) in qlw_swap32() argument 159 if (sc->sc_isp_gen == QLW_GEN_ISP1000) in qlw_swap32() [all …]
|
| D | ncr53c9x.c | 128 #define NCR_SET_COUNT(sc, size) do { \ argument 129 NCR_WRITE_REG((sc), NCR_TCL, (size)); \ 130 NCR_WRITE_REG((sc), NCR_TCM, (size) >> 8); \ 131 if ((sc->sc_cfg2 & NCRCFG2_FE) || \ 132 (sc->sc_rev == NCR_VARIANT_FAS366)) { \ 133 NCR_WRITE_REG((sc), NCR_TCH, (size) >> 16); \ 135 if (sc->sc_rev == NCR_VARIANT_FAS366) { \ 136 NCR_WRITE_REG(sc, NCR_RCH, 0); \ 191 ncr53c9x_attach(struct ncr53c9x_softc *sc) in ncr53c9x_attach() argument 201 if (sc->sc_omess == NULL) in ncr53c9x_attach() [all …]
|
| D | dc.c | 195 #define DC_SETBIT(sc, reg, x) \ argument 196 CSR_WRITE_4(sc, reg, CSR_READ_4(sc, reg) | (x)) 198 #define DC_CLRBIT(sc, reg, x) \ argument 199 CSR_WRITE_4(sc, reg, CSR_READ_4(sc, reg) & ~(x)) 201 #define SIO_SET(x) DC_SETBIT(sc, DC_SIO, (x)) 202 #define SIO_CLR(x) DC_CLRBIT(sc, DC_SIO, (x)) 205 dc_delay(struct dc_softc *sc) in dc_delay() argument 210 CSR_READ_4(sc, DC_BUSCTL); in dc_delay() 214 dc_eeprom_width(struct dc_softc *sc) in dc_eeprom_width() argument 219 dc_eeprom_idle(sc); in dc_eeprom_width() [all …]
|
| D | lsi64854.c | 84 lsi64854_attach(struct lsi64854_softc *sc) in lsi64854_attach() argument 90 switch (sc->sc_channel) { in lsi64854_attach() 92 sc->intr = lsi64854_scsi_intr; in lsi64854_attach() 93 sc->setup = lsi64854_setup; in lsi64854_attach() 96 sc->intr = lsi64854_enet_intr; in lsi64854_attach() 97 sc->setup = lsi64854_setup; in lsi64854_attach() 100 sc->intr = lsi64854_pp_intr; in lsi64854_attach() 101 sc->setup = lsi64854_setup_pp; in lsi64854_attach() 104 printf("%s: unknown channel\n", sc->sc_dev.dv_xname); in lsi64854_attach() 106 sc->reset = lsi64854_reset; in lsi64854_attach() [all …]
|
| D | athn.c | 181 athn_config_ht(struct athn_softc *sc) in athn_config_ht() argument 183 struct ieee80211com *ic = &sc->sc_ic; in athn_config_ht() 186 if ((sc->flags & ATHN_FLAG_11N) == 0) in athn_config_ht() 199 if (AR_SREV_9271(sc) || AR_SREV_9287_10_OR_LATER(sc)) in athn_config_ht() 201 if (AR_SREV_9380_10_OR_LATER(sc)) in athn_config_ht() 203 if (AR_SREV_9280_10_OR_LATER(sc)) { in athn_config_ht() 208 ntxstreams = sc->ntxchains; in athn_config_ht() 209 nrxstreams = sc->nrxchains; in athn_config_ht() 210 if (!AR_SREV_9380_10_OR_LATER(sc)) { in athn_config_ht() 228 athn_attach(struct athn_softc *sc) in athn_attach() argument [all …]
|
| D | rt2860.c | 215 struct rt2860_softc *sc = xsc; in rt2860_attach() local 216 struct ieee80211com *ic = &sc->sc_ic; in rt2860_attach() 220 sc->amrr.amrr_min_success_threshold = 1; in rt2860_attach() 221 sc->amrr.amrr_max_success_threshold = 15; in rt2860_attach() 230 tmp = RAL_READ(sc, reg); in rt2860_attach() 237 sc->sc_dev.dv_xname); in rt2860_attach() 240 sc->mac_ver = tmp >> 16; in rt2860_attach() 241 sc->mac_rev = tmp & 0xffff; in rt2860_attach() 243 if (sc->mac_ver != 0x2860 && in rt2860_attach() 247 sc->sc_flags |= RT2860_ADVANCED_PS; in rt2860_attach() [all …]
|
| /openbsd/src/sys/dev/acpi/ |
| D | acpibat.c | 76 struct acpibat_softc *sc = (struct acpibat_softc *)self; in acpibat_attach() local 80 sc->sc_acpi = (struct acpi_softc *)parent; in acpibat_attach() 81 sc->sc_devnode = aa->aaa_node; in acpibat_attach() 83 if (aml_evalinteger(sc->sc_acpi, sc->sc_devnode, "_STA", 0, NULL, &sta)) { in acpibat_attach() 84 dnprintf(10, "%s: no _STA\n", DEVNAME(sc)); in acpibat_attach() 89 sc->sc_bat_present = 1; in acpibat_attach() 90 acpibat_getbix(sc); in acpibat_attach() 91 acpibat_getbst(sc); in acpibat_attach() 93 printf(": %s", sc->sc_devnode->name); in acpibat_attach() 94 if (sc->sc_bix.bix_model[0]) in acpibat_attach() [all …]
|
| /openbsd/src/sys/dev/usb/ |
| D | umass.c | 184 void umass_disco(struct umass_softc *sc); 187 usbd_status umass_polled_transfer(struct umass_softc *sc, 189 usbd_status umass_setup_transfer(struct umass_softc *sc, 193 usbd_status umass_setup_ctrl_transfer(struct umass_softc *sc, 197 void umass_clear_endpoint_stall(struct umass_softc *sc, int endpt, 201 void umass_reset(struct umass_softc *sc, transfer_cb_f cb, void *priv); 234 void umass_bbb_dump_cbw(struct umass_softc *sc, 236 void umass_bbb_dump_csw(struct umass_softc *sc, 238 void umass_dump_buffer(struct umass_softc *sc, u_int8_t *buffer, 293 struct umass_softc *sc = (struct umass_softc *)self; in umass_attach() local [all …]
|
| /openbsd/src/sys/dev/ |
| D | audio.c | 57 #define DEVNAME(sc) ((sc)->dev.dv_xname) argument 283 audio_mixer_wakeup(struct audio_softc *sc) in audio_mixer_wakeup() argument 287 if (sc->mix_blocking) { in audio_mixer_wakeup() 288 wakeup(&sc->mix_blocking); in audio_mixer_wakeup() 289 sc->mix_blocking = 0; in audio_mixer_wakeup() 291 knote_locked(&sc->mix_klist, 0); in audio_mixer_wakeup() 307 audio_buf_init(struct audio_softc *sc, struct audio_buf *buf, int dir) in audio_buf_init() argument 310 if (sc->ops->round_buffersize) { in audio_buf_init() 311 buf->datalen = sc->ops->round_buffersize(sc->arg, in audio_buf_init() 315 if (sc->ops->allocm) { in audio_buf_init() [all …]
|
| /openbsd/src/sys/dev/pci/ |
| D | if_de.c | 81 #define EMIT do { TULIP_CSR_WRITE(sc, csr_srom_mii, csr); tulip_delay_300ns(sc); } while (0) 82 #define MII_EMIT do { TULIP_CSR_WRITE(sc, csr_srom_mii, csr); tulip_delay_300ns(sc); } while (0) 106 #define PCI_GETBUSDEVINFO(sc) do { \ argument 107 (sc)->tulip_pci_busno = parent; \ 108 (sc)->tulip_pci_devno = pa->pa_device; \ 130 void tulip_timeout(tulip_softc_t * const sc); 131 int tulip_txprobe(tulip_softc_t * const sc); 132 void tulip_media_set(tulip_softc_t * const sc, tulip_media_t media); 133 void tulip_linkup(tulip_softc_t * const sc, tulip_media_t media); 134 void tulip_media_print(tulip_softc_t * const sc); [all …]
|
| D | uhci_pci.c | 58 struct uhci_softc sc; member 85 struct uhci_pci_softc *sc = (struct uhci_pci_softc *)self; in uhci_pci_activate() local 87 if (sc->sc.sc_size == 0) in uhci_pci_activate() 93 pci_conf_write(sc->sc_pc, sc->sc_tag, in uhci_pci_activate() 95 bus_space_barrier(sc->sc.iot, sc->sc.ioh, 0, sc->sc.sc_size, in uhci_pci_activate() 97 bus_space_write_2(sc->sc.iot, sc->sc.ioh, UHCI_INTR, 0); in uhci_pci_activate() 107 struct uhci_pci_softc *sc = (struct uhci_pci_softc *)self; in uhci_pci_attach() local 114 char *devname = sc->sc.sc_bus.bdev.dv_xname; in uhci_pci_attach() 119 &sc->sc.iot, &sc->sc.ioh, NULL, &sc->sc.sc_size, 0)) { in uhci_pci_attach() 127 bus_space_write_2(sc->sc.iot, sc->sc.ioh, UHCI_INTR, 0); in uhci_pci_attach() [all …]
|
| D | ohci_pci.c | 64 struct ohci_softc sc; member 90 struct ohci_pci_softc *sc = (struct ohci_pci_softc *)self; in ohci_pci_attach() local 97 char *devname = sc->sc.sc_bus.bdev.dv_xname; in ohci_pci_attach() 101 &sc->sc.iot, &sc->sc.ioh, NULL, &sc->sc.sc_size, 0)) { in ohci_pci_attach() 107 sc->sc.sc_intre = bus_space_read_4(sc->sc.iot, sc->sc.ioh, in ohci_pci_attach() 111 bus_space_write_4(sc->sc.iot, sc->sc.ioh, OHCI_INTERRUPT_DISABLE, in ohci_pci_attach() 114 sc->sc_pc = pc; in ohci_pci_attach() 115 sc->sc.sc_bus.dmatag = pa->pa_dmat; in ohci_pci_attach() 117 bus_space_barrier(sc->sc.iot, sc->sc.ioh, 0, sc->sc.sc_size, in ohci_pci_attach() 119 bus_space_write_4(sc->sc.iot, sc->sc.ioh, in ohci_pci_attach() [all …]
|
| D | if_bce.c | 185 struct bce_softc *sc = (struct bce_softc *) self; in bce_attach() local 201 sc->bce_pa = *pa; in bce_attach() 202 sc->bce_dmatag = pa->pa_dmat; in bce_attach() 208 if (pci_mapreg_map(pa, BCE_PCI_BAR0, memtype, 0, &sc->bce_btag, in bce_attach() 209 &sc->bce_bhandle, &memaddr, &memsize, 0)) { in bce_attach() 238 sc->bce_intrhand = pci_intr_establish(pc, ih, IPL_NET, bce_intr, sc, in bce_attach() 240 if (sc->bce_intrhand == NULL) { in bce_attach() 249 bce_reset(sc); in bce_attach() 252 if ((sc->bce_data = (caddr_t)uvm_km_kmemalloc_pla(kernel_map, in bce_attach() 260 if ((error = bus_dmamap_create(sc->bce_dmatag, BCE_NRXDESC * MCLBYTES, in bce_attach() [all …]
|
| D | if_rge.c | 167 struct rge_softc *sc = (struct rge_softc *)self; in rge_attach() local 185 PCI_MAPREG_MEM_TYPE_64BIT, 0, &sc->rge_btag, &sc->rge_bhandle, in rge_attach() 186 NULL, &sc->rge_bsize, 0)) { in rge_attach() 188 PCI_MAPREG_MEM_TYPE_32BIT, 0, &sc->rge_btag, in rge_attach() 189 &sc->rge_bhandle, NULL, &sc->rge_bsize, 0)) { in rge_attach() 191 0, &sc->rge_btag, &sc->rge_bhandle, NULL, in rge_attach() 192 &sc->rge_bsize, 0)) { in rge_attach() 204 q->q_sc = sc; in rge_attach() 207 sc->sc_queues = q; in rge_attach() 208 sc->sc_nqueues = 1; in rge_attach() [all …]
|
| D | envy.c | 53 #define DEVNAME(sc) ((sc)->dev.dv_xname) argument 347 delta_init(struct envy_softc *sc) in delta_init() argument 351 for (dev = 0; dev < sc->card->noch / 2; dev++) { in delta_init() 352 envy_codec_write(sc, dev, AK4524_RST, 0x0); in delta_init() 354 envy_codec_write(sc, dev, AK4524_RST, in delta_init() 356 envy_codec_write(sc, dev, AK4524_FMT, in delta_init() 358 sc->shadow[dev][AK4524_DEEMVOL] = AK4524_DEEM_OFF; in delta_init() 359 sc->shadow[dev][AK4524_ADC_GAIN0] = 0x7f; in delta_init() 360 sc->shadow[dev][AK4524_ADC_GAIN1] = 0x7f; in delta_init() 361 sc->shadow[dev][AK4524_DAC_GAIN0] = 0x7f; in delta_init() [all …]
|
| D | if_ixgb.c | 169 struct ixgb_softc *sc; in ixgb_attach() local 174 sc = (struct ixgb_softc *)self; in ixgb_attach() 175 sc->osdep.ixgb_pa = *pa; in ixgb_attach() 177 timeout_set(&sc->timer_handle, ixgb_local_timer, sc); in ixgb_attach() 180 ixgb_identify_hardware(sc); in ixgb_attach() 183 sc->num_tx_desc = IXGB_MAX_TXD; in ixgb_attach() 184 sc->num_rx_desc = IXGB_MAX_RXD; in ixgb_attach() 185 sc->tx_int_delay = TIDV; in ixgb_attach() 186 sc->rx_int_delay = RDTR; in ixgb_attach() 187 sc->rx_buffer_len = IXGB_RXBUFFER_2048; in ixgb_attach() [all …]
|
| /openbsd/src/sys/dev/hil/ |
| D | hil.c | 103 int send_device_cmd(struct hil_softc *sc, u_int device, u_int cmd); 110 #define hil_process_pending(sc) wakeup(&(sc)->sc_pending) argument 113 hilwait(struct hil_softc *sc) in hilwait() argument 119 if ((bus_space_read_1(sc->sc_bst, sc->sc_bsh, HILP_STAT) & in hilwait() 128 hildatawait(struct hil_softc *sc) in hildatawait() argument 134 if ((bus_space_read_1(sc->sc_bst, sc->sc_bsh, HILP_STAT) & in hildatawait() 147 hil_attach(struct hil_softc *sc, int *hil_is_console) in hil_attach() argument 154 sc->sc_cmdending = 0; in hil_attach() 155 sc->sc_actdev = sc->sc_cmddev = 0; in hil_attach() 156 sc->sc_cmddone = 0; in hil_attach() [all …]
|
| /openbsd/src/sys/dev/fdt/ |
| D | ohci_fdt.c | 44 struct ohci_softc sc; member 74 struct ohci_fdt_softc *sc = (struct ohci_fdt_softc *)self; in ohci_fdt_attach() local 76 char *devname = sc->sc.sc_bus.bdev.dv_xname; in ohci_fdt_attach() 83 sc->sc_node = faa->fa_node; in ohci_fdt_attach() 84 sc->sc.iot = faa->fa_iot; in ohci_fdt_attach() 85 sc->sc.sc_bus.dmatag = faa->fa_dmat; in ohci_fdt_attach() 86 sc->sc.sc_size = faa->fa_reg[0].size; in ohci_fdt_attach() 88 if (bus_space_map(sc->sc.iot, faa->fa_reg[0].addr, in ohci_fdt_attach() 89 faa->fa_reg[0].size, 0, &sc->sc.ioh)) { in ohci_fdt_attach() 94 pinctrl_byname(sc->sc_node, "default"); in ohci_fdt_attach() [all …]
|
| D | xhci_fdt.c | 43 struct xhci_softc sc; member 85 struct xhci_fdt_softc *sc = (struct xhci_fdt_softc *)self; in xhci_fdt_attach() local 102 sc->sc_otg_base = faa->fa_reg[idx].addr; in xhci_fdt_attach() 103 sc->sc_otg_size = faa->fa_reg[idx].size; in xhci_fdt_attach() 114 sc->sc_node = faa->fa_node; in xhci_fdt_attach() 115 sc->sc.iot = faa->fa_iot; in xhci_fdt_attach() 116 sc->sc.sc_size = faa->fa_reg[idx].size; in xhci_fdt_attach() 117 sc->sc.sc_bus.dmatag = faa->fa_dmat; in xhci_fdt_attach() 119 if (bus_space_map(sc->sc.iot, faa->fa_reg[idx].addr, in xhci_fdt_attach() 120 faa->fa_reg[idx].size, 0, &sc->sc.ioh)) { in xhci_fdt_attach() [all …]
|
| D | imxccm.c | 176 #define HREAD4(sc, reg) \ argument 177 (bus_space_read_4((sc)->sc_iot, (sc)->sc_ioh, (reg))) 178 #define HWRITE4(sc, reg, val) \ argument 179 bus_space_write_4((sc)->sc_iot, (sc)->sc_ioh, (reg), (val)) 180 #define HSET4(sc, reg, bits) \ argument 181 HWRITE4((sc), (reg), HREAD4((sc), (reg)) | (bits)) 182 #define HCLR4(sc, reg, bits) \ argument 183 HWRITE4((sc), (reg), HREAD4((sc), (reg)) & ~(bits)) 246 uint32_t imxccm_imx8mm_enet(struct imxccm_softc *sc, uint32_t); 247 uint32_t imxccm_imx8mm_ahb(struct imxccm_softc *sc, uint32_t); [all …]
|
| /openbsd/src/sys/arch/luna88k/cbus/ |
| D | nec86hw.c | 127 nec86hw_attach(struct nec86hw_softc *sc) in nec86hw_attach() argument 129 bus_space_tag_t iot = sc->sc_iot; in nec86hw_attach() 130 bus_space_handle_t ioh = sc->sc_ioh; in nec86hw_attach() 134 sc->func_fifo_output = nec86fifo_output_mono_8_direct; in nec86hw_attach() 135 sc->func_fifo_input = nec86fifo_input_mono_8_direct; in nec86hw_attach() 136 (void) nec86hw_set_params(sc, AUMODE_RECORD, 0, in nec86hw_attach() 138 (void) nec86hw_set_params(sc, AUMODE_PLAY, 0, in nec86hw_attach() 142 (void) nec86hw_set_in_port(sc, NEC86HW_INPUT_MIXER); in nec86hw_attach() 143 (void) nec86hw_set_out_port(sc, NEC86HW_OUTPUT_MIXER); in nec86hw_attach() 146 nec86hw_set_volume(sc, NEC86_VOLUME_PORT_OPNAD, NEC86_MAXVOL); in nec86hw_attach() [all …]
|