[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160614160517.GA2490@afzalpc>
Date: Tue, 14 Jun 2016 21:35:17 +0530
From: Afzal Mohammed <afzal.mohd.ma@...il.com>
To: Alexandre Belloni <alexandre.belloni@...e-electrons.com>
Cc: Arnd Bergmann <arnd@...db.de>,
Boris Brezillon <boris.brezillon@...e-electrons.com>,
Stephen Boyd <sboyd@...eaurora.org>,
Nicolas Ferre <nicolas.ferre@...el.com>,
linux-kernel@...r.kernel.org,
Cyrille Pitchen <cyrille.pitchen@...el.com>,
Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
linux-clk@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 01/48] clk: at91: replace usleep() by udelay() calls
Hi,
On Mon, Jun 13, 2016 at 05:24:09PM +0200, Alexandre Belloni wrote:
> On 11/06/2016 at 00:30:36 +0200, Arnd Bergmann wrote :
> > Does this have to be called that early? It seems wasteful to always
> > call udelay() here, when these are functions that are normally
> > allowed to sleep.
> So I've tested it and something like that would work:
>
> if (system_state < SYSTEM_RUNNING)
> udelay(osc->startup_usec);
> else
> usleep_range(osc->startup_usec, osc->startup_usec + 1);
>
> But I'm afraid it would be the first driver to actually do something
> like that (however, it is already the only driver trying to sleep).
tglx has suggested to modify clock core to handle a somewhat similar
kind of scenario (probably should work here too) and avoid driver
changes,
http://lkml.kernel.org/r/alpine.DEB.2.11.1606061448010.28031@nanos
Regards
afzal
Powered by blists - more mailing lists