Lines Matching refs:ch

211     struct ata_channel *ch = device_get_softc(dev);
220 rid = PCIR_BAR(ch->unit);
227 ch->r_io[i].res = r_io;
228 ch->r_io[i].offset = i;
230 ch->r_io[ATA_CONTROL].res = r_io;
231 ch->r_io[ATA_CONTROL].offset = 2 + ATA_IOSIZE;
232 ch->r_io[ATA_IDX_ADDR].res = r_io;
235 ch->r_io[i].res = ctlr->r_res1;
236 ch->r_io[i].offset = (i - ATA_BMCMD_PORT)+(ch->unit * ATA_BMIOSIZE);
239 if (ch->unit >= 2)
248 ch->r_io[ATA_SSTATUS].res = ctlr->r_res2;
249 ch->r_io[ATA_SSTATUS].offset = (ch->unit << ctlr->chip->cfg1);
250 ch->r_io[ATA_SERROR].res = ctlr->r_res2;
251 ch->r_io[ATA_SERROR].offset = 0x04 + (ch->unit << ctlr->chip->cfg1);
252 ch->r_io[ATA_SCONTROL].res = ctlr->r_res2;
253 ch->r_io[ATA_SCONTROL].offset = 0x08 + (ch->unit << ctlr->chip->cfg1);
254 ch->hw.status = ata_via_status;
255 ch->flags |= ATA_NO_SLAVE;
256 ch->flags |= ATA_SATA;
257 ch->flags |= ATA_PERIODIC_POLL;
259 ata_sata_scr_write(ch, -1, ATA_SERROR, 0xffffffff);
268 struct ata_channel *ch = device_get_softc(dev);
274 rid = PCIR_BAR(ch->unit);
276 SYS_RES_IOPORT, rid, ch->r_io[ATA_CONTROL].res);
293 struct ata_channel *ch = device_get_softc(dev);
295 if ((ctlr->chip->cfg2 & VIABAR) && (ch->unit > 1))
301 ch->devices = 0;
318 struct ata_channel *ch = device_get_softc(dev);
320 if ((ctlr->chip->cfg2 & VIABAR) && (ch->unit > 1)) {
347 struct ata_channel *ch = device_get_softc(dev);
348 int devno = (ch->unit << 1) + target;
405 struct ata_channel *ch = device_get_softc(dev);
409 if (ch->unit == 0) {
410 ch->hw.status = ata_via_sata_status;
411 ch->hw.pm_read = ata_via_sata_scr_read;
412 ch->hw.pm_write = ata_via_sata_scr_write;
413 ch->flags |= ATA_PERIODIC_POLL;
414 ch->flags |= ATA_SATA;
415 ata_sata_scr_write(ch, 0, ATA_SERROR, 0xffffffff);
416 ata_sata_scr_write(ch, 1, ATA_SERROR, 0xffffffff);
425 struct ata_channel *ch = device_get_softc(dev);
427 if (ch->unit == 0) {
439 struct ata_channel *ch = device_get_softc(dev);
441 if (ch->unit == 0)
449 struct ata_channel *ch = device_get_softc(dev);
452 if (ch->unit == 0) {
461 ch->devices = 0;