public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
From: Afzal Mohammed <afzal.mohd.ma@gmail.com>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	linux-kernel@vger.kernel.org,
	Cyrille Pitchen <cyrille.pitchen@atmel.com>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 01/48] clk: at91: replace usleep() by udelay() calls
Date: Tue, 14 Jun 2016 21:35:17 +0530	[thread overview]
Message-ID: <20160614160517.GA2490@afzalpc> (raw)
In-Reply-To: <20160613152409.GD3240@piout.net>

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

  parent reply	other threads:[~2016-06-14 16:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-10 22:03 [PATCH 00/48] ARM: at91: rework Atmel TCB drivers Alexandre Belloni
2016-06-10 22:03 ` [PATCH 01/48] clk: at91: replace usleep() by udelay() calls Alexandre Belloni
2016-06-10 22:30   ` Arnd Bergmann
2016-06-10 22:37     ` Alexandre Belloni
2016-06-13 15:24     ` Alexandre Belloni
2016-06-13 19:26       ` Arnd Bergmann
2016-06-14 16:05       ` Afzal Mohammed [this message]
2016-06-14 16:18         ` Boris Brezillon
2016-06-11  7:49   ` Boris Brezillon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160614160517.GA2490@afzalpc \
    --to=afzal.mohd.ma@gmail.com \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=arnd@arndb.de \
    --cc=boris.brezillon@free-electrons.com \
    --cc=cyrille.pitchen@atmel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=plagnioj@jcrosoft.com \
    --cc=sboyd@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox