Lines Matching refs:ch

179     struct ata_channel *ch = device_get_softc(dev);
186 ch->hw.status = ata_cmd_status;
188 ch->flags |= ATA_NO_ATAPI_DMA;
196 struct ata_channel *ch = device_get_softc(dev);
200 (ch->unit ? 0x08 : 0x04))) {
202 reg71 & ~(ch->unit ? 0x04 : 0x08), 1);
213 struct ata_channel *ch = device_get_softc(dev);
214 int devno = (ch->unit << 1) + target;
216 int ureg = ch->unit ? 0x7b : 0x73;
246 struct ata_channel *ch = device_get_softc(dev);
247 int unit01 = (ch->unit & 1), unit10 = (ch->unit & 2);
251 ch->r_io[i].res = ctlr->r_res2;
252 ch->r_io[i].offset = 0x80 + i + (unit01 << 6) + (unit10 << 8);
254 ch->r_io[ATA_CONTROL].res = ctlr->r_res2;
255 ch->r_io[ATA_CONTROL].offset = 0x8a + (unit01 << 6) + (unit10 << 8);
256 ch->r_io[ATA_IDX_ADDR].res = ctlr->r_res2;
259 ch->r_io[ATA_BMCMD_PORT].res = ctlr->r_res2;
260 ch->r_io[ATA_BMCMD_PORT].offset = 0x00 + (unit01 << 3) + (unit10 << 8);
261 ch->r_io[ATA_BMSTAT_PORT].res = ctlr->r_res2;
262 ch->r_io[ATA_BMSTAT_PORT].offset = 0x02 + (unit01 << 3) + (unit10 << 8);
263 ch->r_io[ATA_BMDTP_PORT].res = ctlr->r_res2;
264 ch->r_io[ATA_BMDTP_PORT].offset = 0x04 + (unit01 << 3) + (unit10 << 8);
267 ch->r_io[ATA_SSTATUS].res = ctlr->r_res2;
268 ch->r_io[ATA_SSTATUS].offset = 0x104 + (unit01 << 7) + (unit10 << 8);
269 ch->r_io[ATA_SERROR].res = ctlr->r_res2;
270 ch->r_io[ATA_SERROR].offset = 0x108 + (unit01 << 7) + (unit10 << 8);
271 ch->r_io[ATA_SCONTROL].res = ctlr->r_res2;
272 ch->r_io[ATA_SCONTROL].offset = 0x100 + (unit01 << 7) + (unit10 << 8);
273 ch->flags |= ATA_NO_SLAVE;
274 ch->flags |= ATA_SATA;
275 ch->flags |= ATA_KNOWN_PRESENCE;
283 ch->dma.boundary = 8192;
284 ch->dma.segsize = 15 * DEV_BSIZE;
288 ch->hw.status = ata_sii_status;
290 ch->flags |= ATA_CHECKS_CABLE;
309 struct ata_channel *ch = device_get_softc(dev);
310 int offset0 = ((ch->unit & 1) << 3) + ((ch->unit & 2) << 8);
311 int offset1 = ((ch->unit & 1) << 6) + ((ch->unit & 2) << 8);
328 struct ata_channel *ch = device_get_softc(dev);
329 int offset = ((ch->unit & 1) << 7) + ((ch->unit & 2) << 8);
340 ch->devices = 0;
348 struct ata_channel *ch = device_get_softc(dev);
349 int rego = (ch->unit << 4) + (target << 1);
350 int mreg = ch->unit ? 0x84 : 0x80;
368 (ch->unit ? 0x02 : 0x01))) {