Thread (75 messages) 75 messages, 8 authors, 2017-05-16

[PATCH 01/48] clk: at91: replace usleep() by udelay() calls

From: Alexandre Belloni <hidden>
Date: 2016-06-13 15:24:23
Also in: linux-clk, lkml

On 11/06/2016 at 00:30:36 +0200, Arnd Bergmann wrote :
On Saturday, June 11, 2016 12:03:04 AM CEST Alexandre Belloni wrote:
quoted
From: Cyrille Pitchen <redacted>

Fix the main and slow clock .prepare() implementations which used to call
usleep() when the scheduler wasn't ready yet.
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). 

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help