All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/6] clk: renesas: r8a779[56]: Add Z and Z2 clock support
@ 2018-01-29 18:01 Simon Horman
  2018-01-29 18:01 ` [PATCH v5 1/6] clk: renesas: rcar-gen3: Add Z clock divider support Simon Horman
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Simon Horman @ 2018-01-29 18:01 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Magnus Damm, linux-renesas-soc, linux-clk

Hi,

this patch-set adds Z and Z2 clock support.

These are dependencies for supporting CPUFreq. The remainder of that
work is being posted separately and can be found at:

https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git topic/rcar-gen3-cpufreq-v5

Based on v4.15-rc1

Changes since v4:
* Correct off-by one error in usage of __ffs

Changes since v3:
* Rebase
* Divide parent clock by 2 to give correct rate (again)                         * Take care not to overflow multiplication on 32 but platforms
* Use __ffs as FIELD_{GET,PREP} don't not work with non-constant masks
* Use correct mask in cpg_z_clk_recalc_rate()

Changes since v2:
* Rebase
* Address review of v2 as noted in patch changelogs

Takeshi Kihara (6):
  clk: renesas: rcar-gen3: Add Z clock divider support
  clk: renesas: rcar-gen3: Add Z2 clock divider support
  clk: renesas: r8a7795: Add Z clock
  clk: renesas: r8a7795: Add Z2 clock
  clk: renesas: r8a7796: Add Z clock
  clk: renesas: r8a7796: Add Z2 clock

 drivers/clk/renesas/r8a7795-cpg-mssr.c |   2 +
 drivers/clk/renesas/r8a7796-cpg-mssr.c |   2 +
 drivers/clk/renesas/rcar-gen3-cpg.c    | 143 +++++++++++++++++++++++++++++++++
 drivers/clk/renesas/rcar-gen3-cpg.h    |   2 +
 4 files changed, 149 insertions(+)

Results of testing this on an H3 ES2.0 / Salvator-XS are as below.
Testing has shown equivalent results on an M3W ES1.0 / Salvator-X.
Testing has also shown equivalent results on an H3 ES1.0 / Salvator-X
with the following restrictions due to lack of physical access:
1. No little CPUs are brought up and thus scaling the frequency of
   those CPUs was not tested
2. No Suspend-to-RAM

The results for H3 ES2.0 / Salvator-XS:

On Boot
-------

Z clock is half of pll0 and corresponds to CPU frequency.
Z2 clock is half pll2. This is as expected.

# cd /sys/devices/system/cpu/
# grep -E -w "pll[02]|z|z2" /sys/kernel/debug/clk/clk_summary
       .pll2                              0            0  2396160000          0 0  
          z2                              0            0  1198080000          0 0  
       .pll0                              0            0  2995200000          0 0  
          z                               0            0  1497600000          0 0  
# grep . cpu*/cpufreq/*cur*
cpu0/cpufreq/cpuinfo_cur_freq:1497600
cpu0/cpufreq/scaling_cur_freq:1497600
cpu1/cpufreq/cpuinfo_cur_freq:1497600
cpu1/cpufreq/scaling_cur_freq:1497600
cpu2/cpufreq/cpuinfo_cur_freq:1497600
cpu2/cpufreq/scaling_cur_freq:1497600
cpu3/cpufreq/cpuinfo_cur_freq:1497600
cpu3/cpufreq/scaling_cur_freq:1497600
cpu4/cpufreq/cpuinfo_cur_freq:1198080
cpu4/cpufreq/scaling_cur_freq:1198080
cpu5/cpufreq/cpuinfo_cur_freq:1198080
cpu5/cpufreq/scaling_cur_freq:1198080
cpu6/cpufreq/cpuinfo_cur_freq:1198080
cpu6/cpufreq/scaling_cur_freq:1198080
cpu7/cpufreq/cpuinfo_cur_freq:1198080
cpu7/cpufreq/scaling_cur_freq:1198080

BIG CPU Freq scaled to 500000 and little CPU Freq scaled to 800000
------------------------------------------------------------------

Z and Z2 clocks corresponds to new CPU frequencies.
PLL0 and PLL2 are unchanged.
This is the expected result.

# echo 500000 > cpu0/cpufreq/scaling_max_freq
# echo 800000 > cpu4/cpufreq/scaling_max_freq
# grep -E -w "pll[02]|z|z2" /sys/kernel/debug/clk/clk_summary
       .pll2                              0            0  2396160000          0 0  
          z2                              0            0   786240000          0 0  
       .pll0                              0            0  2995200000          0 0  
          z                               0            0   468000000          0 0  
# grep . cpu*/cpufreq/*cur*
cpu0/cpufreq/cpuinfo_cur_freq:468000
cpu0/cpufreq/scaling_cur_freq:468000
cpu1/cpufreq/cpuinfo_cur_freq:468000
cpu1/cpufreq/scaling_cur_freq:468000
cpu2/cpufreq/cpuinfo_cur_freq:468000
cpu2/cpufreq/scaling_cur_freq:468000
cpu3/cpufreq/cpuinfo_cur_freq:468000
cpu3/cpufreq/scaling_cur_freq:468000
cpu4/cpufreq/cpuinfo_cur_freq:786240
cpu4/cpufreq/scaling_cur_freq:786240
cpu5/cpufreq/cpuinfo_cur_freq:786240
cpu5/cpufreq/scaling_cur_freq:786240
cpu6/cpufreq/cpuinfo_cur_freq:786240
cpu6/cpufreq/scaling_cur_freq:786240
cpu7/cpufreq/cpuinfo_cur_freq:786240
cpu7/cpufreq/scaling_cur_freq:786240


After Resume from Suspend-to-RAM
--------------------------------

Clocks and CPU freqiencies are restored to their values before
suspend. This is the expected result.

# grep -E -w "pll[02]|z|z2" /sys/kernel/debug/clk/clk_summary
       .pll2                              0            0  2396160000          0 0  
          z2                              0            0   786240000          0 0  
       .pll0                              0            0  2995200000          0 0  
          z                               0            0   468000000          0 0  
# grep . cpu*/cpufreq/*cur*
cpu0/cpufreq/cpuinfo_cur_freq:468000
cpu0/cpufreq/scaling_cur_freq:500000
cpu1/cpufreq/cpuinfo_cur_freq:468000
cpu1/cpufreq/scaling_cur_freq:500000
cpu2/cpufreq/cpuinfo_cur_freq:468000
cpu2/cpufreq/scaling_cur_freq:500000
cpu3/cpufreq/cpuinfo_cur_freq:468000
cpu3/cpufreq/scaling_cur_freq:500000
cpu4/cpufreq/cpuinfo_cur_freq:786240
cpu4/cpufreq/scaling_cur_freq:800000
cpu5/cpufreq/cpuinfo_cur_freq:786240
cpu5/cpufreq/scaling_cur_freq:800000
cpu6/cpufreq/cpuinfo_cur_freq:786240
cpu6/cpufreq/scaling_cur_freq:800000
cpu7/cpufreq/cpuinfo_cur_freq:786240
cpu7/cpufreq/scaling_cur_freq:800000



-- 
2.11.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v5 1/6] clk: renesas: rcar-gen3: Add Z clock divider support
  2018-01-29 18:01 [PATCH v5 0/6] clk: renesas: r8a779[56]: Add Z and Z2 clock support Simon Horman
@ 2018-01-29 18:01 ` Simon Horman
  2018-02-09 15:51   ` Geert Uytterhoeven
  2018-01-29 18:01 ` [PATCH v5 2/6] clk: renesas: rcar-gen3: Add Z2 " Simon Horman
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 9+ messages in thread
From: Simon Horman @ 2018-01-29 18:01 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Magnus Damm, linux-renesas-soc, linux-clk

