stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gregory CLEMENT <gregory.clement@free-electrons.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Lior Amsalem <alior@marvell.com>, Andrew Lunn <andrew@lunn.ch>,
	Jason Cooper <jason@lakedaemon.net>,
	stable@vger.kernel.org, Nadav Haklai <nadavh@marvell.com>,
	linux-arm-kernel@lists.infradead.org,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Subject: Re: [PATCH] ARM: mvebu: Fix of_clk_get() call in a non sleeping context
Date: Thu, 10 Mar 2016 13:44:26 +0100	[thread overview]
Message-ID: <87fuvy33kl.fsf@free-electrons.com> (raw)
In-Reply-To: <20160308205050.GN19428@n2100.arm.linux.org.uk> (Russell King's message of "Tue, 8 Mar 2016 20:50:51 +0000")

Hi Russell King,
 
 On mar., mars 08 2016, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:

> On Tue, Mar 08, 2016 at 05:38:11PM +0100, Gregory CLEMENT wrote:
>> And from clk_enable comment we have:
>> ""
>> clk_enable must not sleep, which differentiates it from clk_prepare.  In a
>> simple case, clk_enable can be used instead of clk_prepare to ungate a clk
>> if the operation will never sleep.
>> ""
>> 
>> Moreoever for me the "must" was to insist to the order of the call no to
>> the fact that both must be called.
>
> As the author of the clk API, the idea here is that clk_prepare()
> should always be called _before_ clk_enable() for any clock: in
> other words, getting a clock and then calling clk_enable() on it
> is not legal.
>
> CCF presently enforces this - clk_enable() without a preceding
> clk_prepare() will return -ESHUTDOWN.

Thanks for the clarification, I will work on a alternative solutioin.

Gregory

>
> -- 
> RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
> FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
> according to speedtest.net.

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

      reply	other threads:[~2016-03-10 12:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-08 14:18 [PATCH] ARM: mvebu: Fix of_clk_get() call in a non sleeping context Gregory CLEMENT
2016-03-08 15:41 ` Thomas Petazzoni
2016-03-08 16:19   ` Gregory CLEMENT
2016-03-08 16:31     ` Thomas Petazzoni
2016-03-08 16:38       ` Gregory CLEMENT
2016-03-08 16:51         ` Thomas Petazzoni
2016-03-08 20:55           ` Russell King - ARM Linux
2016-03-08 20:50         ` Russell King - ARM Linux
2016-03-10 12:44           ` Gregory CLEMENT [this message]

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=87fuvy33kl.fsf@free-electrons.com \
    --to=gregory.clement@free-electrons.com \
    --cc=alior@marvell.com \
    --cc=andrew@lunn.ch \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nadavh@marvell.com \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=thomas.petazzoni@free-electrons.com \
    /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;
as well as URLs for NNTP newsgroup(s).