lkml.org 
[lkml]   [2013]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] mfd: omap-usb-host: Fix USB device detection problems on OMAP4 Panda
On 12/02/2013 06:28 PM, David Laight wrote:
>> From: Roger Quadros [mailto:rogerq@ti.com]
>> On 11/29/2013 03:17 PM, David Laight wrote:
> ...
>>>> + timeout = jiffies + msecs_to_jiffies(100);
>>>> + while (!(usbhs_read(omap->uhh_base, OMAP_UHH_SYSSTATUS)
>>>> + & OMAP_UHH_SYSSTATUS_RESETDONE)) {
>>>> + cpu_relax();
>>
>> You mean use msleep(1) here instead of cpu_relax()?
>> Shouldn't be a problem IMO, but can you please tell me why that is better
>> as the reset seems to complete usually in the first iteration.
>
> If it doesn't finish in the first iteration you don't want to
> spin the cpu for 100ms.
>
> If it hasn't finished in the first millisecond, you probably expect
> it to actually time out - so you might as well look (say) every 10ms.
>

Understood now. Thanks.

cheers,
-roger


\
 
 \ /
  Last update: 2013-12-03 11:01    [W:0.057 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site