From: Takeshi Kihara <takeshi.kihara.df@renesas.com>

This patch adds Z clock divider support for R-Car Gen3 SoC.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---

v4 [Simon Horman]
* Rebase
* Divide parent clock by 2 to give correct rate (again)
* Take care not to overflow multiplication on 32 but platforms

v3 [Simon Horman]
* Use DIV_ROUND_CLOSEST_ULL instead of open-coding the same behaviour
  using div_u64()
* Do not round rate to 100MHz in cpg_z_clk_recalc_rate
* Remove calculation for PLL post-divider, this is bogus.
  Instead do not round to closest in cpg_z_clk_round_rate()
* Drop check for !prate in cpg_z_clk_round_rate

v1 [Simon Horman]
* Divide parent clock by 2 to give correct rate
* Use GENMASK, FIELD_{GET,PREP}
* Correct whitespace
* Arrange local variables in reverse Christmas tree order

v0 [Takeshi Kihara]
---
 drivers/clk/renesas/rcar-gen3-cpg.c | 133 ++++++++++++++++++++++++++++++++++++
 drivers/clk/renesas/rcar-gen3-cpg.h |   1 +
 2 files changed, 134 insertions(+)

diff --git a/drivers/clk/renesas/rcar-gen3-cpg.c b/drivers/clk/renesas/rcar-gen3-cpg.c
index 0904886f5501..b85918fa62c6 100644
--- a/drivers/clk/renesas/rcar-gen3-cpg.c
+++ b/drivers/clk/renesas/rcar-gen3-cpg.c
@@ -13,6 +13,7 @@
  */
 
 #include <linux/bug.h>
