[PATCH] ARM: mx28: clock-mx28: Use a proper timeout mechanism
Fabio Estevam
festevam at gmail.com
Mon Jan 23 16:31:45 EST 2012
Hi Wolfram,
On Mon, Jan 23, 2012 at 7:18 PM, Wolfram Sang <w.sang at pengutronix.de> wrote:
> Is there a difference in the two versions you sent?
No, I sent the same patch twice by mistake.
>> +static int mxs_clkctrl_timeout(unsigned int reg_offset, unsigned int mask)
>> +{
>> + unsigned long timeout = jiffies + msecs_to_jiffies(CLKCTRL_TIMEOUT);
>> + while (readl_relaxed(CLKCTRL_BASE_ADDR + reg_offset) & mask) {
>
> Hmm, this is a lot better, yet not perfect. You could be scheduled away here
> for 10ms and then you had only checked at t=0. However, I think it makes more
> sense to introduce a generic timeout-loop somehow and then convert to it
> later. This is my homework, though...
Ok, will address your comments and keep the current
mxs_clkctrl_timeout version for v2.
Thanks for your review.
Regards,
Fabio Estevam
More information about the linux-arm-kernel
mailing list