From: Gerhard Sittig <gsi@denx.de>
To: linuxppc-dev@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org,
Anatolij Gustschin <agust@denx.de>,
Mike Turquette <mturquette@linaro.org>,
Matteo Facchinetti <matteo.facchinetti@sirius-es.it>
Cc: Scott Wood <scottwood@freescale.com>,
Gerhard Sittig <gsi@denx.de>, Detlev Zundel <dzu@denx.de>
Subject: [PATCH v1 1/4] powerpc/512x: clk: minor comment updates
Date: Tue, 10 Dec 2013 14:11:34 +0100 [thread overview]
Message-ID: <1386681097-14126-2-git-send-email-gsi@denx.de> (raw)
In-Reply-To: <1386681097-14126-1-git-send-email-gsi@denx.de>
adjust (expand on or move) a few comments,
add markers for easier navigation around helpers
Signed-off-by: Gerhard Sittig <gsi@denx.de>
---
arch/powerpc/platforms/512x/clock-commonclk.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/platforms/512x/clock-commonclk.c b/arch/powerpc/platforms/512x/clock-commonclk.c
index 189be4a4cb42..079eb1137260 100644
--- a/arch/powerpc/platforms/512x/clock-commonclk.c
+++ b/arch/powerpc/platforms/512x/clock-commonclk.c
@@ -76,6 +76,8 @@ static struct clk_onecell_data clk_data;
static struct mpc512x_ccm __iomem *clkregs;
static DEFINE_SPINLOCK(clklock);
+/* common clk API wrappers {{{ */
+
/* convenience wrappers around the common clk API */
static inline struct clk *mpc512x_clk_fixed(const char *name, int rate)
{
@@ -139,6 +141,8 @@ static inline struct clk *mpc512x_clk_muxed(const char *name,
reg, pos, len, muxflags, &clklock);
}
+/* }}} common clk API wrappers */
+
/* helper to isolate a bit field from a register */
static inline int get_bit_field(uint32_t __iomem *reg, uint8_t pos, uint8_t len)
{
@@ -308,6 +312,8 @@ static void mpc512x_clk_setup_ref_clock(struct device_node *np, int bus_freq,
}
}
+/* MCLK helpers {{{ */
+
/*
* helper code for the MCLK subtree setup
*
@@ -338,8 +344,8 @@ static void mpc512x_clk_setup_ref_clock(struct device_node *np, int bus_freq,
/*
* note that this declaration raises a checkpatch warning, but
- * it's the very data type which <linux/clk-provider.h> expects,
- * making this declaration pass checkpatch will break compilation
+ * it's the very data type dictated by <linux/clk-provider.h>,
+ * "fixing" this warning will break compilation
*/
static const char *parent_names_mux0[] = {
"sys", "ref", "psc-mclk-in", "spdif-tx",
@@ -512,6 +518,8 @@ static void mpc512x_clk_setup_mclk(struct mclk_setup_data *entry, size_t idx)
}
}
+/* }}} MCLK helpers */
+
static void mpc512x_clk_setup_clock_tree(struct device_node *np, int busfreq)
{
int sys_mul, sys_div, ips_div;
@@ -549,8 +557,8 @@ static void mpc512x_clk_setup_clock_tree(struct device_node *np, int busfreq)
clks[MPC512x_CLK_IPS] = mpc512x_clk_divtable("ips", "csb",
&clkregs->scfr1, 23, 3,
divtab_2346);
-
/* now setup anything below SYS and CSB and IPS */
+
clks[MPC512x_CLK_DDR_UG] = mpc512x_clk_factor("ddr-ug", "sys", 1, 2);
clks[MPC512x_CLK_SDHC_x4] = mpc512x_clk_factor("sdhc-x4", "csb", 4, 1);
clks[MPC512x_CLK_SDHC_UG] = mpc512x_clk_divider("sdhc-ug", "sdhc-x4", 0,
--
1.7.10.4
next prev parent reply other threads:[~2013-12-10 23:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-10 13:11 [PATCH v1 0/4] powerpc/512x: update COMMON_CLK support for MPC5125 Gerhard Sittig
2013-12-10 13:11 ` Gerhard Sittig [this message]
2013-12-10 13:11 ` [PATCH v1 2/4] powerpc/512x: clk: enforce even SDHC divider values Gerhard Sittig
2013-12-10 13:11 ` [PATCH v1 3/4] powerpc/512x: clk: support MPC5121/5123/5125 SoC variants Gerhard Sittig
2013-12-10 13:11 ` [PATCH v1 4/4] powerpc/512x: dts: add MPC5125 clock specs Gerhard Sittig
2013-12-12 16:12 ` [PATCH v1 0/4] powerpc/512x: update COMMON_CLK support for MPC5125 Matteo Facchinetti
2013-12-12 17:46 ` Sinan Akman
2013-12-12 19:32 ` Scott Wood
2013-12-13 0:29 ` Sinan Akman
2013-12-12 22:25 ` Gerhard Sittig
2013-12-18 19:53 ` Anatolij Gustschin
2013-12-18 22:20 ` Mike Turquette
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=1386681097-14126-2-git-send-email-gsi@denx.de \
--to=gsi@denx.de \
--cc=agust@denx.de \
--cc=dzu@denx.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=matteo.facchinetti@sirius-es.it \
--cc=mturquette@linaro.org \
--cc=scottwood@freescale.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).