+#include <linux/bitfield.h>
 #include <linux/clk.h>
 #include <linux/clk-provider.h>
 #include <linux/device.h>
@@ -62,6 +63,134 @@ static void cpg_simple_notifier_register(struct raw_notifier_head *notifiers,
 }
 
 /*
+ * Z Clock
+ *
+ * Traits of this clock:
+ * prepare - clk_prepare only ensures that parents are prepared
+ * enable - clk_enable only ensures that parents are enabled
+ * rate - rate is adjustable.  clk->rate = (parent->rate * mult / 32 ) / 2
+ * parent - fixed parent.  No clk_set_parent support
+ */
+#define CPG_FRQCRB			0x00000004
+#define CPG_FRQCRB_KICK			BIT(31)
+#define CPG_FRQCRC			0x000000e0
+#define CPG_FRQCRC_ZFC_MASK		GENMASK(12, 8)
+
+struct cpg_z_clk {
+	struct clk_hw hw;
+	void __iomem *reg;
+	void __iomem *kick_reg;
+};
+
+#define to_z_clk(_hw)	container_of(_hw, struct cpg_z_clk, hw)
+
+static unsigned long cpg_z_clk_recalc_rate(struct clk_hw *hw,
+					   unsigned long parent_rate)
+{
+	struct cpg_z_clk *zclk = to_z_clk(hw);
+	unsigned int mult;
+
+	mult = 32 - FIELD_GET(CPG_FRQCRC_ZFC_MASK, clk_readl(zclk->reg));
+
+	/* Factor of 2 is for fixed divider */
+	return DIV_ROUND_CLOSEST_ULL((u64)parent_rate * mult, 32 * 2);
+}
+
+static long cpg_z_clk_round_rate(struct clk_hw *hw, unsigned long rate,
+				 unsigned long *parent_rate)
+{
+	/* Factor of 2 is for fixed divider */
+	unsigned long prate = *parent_rate / 2;
+	unsigned int mult;
+
+	mult = div_u64(rate * 32ULL, prate);
+	mult = clamp(mult, 1U, 32U);
+
+	return (u64)prate * mult / 32;
+}
+
+static int cpg_z_clk_set_rate(struct clk_hw *hw, unsigned long rate,
+			      unsigned long parent_rate)
+{
+	struct cpg_z_clk *zclk = to_z_clk(hw);
+	unsigned int mult;
+	unsigned int i;
+	u32 val, kick;
+
+	/* Factor of 2 is for fixed divider */
+	mult = DIV_ROUND_CLOSEST_ULL(rate * 32ULL * 2, parent_rate);
+	mult = clamp(mult, 1U, 32U);
+
+	if (clk_readl(zclk->kick_reg) & CPG_FRQCRB_KICK)
+		return -EBUSY;
+
+	val = clk_readl(zclk->reg) & ~CPG_FRQCRC_ZFC_MASK;
+	val |= FIELD_PREP(CPG_FRQCRC_ZFC_MASK, 32 - mult);
+	clk_writel(val, zclk->reg);
+
+	/*
+	 * Set KICK bit in FRQCRB to update hardware setting and wait for
+	 * clock change completion.
+	 */
+	kick = clk_readl(zclk->kick_reg);
+	kick |= CPG_FRQCRB_KICK;
+	clk_writel(kick, zclk->kick_reg);
+
+	/*
+	 * Note: There is no HW information about the worst case latency.
+	 *
+	 * Using experimental measurements, it seems that no more than
+	 * ~10 iterations are needed, independently of the CPU rate.
+	 * Since this value might be dependent of external xtal rate, pll1
+	 * rate or even the other emulation clocks rate, use 1000 as a
+	 * "super" safe value.
+	 */
+	for (i = 1000; i; i--) {
+		if (!(clk_readl(zclk->kick_reg) & CPG_FRQCRB_KICK))
+			return 0;
+
+		cpu_relax();
+	}
+
+	return -ETIMEDOUT;
+}
+
+static const struct clk_ops cpg_z_clk_ops = {
+	.recalc_rate = cpg_z_clk_recalc_rate,
+	.round_rate = cpg_z_clk_round_rate,
+	.set_rate = cpg_z_clk_set_rate,
+};
+
+static struct clk * __init cpg_z_clk_register(const char *name,
+					      const char *parent_name,
+					      void __iomem *reg)
+{
+	struct clk_init_data init;
+	struct cpg_z_clk *zclk;
+	struct clk *clk;
+
+	zclk = kzalloc(sizeof(*zclk), GFP_KERNEL);
+	if (!zclk)
+		return ERR_PTR(-ENOMEM);
+
+	init.name = name;
+	init.ops = &cpg_z_clk_ops;
+	init.flags = 0;
+	init.parent_names = &parent_name;
+	init.num_parents = 1;
+
+	zclk->reg = reg + CPG_FRQCRC;
+	zclk->kick_reg = reg + CPG_FRQCRB;
+	zclk->hw.init = &init;
+
+	clk = clk_register(NULL, &zclk->hw);
+	if (IS_ERR(clk))
+		kfree(zclk);
+
+	return clk;
+}
+
+/*
  * SDn Clock
  */
 #define CPG_SD_STP_HCK		BIT(9)
