/* set DMA mode a specific channel for CY82C693  */
static void cy82c693_set_dma_mode(ide_drive_t *drive, const u8 mode)
/* set DMA mode a specific channel for CY82C693  */
static void cy82c693_set_dma_mode(ide_drive_t *drive, const u8 mode)
{
	ide_hwif_t *hwif = drive->hwif;
	u8 single = (mode & 0x10) >> 4, index = 0, data = 0;
	index = hwif->channel ? CY82_INDEX_CHANNEL1 : CY82_INDEX_CHANNEL0;
	data = (mode & 3) | (single << 2);
	outb(index, CY82_INDEX_PORT);
	outb(data, CY82_DATA_PORT);
	data = BUSMASTER_TIMEOUT;
	outb(CY82_INDEX_TIMEOUT, CY82_INDEX_PORT);
	outb(data, CY82_DATA_PORT);
}