[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <529DA7B6.4020402@ti.com>
Date: Tue, 3 Dec 2013 11:43:18 +0200
From: Roger Quadros <rogerq@...com>
To: David Laight <David.Laight@...LAB.COM>, <lee.jones@...aro.org>,
<sameo@...ux.intel.com>
CC: <tomi.valkeinen@...com>, <balbi@...com>, <sr@...x.de>,
<ljkenny.mailinglists@...il.com>, <linux-omap@...r.kernel.org>,
<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [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@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists