/* Tune the ITE chipset for the desired DMA mode.  */
static void it821x_set_dma_mode(ide_drive_t *drive, const u8 speed)
/* Tune the ITE chipset for the desired DMA mode.  */
static void it821x_set_dma_mode(ide_drive_t *drive, const u8 speed)
{
	if (speed >= XFER_UDMA_0 && speed <= XFER_UDMA_6)
		it821x_tune_udma(drive, speed - XFER_UDMA_0);
	else if (speed >= XFER_MW_DMA_0 && speed <= XFER_MW_DMA_2)
		it821x_tune_mwdma(drive, speed - XFER_MW_DMA_0);
}