linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: 21cnbao@gmail.com (Barry Song)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/7] clk: atlas7: export mux clks so that driver can use it
Date: Tue, 28 Jul 2015 06:27:20 +0000	[thread overview]
Message-ID: <1438064845-17894-3-git-send-email-21cnbao@gmail.com> (raw)
In-Reply-To: <1438064845-17894-1-git-send-email-21cnbao@gmail.com>

From: Guo Zeng <guo.zeng@csr.com>

this patch makes mux clks can be referenced by device drivers.

Signed-off-by: Guo Zeng <guo.zeng@csr.com>
Signed-off-by: Barry Song <Barry.Song@csr.com>
---
 drivers/clk/sirf/clk-atlas7.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/sirf/clk-atlas7.c b/drivers/clk/sirf/clk-atlas7.c
index a92e7ea..d01dce3 100644
--- a/drivers/clk/sirf/clk-atlas7.c
+++ b/drivers/clk/sirf/clk-atlas7.c
@@ -1180,7 +1180,7 @@ static struct atlas7_unit_init_data unit_list[] __initdata = {
 	{ 141 , "thcgum_sys", "sys_mux", 0, SIRFSOC_CLKC_LEAF_CLK_EN0_SET, 3, &leaf0_gate_lock },
 };
 
-static struct clk *atlas7_clks[ARRAY_SIZE(unit_list)];
+static struct clk *atlas7_clks[ARRAY_SIZE(unit_list) + ARRAY_SIZE(mux_list)];
 
 static int unit_clk_is_enabled(struct clk_hw *hw)
 {
@@ -1613,6 +1613,7 @@ static void __init atlas7_clk_init(struct device_node *np)
 			       sirfsoc_clk_vbase + mux->mux_offset,
 			       mux->shift, mux->width,
 			       mux->mux_flags, NULL);
+		atlas7_clks[ARRAY_SIZE(unit_list) + i] = clk;
 		BUG_ON(!clk);
 	}
 
@@ -1624,7 +1625,7 @@ static void __init atlas7_clk_init(struct device_node *np)
 	}
 
 	clk_data.clks = atlas7_clks;
-	clk_data.clk_num = ARRAY_SIZE(unit_list);
+	clk_data.clk_num = ARRAY_SIZE(unit_list) + ARRAY_SIZE(mux_list);
 
 	ret = of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
 	BUG_ON(ret);
-- 
1.9.1

  parent reply	other threads:[~2015-07-28  6:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-28  6:27 [PATCH 0/7] clk: atlas7: a bind of fixes Barry Song
2015-07-28  6:27 ` [PATCH 1/7] clk: atlas7: add lost pwm unit clks Barry Song
2015-07-28  6:27 ` Barry Song [this message]
2015-07-28 21:56   ` [PATCH 2/7] clk: atlas7: export mux clks so that driver can use it Stephen Boyd
2015-07-29 12:24     ` Barry Song
2015-07-28  6:27 ` [PATCH 3/7] clk: sirf: fix integer overflow in dto rate calculation Barry Song
2015-07-28  6:27 ` [PATCH 4/7] clk: atlas7: replace dto resolution magic number by macro Barry Song
2015-07-28  6:27 ` [PATCH 5/7] clk: atlas7: fix the clock tree for bluetooth stuff Barry Song
2015-07-28 22:07   ` Stephen Boyd
2015-07-29 14:52     ` Barry Song
2015-08-06  1:44       ` Stephen Boyd
2015-08-06  9:53         ` Barry Song
2015-08-10  2:35         ` Barry Song
2015-08-12  0:02           ` Stephen Boyd
2015-08-12  2:39             ` Barry Song
2015-07-28  6:27 ` [PATCH 6/7] clk: sirf: fix bit field and its root clk for coresight_tpiu Barry Song
2015-07-28  6:27 ` [PATCH 7/7] clk: atlas7: fix pll missed divide NR in fraction mode Barry Song

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=1438064845-17894-3-git-send-email-21cnbao@gmail.com \
    --to=21cnbao@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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).