Lines Matching refs:itdev
129 struct it821x_dev *itdev = ap->private_data; in it821x_program() local
134 if (itdev->clock_mode == ATA_66) in it821x_program()
156 struct it821x_dev *itdev = ap->private_data; in it821x_program_udma() local
163 if (itdev->clock_mode == ATA_66) in it821x_program_udma()
167 if (itdev->timing10 == 0) in it821x_program_udma()
188 struct it821x_dev *itdev = ap->private_data; in it821x_clock_strategy() local
197 if (itdev->want[0][0] > itdev->want[1][0]) { in it821x_clock_strategy()
198 clock = itdev->want[0][1]; in it821x_clock_strategy()
199 altclock = itdev->want[1][1]; in it821x_clock_strategy()
201 clock = itdev->want[1][1]; in it821x_clock_strategy()
202 altclock = itdev->want[0][1]; in it821x_clock_strategy()
213 if (clock == itdev->clock_mode) in it821x_clock_strategy()
218 itdev->clock_mode = ATA_66; in it821x_clock_strategy()
220 itdev->clock_mode = ATA_50; in it821x_clock_strategy()
232 if (pair && itdev->udma[1-unit] != UDMA_OFF) { in it821x_clock_strategy()
233 it821x_program_udma(ap, pair, itdev->udma[1-unit]); in it821x_clock_strategy()
234 it821x_program(ap, pair, itdev->pio[1-unit]); in it821x_clock_strategy()
240 if (itdev->udma[unit] != UDMA_OFF) { in it821x_clock_strategy()
241 it821x_program_udma(ap, adev, itdev->udma[unit]); in it821x_clock_strategy()
242 it821x_program(ap, adev, itdev->pio[unit]); in it821x_clock_strategy()
261 struct it821x_dev *itdev = ap->private_data; in it821x_passthru_set_piomode() local
266 itdev->want[unit][1] = pio_want[mode_wanted]; in it821x_passthru_set_piomode()
267 itdev->want[unit][0] = 1; /* PIO is lowest priority */ in it821x_passthru_set_piomode()
268 itdev->pio[unit] = pio[mode_wanted]; in it821x_passthru_set_piomode()
270 it821x_program(ap, adev, itdev->pio[unit]); in it821x_passthru_set_piomode()
293 struct it821x_dev *itdev = ap->private_data; in it821x_passthru_set_dmamode() local
301 itdev->want[unit][1] = udma_want[mode_wanted]; in it821x_passthru_set_dmamode()
302 itdev->want[unit][0] = 3; /* UDMA is high priority */ in it821x_passthru_set_dmamode()
303 itdev->mwdma[unit] = MWDMA_OFF; in it821x_passthru_set_dmamode()
304 itdev->udma[unit] = udma[mode_wanted]; in it821x_passthru_set_dmamode()
306 itdev->udma[unit] |= 0x8080; /* UDMA 5/6 select on */ in it821x_passthru_set_dmamode()
310 if (itdev->timing10) in it821x_passthru_set_dmamode()
316 it821x_program_udma(ap, adev, itdev->udma[unit]); in it821x_passthru_set_dmamode()
320 itdev->want[unit][1] = mwdma_want[mode_wanted]; in it821x_passthru_set_dmamode()
321 itdev->want[unit][0] = 2; /* MWDMA is low priority */ in it821x_passthru_set_dmamode()
322 itdev->mwdma[unit] = dma[mode_wanted]; in it821x_passthru_set_dmamode()
323 itdev->udma[unit] = UDMA_OFF; in it821x_passthru_set_dmamode()
327 if (itdev->timing10) in it821x_passthru_set_dmamode()
349 struct it821x_dev *itdev = ap->private_data; in it821x_passthru_bmdma_start() local
352 if (itdev->mwdma[unit] != MWDMA_OFF) in it821x_passthru_bmdma_start()
353 it821x_program(ap, adev, itdev->mwdma[unit]); in it821x_passthru_bmdma_start()
354 else if (itdev->udma[unit] != UDMA_OFF && itdev->timing10) in it821x_passthru_bmdma_start()
355 it821x_program_udma(ap, adev, itdev->udma[unit]); in it821x_passthru_bmdma_start()
372 struct it821x_dev *itdev = ap->private_data; in it821x_passthru_bmdma_stop() local
376 if (itdev->mwdma[unit] != MWDMA_OFF) in it821x_passthru_bmdma_stop()
377 it821x_program(ap, adev, itdev->pio[unit]); in it821x_passthru_bmdma_stop()
392 struct it821x_dev *itdev = ap->private_data; in it821x_passthru_dev_select() local
393 if (itdev && device != itdev->last_device) { in it821x_passthru_dev_select()
395 it821x_program(ap, adev, itdev->pio[adev->devno]); in it821x_passthru_dev_select()
396 itdev->last_device = device; in it821x_passthru_dev_select()
578 struct it821x_dev *itdev = ap->private_data; in it821x_check_atapi_dma() local
585 if (itdev->smart) in it821x_check_atapi_dma()
588 if (itdev->timing10) in it821x_check_atapi_dma()
738 struct it821x_dev *itdev; in it821x_port_start() local
745 itdev = devm_kzalloc(&pdev->dev, sizeof(struct it821x_dev), GFP_KERNEL); in it821x_port_start()
746 if (itdev == NULL) in it821x_port_start()
748 ap->private_data = itdev; in it821x_port_start()
753 itdev->smart = 1; in it821x_port_start()
762 itdev->clock_mode = ATA_50; in it821x_port_start()
764 itdev->clock_mode = ATA_66; in it821x_port_start()
766 itdev->want[0][1] = ATA_ANY; in it821x_port_start()
767 itdev->want[1][1] = ATA_ANY; in it821x_port_start()
768 itdev->last_device = -1; in it821x_port_start()
771 itdev->timing10 = 1; in it821x_port_start()
773 if (!itdev->smart) in it821x_port_start()