* [PATCH 0/2] clk: renesas: cpg-mssr: Always use readl()/writel()
@ 2016-09-23 8:32 Geert Uytterhoeven
2016-09-23 8:32 ` [PATCH 1/2] " Geert Uytterhoeven
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2016-09-23 8:32 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd
Cc: linux-renesas-soc, linux-clk, Geert Uytterhoeven
Hi Mike, Stephen,
The Renesas CPG/MSSR clock drivers use a mix of clk_readl()/clk_writel()
and readl()/writel() to access the clock registers. Settle on the
generic readl()/writel().
I plan to queue this up in clk-renesas-for-v4.10.
Geert Uytterhoeven (2):
clk: renesas: cpg-mssr: Always use readl()/writel()
clk: renesas: rcar-gen3-cpg: Always use readl()/writel()
drivers/clk/renesas/rcar-gen3-cpg.c | 14 +++++++-------
drivers/clk/renesas/renesas-cpg-mssr.c | 9 ++++-----
2 files changed, 11 insertions(+), 12 deletions(-)
--
1.9.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] clk: renesas: cpg-mssr: Always use readl()/writel()
2016-09-23 8:32 [PATCH 0/2] clk: renesas: cpg-mssr: Always use readl()/writel() Geert Uytterhoeven
@ 2016-09-23 8:32 ` Geert Uytterhoeven
2016-09-23 8:32 ` [PATCH 2/2] clk: renesas: rcar-gen3-cpg: " Geert Uytterhoeven
2016-09-23 21:42 ` [PATCH 0/2] clk: renesas: cpg-mssr: " Stephen Boyd
2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2016-09-23 8:32 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd
Cc: linux-renesas-soc, linux-clk, Geert Uytterhoeven
The Renesas CPG/MSSR driver core uses a mix of clk_readl()/clk_writel()
and readl()/writel() to access the clock registers. Settle on the
generic readl()/writel().
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/clk/renesas/renesas-cpg-mssr.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/clk/renesas/renesas-cpg-mssr.c b/drivers/clk/renesas/renesas-cpg-mssr.c
index e1365e7491ae02a0..a1d5b7431ec479b5 100644
--- a/drivers/clk/renesas/renesas-cpg-mssr.c
+++ b/drivers/clk/renesas/renesas-cpg-mssr.c
@@ -146,12 +146,12 @@ static int cpg_mstp_clock_endisable(struct clk_hw *hw, bool enable)
enable ? "ON" : "OFF");
spin_lock_irqsave(&priv->mstp_lock, flags);
- value = clk_readl(priv->base + SMSTPCR(reg));
+ value = readl(priv->base + SMSTPCR(reg));
if (enable)
value &= ~bitmask;
else
value |= bitmask;
- clk_writel(value, priv->base + SMSTPCR(reg));
+ writel(value, priv->base + SMSTPCR(reg));
spin_unlock_irqrestore(&priv->mstp_lock, flags);
@@ -159,8 +159,7 @@ static int cpg_mstp_clock_endisable(struct clk_hw *hw, bool enable)
return 0;
for (i = 1000; i > 0; --i) {
- if (!(clk_readl(priv->base + MSTPSR(reg)) &
- bitmask))
+ if (!(readl(priv->base + MSTPSR(reg)) & bitmask))
break;
cpu_relax();
}
@@ -190,7 +189,7 @@ static int cpg_mstp_clock_is_enabled(struct clk_hw *hw)
struct cpg_mssr_priv *priv = clock->priv;
u32 value;
- value = clk_readl(priv->base + MSTPSR(clock->index / 32));
+ value = readl(priv->base + MSTPSR(clock->index / 32));
return !(value & BIT(clock->index % 32));
}
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] clk: renesas: rcar-gen3-cpg: Always use readl()/writel()
2016-09-23 8:32 [PATCH 0/2] clk: renesas: cpg-mssr: Always use readl()/writel() Geert Uytterhoeven
2016-09-23 8:32 ` [PATCH 1/2] " Geert Uytterhoeven
@ 2016-09-23 8:32 ` Geert Uytterhoeven
2016-09-23 21:42 ` [PATCH 0/2] clk: renesas: cpg-mssr: " Stephen Boyd
2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2016-09-23 8:32 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd
Cc: linux-renesas-soc, linux-clk, Geert Uytterhoeven
The R-Car Gen3 CPG/MSSR driver uses a mix of clk_readl()/clk_writel()
and readl()/writel() to access the clock registers. Settle on the
generic readl()/writel().
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/clk/renesas/rcar-gen3-cpg.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/clk/renesas/rcar-gen3-cpg.c b/drivers/clk/renesas/rcar-gen3-cpg.c
index 9d76076da4948fc4..742f6dc7c15653ef 100644
--- a/drivers/clk/renesas/rcar-gen3-cpg.c
+++ b/drivers/clk/renesas/rcar-gen3-cpg.c
@@ -98,7 +98,7 @@ static int cpg_sd_clock_enable(struct clk_hw *hw)
u32 val, sd_fc;
unsigned int i;
- val = clk_readl(clock->reg);
+ val = readl(clock->reg);
sd_fc = val & CPG_SD_FC_MASK;
for (i = 0; i < clock->div_num; i++)
@@ -111,7 +111,7 @@ static int cpg_sd_clock_enable(struct clk_hw *hw)
val &= ~(CPG_SD_STP_MASK);
val |= clock->div_table[i].val & CPG_SD_STP_MASK;
- clk_writel(val, clock->reg);
+ writel(val, clock->reg);
return 0;
}
@@ -120,14 +120,14 @@ static void cpg_sd_clock_disable(struct clk_hw *hw)
{
struct sd_clock *clock = to_sd_clock(hw);
- clk_writel(clk_readl(clock->reg) | CPG_SD_STP_MASK, clock->reg);
+ writel(readl(clock->reg) | CPG_SD_STP_MASK, clock->reg);
}
static int cpg_sd_clock_is_enabled(struct clk_hw *hw)
{
struct sd_clock *clock = to_sd_clock(hw);
- return !(clk_readl(clock->reg) & CPG_SD_STP_MASK);
+ return !(readl(clock->reg) & CPG_SD_STP_MASK);
}
static unsigned long cpg_sd_clock_recalc_rate(struct clk_hw *hw,
@@ -138,7 +138,7 @@ static unsigned long cpg_sd_clock_recalc_rate(struct clk_hw *hw,
u32 val, sd_fc;
unsigned int i;
- val = clk_readl(clock->reg);
+ val = readl(clock->reg);
sd_fc = val & CPG_SD_FC_MASK;
for (i = 0; i < clock->div_num; i++)
@@ -189,10 +189,10 @@ static int cpg_sd_clock_set_rate(struct clk_hw *hw, unsigned long rate,
if (i >= clock->div_num)
return -EINVAL;
- val = clk_readl(clock->reg);
+ val = readl(clock->reg);
val &= ~(CPG_SD_STP_MASK | CPG_SD_FC_MASK);
val |= clock->div_table[i].val & (CPG_SD_STP_MASK | CPG_SD_FC_MASK);
- clk_writel(val, clock->reg);
+ writel(val, clock->reg);
return 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] clk: renesas: cpg-mssr: Always use readl()/writel()
2016-09-23 8:32 [PATCH 0/2] clk: renesas: cpg-mssr: Always use readl()/writel() Geert Uytterhoeven
2016-09-23 8:32 ` [PATCH 1/2] " Geert Uytterhoeven
2016-09-23 8:32 ` [PATCH 2/2] clk: renesas: rcar-gen3-cpg: " Geert Uytterhoeven
@ 2016-09-23 21:42 ` Stephen Boyd
2 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2016-09-23 21:42 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Michael Turquette, linux-renesas-soc, linux-clk
On 09/23, Geert Uytterhoeven wrote:
> Hi Mike, Stephen,
>
> The Renesas CPG/MSSR clock drivers use a mix of clk_readl()/clk_writel()
> and readl()/writel() to access the clock registers. Settle on the
> generic readl()/writel().
>
> I plan to queue this up in clk-renesas-for-v4.10.
>
> Geert Uytterhoeven (2):
> clk: renesas: cpg-mssr: Always use readl()/writel()
> clk: renesas: rcar-gen3-cpg: Always use readl()/writel()
>
> drivers/clk/renesas/rcar-gen3-cpg.c | 14 +++++++-------
> drivers/clk/renesas/renesas-cpg-mssr.c | 9 ++++-----
> 2 files changed, 11 insertions(+), 12 deletions(-)
>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-23 21:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-23 8:32 [PATCH 0/2] clk: renesas: cpg-mssr: Always use readl()/writel() Geert Uytterhoeven
2016-09-23 8:32 ` [PATCH 1/2] " Geert Uytterhoeven
2016-09-23 8:32 ` [PATCH 2/2] clk: renesas: rcar-gen3-cpg: " Geert Uytterhoeven
2016-09-23 21:42 ` [PATCH 0/2] clk: renesas: cpg-mssr: " Stephen Boyd
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).