/* Configure for PIO mode. This is complicated as the register is shared by PIO and MWDMA and for both channels.  */
static void it821x_passthru_set_piomode(struct ata_port *ap, struct ata_device *adev)
/* Configure for PIO mode. This is complicated as the register is shared by PIO and MWDMA and for both channels.  */
static void it821x_passthru_set_piomode(struct ata_port *ap, struct ata_device *adev)
{
	static const u16 pio[]	= { 0xAA88, 0xA382, 0xA181, 0x3332, 0x3121 };
	static const u8 pio_want[]    = { ATA_66, ATA_66, ATA_66, ATA_66, ATA_ANY };
	struct it821x_dev *itdev = ap->private_data;
	int unit = adev->devno;
	int mode_wanted = adev->pio_mode - XFER_PIO_0;
	itdev->want[unit][1] = pio_want[mode_wanted];
	itdev->want[unit][0] = 1;
	itdev->pio[unit] = pio[mode_wanted];
	it821x_clock_strategy(ap, adev);
	it821x_program(ap, adev, itdev->pio[unit]);
}