How about this:
http://lxr.free-electrons.com/source/arch/arm/mach-omap2/pm34xx.c?a=arm#L69
So in the case below:
while (davinci_rtcss_read(DAVINCI_PRTCSS_RTC_CCTRL) &
DAVINCI_PRTCSS_RTC_CCTRL_CALBUSY)
cpu_relax();
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
Miguel Aguilar
Sent: Tuesday, October 27, 2009 1:17 PM
To: Kevin Hilman
Cc: [email protected]; [email protected]
Subject: Re: [PATCH 1/2] RTC: DaVinci RTC driver
Kevin,
>> + return -EINVAL;
>> +
>> + spin_lock_irqsave(&davinci_rtc_lock, flags);
>> +
>> + while (davinci_rtcss_read(DAVINCI_PRTCSS_RTC_CCTRL) &
>> + DAVINCI_PRTCSS_RTC_CCTRL_CALBUSY);
>
> As reported by checkpatch, the empty body of the polling loop should
> be on the next line, this helps readability tremendously. Also, not
> sure how many loops are expected here but rather than a
> fast-as-possible poll, they should probably use cpu_relax().
>
> Lots more of these in the rest of the driver.
>
> Kevin
>
Can you show me an example how to handle this polling loops properly?.
Thanks,
Miguel Aguilar
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source