@@ -420,6 +549,10 @@ struct clk * __init rcar_gen3_cpg_clk_register(struct device *dev,
 		mult = 1;
 		break;
 
+	case CLK_TYPE_GEN3_Z:
+		return cpg_z_clk_register(core->name, __clk_get_name(parent),
+					  base);
+
 	default:
 		return ERR_PTR(-EINVAL);
 	}
diff --git a/drivers/clk/renesas/rcar-gen3-cpg.h b/drivers/clk/renesas/rcar-gen3-cpg.h
index 2e4284399f53..c73d4d6fdc85 100644
--- a/drivers/clk/renesas/rcar-gen3-cpg.h
+++ b/drivers/clk/renesas/rcar-gen3-cpg.h
@@ -21,6 +21,7 @@ enum rcar_gen3_clk_types {
 	CLK_TYPE_GEN3_SD,
 	CLK_TYPE_GEN3_R,
 	CLK_TYPE_GEN3_PE,
+	CLK_TYPE_GEN3_Z,
 };
 
 #define DEF_GEN3_SD(_name, _id, _parent, _offset)	\
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v5 2/6] clk: renesas: rcar-gen3: Add Z2 clock divider support
  2018-01-29 18:01 [PATCH v5 0/6] clk: renesas: r8a779[56]: Add Z and Z2 clock support Simon Horman
  2018-01-29 18:01 ` [PATCH v5 1/6] clk: renesas: rcar-gen3: Add Z clock divider support Simon Horman
@ 2018-01-29 18:01 ` Simon Horman
  2018-02-09 15:54   ` Geert Uytterhoeven
  2018-01-29 18:01 ` [PATCH v5 3/6] clk: renesas: r8a7795: Add Z clock Simon Horman
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 9+ messages in thread
From: Simon Horman @ 2018-01-29 18:01 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Magnus Damm, linux-renesas-soc, linux-clk

