• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/drivers/ide/

Lines Matching refs:drive

58  *  Version 0.07	Changed to more conservative drive tuning policy.
161 * Registers and masks for easy access by drive index:
172 * Current cmd640 timing values for each drive.
336 * Returns 1 if an IDE interface/drive exists at 0x170,
378 static void __set_prefetch_mode(ide_drive_t *drive, int mode)
382 drive->dev_flags |= IDE_DFLAG_NO_UNMASK;
383 drive->dev_flags &= ~IDE_DFLAG_UNMASK;
385 drive->dev_flags &= ~IDE_DFLAG_NO_IO_32BIT;
387 drive->dev_flags &= ~IDE_DFLAG_NO_UNMASK;
388 drive->dev_flags |= IDE_DFLAG_NO_IO_32BIT;
389 drive->io_32bit = 0;
395 * Check whether prefetch is on for a drive,
398 static void __init check_prefetch(ide_drive_t *drive, unsigned int index)
402 __set_prefetch_mode(drive, (b & prefetch_masks[index]) ? 0 : 1);
407 * Sets prefetch mode for a drive.
409 static void set_prefetch_mode(ide_drive_t *drive, unsigned int index, int mode)
417 __set_prefetch_mode(drive, mode);
427 * Dump out current drive clocks settings
455 * for a drive into the cmd640 chipset registers to active them.
457 static void program_drive_counts(ide_drive_t *drive, unsigned int index)
465 * Set up address setup count and drive read/write timing registers.
467 * each drive. Secondary interface has one common set of registers,
471 ide_drive_t *peer = ide_get_pair_dev(drive);
511 * Set a specific pio_mode for a drive
513 static void cmd640_set_mode(ide_drive_t *drive, unsigned int index,
565 * In a perfect world, we might set the drive pio mode here
572 program_drive_counts(drive, index);
575 static void cmd640_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
578 const u8 pio = drive->pio_mode - XFER_PIO_0;
589 drive->name, (pio & 1) ? "en" : "dis");
593 set_prefetch_mode(drive, index, pio & 1);
595 drive->name, (pio & 1) ? "en" : "dis");
599 cycle_time = ide_pio_cycle_time(drive, pio);
600 cmd640_set_mode(drive, index, pio, cycle_time);
603 drive->name, pio, cycle_time);
609 static void __init cmd640_init_dev(ide_drive_t *drive)
611 unsigned int i = drive->hwif->channel * 2 + (drive->dn & 1);
616 * This way, the drive identify code has a better chance.
621 program_drive_counts(drive, i);
622 set_prefetch_mode(drive, i, 0);
623 printk(KERN_INFO DRV_NAME ": drive%d timings/prefetch cleared\n", i);
626 * Set the drive unmask flags to match the prefetch setting.
628 check_prefetch(drive, i);
629 printk(KERN_INFO DRV_NAME ": drive%d timings/prefetch(%s) preserved\n",
630 i, (drive->dev_flags & IDE_DFLAG_NO_IO_32BIT) ? "off" : "on");
791 * for access to the drive's command register block,