devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chao Xie <chao.xie@marvell.com>
To: haojian.zhuang@gmail.com, mturquette@linaro.org,
	chao.xie@marvell.com, xiechao_mail@163.com,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 04/12] clk: mmp: move definiton of mmp_clk_frac to clk.h
Date: Tue, 10 Jun 2014 09:27:40 +0800	[thread overview]
Message-ID: <1402363668-25806-5-git-send-email-chao.xie@marvell.com> (raw)
In-Reply-To: <1402363668-25806-1-git-send-email-chao.xie@marvell.com>

From: Chao Xie <chao.xie@marvell.com>

Move the definition of structure of mmp_clk_frac to
clk.h.
So device tree support can use this structure.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
---
 drivers/clk/mmp/clk-frac.c |  8 --------
 drivers/clk/mmp/clk.h      | 32 ++++++++++++++++++++++----------
 2 files changed, 22 insertions(+), 18 deletions(-)

diff --git a/drivers/clk/mmp/clk-frac.c b/drivers/clk/mmp/clk-frac.c
index 1876d2c..eeba52c 100644
--- a/drivers/clk/mmp/clk-frac.c
+++ b/drivers/clk/mmp/clk-frac.c
@@ -23,14 +23,6 @@
  */
 
 #define to_clk_factor(hw) container_of(hw, struct mmp_clk_factor, hw)
-struct mmp_clk_factor {
-	struct clk_hw		hw;
-	void __iomem		*base;
-	struct mmp_clk_factor_masks	*masks;
-	struct mmp_clk_factor_tbl	*ftbl;
-	unsigned int		ftbl_cnt;
-	spinlock_t *lock;
-};
 
 static long clk_factor_round_rate(struct clk_hw *hw, unsigned long drate,
 		unsigned long *prate)
diff --git a/drivers/clk/mmp/clk.h b/drivers/clk/mmp/clk.h
index b71b717..d267639 100644
--- a/drivers/clk/mmp/clk.h
+++ b/drivers/clk/mmp/clk.h
@@ -7,12 +7,14 @@
 #define APBC_NO_BUS_CTRL	BIT(0)
 #define APBC_POWER_CTRL		BIT(1)
 
+
+/* Clock type "factor" */
 struct mmp_clk_factor_masks {
-	unsigned int	factor;
-	unsigned int	num_mask;
-	unsigned int	den_mask;
-	unsigned int	num_shift;
-	unsigned int	den_shift;
+	unsigned int factor;
+	unsigned int num_mask;
+	unsigned int den_mask;
+	unsigned int num_shift;
+	unsigned int den_shift;
 };
 
 struct mmp_clk_factor_tbl {
@@ -20,6 +22,21 @@ struct mmp_clk_factor_tbl {
 	unsigned int den;
 };
 
+struct mmp_clk_factor {
+	struct clk_hw hw;
+	void __iomem *base;
+	struct mmp_clk_factor_masks *masks;
+	struct mmp_clk_factor_tbl *ftbl;
+	unsigned int ftbl_cnt;
+	spinlock_t *lock;
+};
+
+extern struct clk *mmp_clk_register_factor(const char *name,
+		const char *parent_name, unsigned long flags,
+		void __iomem *base, struct mmp_clk_factor_masks *masks,
+		struct mmp_clk_factor_tbl *ftbl, unsigned int ftbl_cnt,
+		spinlock_t *lock);
+
 extern struct clk *mmp_clk_register_pll2(const char *name,
 		const char *parent_name, unsigned long flags);
 extern struct clk *mmp_clk_register_apbc(const char *name,
@@ -28,9 +45,4 @@ extern struct clk *mmp_clk_register_apbc(const char *name,
 extern struct clk *mmp_clk_register_apmu(const char *name,
 		const char *parent_name, void __iomem *base, u32 enable_mask,
 		spinlock_t *lock);
-extern struct clk *mmp_clk_register_factor(const char *name,
-		const char *parent_name, unsigned long flags,
-		void __iomem *base, struct mmp_clk_factor_masks *masks,
-		struct mmp_clk_factor_tbl *ftbl, unsigned int ftbl_cnt,
-		spinlock_t *lock);
 #endif
-- 
1.8.3.2

  parent reply	other threads:[~2014-06-10  1:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-10  1:27 [PATCH 00/12] clk: mmp: clock device tree support Chao Xie
2014-06-10  1:27 ` [PATCH 01/12] clk: mmp: add prefix "mmp" for structures defined for clk-frac Chao Xie
2014-06-10  1:27 ` [PATCH 02/12] clk: mmp: add spin lock " Chao Xie
     [not found] ` <1402363668-25806-1-git-send-email-chao.xie-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2014-06-10  1:27   ` [PATCH 03/12] clk: mmp: add init callback " Chao Xie
2014-06-10  1:27 ` Chao Xie [this message]
2014-06-10  1:27 ` [PATCH 05/12] clk: mmp: add clock type mix Chao Xie
2014-06-10  1:27 ` [PATCH 06/12] clk: mmp: add mmp private gate clock Chao Xie
2014-06-10  1:27 ` [PATCH 07/12] clk: mmp: add clock type composite for mix Chao Xie
2014-06-10  1:27 ` [PATCH 08/12] clk: mmp: add clock type master Chao Xie
2014-06-10  1:27 ` [PATCH 09/12] clk: mmp: add spin lock automatic detection from device tree Chao Xie
2014-06-10  1:27 ` [PATCH 10/12] clk: mmp: add device tree support for composite type clock Chao Xie
2014-06-10  1:27 ` [PATCH 11/12] clk: mmp: add device tree support for clocks Chao Xie
2014-06-10  1:27 ` [PATCH 12/12] arm: mmp: support clock device tree for mmp platforms Chao Xie
  -- strict thread matches above, loose matches on Subject: below --
2014-08-26  4:38 [PATCH 00/12] clk: mmp: clock device tree support Chao Xie
     [not found] ` <1409027904-21859-1-git-send-email-chao.xie-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2014-08-26  4:38   ` [PATCH 04/12] clk: mmp: move definiton of mmp_clk_frac to clk.h Chao Xie

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=1402363668-25806-5-git-send-email-chao.xie@marvell.com \
    --to=chao.xie@marvell.com \
    --cc=devicetree@vger.kernel.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=xiechao_mail@163.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).