From: Takeshi Kihara <takeshi.kihara.df@renesas.com>

This patch adds Z2 clock divider support for R-Car Gen3 SoC.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
v5 [Simon Horman]
* Correct off-by-one error in use of __ffs()

v4 [Simon Horman]
* Rebase
* Use __ffs as FIELD_{GET,PREP} don't not work with non-constant masks
* Use correct mask in cpg_z_clk_recalc_rate()

v3 [Simon Horman]
* Consolidate Z and Z2 clock ops
* Allow setting of Z2 clock

v1 [Simon Horman]
* Provide __cpg_z_clk_recalc_rate() helper
* Use GENMASK

v0 [Takeshi Kihara]
---
 drivers/clk/renesas/rcar-gen3-cpg.c | 22 ++++++++++++++++------
 drivers/clk/renesas/rcar-gen3-cpg.h |  1 +
 2 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/drivers/clk/renesas/rcar-gen3-cpg.c b/drivers/clk/renesas/rcar-gen3-cpg.c
index b85918fa62c6..0c8fe10d57fe 100644
--- a/drivers/clk/renesas/rcar-gen3-cpg.c
+++ b/drivers/clk/renesas/rcar-gen3-cpg.c
@@ -63,7 +63,7 @@ static void cpg_simple_notifier_register(struct raw_notifier_head *notifiers,
 }
 
 /*
- * Z Clock
+ * Z Clock & Z2 Clock
  *
  * Traits of this clock:
  * prepare - clk_prepare only ensures that parents are prepared
@@ -75,11 +75,13 @@ static void cpg_simple_notifier_register(struct raw_notifier_head *notifiers,
 #define CPG_FRQCRB_KICK			BIT(31)
 #define CPG_FRQCRC			0x000000e0
 #define CPG_FRQCRC_ZFC_MASK		GENMASK(12, 8)
+#define CPG_FRQCRC_Z2FC_MASK		GENMASK(4, 0)
 
 struct cpg_z_clk {
 	struct clk_hw hw;
 	void __iomem *reg;
 	void __iomem *kick_reg;
+	unsigned long mask;
 };
 
 #define to_z_clk(_hw)	container_of(_hw, struct cpg_z_clk, hw)
@@ -89,8 +91,10 @@ static unsigned long cpg_z_clk_recalc_rate(struct clk_hw *hw,
 {
 	struct cpg_z_clk *zclk = to_z_clk(hw);
 	unsigned int mult;
+	u32 val;
 
-	mult = 32 - FIELD_GET(CPG_FRQCRC_ZFC_MASK, clk_readl(zclk->reg));
+	val = clk_readl(zclk->reg) & zclk->mask;
+	mult = 32 - (val >> __ffs(zclk->mask));
 
 	/* Factor of 2 is for fixed divider */
 	return DIV_ROUND_CLOSEST_ULL((u64)parent_rate * mult, 32 * 2);
