/netbsd-src/sys/dev/ic/ |
H A D | wdc.c | 181 wdc_init_shadow_regs(struct wdc_regs *wdr) in wdc_init_shadow_regs() argument 183 wdr->cmd_iohs[wd_status] = wdr->cmd_iohs[wd_command]; in wdc_init_shadow_regs() 184 wdr->cmd_iohs[wd_features] = wdr->cmd_iohs[wd_error]; in wdc_init_shadow_regs() 208 struct wdc_regs *wdr = CHAN_TO_WDC_REGS(chp); in wdc_sataprobe() local 219 switch (sata_reset_interface(chp, wdr->sata_iot, wdr->sata_control, in wdc_sataprobe() 220 wdr->sata_status, AT_WAIT)) { in wdc_sataprobe() 224 bus_space_write_1(wdr->cmd_iot, in wdc_sataprobe() 225 wdr->cmd_iohs[wd_sdh], 0, WDSD_IBM); in wdc_sataprobe() 227 st = bus_space_read_1(wdr->cmd_iot, in wdc_sataprobe() 228 wdr->cmd_iohs[wd_status], 0); in wdc_sataprobe() [all …]
|
/netbsd-src/sys/arch/dreamcast/dev/g1/ |
H A D | wdc_g1.c | 74 struct wdc_regs wdr; in wdc_g1_probe() local 81 wdr.cmd_iot = ga->ga_memt; in wdc_g1_probe() 82 if (bus_space_map(wdr.cmd_iot, WDC_G1_CMD_ADDR, in wdc_g1_probe() 83 WDC_G1_REG_NPORTS * 4, 0, &wdr.cmd_baseioh)) in wdc_g1_probe() 87 if (bus_space_subregion(wdr.cmd_iot, wdr.cmd_baseioh, i * 4, in wdc_g1_probe() 88 i == 0 ? 2 : 1, &wdr.cmd_iohs[i]) != 0) in wdc_g1_probe() 92 wdc_init_shadow_regs(&wdr); in wdc_g1_probe() 94 wdr.ctl_iot = ga->ga_memt; in wdc_g1_probe() 95 if (bus_space_map(wdr.ctl_iot, WDC_G1_CTL_ADDR, in wdc_g1_probe() 96 WDC_G1_AUXREG_NPORTS, 0, &wdr.ctl_ioh)) in wdc_g1_probe() [all …]
|
/netbsd-src/sys/arch/mac68k/obio/ |
H A D | wdc_obio.c | 90 struct wdc_regs *wdr; in wdc_obio_match() local 93 wdr = kmem_alloc(sizeof(*wdr), KM_SLEEP); in wdc_obio_match() 101 wdr->cmd_iot = wdr->ctl_iot = oa->oa_tag; in wdc_obio_match() 103 if (bus_space_map(wdr->cmd_iot, IDEBase, WDC_OBIO_REG_NPORTS, in wdc_obio_match() 104 0, &wdr->cmd_baseioh)) in wdc_obio_match() 107 mac68k_bus_space_handle_swapped(wdr->cmd_iot, in wdc_obio_match() 108 &wdr->cmd_baseioh); in wdc_obio_match() 111 if (bus_space_subregion(wdr->cmd_iot, wdr->cmd_baseioh, in wdc_obio_match() 112 i * 4, 4, &wdr->cmd_iohs[i]) != 0) in wdc_obio_match() 115 wdc_init_shadow_regs(wdr); in wdc_obio_match() [all …]
|
/netbsd-src/sys/arch/atari/dev/ |
H A D | wdc_mb.c | 88 struct wdc_regs wdr; in wdc_mb_probe() local 97 wdr.cmd_iot = wdr.ctl_iot = mb_alloc_bus_space_tag(); in wdc_mb_probe() 98 if (wdr.cmd_iot == NULL) in wdc_mb_probe() 100 wdr.cmd_iot->stride = 0; in wdc_mb_probe() 101 wdr.cmd_iot->wo_1 = 1; in wdc_mb_probe() 103 if (bus_space_map(wdr.cmd_iot, FALCON_WD_BASE, FALCON_WD_LEN, 0, in wdc_mb_probe() 104 &wdr.cmd_baseioh)) in wdc_mb_probe() 107 if (bus_space_subregion(wdr.cmd_iot, wdr.cmd_baseioh, in wdc_mb_probe() 108 i * 4, 4, &wdr.cmd_iohs[i]) != 0) in wdc_mb_probe() 111 wdc_init_shadow_regs(&wdr); in wdc_mb_probe() [all …]
|
/netbsd-src/sys/arch/acorn32/mainbus/ |
H A D | wdc_pioc.c | 85 struct wdc_regs wdr; in wdc_pioc_probe() local 97 wdr.cmd_iot = pa->pa_iot; in wdc_pioc_probe() 98 wdr.ctl_iot = pa->pa_iot; in wdc_pioc_probe() 100 if (bus_space_map(wdr.cmd_iot, iobase, WDC_PIOC_REG_NPORTS, 0, in wdc_pioc_probe() 101 &wdr.cmd_baseioh)) in wdc_pioc_probe() 104 if (bus_space_subregion(wdr.cmd_iot, wdr.cmd_baseioh, i, in wdc_pioc_probe() 105 i == 0 ? 4 : 1, &wdr.cmd_iohs[i]) != 0) { in wdc_pioc_probe() 106 bus_space_unmap(wdr.cmd_iot, wdr.cmd_baseioh, in wdc_pioc_probe() 111 wdc_init_shadow_regs(&wdr); in wdc_pioc_probe() 113 if (bus_space_map(wdr.ctl_iot, iobase + WDC_PIOC_AUXREG_OFFSET, in wdc_pioc_probe() [all …]
|
/netbsd-src/sys/arch/mips/adm5120/dev/ |
H A D | wdc_extio.c | 119 struct wdc_regs *wdr = &wdc->regs[chp->ch_channel]; 128 bus_space_write_1(wdr->ctl_iot, wdr->ctl_ioh, wd_aux_ctlr, WDCTL_RST); 130 (void) bus_space_read_1(wdr->cmd_iot, wdr->cmd_iohs[wd_error], 0); 131 bus_space_write_1(wdr->ctl_iot, wdr->ctl_ioh, wd_aux_ctlr, 0); 134 st0 = bus_space_read_1(wdr->cmd_iot, 135 wdr->cmd_iohs[wd_status], 0); 157 wdc_extio_map(struct extio_attach_args *ea, struct wdc_regs *wdr, in wdc_extio_map() argument 163 wdr->cmd_iot = wdr->ctl_iot = ea->ea_st; in wdc_extio_map() 172 if (bus_space_map(wdr->cmd_iot, ea->ea_addr, WDC_OBIO_CF_WINSIZE, 0, in wdc_extio_map() 173 &wdr->cmd_baseioh)) { in wdc_extio_map() [all …]
|
/netbsd-src/sys/arch/mmeye/dev/ |
H A D | wdc_mainbus.c | 73 struct wdc_regs wdr; in wdc_mainbus_match() local 84 wdr.cmd_iot = SH3_BUS_SPACE_PCMCIA_IO; in wdc_mainbus_match() 85 if (bus_space_map(wdr.cmd_iot, ma->ma_addr1, in wdc_mainbus_match() 86 WDC_MAINBUS_REG_NPORTS, 0, &wdr.cmd_baseioh) != 0) in wdc_mainbus_match() 90 if (bus_space_subregion(wdr.cmd_iot, wdr.cmd_baseioh, i, in wdc_mainbus_match() 91 i == 0 ? 4 : 1, &wdr.cmd_iohs[i]) != 0) in wdc_mainbus_match() 94 wdc_init_shadow_regs(&wdr); in wdc_mainbus_match() 96 wdr.ctl_iot = SH3_BUS_SPACE_PCMCIA_IO; in wdc_mainbus_match() 97 if (bus_space_map(wdr.ctl_iot, ma->ma_addr1 + WDC_MAINBUS_AUXREG_OFFSET, in wdc_mainbus_match() 98 WDC_MAINBUS_AUXREG_NPORTS, 0, &wdr.ctl_ioh) != 0) in wdc_mainbus_match() [all …]
|
/netbsd-src/sys/arch/landisk/dev/ |
H A D | wdc_obio.c | 72 struct wdc_regs wdr; in wdc_obio_probe() local 86 wdr.cmd_iot = oa->oa_iot; in wdc_obio_probe() 87 if (bus_space_map(wdr.cmd_iot, oa->oa_io[0].or_addr, in wdc_obio_probe() 88 WDC_OBIO_REG_SIZE, 0, &wdr.cmd_baseioh)) { in wdc_obio_probe() 92 if (bus_space_subregion(wdr.cmd_iot, wdr.cmd_baseioh, in wdc_obio_probe() 93 i * 2, (i == 0) ? 2 : 1, &wdr.cmd_iohs[i])) { in wdc_obio_probe() 97 wdc_init_shadow_regs(&wdr); in wdc_obio_probe() 99 wdr.ctl_iot = oa->oa_iot; in wdc_obio_probe() 100 if (bus_space_map(wdr.ctl_iot, in wdc_obio_probe() 102 WDC_OBIO_AUXREG_SIZE, 0, &wdr.ctl_ioh)) { in wdc_obio_probe() [all …]
|
/netbsd-src/sys/dev/pci/ |
H A D | pciide_opti_reg.h | 111 struct wdc_regs *wdr = CHAN_TO_WDC_REGS(chp); in opti_read_config() local 116 (void) bus_space_read_2(wdr->cmd_iot, wdr->cmd_iohs[wd_features], 0); in opti_read_config() 117 (void) bus_space_read_2(wdr->cmd_iot, wdr->cmd_iohs[wd_features], 0); in opti_read_config() 120 bus_space_write_1(wdr->cmd_iot, wdr->cmd_iohs[wd_seccnt], 0, 0x03u); in opti_read_config() 123 rv = bus_space_read_1(wdr->cmd_iot, wdr->cmd_iohs[reg], 0); in opti_read_config() 126 bus_space_write_1(wdr->cmd_iot, wdr->cmd_iohs[wd_seccnt], 0, 0x83u); in opti_read_config() 136 struct wdc_regs *wdr = CHAN_TO_WDC_REGS(chp); in opti_write_config() local 140 (void) bus_space_read_2(wdr->cmd_iot, wdr->cmd_iohs[wd_features], 0); in opti_write_config() 141 (void) bus_space_read_2(wdr->cmd_iot, wdr->cmd_iohs[wd_features], 0); in opti_write_config() 144 bus_space_write_1(wdr->cmd_iot, wdr->cmd_iohs[wd_seccnt], 0, 0x03u); in opti_write_config() [all …]
|
H A D | svwsata.c | 248 struct wdc_regs *wdr = CHAN_TO_WDC_REGS(wdc_cp); in svwsata_mapchan() local 254 wdr->cmd_iot = sc->sc_ba5_st; in svwsata_mapchan() 257 SVWSATA_TF8 - SVWSATA_TF0, &wdr->cmd_baseioh) != 0) { in svwsata_mapchan() 263 wdr->ctl_iot = sc->sc_ba5_st; in svwsata_mapchan() 271 wdr->ctl_ioh = cp->ctl_baseioh; in svwsata_mapchan() 274 if (bus_space_subregion(wdr->cmd_iot, wdr->cmd_baseioh, in svwsata_mapchan() 276 &wdr->cmd_iohs[i]) != 0) { in svwsata_mapchan() 283 wdc_init_shadow_regs(wdr); in svwsata_mapchan() 284 wdr->data32iot = wdr->cmd_iot; in svwsata_mapchan() 285 wdr->data32ioh = wdr->cmd_iohs[0]; in svwsata_mapchan() [all …]
|
H A D | artsata.c | 126 struct wdc_regs *wdr = CHAN_TO_WDC_REGS(wdc_cp); in artisea_mapregs() local 158 wdr->cmd_iot = sc->sc_ba5_st; in artisea_mapregs() 161 &wdr->cmd_baseioh) != 0) { in artisea_mapregs() 167 wdr->ctl_iot = sc->sc_ba5_st; in artisea_mapregs() 168 if (bus_space_subregion(wdr->cmd_iot, wdr->cmd_baseioh, in artisea_mapregs() 174 wdr->ctl_ioh = cp->ctl_baseioh; in artisea_mapregs() 178 if (bus_space_subregion(wdr->cmd_iot, wdr->cmd_baseioh, in artisea_mapregs() 180 &wdr->cmd_iohs[i]) != 0) { in artisea_mapregs() 187 wdr->data32iot = wdr->cmd_iot; in artisea_mapregs() 188 wdr->data32ioh = wdr->cmd_iohs[0]; in artisea_mapregs() [all …]
|
H A D | pciide_common.c | 176 struct wdc_regs *wdr; in pciide_common_detach() local 188 wdr = CHAN_TO_WDC_REGS(wdc_cp); in pciide_common_detach() 193 if (wdr->cmd_ios != 0) in pciide_common_detach() 194 bus_space_unmap(wdr->cmd_iot, in pciide_common_detach() 195 wdr->cmd_baseioh, wdr->cmd_ios); in pciide_common_detach() 197 if (wdr->ctl_ios != 0) in pciide_common_detach() 198 bus_space_unmap(wdr->ctl_iot, in pciide_common_detach() 199 wdr->ctl_ioh, wdr->ctl_ios); in pciide_common_detach() 202 bus_space_unmap(wdr->ctl_iot, in pciide_common_detach() 289 struct wdc_regs *wdr = CHAN_TO_WDC_REGS(wdc_cp); in pciide_mapregs_compat() local [all …]
|
/netbsd-src/sys/dev/isa/ |
H A D | wdc_isa.c | 87 struct wdc_regs wdr; in wdc_isa_probe() local 105 wdr.cmd_iot = ia->ia_iot; in wdc_isa_probe() 107 if (bus_space_map(wdr.cmd_iot, ia->ia_io[0].ir_addr, in wdc_isa_probe() 108 WDC_ISA_REG_NPORTS, 0, &wdr.cmd_baseioh)) in wdc_isa_probe() 112 if (bus_space_subregion(wdr.cmd_iot, wdr.cmd_baseioh, i, in wdc_isa_probe() 113 i == 0 ? 4 : 1, &wdr.cmd_iohs[i]) != 0) in wdc_isa_probe() 116 wdc_init_shadow_regs(&wdr); in wdc_isa_probe() 118 wdr.ctl_iot = ia->ia_iot; in wdc_isa_probe() 119 if (bus_space_map(wdr.ctl_iot, ia->ia_io[0].ir_addr + in wdc_isa_probe() 120 WDC_ISA_AUXREG_OFFSET, WDC_ISA_AUXREG_NPORTS, 0, &wdr.ctl_ioh)) in wdc_isa_probe() [all …]
|
/netbsd-src/sys/arch/evbppc/mpc85xx/ |
H A D | wdc_obio.c | 69 wdc_obio_initregmap(struct wdc_regs *wdr, bus_space_tag_t bst, in wdc_obio_initregmap() argument 74 wdr->cmd_iot = bst; in wdc_obio_initregmap() 75 wdr->ctl_iot = bst; in wdc_obio_initregmap() 77 error = bus_space_map(wdr->cmd_iot, addr, size, 0, &wdr->cmd_baseioh); in wdc_obio_initregmap() 79 wdr->cmd_baseioh = 0; in wdc_obio_initregmap() 84 if (bus_space_subregion(wdr->cmd_iot, wdr->cmd_baseioh, in wdc_obio_initregmap() 85 i, (i == 0) ? 2 : 1, &wdr->cmd_iohs[i])) { in wdc_obio_initregmap() 90 if (bus_space_subregion(wdr->ctl_iot, wdr->cmd_baseioh, in wdc_obio_initregmap() 91 WDC_OBIO_AUXREG_OFFSET, 1, &wdr->ctl_ioh)) { in wdc_obio_initregmap() 103 struct wdc_regs wdr; in wdc_obio_match() local [all …]
|
/netbsd-src/sys/dev/pcmcia/ |
H A D | wdc_pcmcia.c | 210 struct wdc_regs *wdr; in wdc_pcmcia_attach() local 235 sc->sc_wdcdev.regs = wdr = &sc->wdc_regs; in wdc_pcmcia_attach() 238 wdr->cmd_iot = cfe->memspace[0].handle.memt; in wdc_pcmcia_attach() 239 wdr->cmd_baseioh = cfe->memspace[0].handle.memh; in wdc_pcmcia_attach() 241 wdr->ctl_iot = cfe->memspace[0].handle.memt; in wdc_pcmcia_attach() 245 &wdr->ctl_ioh)) in wdc_pcmcia_attach() 248 wdr->cmd_iot = cfe->iospace[0].handle.iot; in wdc_pcmcia_attach() 249 wdr->cmd_baseioh = cfe->iospace[0].handle.ioh; in wdc_pcmcia_attach() 252 wdr->ctl_iot = cfe->iospace[0].handle.iot; in wdc_pcmcia_attach() 256 &wdr->ctl_ioh)) in wdc_pcmcia_attach() [all …]
|
/netbsd-src/sys/arch/acorn32/eb7500atx/ |
H A D | rside.c | 167 struct wdc_regs *wdr; in rside_attach() local 196 wdr = &sc->sc_wdc_regs[channel]; in rside_attach() 200 wdr->cmd_iot = wdr->ctl_iot = &sc->sc_tag; in rside_attach() 201 if (bus_space_map(wdr->cmd_iot, in rside_attach() 203 DRIVE_REGISTERS_SPACE, 0, &wdr->cmd_baseioh)) in rside_attach() 210 if (bus_space_subregion(wdr->cmd_iot, wdr->cmd_baseioh, in rside_attach() 212 &wdr->cmd_iohs[i]) != 0) { in rside_attach() 213 bus_space_unmap(wdr->cmd_iot, wdr->cmd_baseioh, in rside_attach() 218 wdc_init_shadow_regs(wdr); in rside_attach() 220 if (bus_space_map(wdr->ctl_iot, in rside_attach() [all …]
|
/netbsd-src/sys/arch/prep/pnpbus/ |
H A D | wdc_pnpbus.c | 100 struct wdc_regs *wdr; in wdc_pnpbus_attach() local 105 sc->sc_wdcdev.regs = wdr = &sc->sc_wdc_regs; in wdc_pnpbus_attach() 107 wdr->cmd_iot = pna->pna_iot; in wdc_pnpbus_attach() 108 wdr->ctl_iot = pna->pna_iot; in wdc_pnpbus_attach() 112 if (pnpbus_io_map(&pna->pna_res, 0, &wdr->cmd_iot, &wdr->cmd_baseioh) || in wdc_pnpbus_attach() 113 pnpbus_io_map(&pna->pna_res, 1, &wdr->ctl_iot, &wdr->ctl_ioh)) { in wdc_pnpbus_attach() 118 if (bus_space_subregion(wdr->cmd_iot, in wdc_pnpbus_attach() 119 wdr->cmd_baseioh, i, i == 0 ? 4 : 1, in wdc_pnpbus_attach() 120 &wdr->cmd_iohs[i]) != 0) { in wdc_pnpbus_attach() 126 wdr->data32iot = wdr->cmd_iot; in wdc_pnpbus_attach() [all …]
|
/netbsd-src/sys/arch/evbarm/tsarm/ |
H A D | wdc_ts.c | 73 struct wdc_regs *wdr; in wdc_ts_attach() local 78 sc->sc_wdcdev.regs = wdr = &sc->wdc_regs; in wdc_ts_attach() 79 wdr->cmd_iot = ta->ta_iot; in wdc_ts_attach() 80 wdr->ctl_iot = ta->ta_iot; in wdc_ts_attach() 81 if (bus_space_map(wdr->cmd_iot, 0x11000000, 8, 0, &wdr->cmd_baseioh) || in wdc_ts_attach() 82 bus_space_map(wdr->ctl_iot, 0x10400006, 1, 0, &wdr->ctl_ioh)) { in wdc_ts_attach() 88 if (bus_space_subregion(wdr->cmd_iot, in wdc_ts_attach() 89 wdr->cmd_baseioh, i, 1, &wdr->cmd_iohs[i]) != 0) { in wdc_ts_attach() 96 if (bus_space_map(wdr->cmd_iot, 0x21000000, 2, 0, &wdr->cmd_iohs[0])) { in wdc_ts_attach() 112 wdc_init_shadow_regs(wdr); in wdc_ts_attach()
|
/netbsd-src/sys/arch/macppc/dev/ |
H A D | kauai.c | 110 struct wdc_regs *wdr; in kauai_attach() local 167 sc->sc_wdcdev.regs = wdr = &sc->sc_wdc_regs; in kauai_attach() 169 wdr->cmd_iot = wdr->ctl_iot = pa->pa_memt; in kauai_attach() 171 if (bus_space_map(wdr->cmd_iot, regbase, WDC_REG_NPORTS << 4, 0, in kauai_attach() 172 &wdr->cmd_baseioh) || in kauai_attach() 173 bus_space_subregion(wdr->cmd_iot, wdr->cmd_baseioh, in kauai_attach() 174 WDC_AUXREG_OFFSET << 4, 1, &wdr->ctl_ioh)) { in kauai_attach() 179 if (bus_space_subregion(wdr->cmd_iot, wdr->cmd_baseioh, i << 4, in kauai_attach() 180 i == 0 ? 4 : 1, &wdr->cmd_iohs[i]) != 0) { in kauai_attach() 181 bus_space_unmap(wdr->cmd_iot, wdr->cmd_baseioh, in kauai_attach() [all …]
|
/netbsd-src/sys/arch/amiga/dev/ |
H A D | wdc_amiga.c | 85 struct wdc_regs *wdr; in wdc_amiga_attach() local 91 sc->sc_wdcdev.regs = wdr = &sc->sc_wdc_regs; in wdc_amiga_attach() 104 wdr->cmd_iot = &sc->cmd_iot; in wdc_amiga_attach() 105 wdr->ctl_iot = &sc->ctl_iot; in wdc_amiga_attach() 107 if (bus_space_map(wdr->cmd_iot, 0, 0x40, 0, in wdc_amiga_attach() 108 &wdr->cmd_baseioh)) { in wdc_amiga_attach() 114 if (bus_space_subregion(wdr->cmd_iot, in wdc_amiga_attach() 115 wdr->cmd_baseioh, i, i == 0 ? 4 : 1, in wdc_amiga_attach() 116 &wdr->cmd_iohs[i]) != 0) { in wdc_amiga_attach() 118 bus_space_unmap(wdr->cmd_iot, in wdc_amiga_attach() [all …]
|
H A D | wdc_buddha.c | 122 struct wdc_regs *wdr; in wdc_buddha_attach() local 143 wdr = CHAN_TO_WDC_REGS(cp); in wdc_buddha_attach() 145 wdr->cmd_iot = &sc->sc_iot; in wdc_buddha_attach() 146 if (bus_space_map(wdr->cmd_iot, 0x210+ch*0x80, 8, 0, in wdc_buddha_attach() 147 &wdr->cmd_baseioh)) { in wdc_buddha_attach() 152 wdr->ctl_iot = &sc->sc_iot; in wdc_buddha_attach() 153 if (bus_space_map(wdr->ctl_iot, 0x250+ch*0x80, 2, 0, in wdc_buddha_attach() 154 &wdr->ctl_ioh)) { in wdc_buddha_attach() 155 bus_space_unmap(wdr->cmd_iot, wdr->cmd_baseioh, 8); in wdc_buddha_attach() 161 if (bus_space_subregion(wdr->cmd_iot, wdr->cmd_baseioh, in wdc_buddha_attach() [all …]
|
/netbsd-src/sys/arch/evbarm/iq31244/ |
H A D | wdc_obio.c | 76 struct wdc_regs *wdr; in wdc_obio_attach() local 81 sc->sc_wdcdev.regs = wdr = &sc->wdc_regs; in wdc_obio_attach() 82 wdr->cmd_iot = oba->oba_st; in wdc_obio_attach() 83 wdr->ctl_iot = oba->oba_st; in wdc_obio_attach() 84 if (bus_space_map(wdr->cmd_iot, oba->oba_addr, IQ31244_CFLASH_SIZE, in wdc_obio_attach() 85 0, &wdr->cmd_baseioh)) { in wdc_obio_attach() 91 if (bus_space_subregion(wdr->cmd_iot, wdr->cmd_baseioh, in wdc_obio_attach() 92 IQ31244_CFLASH_CMD_BASE + i, 1, &wdr->cmd_iohs[i]) != 0) { in wdc_obio_attach() 98 if (bus_space_subregion(wdr->ctl_iot, wdr->cmd_baseioh, in wdc_obio_attach() 99 IQ31244_CFLASH_CTL_BASE, 1, &wdr->ctl_ioh) != 0) { in wdc_obio_attach() [all …]
|
/netbsd-src/sys/arch/arm/gemini/ |
H A D | obio_wdc.c | 87 struct wdc_regs *wdr; in wdc_obio_attach() local 110 sc->sc_wdcdev.regs = wdr = &sc->wdc_regs; in wdc_obio_attach() 111 wdr->cmd_iot = obio->obio_iot; in wdc_obio_attach() 112 wdr->ctl_iot = obio->obio_iot; in wdc_obio_attach() 113 if (bus_space_map(wdr->cmd_iot, obio->obio_addr, GEMINI_MIDE_SIZE, in wdc_obio_attach() 114 0, &wdr->cmd_baseioh)) { in wdc_obio_attach() 120 if (bus_space_subregion(wdr->cmd_iot, wdr->cmd_baseioh, in wdc_obio_attach() 121 GEMINI_MIDE_CMDBLK + i, 1, &wdr->cmd_iohs[i]) != 0) { in wdc_obio_attach() 127 if (bus_space_subregion(wdr->ctl_iot, wdr->cmd_baseioh, in wdc_obio_attach() 128 GEMINI_MIDE_CTLBLK, 1, &wdr->ctl_ioh) != 0) { in wdc_obio_attach() [all …]
|
/netbsd-src/sys/dev/isapnp/ |
H A D | wdc_isapnp.c | 90 struct wdc_regs *wdr; in wdc_isapnp_attach() local 111 sc->sc_wdcdev.regs = wdr = &sc->wdc_regs; in wdc_isapnp_attach() 112 wdr->cmd_iot = ipa->ipa_iot; in wdc_isapnp_attach() 113 wdr->ctl_iot = ipa->ipa_iot; in wdc_isapnp_attach() 120 wdr->cmd_baseioh = ipa->ipa_io[0].h; in wdc_isapnp_attach() 121 wdr->ctl_ioh = ipa->ipa_io[1].h; in wdc_isapnp_attach() 123 wdr->cmd_baseioh = ipa->ipa_io[1].h; in wdc_isapnp_attach() 124 wdr->ctl_ioh = ipa->ipa_io[0].h; in wdc_isapnp_attach() 128 if (bus_space_subregion(wdr->cmd_iot, in wdc_isapnp_attach() 129 wdr->cmd_baseioh, i, i == 0 ? 4 : 1, in wdc_isapnp_attach() [all …]
|
/netbsd-src/sys/arch/acorn32/podulebus/ |
H A D | simide.c | 162 struct wdc_regs *wdr; in simide_attach() local 255 wdr = &sc->sc_wdc_regs[channel]; in simide_attach() 259 wdr->cmd_iot = wdr->ctl_iot = &sc->sc_tag; in simide_attach() 261 if (bus_space_map(wdr->cmd_iot, iobase + in simide_attach() 263 DRIVE_REGISTERS_SPACE, 0, &wdr->cmd_baseioh)) in simide_attach() 266 if (bus_space_subregion(wdr->cmd_iot, wdr->cmd_baseioh, in simide_attach() 267 i, i == 0 ? 4 : 1, &wdr->cmd_iohs[i]) != 0) { in simide_attach() 268 bus_space_unmap(wdr->cmd_iot, wdr->cmd_baseioh, in simide_attach() 273 wdc_init_shadow_regs(wdr); in simide_attach() 274 if (bus_space_map(wdr->ctl_iot, iobase + in simide_attach() [all …]
|