Lines Matching refs:itdev
130 struct it821x_dev *itdev = ap->private_data; in it821x_program() local
135 if (itdev->clock_mode == ATA_66) in it821x_program()
157 struct it821x_dev *itdev = ap->private_data; in it821x_program_udma() local
164 if (itdev->clock_mode == ATA_66) in it821x_program_udma()
168 if (itdev->timing10 == 0) in it821x_program_udma()
189 struct it821x_dev *itdev = ap->private_data; in it821x_clock_strategy() local
198 if (itdev->want[0][0] > itdev->want[1][0]) { in it821x_clock_strategy()
199 clock = itdev->want[0][1]; in it821x_clock_strategy()
200 altclock = itdev->want[1][1]; in it821x_clock_strategy()
202 clock = itdev->want[1][1]; in it821x_clock_strategy()
203 altclock = itdev->want[0][1]; in it821x_clock_strategy()
214 if (clock == itdev->clock_mode) in it821x_clock_strategy()
219 itdev->clock_mode = ATA_66; in it821x_clock_strategy()
221 itdev->clock_mode = ATA_50; in it821x_clock_strategy()
233 if (pair && itdev->udma[1-unit] != UDMA_OFF) { in it821x_clock_strategy()
234 it821x_program_udma(ap, pair, itdev->udma[1-unit]); in it821x_clock_strategy()
235 it821x_program(ap, pair, itdev->pio[1-unit]); in it821x_clock_strategy()
241 if (itdev->udma[unit] != UDMA_OFF) { in it821x_clock_strategy()
242 it821x_program_udma(ap, adev, itdev->udma[unit]); in it821x_clock_strategy()
243 it821x_program(ap, adev, itdev->pio[unit]); in it821x_clock_strategy()
262 struct it821x_dev *itdev = ap->private_data; in it821x_passthru_set_piomode() local
267 itdev->want[unit][1] = pio_want[mode_wanted]; in it821x_passthru_set_piomode()
268 itdev->want[unit][0] = 1; /* PIO is lowest priority */ in it821x_passthru_set_piomode()
269 itdev->pio[unit] = pio[mode_wanted]; in it821x_passthru_set_piomode()
271 it821x_program(ap, adev, itdev->pio[unit]); in it821x_passthru_set_piomode()
294 struct it821x_dev *itdev = ap->private_data; in it821x_passthru_set_dmamode() local
302 itdev->want[unit][1] = udma_want[mode_wanted]; in it821x_passthru_set_dmamode()
303 itdev->want[unit][0] = 3; /* UDMA is high priority */ in it821x_passthru_set_dmamode()
304 itdev->mwdma[unit] = MWDMA_OFF; in it821x_passthru_set_dmamode()
305 itdev->udma[unit] = udma[mode_wanted]; in it821x_passthru_set_dmamode()
307 itdev->udma[unit] |= 0x8080; /* UDMA 5/6 select on */ in it821x_passthru_set_dmamode()
311 if (itdev->timing10) in it821x_passthru_set_dmamode()
317 it821x_program_udma(ap, adev, itdev->udma[unit]); in it821x_passthru_set_dmamode()
321 itdev->want[unit][1] = mwdma_want[mode_wanted]; in it821x_passthru_set_dmamode()
322 itdev->want[unit][0] = 2; /* MWDMA is low priority */ in it821x_passthru_set_dmamode()
323 itdev->mwdma[unit] = dma[mode_wanted]; in it821x_passthru_set_dmamode()
324 itdev->udma[unit] = UDMA_OFF; in it821x_passthru_set_dmamode()
328 if (itdev->timing10) in it821x_passthru_set_dmamode()
350 struct it821x_dev *itdev = ap->private_data; in it821x_passthru_bmdma_start() local
353 if (itdev->mwdma[unit] != MWDMA_OFF) in it821x_passthru_bmdma_start()
354 it821x_program(ap, adev, itdev->mwdma[unit]); in it821x_passthru_bmdma_start()
355 else if (itdev->udma[unit] != UDMA_OFF && itdev->timing10) in it821x_passthru_bmdma_start()
356 it821x_program_udma(ap, adev, itdev->udma[unit]); in it821x_passthru_bmdma_start()
373 struct it821x_dev *itdev = ap->private_data; in it821x_passthru_bmdma_stop() local
377 if (itdev->mwdma[unit] != MWDMA_OFF) in it821x_passthru_bmdma_stop()
378 it821x_program(ap, adev, itdev->pio[unit]); in it821x_passthru_bmdma_stop()
393 struct it821x_dev *itdev = ap->private_data; in it821x_passthru_dev_select() local
394 if (itdev && device != itdev->last_device) { in it821x_passthru_dev_select()
396 it821x_program(ap, adev, itdev->pio[adev->devno]); in it821x_passthru_dev_select()
397 itdev->last_device = device; in it821x_passthru_dev_select()
579 struct it821x_dev *itdev = ap->private_data; in it821x_check_atapi_dma() local
586 if (itdev->smart) in it821x_check_atapi_dma()
589 if (itdev->timing10) in it821x_check_atapi_dma()
739 struct it821x_dev *itdev; in it821x_port_start() local
746 itdev = devm_kzalloc(&pdev->dev, sizeof(struct it821x_dev), GFP_KERNEL); in it821x_port_start()
747 if (itdev == NULL) in it821x_port_start()
749 ap->private_data = itdev; in it821x_port_start()
754 itdev->smart = 1; in it821x_port_start()
763 itdev->clock_mode = ATA_50; in it821x_port_start()
765 itdev->clock_mode = ATA_66; in it821x_port_start()
767 itdev->want[0][1] = ATA_ANY; in it821x_port_start()
768 itdev->want[1][1] = ATA_ANY; in it821x_port_start()
769 itdev->last_device = -1; in it821x_port_start()
772 itdev->timing10 = 1; in it821x_port_start()
774 if (!itdev->smart) in it821x_port_start()