Lines Matching refs:ch

105     struct ata_channel *ch = device_get_softc(dev);
111 if (!(ATA_INL(ctlr->r_res2, 0x1f80) & (1 << ch->unit)))
119 ATA_IDX_INL(ch,ATA_STATUS);
176 struct ata_channel *ch = device_get_softc(dev);
180 ch_offset = ch->unit * 0x100;
183 ch->r_io[i].res = ctlr->r_res2;
186 ch->r_io[ATA_DATA].offset = ch_offset + 0x00;
187 ch->r_io[ATA_FEATURE].offset = ch_offset + 0x04;
188 ch->r_io[ATA_COUNT].offset = ch_offset + 0x08;
189 ch->r_io[ATA_SECTOR].offset = ch_offset + 0x0c;
190 ch->r_io[ATA_CYL_LSB].offset = ch_offset + 0x10;
191 ch->r_io[ATA_CYL_MSB].offset = ch_offset + 0x14;
192 ch->r_io[ATA_DRIVE].offset = ch_offset + 0x18;
193 ch->r_io[ATA_COMMAND].offset = ch_offset + 0x1c;
194 ch->r_io[ATA_CONTROL].offset = ch_offset + 0x20;
198 ch->r_io[ATA_BMCMD_PORT].offset = ch_offset + 0x30;
199 ch->r_io[ATA_BMSTAT_PORT].offset = ch_offset + 0x32;
200 ch->r_io[ATA_BMDTP_PORT].offset = ch_offset + 0x34;
203 ch->r_io[ATA_SSTATUS].offset = ch_offset + 0x40;
204 ch->r_io[ATA_SERROR].offset = ch_offset + 0x44;
205 ch->r_io[ATA_SCONTROL].offset = ch_offset + 0x48;
207 ch->flags |= ATA_NO_SLAVE | ATA_SATA | ATA_KNOWN_PRESENCE;
209 ch->hw.tf_read = ata_serverworks_tf_read;
210 ch->hw.tf_write = ata_serverworks_tf_write;
230 ch->flags |= ATA_DMA_BEFORE_CMD;
237 ch->hw.status = ata_serverworks_status;
238 ch->flags |= ATA_STATUS_IS_LONG;
242 ch->dma.max_iosize = 64 * DEV_BSIZE;
260 struct ata_channel *ch = device_get_softc(request->parent);
265 request->u.ata.count = ATA_IDX_INW(ch, ATA_COUNT);
266 temp = ATA_IDX_INW(ch, ATA_SECTOR);
269 temp = ATA_IDX_INW(ch, ATA_CYL_LSB);
272 temp = ATA_IDX_INW(ch, ATA_CYL_MSB);
277 request->u.ata.count = ATA_IDX_INW(ch, ATA_COUNT) & 0x00ff;
278 request->u.ata.lba = (ATA_IDX_INW(ch, ATA_SECTOR) & 0x00ff) |
279 ((ATA_IDX_INW(ch, ATA_CYL_LSB) & 0x00ff) << 8) |
280 ((ATA_IDX_INW(ch, ATA_CYL_MSB) & 0x00ff) << 16) |
281 ((ATA_IDX_INW(ch, ATA_DRIVE) & 0xf) << 24);
288 struct ata_channel *ch = device_get_softc(request->parent);
291 ATA_IDX_OUTW(ch, ATA_FEATURE, request->u.ata.feature);
292 ATA_IDX_OUTW(ch, ATA_COUNT, request->u.ata.count);
293 ATA_IDX_OUTW(ch, ATA_SECTOR, ((request->u.ata.lba >> 16) & 0xff00) |
295 ATA_IDX_OUTW(ch, ATA_CYL_LSB, ((request->u.ata.lba >> 24) & 0xff00) |
297 ATA_IDX_OUTW(ch, ATA_CYL_MSB, ((request->u.ata.lba >> 32) & 0xff00) |
299 ATA_IDX_OUTW(ch, ATA_DRIVE, ATA_D_LBA | ATA_DEV(request->unit));
302 ATA_IDX_OUTW(ch, ATA_FEATURE, request->u.ata.feature);
303 ATA_IDX_OUTW(ch, ATA_COUNT, request->u.ata.count);
304 ATA_IDX_OUTW(ch, ATA_SECTOR, request->u.ata.lba);
305 ATA_IDX_OUTW(ch, ATA_CYL_LSB, request->u.ata.lba >> 8);
306 ATA_IDX_OUTW(ch, ATA_CYL_MSB, request->u.ata.lba >> 16);
307 ATA_IDX_OUTW(ch, ATA_DRIVE,
318 struct ata_channel *ch = device_get_softc(dev);
319 int devno = (ch->unit << 1) + target;
375 struct ata_channel *ch = device_get_softc(dev);
380 ch->devices = 0;