linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: kernel@stlinux.com, maxime.coquelin@st.com,
	patrice.chotard@st.com, mturquette@baylibre.com,
	sboyd@codeaurora.org, broonie@kernel.org,
	linux-clk@vger.kernel.org, linux-spi@vger.kernel.org,
	Lee Jones <lee.jones@linaro.org>
Subject: [PATCH 2/6] clk: st: clkgen-fsyn: Detect critical clocks
Date: Tue,  7 Jun 2016 12:19:26 +0100	[thread overview]
Message-ID: <20160607111930.10375-3-lee.jones@linaro.org> (raw)
In-Reply-To: <20160607111930.10375-1-lee.jones@linaro.org>

Utilise the new Critical Clock infrastructure to mark clocks which
much not be disabled as CRITICAL.

Clocks are marked as CRITICAL using clk flags.  This patch also
ensures flags are peculated through the framework in the correct
manner.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/clk/st/clkgen-fsyn.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/st/clkgen-fsyn.c b/drivers/clk/st/clkgen-fsyn.c
index dec4eaa..09afeb8 100644
--- a/drivers/clk/st/clkgen-fsyn.c
+++ b/drivers/clk/st/clkgen-fsyn.c
@@ -1027,7 +1027,7 @@ static const struct clk_ops st_quadfs_ops = {
 static struct clk * __init st_clk_register_quadfs_fsynth(
 		const char *name, const char *parent_name,
 		struct clkgen_quadfs_data *quadfs, void __iomem *reg, u32 chan,
-		spinlock_t *lock)
+		unsigned long flags, spinlock_t *lock)
 {
 	struct st_clk_quadfs_fsynth *fs;
 	struct clk *clk;
@@ -1045,7 +1045,7 @@ static struct clk * __init st_clk_register_quadfs_fsynth(
 
 	init.name = name;
 	init.ops = &st_quadfs_ops;
-	init.flags = CLK_GET_RATE_NOCACHE | CLK_IS_BASIC;
+	init.flags = flags | CLK_GET_RATE_NOCACHE | CLK_IS_BASIC;
 	init.parent_names = &parent_name;
 	init.num_parents = 1;
 
@@ -1115,6 +1115,7 @@ static void __init st_of_create_quadfs_fsynths(
 	for (fschan = 0; fschan < QUADFS_MAX_CHAN; fschan++) {
 		struct clk *clk;
 		const char *clk_name;
+		unsigned long flags = 0;
 
 		if (of_property_read_string_index(np, "clock-output-names",
 						  fschan, &clk_name)) {
@@ -1127,8 +1128,11 @@ static void __init st_of_create_quadfs_fsynths(
 		if (*clk_name == '\0')
 			continue;
 
+		of_clk_detect_critical(np, fschan, &flags);
+
 		clk = st_clk_register_quadfs_fsynth(clk_name, pll_name,
-				quadfs, reg, fschan, lock);
+						    quadfs, reg, fschan,
+						    flags, lock);
 
 		/*
 		 * If there was an error registering this clock output, clean
-- 
2.8.3

  parent reply	other threads:[~2016-06-07 11:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-07 11:19 [PATCH 0/6] clk: sti: Add support for critical clocks Lee Jones
2016-06-07 11:19 ` [PATCH 1/6] clk: st: clk-flexgen: Detect " Lee Jones
2016-06-07 11:19 ` Lee Jones [this message]
2016-06-07 11:19 ` [PATCH 3/6] clk: st: clkgen-pll: " Lee Jones
2016-06-07 11:19 ` [PATCH 4/6] ARM: sti: stih407-family: Supply defines for CLOCKGEN A0 Lee Jones
2016-06-07 11:19 ` [PATCH 5/6] ARM: sti: stih410-clocks: Identify critical clocks Lee Jones
2016-06-07 11:19 ` [PATCH 6/6] spi: st-ssc4: Remove 'no clocking' hack Lee Jones
2016-06-07 15:17   ` Mark Brown
2016-06-30 20:52     ` Lee Jones
2016-07-01  9:59       ` Mark Brown
2016-06-30 19:23 ` [PATCH 0/6] clk: sti: Add support for critical clocks Stephen Boyd
2016-06-30 20:54   ` Lee Jones

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=20160607111930.10375-3-lee.jones@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=broonie@kernel.org \
    --cc=kernel@stlinux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=maxime.coquelin@st.com \
    --cc=mturquette@baylibre.com \
    --cc=patrice.chotard@st.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;
as well as URLs for NNTP newsgroup(s).