[PATCH 1/5] [POWERPC] sysdev: implement FSL GTM support

Anton Vorontsov cbouatmailru at gmail.com
Fri Apr 18 19:54:59 EST 2008


On Thu, Apr 17, 2008 at 11:19:39PM -0500, Kumar Gala wrote:
[...]
>>> + * interval value, and fires the interrupt when the value is  
>>> reached. This
>>> + * function will reduce the precision of the timer as needed in  
>>> order for the
>>> + * requested timeout to fit in a 16-bit register.
>>> + */
>>> +int gtm_reset_timer16(struct gtm_timer *tmr, unsigned long usec,  
>>> bool reload)
>>> +{
>>> +	/* quite obvious, frequency which is enough for µSec precision */
>>> +	int freq = 1000000;
>>> +	unsigned int bit;
>>> +
>>> +	bit = fls_long(usec);
>>> +	if (bit > 15) {
>>> +		freq >>= bit - 15;
>>> +		usec >>= bit - 15;
>>> +	}
>>
>> if (!freq)
>> 	return -EINVAL;
>
> do you want me to fix this up on commit or are you going to respin the  
> patch set based on feedback?

I would better respin the whole thing. Will do this today.

Thanks,

-- 
Anton Vorontsov
email: cbouatmailru at gmail.com
irc://irc.freenode.net/bd2



More information about the Linuxppc-dev mailing list