Lines Matching refs:index

163  * Registers and masks for easy access by drive index:
400 static void __init check_prefetch(ide_drive_t *drive, unsigned int index)
402 u8 b = get_cmd640_reg(prefetch_regs[index]);
404 __set_prefetch_mode(drive, (b & prefetch_masks[index]) ? 0 : 1);
411 static void set_prefetch_mode(ide_drive_t *drive, unsigned int index, int mode)
414 int reg = prefetch_regs[index];
421 b &= ~prefetch_masks[index]; /* enable prefetch */
423 b |= prefetch_masks[index]; /* disable prefetch */
431 static void display_clocks(unsigned int index)
435 active_count = active_counts[index];
438 recovery_count = recovery_counts[index];
443 printk(", clocks=%d/%d/%d\n", setup_counts[index], active_count, recovery_count);
459 static void program_drive_counts(ide_drive_t *drive, unsigned int index)
462 u8 setup_count = setup_counts[index];
463 u8 active_count = active_counts[index];
464 u8 recovery_count = recovery_counts[index];
472 if (index > 1) {
474 unsigned int mate = index ^ 1;
506 setup_count |= __get_cmd640_reg(arttim_regs[index]) & 0x3f;
507 __put_cmd640_reg(arttim_regs[index], setup_count);
508 __put_cmd640_reg(drwtim_regs[index], pack_nibbles(active_count, recovery_count));
515 static void cmd640_set_mode(ide_drive_t *drive, unsigned int index,
562 setup_counts[index] = setup_count;
563 active_counts[index] = active_count;
564 recovery_counts[index] = recovery_count;
574 program_drive_counts(drive, index);
579 unsigned int index = 0, cycle_time;
595 set_prefetch_mode(drive, index, pio & 1);
602 cmd640_set_mode(drive, index, pio, cycle_time);
607 display_clocks(index);