@@ -124,8 +128,8 @@ static int cpg_z_clk_set_rate(struct clk_hw *hw, unsigned long rate,
 	if (clk_readl(zclk->kick_reg) & CPG_FRQCRB_KICK)
 		return -EBUSY;
 
-	val = clk_readl(zclk->reg) & ~CPG_FRQCRC_ZFC_MASK;
-	val |= FIELD_PREP(CPG_FRQCRC_ZFC_MASK, 32 - mult);
+	val = clk_readl(zclk->reg) & ~zclk->mask;
+	val |= ((32 - mult) << __ffs(zclk->mask)) & zclk->mask;
 	clk_writel(val, zclk->reg);
 
 	/*
@@ -163,7 +167,8 @@ static const struct clk_ops cpg_z_clk_ops = {
 
 static struct clk * __init cpg_z_clk_register(const char *name,
 					      const char *parent_name,
-					      void __iomem *reg)
+					      void __iomem *reg,
+					      unsigned long mask)
 {
 	struct clk_init_data init;
 	struct cpg_z_clk *zclk;
@@ -182,6 +187,7 @@ static struct clk * __init cpg_z_clk_register(const char *name,
 	zclk->reg = reg + CPG_FRQCRC;
 	zclk->kick_reg = reg + CPG_FRQCRB;
 	zclk->hw.init = &init;
+	zclk->mask = mask;
 
 	clk = clk_register(NULL, &zclk->hw);
 	if (IS_ERR(clk))
@@ -551,7 +557,11 @@ struct clk * __init rcar_gen3_cpg_clk_register(struct device *dev,
 
 	case CLK_TYPE_GEN3_Z:
 		return cpg_z_clk_register(core->name, __clk_get_name(parent),
-					  base);
+					  base, CPG_FRQCRC_ZFC_MASK);
+
+	case CLK_TYPE_GEN3_Z2:
+		return cpg_z_clk_register(core->name, __clk_get_name(parent),
+					  base, CPG_FRQCRC_Z2FC_MASK);
 
 	default:
 		return ERR_PTR(-EINVAL);
diff --git a/drivers/clk/renesas/rcar-gen3-cpg.h b/drivers/clk/renesas/rcar-gen3-cpg.h
index c73d4d6fdc85..ea4f8fc3c4c9 100644
--- a/drivers/clk/renesas/rcar-gen3-cpg.h
+++ b/drivers/clk/renesas/rcar-gen3-cpg.h
@@ -22,6 +22,7 @@ enum rcar_gen3_clk_types {
 	CLK_TYPE_GEN3_R,
 	CLK_TYPE_GEN3_PE,
 	CLK_TYPE_GEN3_Z,
+	CLK_TYPE_GEN3_Z2,
 };
 
 #define DEF_GEN3_SD(_name, _id, _parent, _offset)	\
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v5 3/6] clk: renesas: r8a7795: Add Z clock
  2018-01-29 18:01 [PATCH v5 0/6] clk: renesas: r8a779[56]: Add Z and Z2 clock support Simon Horman
  2018-01-29 18:01 ` [PATCH v5 1/6] clk: renesas: rcar-gen3: Add Z clock divider support Simon Horman
  2018-01-29 18:01 ` [PATCH v5 2/6] clk: renesas: rcar-gen3: Add Z2 " Simon Horman
@ 2018-01-29 18:01 ` Simon Horman
  2018-01-29 18:01 ` [PATCH v5 4/6] clk: renesas: r8a7795: Add Z2 clock Simon Horman
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2018-01-29 18:01 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Magnus Damm, linux-renesas-soc, linux-clk

From: Takeshi Kihara <takeshi.kihara.df@renesas.com>

This patch adds Z clock for R8A7795 SoC.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/clk/renesas/r8a7795-cpg-mssr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/renesas/r8a7795-cpg-mssr.c b/drivers/clk/renesas/r8a7795-cpg-mssr.c
index b1d9f48eae9e..995a4c4fb01e 100644
--- a/drivers/clk/renesas/r8a7795-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7795-cpg-mssr.c
@@ -74,6 +74,7 @@ static struct cpg_core_clk r8a7795_core_clks[] __initdata = {
 	DEF_FIXED(".sdsrc",     CLK_SDSRC,         CLK_PLL1_DIV2,  2, 1),
 
 	/* Core Clock Outputs */
+	DEF_BASE("z",           R8A7795_CLK_Z,     CLK_TYPE_GEN3_Z, CLK_PLL0),
 	DEF_FIXED("ztr",        R8A7795_CLK_ZTR,   CLK_PLL1_DIV2,  6, 1),
 	DEF_FIXED("ztrd2",      R8A7795_CLK_ZTRD2, CLK_PLL1_DIV2, 12, 1),
 	DEF_FIXED("zt",         R8A7795_CLK_ZT,    CLK_PLL1_DIV2,  4, 1),
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v5 4/6] clk: renesas: r8a7795: Add Z2 clock
  2018-01-29 18:01 [PATCH v5 0/6] clk: renesas: r8a779[56]: Add Z and Z2 clock support Simon Horman
                   ` (2 preceding siblings ...)
  2018-01-29 18:01 ` [PATCH v5 3/6] clk: renesas: r8a7795: Add Z clock Simon Horman
