Lines Matching refs:drive

59  *  Version 0.07	Changed to more conservative drive tuning policy.
163 * Registers and masks for easy access by drive index:
174 * Current cmd640 timing values for each drive.
338 * Returns 1 if an IDE interface/drive exists at 0x170,
380 static void __set_prefetch_mode(ide_drive_t *drive, int mode)
384 drive->dev_flags |= IDE_DFLAG_NO_UNMASK;
385 drive->dev_flags &= ~IDE_DFLAG_UNMASK;
387 drive->dev_flags &= ~IDE_DFLAG_NO_IO_32BIT;
389 drive->dev_flags &= ~IDE_DFLAG_NO_UNMASK;
390 drive->dev_flags |= IDE_DFLAG_NO_IO_32BIT;
391 drive->io_32bit = 0;
397 * Check whether prefetch is on for a drive,
400 static void __init check_prefetch(ide_drive_t *drive, unsigned int index)
404 __set_prefetch_mode(drive, (b & prefetch_masks[index]) ? 0 : 1);
409 * Sets prefetch mode for a drive.
411 static void set_prefetch_mode(ide_drive_t *drive, unsigned int index, int mode)
419 __set_prefetch_mode(drive, mode);
429 * Dump out current drive clocks settings
457 * for a drive into the cmd640 chipset registers to active them.
459 static void program_drive_counts(ide_drive_t *drive, unsigned int index)
467 * Set up address setup count and drive read/write timing registers.
469 * each drive. Secondary interface has one common set of registers,
473 ide_drive_t *peer = ide_get_pair_dev(drive);
513 * Set a specific pio_mode for a drive
515 static void cmd640_set_mode(ide_drive_t *drive, unsigned int index,
567 * In a perfect world, we might set the drive pio mode here
574 program_drive_counts(drive, index);
577 static void cmd640_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
580 const u8 pio = drive->pio_mode - XFER_PIO_0;
591 drive->name, (pio & 1) ? "en" : "dis");
595 set_prefetch_mode(drive, index, pio & 1);
597 drive->name, (pio & 1) ? "en" : "dis");
601 cycle_time = ide_pio_cycle_time(drive, pio);
602 cmd640_set_mode(drive, index, pio, cycle_time);
605 drive->name, pio, cycle_time);
611 static void __init cmd640_init_dev(ide_drive_t *drive)
613 unsigned int i = drive->hwif->channel * 2 + (drive->dn & 1);
618 * This way, the drive identify code has a better chance.
623 program_drive_counts(drive, i);
624 set_prefetch_mode(drive, i, 0);
625 printk(KERN_INFO DRV_NAME ": drive%d timings/prefetch cleared\n", i);
628 * Set the drive unmask flags to match the prefetch setting.
630 check_prefetch(drive, i);
631 printk(KERN_INFO DRV_NAME ": drive%d timings/prefetch(%s) preserved\n",
632 i, (drive->dev_flags & IDE_DFLAG_NO_IO_32BIT) ? "off" : "on");
793 * for access to the drive's command register block,