• Home
  • Raw
  • Download

Lines Matching refs:drive

92 static void qd65xx_dev_select(ide_drive_t *drive)  in qd65xx_dev_select()  argument
94 u8 index = (( (QD_TIMREG(drive)) & 0x80 ) >> 7) | in qd65xx_dev_select()
95 (QD_TIMREG(drive) & 0x02); in qd65xx_dev_select()
97 if (timings[index] != QD_TIMING(drive)) in qd65xx_dev_select()
98 outb(timings[index] = QD_TIMING(drive), QD_TIMREG(drive)); in qd65xx_dev_select()
100 outb(drive->select | ATA_DEVICE_OBS, drive->hwif->io_ports.device_addr); in qd65xx_dev_select()
150 static int qd_find_disk_type (ide_drive_t *drive, in qd_find_disk_type() argument
154 char *m = (char *)&drive->id[ATA_ID_PROD]; in qd_find_disk_type()
165 printk(KERN_DEBUG "%s: listed !\n", drive->name); in qd_find_disk_type()
180 static void qd_set_timing (ide_drive_t *drive, u8 timing) in qd_set_timing() argument
182 unsigned long data = (unsigned long)ide_get_drivedata(drive); in qd_set_timing()
186 ide_set_drivedata(drive, (void *)data); in qd_set_timing()
188 printk(KERN_DEBUG "%s: %#x\n", drive->name, timing); in qd_set_timing()
191 static void qd6500_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) in qd6500_set_pio_mode() argument
193 u16 *id = drive->id; in qd6500_set_pio_mode()
198 if (!qd_find_disk_type(drive, &active_time, &recovery_time) && in qd6500_set_pio_mode()
201 printk(KERN_INFO "%s: PIO mode%d\n", drive->name, in qd6500_set_pio_mode()
204 recovery_time = drive->id[ATA_ID_EIDE_PIO] - 120; in qd6500_set_pio_mode()
207 qd_set_timing(drive, qd6500_compute_timing(drive->hwif, in qd6500_set_pio_mode()
211 static void qd6580_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) in qd6580_set_pio_mode() argument
213 const u8 pio = drive->pio_mode - XFER_PIO_0; in qd6580_set_pio_mode()
220 if (drive->id && !qd_find_disk_type(drive, &active_time, &recovery_time)) { in qd6580_set_pio_mode()
221 cycle_time = ide_pio_cycle_time(drive, pio); in qd6580_set_pio_mode()
230 printk(KERN_WARNING "%s: Strange recovery time !\n",drive->name); in qd6580_set_pio_mode()
237 printk(KERN_WARNING "%s: Strange recovery time !\n",drive->name); in qd6580_set_pio_mode()
248 printk(KERN_INFO "%s: PIO mode%d\n", drive->name,pio); in qd6580_set_pio_mode()
251 if (!hwif->channel && drive->media != ide_disk) { in qd6580_set_pio_mode()
255 drive->name, hwif->name); in qd6580_set_pio_mode()
258 qd_set_timing(drive, qd6580_compute_timing(active_time, recovery_time)); in qd6580_set_pio_mode()
289 static void __init qd6500_init_dev(ide_drive_t *drive) in qd6500_init_dev() argument
291 ide_hwif_t *hwif = drive->hwif; in qd6500_init_dev()
295 ide_set_drivedata(drive, (void *)QD6500_DEF_DATA); in qd6500_init_dev()
298 static void __init qd6580_init_dev(ide_drive_t *drive) in qd6580_init_dev() argument
300 ide_hwif_t *hwif = drive->hwif; in qd6580_init_dev()
311 ide_set_drivedata(drive, (void *)((drive->dn & 1) ? t2 : t1)); in qd6580_init_dev()