@ 2018-01-29 18:01 ` Simon Horman
  2018-01-29 18:01 ` [PATCH v5 5/6] clk: renesas: r8a7796: Add Z clock Simon Horman
  2018-01-29 18:01 ` [PATCH v5 6/6] clk: renesas: r8a7796: Add Z2 clock Simon Horman
  5 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2018-01-29 18:01 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Magnus Damm, linux-renesas-soc, linux-clk

From: Takeshi Kihara <takeshi.kihara.df@renesas.com>

This patch adds Z2 clock for r8a7795 SoC.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/clk/renesas/r8a7795-cpg-mssr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/renesas/r8a7795-cpg-mssr.c b/drivers/clk/renesas/r8a7795-cpg-mssr.c
index 995a4c4fb01e..775b0ceaa337 100644
--- a/drivers/clk/renesas/r8a7795-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7795-cpg-mssr.c
@@ -75,6 +75,7 @@ static struct cpg_core_clk r8a7795_core_clks[] __initdata = {
 
 	/* Core Clock Outputs */
 	DEF_BASE("z",           R8A7795_CLK_Z,     CLK_TYPE_GEN3_Z, CLK_PLL0),
+	DEF_BASE("z2",          R8A7795_CLK_Z2,    CLK_TYPE_GEN3_Z2, CLK_PLL2),
 	DEF_FIXED("ztr",        R8A7795_CLK_ZTR,   CLK_PLL1_DIV2,  6, 1),
 	DEF_FIXED("ztrd2",      R8A7795_CLK_ZTRD2, CLK_PLL1_DIV2, 12, 1),
 	DEF_FIXED("zt",         R8A7795_CLK_ZT,    CLK_PLL1_DIV2,  4, 1),
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v5 5/6] clk: renesas: r8a7796: Add Z clock
  2018-01-29 18:01 [PATCH v5 0/6] clk: renesas: r8a779[56]: Add Z and Z2 clock support Simon Horman
                   ` (3 preceding siblings ...)
  2018-01-29 18:01 ` [PATCH v5 4/6] clk: renesas: r8a7795: Add Z2 clock Simon Horman
@ 2018-01-29 18:01 ` Simon Horman
  2018-01-29 18:01 ` [PATCH v5 6/6] clk: renesas: r8a7796: Add Z2 clock Simon Horman
  5 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2018-01-29 18:01 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Magnus Damm, linux-renesas-soc, linux-clk

From: Takeshi Kihara <takeshi.kihara.df@renesas.com>

This patch adds Z clock for R8A7796 SoC.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/clk/renesas/r8a7796-cpg-mssr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/renesas/r8a7796-cpg-mssr.c b/drivers/clk/renesas/r8a7796-cpg-mssr.c
index b3767472088a..82b444ac66c6 100644
--- a/drivers/clk/renesas/r8a7796-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7796-cpg-mssr.c
@@ -74,6 +74,7 @@ static const struct cpg_core_clk r8a7796_core_clks[] __initconst = {
 	DEF_FIXED(".sdsrc",     CLK_SDSRC,         CLK_PLL1_DIV2,  2, 1),
 
 	/* Core Clock Outputs */
+	DEF_BASE("z",           R8A7796_CLK_Z,     CLK_TYPE_GEN3_Z, CLK_PLL0),
 	DEF_FIXED("ztr",        R8A7796_CLK_ZTR,   CLK_PLL1_DIV2,  6, 1),
 	DEF_FIXED("ztrd2",      R8A7796_CLK_ZTRD2, CLK_PLL1_DIV2, 12, 1),
 	DEF_FIXED("zt",         R8A7796_CLK_ZT,    CLK_PLL1_DIV2,  4, 1),
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v5 6/6] clk: renesas: r8a7796: Add Z2 clock
  2018-01-29 18:01 [PATCH v5 0/6] clk: renesas: r8a779[56]: Add Z and Z2 clock support Simon Horman
                   ` (4 preceding siblings ...)
  2018-01-29 18:01 ` [PATCH v5 5/6] clk: renesas: r8a7796: Add Z clock Simon Horman
@ 2018-01-29 18:01 ` Simon Horman
  5 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2018-01-29 18:01 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Magnus Damm, linux-renesas-soc, linux-clk

