kernels/linux-2.4.0/drivers/ide/qd6580.c
/*
 * compute_timing
 *
 * computes the timing value where
 *    lower nibble is active time,   in count of VLB clocks, 17-(from 2 to 17)
 *    upper nibble is recovery time, in count of VLB clocks, 15-(from 2 to 15)
 */
compute_timing
computes the timing value where
lower nibble is active time,   in count of VLB clocks, 17-(from 2 to 17)
upper nibble is recovery time, in count of VLB clocks, 15-(from 2 to 15)
compute_timing computes the timing value where lower nibble is active time in count of VLB clocks 17 - ( from 2 to 17 ) upper nibble is recovery time in count of VLB clocks 15 - ( from 2 to 15 )
static byte compute_timing ( char name[6], ide_hd_timings_t *t )
{
	byte active_cycle;
	byte recovery_cycle;
	byte parameter;
	active_cycle   = 17-IDE_IN(t->active_time   / bus_clock + 1, 2, 17);
	recovery_cycle = 15-IDE_IN(t->recovery_time / bus_clock + 1, 2, 15);
	parameter = active_cycle | (recovery_cycle<<4);
	printk("%s: tim1=%dns tim2=%dns => %#x\n", name, t[0].active_time, t[0].recovery_time, parameter);
	return(parameter);
}
static byte compute_timing ( char name [ 6 ] , ide_hd_timings_t * t ) { byte active_cycle ; byte recovery_cycle ; byte parameter ; active_cycle = 17 - IDE_IN ( t -> active_time / bus_clock + 1 , 2 , 17 ) ; recovery_cycle = 15 - IDE_IN ( t -> recovery_time / bus_clock + 1 , 2 , 15 ) ; parameter = active_cycle | ( recovery_cycle << 4 ) ; printk ( " \n " , name , t [ 0 ] . active_time , t [ 0 ] . recovery_time , parameter ) ; return ( parameter ) ; }
compute_timing
 computes the timing value where
    lower nibble is active time,   in count of VLB clocks, 17-(from 2 to 17)
    upper nibble is recovery time, in count of VLB clocks, 15-(from 2 to 15)
compute_timing computes the timing value where lower nibble is active time in count of VLB clocks 17 - ( from 2 to 17 ) upper nibble is recovery time in count of VLB clocks 15 - ( from 2 to 15 )