/* This routine is invoked to prepare for access to a given drive.  */
static void qd65xx_dev_select(ide_drive_t *drive)
/* This routine is invoked to prepare for access to a given drive.  */
static void qd65xx_dev_select(ide_drive_t *drive)
{
	u8 index = ((	(QD_TIMREG(drive)) & 0x80 ) >> 7) |
			(QD_TIMREG(drive) & 0x02);
	if (timings[index] != QD_TIMING(drive))
		outb(timings[index] = QD_TIMING(drive), QD_TIMREG(drive));
	outb(drive->select | ATA_DEVICE_OBS, drive->hwif->io_ports.device_addr);
}