From: Takeshi Kihara <takeshi.kihara.df@renesas.com>

This patch adds Z2 clock for R8A7796 SoC.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/clk/renesas/r8a7796-cpg-mssr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/renesas/r8a7796-cpg-mssr.c b/drivers/clk/renesas/r8a7796-cpg-mssr.c
index 82b444ac66c6..83a68e51e4ec 100644
--- a/drivers/clk/renesas/r8a7796-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7796-cpg-mssr.c
@@ -75,6 +75,7 @@ static const struct cpg_core_clk r8a7796_core_clks[] __initconst = {
 
 	/* Core Clock Outputs */
 	DEF_BASE("z",           R8A7796_CLK_Z,     CLK_TYPE_GEN3_Z, CLK_PLL0),
+	DEF_BASE("z2",          R8A7796_CLK_Z2,    CLK_TYPE_GEN3_Z2, CLK_PLL2),
 	DEF_FIXED("ztr",        R8A7796_CLK_ZTR,   CLK_PLL1_DIV2,  6, 1),
 	DEF_FIXED("ztrd2",      R8A7796_CLK_ZTRD2, CLK_PLL1_DIV2, 12, 1),
 	DEF_FIXED("zt",         R8A7796_CLK_ZT,    CLK_PLL1_DIV2,  4, 1),
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v5 1/6] clk: renesas: rcar-gen3: Add Z clock divider support
  2018-01-29 18:01 ` [PATCH v5 1/6] clk: renesas: rcar-gen3: Add Z clock divider support Simon Horman
@ 2018-02-09 15:51   ` Geert Uytterhoeven
  0 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2018-02-09 15:51 UTC (permalink / raw)
  To: Simon Horman; +Cc: Geert Uytterhoeven, Magnus Damm, Linux-Renesas, linux-clk

On Mon, Jan 29, 2018 at 7:01 PM, Simon Horman
<horms+renesas@verge.net.au> wrote:
> From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
>
> This patch adds Z clock divider support for R-Car Gen3 SoC.
>
> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

I.e. will queue in clk-renesas-for-v4.17.

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] 9+ messages in thread

* Re: [PATCH v5 2/6] clk: renesas: rcar-gen3: Add Z2 clock divider support
  2018-01-29 18:01 ` [PATCH v5 2/6] clk: renesas: rcar-gen3: Add Z2 " Simon Horman
@ 2018-02-09 15:54   ` Geert Uytterhoeven
  0 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2018-02-09 15:54 UTC (permalink / raw)
  To: Simon Horman; +Cc: Geert Uytterhoeven, Magnus Damm, Linux-Renesas, linux-clk

On Mon, Jan 29, 2018 at 7:01 PM, Simon Horman
<horms+renesas@verge.net.au> wrote:
> From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
>
> This patch adds Z2 clock divider support for R-Car Gen3 SoC.
>
> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

I.e. will queue in clk-renesas-for-v4.17.

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] 9+ messages in thread

end of thread, other threads:[~2018-02-09 15:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-29 18:01 [PATCH v5 0/6] clk: renesas: r8a779[56]: Add Z and Z2 clock support Simon Horman
2018-01-29 18:01 ` [PATCH v5 1/6] clk: renesas: rcar-gen3: Add Z clock divider support Simon Horman
2018-02-09 15:51   ` Geert Uytterhoeven
2018-01-29 18:01 ` [PATCH v5 2/6] clk: renesas: rcar-gen3: Add Z2 " Simon Horman
2018-02-09 15:54   ` Geert Uytterhoeven
2018-01-29 18:01 ` [PATCH v5 3/6] clk: renesas: r8a7795: Add Z clock Simon Horman
2018-01-29 18:01 ` [PATCH v5 4/6] clk: renesas: r8a7795: Add Z2 clock Simon Horman
2018-01-29 18:01 ` [PATCH v5 5/6] clk: renesas: r8a7796: Add Z clock Simon Horman
2018-01-29 18:01 ` [PATCH v5 6/6] clk: renesas: r8a7796: Add Z2 clock Simon Horman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.