clk: shmobile: r8a7779: Add clocks support
Subsystems (4)
v6 cover clk: shmobile: r8a7779: Add clocks support
Hi Mike,
please consider applying this series.
It is the first step on the way towards using the common clock framework and in turn multi-platform on the r8a7779 (R-Car H1) SoC.
It has been acked by Laurent Pinchart who did similar work for the R-Car Gen-2 family of SoCs. This work is based on that work.
The bindings added in this series have not been changed since v4 was posted with devicetree at vger.kernel.org CCed on the 13th of March.
Simon Horman (2):
clk: shmobile: r8a7779: Add clocks support
clk: shmobile: r8a7779: Add MSTP clock support
.../bindings/clock/renesas,cpg-mstp-clocks.txt | 1 + .../bindings/clock/renesas,r8a7779-cpg-clocks.txt | 27 ++++ drivers/clk/shmobile/Makefile | 1 + drivers/clk/shmobile/clk-r8a7779.c | 180 +++++++++++++++++++++ include/linux/clk/shmobile.h | 3 + 5 files changed, 212 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt create mode 100644 drivers/clk/shmobile/clk-r8a7779.c
Signature · 1 line
1.8.4
PATCH v6 1/2 clk: shmobile: r8a7779: Add clocks support
The R8A7779 SoC has several clocks that are too custom to be supported in a generic driver. Those clocks are all fixed rate clocks with multiplier and divisor set according to boot mode configuration.
Based on work for R-Car Gen2 SoCs by Laurent Pinchart.
---
v6
* Added Ack from Laurent Pinchart
v5
* Rebase
* As suggested by Laurent Pinchart
- Do not print an error if kzalloc() fails,
kzalloc() will print OOM message to the kernel log in such cases
v4
* As suggested by Geert Uytterhoeven
- Remove double and from bindings documentation
- Remove unused CPG_PLL_CONFIG_INDEX and struct cpg_pll_config
- Correct order of cpg_clk_configs entries
* As suggested by Laurent Pinchart
- Update copyright to include 2014
- Remove reference to non-existent divider clocks in changelog
- Do not map cpg->reg as it is not accessed
- Return an error for unknown name values in r8a7779_cpg_register_clock()
- Expose clkb in binding
- Do not include MSPT registers in register range in binding example
* Write (BIT(2)|BIT(1)) instead of (BIT(1)|BIT(2)) as it is less confusing (to me)
v3
* As suggested by Laurent Pinchart
- Added external clock input
- Use PLLA ratio set bu MD11 and MD12
- Add _div suffixes of fields of struct cpt_clk_config
- Register PLLA as a fixed factor clock
- Use sizeof() instead of sizeof
- Use num_clks instead of CPG_NUM_CLOCKS in r8a7779_cpg_clocks_init()
- I kept this as r8a7779 binding rather than moving to a R-Car Gen1 binding which could be shared with other SoCs as I do not believe that the SoCs is are sufficiently similar.
--- .../bindings/clock/renesas,r8a7779-cpg-clocks.txt | 27 ++++ drivers/clk/shmobile/Makefile | 1 + drivers/clk/shmobile/clk-r8a7779.c | 180 +++++++++++++++++++++ include/linux/clk/shmobile.h | 3 + 4 files changed, 211 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt create mode 100644 drivers/clk/shmobile/clk-r8a7779.c
Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt new file +27 -0
@@ -0,0 +1,27 @@ +* Renesas R8A7779 Clock Pulse Generator (CPG) + +The CPG generates core clocks for the R8A7779. It includes one PLL and +several fixed ratio dividers + +Required Properties: + + - compatible: Must be "renesas,r8a7779-cpg-clocks" + - reg: Base address and length of the memory resource used by the CPG + + - clocks: Reference to the parent clock + - #clock-cells: Must be 1 + - clock-output-names: The names of the clocks. Supported clocks are "plla", + "z", "zs", "s", "s1", "p", "b", "out". + + +Example +------- + + cpg_clocks: cpg_clocks at ffc80000 { + compatible = "renesas,r8a7779-cpg-clocks"; + reg = <0 0xffc80000 0 0x30>; + clocks = <&extal_clk>; + #clock-cells = <1>; + clock-output-names = "plla", "z", "zs", "s", "s1", "p", + "b", "out"; + };
drivers/clk/shmobile/Makefile +1 -0
@@ -1,5 +1,6 @@ obj-$(CONFIG_ARCH_EMEV2) += clk-emev2.o obj-$(CONFIG_ARCH_R7S72100) += clk-rz.o +obj-$(CONFIG_ARCH_R8A7779) += clk-r8a7779.o obj-$(CONFIG_ARCH_R8A7790) += clk-rcar-gen2.o obj-$(CONFIG_ARCH_R8A7791) += clk-rcar-gen2.o obj-$(CONFIG_ARCH_SHMOBILE_MULTI) += clk-div6.o
drivers/clk/shmobile/clk-r8a7779.c new file +180 -0
180 lines not on this page · raw message
include/linux/clk/shmobile.h +3 -0
@@ -1,7 +1,9 @@/* * Copyright 2013 Ideas On Board SPRL +* Copyright 2013, 2014 Horms Solutions Ltd. * * Contact: Laurent Pinchart <[email protected]> +* Contact: Simon Horman <[email protected]> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by
@@ -14,6 +16,7 @@#include <linux/types.h> +void r8a7779_clocks_init (u32 mode);void rcar_gen2_clocks_init (u32 mode);#endif
Signature · 1 line
1.8.4
PATCH v6 1/2 clk: shmobile: r8a7779: Add clocks support
Quoted 18 lines · Simon Horman
drivers/clk/shmobile/clk-r8a7779.c new file +12
-0@@ -0,0 +1,180 @@ +/* +* r8a7779 Core CPG Clocks +* +* Copyright (C) 2013, 2014 Horms Solutions Ltd. +* +* Contact: Simon Horman <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; version 2 of the License. +*/ +
drivers/clk/shmobile/clk-r8a7779.c line 22
Quoted 10 lines
drivers/clk/shmobile/clk-r8a7779.c new file +10
-0+#include <linux/clk-provider.h> +#include <linux/clkdev.h> +#include <linux/clk/shmobile.h> +#include <linux/init.h> +#include <linux/kernel.h> +#include <linux/of.h> +#include <linux/of_address.h> +#include <linux/spinlock.h> + +#include <dt-bindings/clock/r8a7779-clock.h>
This currently causes a build error in Linux-next, since the header file has not been merged along with the driver.
Arnd
PATCH v6 1/2 clk: shmobile: r8a7779: Add clocks support
Quoted 24 lines · Arnd Bergmann
Quoted 23 lines · Simon Horman
drivers/clk/shmobile/clk-r8a7779.c new file +17
-0@@ -0,0 +1,180 @@ +/* +* r8a7779 Core CPG Clocks +* +* Copyright (C) 2013, 2014 Horms Solutions Ltd. +* +* Contact: Simon Horman <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; version 2 of the License. +*/ + +#include <linux/clk-provider.h> +#include <linux/clkdev.h> +#include <linux/clk/shmobile.h> +#include <linux/init.h> +#include <linux/kernel.h>
Quoted 8 lines
drivers/clk/shmobile/clk-r8a7779.c line 22
Quoted 5 lines
drivers/clk/shmobile/clk-r8a7779.c new file +5
-0+#include <linux/of.h> +#include <linux/of_address.h> +#include <linux/spinlock.h> + +#include <dt-bindings/clock/r8a7779-clock.h> This currently causes a build error in Linux-next, since the header file has not been merged along with the driver.
Hi Arnd,
I'm a little unsure what combination of Kernel config options you are using to compile this driver in linux-next but I do agree that the header is missing and that would cause the compile to fail. I apologise for that oversight.
I believe that a good fix is to add the header, which I already have queued-up in the renesas tree for v3.17. I wonder if Mike would consider taking the following patch for v3.16. Alternatively I would be happy to send it it to arm-soc as a fix for v3.16.
Naturally I will drop it from my v3.17 queue if it its accepted for v3.16 one way or another.
From: Simon Horman <[email protected]>
[PATCH] ARM: shmobile: r8a7779: Add clock index macros for DT sources
Add macros usable by device tree sources to reference r8a7779 clocks by index.
Based on work for the r8a7791 SoC by Laurent Pinchart.
--- include/dt-bindings/clock/r8a7779-clock.h | 64 +++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 include/dt-bindings/clock/r8a7779-clock.h
include/dt-bindings/clock/r8a7779-clock.h new file +64 -0
@@ -0,0 +1,64 @@ +/* +* Copyright (C) 2013 Horms Solutions Ltd. +* +* Contact: Simon Horman <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +*/ + +#ifndef __DT_BINDINGS_CLOCK_R8A7779_H__ +#define __DT_BINDINGS_CLOCK_R8A7779_H__ + +/* CPG */ +#define R8A7779_CLK_PLLA 0 +#define R8A7779_CLK_Z 1 +#define R8A7779_CLK_ZS 2 +#define R8A7779_CLK_S 3 +#define R8A7779_CLK_S1 4 +#define R8A7779_CLK_P 5 +#define R8A7779_CLK_B 6 +#define R8A7779_CLK_OUT 7 + +/* MSTP 0 */ +#define R8A7779_CLK_HSPI 7 +#define R8A7779_CLK_TMU2 14 +#define R8A7779_CLK_TMU1 15 +#define R8A7779_CLK_TMU0 16 +#define R8A7779_CLK_HSCIF1 18 +#define R8A7779_CLK_HSCIF0 19 +#define R8A7779_CLK_SCIF5 21 +#define R8A7779_CLK_SCIF4 22 +#define R8A7779_CLK_SCIF3 23 +#define R8A7779_CLK_SCIF2 24 +#define R8A7779_CLK_SCIF1 25 +#define R8A7779_CLK_SCIF0 26 +#define R8A7779_CLK_I2C3 27 +#define R8A7779_CLK_I2C2 28 +#define R8A7779_CLK_I2C1 29 +#define R8A7779_CLK_I2C0 30 + +/* MSTP 1 */ +#define R8A7779_CLK_USB01 0 +#define R8A7779_CLK_USB2 1 +#define R8A7779_CLK_DU 3 +#define R8A7779_CLK_VIN2 8 +#define R8A7779_CLK_VIN1 9 +#define R8A7779_CLK_VIN0 10 +#define R8A7779_CLK_ETHER 14 +#define R8A7779_CLK_SATA 15 +#define R8A7779_CLK_PCIE 16 +#define R8A7779_CLK_VIN3 20 + +/* MSTP 3 */ +#define R8A7779_CLK_SDHI3 20 +#define R8A7779_CLK_SDHI2 21 +#define R8A7779_CLK_SDHI1 22 +#define R8A7779_CLK_SDHI0 23 +#define R8A7779_CLK_MMC1 30 +#define R8A7779_CLK_MMC0 31 + + +#endif /* __DT_BINDINGS_CLOCK_R8A7779_H__ */
Signature · 1 line
1.8.5.2
PATCH v6 1/2 clk: shmobile: r8a7779: Add clocks support
Quoting Simon Horman (2014-05-27 18:08:50)
Quoted 41 lines · Arnd Bergmann
Quoted 24 lines · Simon Horman
Quoted 23 lines
drivers/clk/shmobile/clk-r8a7779.c new file +17
-0@@ -0,0 +1,180 @@ +/* +* r8a7779 Core CPG Clocks +* +* Copyright (C) 2013, 2014 Horms Solutions Ltd. +* +* Contact: Simon Horman <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; version 2 of the License. +*/ + +#include <linux/clk-provider.h> +#include <linux/clkdev.h> +#include <linux/clk/shmobile.h> +#include <linux/init.h> +#include <linux/kernel.h> Quoted 8 lines
drivers/clk/shmobile/clk-r8a7779.c line 22
Quoted 5 lines
drivers/clk/shmobile/clk-r8a7779.c new file +5
-0+#include <linux/of.h> +#include <linux/of_address.h> +#include <linux/spinlock.h> + +#include <dt-bindings/clock/r8a7779-clock.h> This currently causes a build error in Linux-next, since the header file has not been merged along with the driver.
Hi Arnd,
I'm a little unsure what combination of Kernel config options you are using to compile this driver in linux-next but I do agree that the header is missing and that would cause the compile to fail. I apologise for that oversight.
Quoted 4 lines
I believe that a good fix is to add the header, which I already have queued-up in the renesas tree for v3.17. I wonder if Mike would consider taking the following patch for v3.16. Alternatively I would be happy to send it it to arm-soc as a fix for v3.16.
I'm happy to take it for 3.16. I can't squash/rebase my tree so there will still be the potential for bisect badness, but that's just the way it goes.
Can you send the patch separately after testing it against the current clk-next tree?
Thanks,
Mike
Quoted 94 lines
Naturally I will drop it from my v3.17 queue if it its accepted for v3.16 one way or another.
From: Simon Horman <[email protected]>
[PATCH] ARM: shmobile: r8a7779: Add clock index macros for DT sources
Add macros usable by device tree sources to reference r8a7779 clocks by index.
Based on work for the r8a7791 SoC by Laurent Pinchart.
Acked-by Laurent Pinchart <[email protected]>Signed-off-by Simon Horman <[email protected]>--- include/dt-bindings/clock/r8a7779-clock.h | 64 +++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 include/dt-bindings/clock/r8a7779-clock.hinclude/dt-bindings/clock/r8a7779-clock.h new file +64
-0@@ -0,0 +1,64 @@ +/* +* Copyright (C) 2013 Horms Solutions Ltd. +* +* Contact: Simon Horman <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +*/ + +#ifndef __DT_BINDINGS_CLOCK_R8A7779_H__ +#define __DT_BINDINGS_CLOCK_R8A7779_H__ + +/* CPG */ +#define R8A7779_CLK_PLLA 0 +#define R8A7779_CLK_Z 1 +#define R8A7779_CLK_ZS 2 +#define R8A7779_CLK_S 3 +#define R8A7779_CLK_S1 4 +#define R8A7779_CLK_P 5 +#define R8A7779_CLK_B 6 +#define R8A7779_CLK_OUT 7 + +/* MSTP 0 */ +#define R8A7779_CLK_HSPI 7 +#define R8A7779_CLK_TMU2 14 +#define R8A7779_CLK_TMU1 15 +#define R8A7779_CLK_TMU0 16 +#define R8A7779_CLK_HSCIF1 18 +#define R8A7779_CLK_HSCIF0 19 +#define R8A7779_CLK_SCIF5 21 +#define R8A7779_CLK_SCIF4 22 +#define R8A7779_CLK_SCIF3 23 +#define R8A7779_CLK_SCIF2 24 +#define R8A7779_CLK_SCIF1 25 +#define R8A7779_CLK_SCIF0 26 +#define R8A7779_CLK_I2C3 27 +#define R8A7779_CLK_I2C2 28 +#define R8A7779_CLK_I2C1 29 +#define R8A7779_CLK_I2C0 30 + +/* MSTP 1 */ +#define R8A7779_CLK_USB01 0 +#define R8A7779_CLK_USB2 1 +#define R8A7779_CLK_DU 3 +#define R8A7779_CLK_VIN2 8 +#define R8A7779_CLK_VIN1 9 +#define R8A7779_CLK_VIN0 10 +#define R8A7779_CLK_ETHER 14 +#define R8A7779_CLK_SATA 15 +#define R8A7779_CLK_PCIE 16 +#define R8A7779_CLK_VIN3 20 + +/* MSTP 3 */ +#define R8A7779_CLK_SDHI3 20 +#define R8A7779_CLK_SDHI2 21 +#define R8A7779_CLK_SDHI1 22 +#define R8A7779_CLK_SDHI0 23 +#define R8A7779_CLK_MMC1 30 +#define R8A7779_CLK_MMC0 31 + + +#endif /* __DT_BINDINGS_CLOCK_R8A7779_H__ */ Signature · 1 line
1.8.5.2
PATCH v6 1/2 clk: shmobile: r8a7779: Add clocks support
Quoted 47 lines · Mike Turquette
Quoting Simon Horman (2014-05-27 18:08:50)
Quoted 41 lines · Arnd Bergmann
Quoted 24 lines · Simon Horman
Quoted 23 lines
drivers/clk/shmobile/clk-r8a7779.c new file +17
-0@@ -0,0 +1,180 @@ +/* +* r8a7779 Core CPG Clocks +* +* Copyright (C) 2013, 2014 Horms Solutions Ltd. +* +* Contact: Simon Horman <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; version 2 of the License. +*/ + +#include <linux/clk-provider.h> +#include <linux/clkdev.h> +#include <linux/clk/shmobile.h> +#include <linux/init.h> +#include <linux/kernel.h> Quoted 8 lines
drivers/clk/shmobile/clk-r8a7779.c line 22
Quoted 5 lines
drivers/clk/shmobile/clk-r8a7779.c new file +5
-0+#include <linux/of.h> +#include <linux/of_address.h> +#include <linux/spinlock.h> + +#include <dt-bindings/clock/r8a7779-clock.h> This currently causes a build error in Linux-next, since the header file has not been merged along with the driver.
Hi Arnd,
I'm a little unsure what combination of Kernel config options you are using to compile this driver in linux-next but I do agree that the header is missing and that would cause the compile to fail. I apologise for that oversight.
Quoted 4 lines
I believe that a good fix is to add the header, which I already have queued-up in the renesas tree for v3.17. I wonder if Mike would consider taking the following patch for v3.16. Alternatively I would be happy to send it it to arm-soc as a fix for v3.16.
Quoted 6 lines
I'm happy to take it for 3.16. I can't squash/rebase my tree so there will still be the potential for bisect badness, but that's just the way it goes.
Can you send the patch separately after testing it against the current clk-next tree?
Sure, will do.
Quoted 102 lines
Thanks,
MikeQuoted 94 lines
Naturally I will drop it from my v3.17 queue if it its accepted for v3.16 one way or another.
From: Simon Horman <[email protected]>
[PATCH] ARM: shmobile: r8a7779: Add clock index macros for DT sources
Add macros usable by device tree sources to reference r8a7779 clocks by index.
Based on work for the r8a7791 SoC by Laurent Pinchart.
Acked-by Laurent Pinchart <[email protected]>Signed-off-by Simon Horman <[email protected]>--- include/dt-bindings/clock/r8a7779-clock.h | 64 +++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 include/dt-bindings/clock/r8a7779-clock.hinclude/dt-bindings/clock/r8a7779-clock.h new file +64
-0@@ -0,0 +1,64 @@ +/* +* Copyright (C) 2013 Horms Solutions Ltd. +* +* Contact: Simon Horman <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +*/ + +#ifndef __DT_BINDINGS_CLOCK_R8A7779_H__ +#define __DT_BINDINGS_CLOCK_R8A7779_H__ + +/* CPG */ +#define R8A7779_CLK_PLLA 0 +#define R8A7779_CLK_Z 1 +#define R8A7779_CLK_ZS 2 +#define R8A7779_CLK_S 3 +#define R8A7779_CLK_S1 4 +#define R8A7779_CLK_P 5 +#define R8A7779_CLK_B 6 +#define R8A7779_CLK_OUT 7 + +/* MSTP 0 */ +#define R8A7779_CLK_HSPI 7 +#define R8A7779_CLK_TMU2 14 +#define R8A7779_CLK_TMU1 15 +#define R8A7779_CLK_TMU0 16 +#define R8A7779_CLK_HSCIF1 18 +#define R8A7779_CLK_HSCIF0 19 +#define R8A7779_CLK_SCIF5 21 +#define R8A7779_CLK_SCIF4 22 +#define R8A7779_CLK_SCIF3 23 +#define R8A7779_CLK_SCIF2 24 +#define R8A7779_CLK_SCIF1 25 +#define R8A7779_CLK_SCIF0 26 +#define R8A7779_CLK_I2C3 27 +#define R8A7779_CLK_I2C2 28 +#define R8A7779_CLK_I2C1 29 +#define R8A7779_CLK_I2C0 30 + +/* MSTP 1 */ +#define R8A7779_CLK_USB01 0 +#define R8A7779_CLK_USB2 1 +#define R8A7779_CLK_DU 3 +#define R8A7779_CLK_VIN2 8 +#define R8A7779_CLK_VIN1 9 +#define R8A7779_CLK_VIN0 10 +#define R8A7779_CLK_ETHER 14 +#define R8A7779_CLK_SATA 15 +#define R8A7779_CLK_PCIE 16 +#define R8A7779_CLK_VIN3 20 + +/* MSTP 3 */ +#define R8A7779_CLK_SDHI3 20 +#define R8A7779_CLK_SDHI2 21 +#define R8A7779_CLK_SDHI1 22 +#define R8A7779_CLK_SDHI0 23 +#define R8A7779_CLK_MMC1 30 +#define R8A7779_CLK_MMC0 31 + + +#endif /* __DT_BINDINGS_CLOCK_R8A7779_H__ */ Signature · 1 line
1.8.5.2--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v6 1/2 clk: shmobile: r8a7779: Add clocks support
In reply to Simon HormanHi Simon,
Quoted 12 lines · Simon Horman
Quoted 4 lines
Quoted 1 line
+#include <
dt-bindings/clock/r8a7779-clock.h>This currently causes a build error in Linux-next, since the header file has not been merged along with the driver.
Hi Arnd,
I'm a little unsure what combination of Kernel config options you are using to compile this driver in linux-next but I do agree that the header is missing and that would cause the compile to fail. I apologise for that oversight.
Quoted 4 lines
I believe that a good fix is to add the header, which I already have queued-up in the renesas tree for v3.17. I wonder if Mike would consider taking the following patch for v3.16. Alternatively I would be happy to send it it to arm-soc as a fix for v3.16.
IIUIC, the only reason the driver source needs the header file is:
#define CPG_NUM_CLOCKS (R8A7779_CLK_OUT + 1)
Why not
#define CPG_NUM_CLOCKS 8
and drop the include?
Or better, use "num_clks" (from of_property_count_strings(np, "clock-output-names")), like the other R-Car drivers do.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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
PATCH v6 1/2 clk: shmobile: r8a7779: Add clocks support
Quoted 24 lines · Geert Uytterhoeven
Hi Simon,
Quoted 12 lines · Simon Horman
Quoted 4 lines
Quoted 1 line
+#include <
dt-bindings/clock/r8a7779-clock.h>This currently causes a build error in Linux-next, since the header file has not been merged along with the driver.
Hi Arnd,
I'm a little unsure what combination of Kernel config options you are using to compile this driver in linux-next but I do agree that the header is missing and that would cause the compile to fail. I apologise for that oversight.
Quoted 4 lines
I believe that a good fix is to add the header, which I already have queued-up in the renesas tree for v3.17. I wonder if Mike would consider taking the following patch for v3.16. Alternatively I would be happy to send it it to arm-soc as a fix for v3.16.
IIUIC, the only reason the driver source needs the header file is:
#define
CPG_NUM_CLOCKS(R8A7779_CLK_OUT+ 1)
Quoted 8 lines
Why not
#define
CPG_NUM_CLOCKS8and drop the include?
Or better, use "
num_clks" (fromof_property_count_strings(np, "clock-output-names")), like the other R-Car drivers do.
The latter I like. But I don't see any harm in fixing the immediate problem using a patch that has already been reviewed.
PATCH v6 2/2 clk: shmobile: r8a7779: Add MSTP clock support
In reply to Simon HormanAdd MSTP clock support for the r8a7779 SoC
The only change required appears to be to note a new compatibility string in the bindings.
---
v4 - v6
* No Change
v3
* As suggested by Laurent Pinchart
- Add entry in numerical order
--- Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt +1 -0
@@ -10,6 +10,7 @@ index in the group, from 0 to 31. Required Properties: - compatible: Must be one of the following + - "renesas,r8a7779-mstp-clocks" for R8A7779 (R-Car H1) MSTP gate clocks - "renesas,r8a7790-mstp-clocks" for R8A7790 (R-Car H2) MSTP gate clocks - "renesas,r8a7791-mstp-clocks" for R8A7791 (R-Car M2) MSTP gate clocks - "renesas,cpg-mstp-clock" for generic MSTP gate clocks
Signature · 1 line
1.8.4
v6 cover clk: shmobile: r8a7779: Add clocks support
In reply to Simon HormanQuoted 4 lines · Simon Horman
Hi Mike,
please consider applying this series.
Quoted 8 lines
It is the first step on the way towards using the common clock framework and in turn multi-platform on the r8a7779 (R-Car H1) SoC.
It has been acked by Laurent Pinchart who did similar work for the R-Car Gen-2 family of SoCs. This work is based on that work.
The bindings added in this series have not been changed since v4 was posted with devicetree at vger.kernel.org CCed on the 13th of March.
Hi Mike,
if you could take a look at this I would be most grateful.
Quoted 17 lines
Simon Horman (2):
clk: shmobile: r8a7779: Add clocks support
clk: shmobile: r8a7779: Add MSTP clock support.../bindings/clock/renesas,cpg-mstp-clocks.txt | 1 + .../bindings/clock/renesas,r8a7779-cpg-clocks.txt | 27 ++++ drivers/clk/shmobile/Makefile | 1 + drivers/clk/shmobile/clk-r8a7779.c | 180 +++++++++++++++++++++ include/linux/clk/shmobile.h | 3 + 5 files changed, 212 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt create mode 100644 drivers/clk/shmobile/clk-r8a7779.cSignature · 1 line
1.8.4
v6 cover clk: shmobile: r8a7779: Add clocks support
In reply to Simon HormanHi Mike,
I'm wondering if you would consider this series. I'm happy to take it through my tree and then arm-soc is that works best for you.
Quoted 29 lines · Simon Horman
Hi Mike,
please consider applying this series.
It is the first step on the way towards using the common clock framework and in turn multi-platform on the r8a7779 (R-Car H1) SoC.
It has been acked by Laurent Pinchart who did similar work for the R-Car Gen-2 family of SoCs. This work is based on that work.
The bindings added in this series have not been changed since v4 was posted with devicetree at vger.kernel.org CCed on the 13th of March.
Simon Horman (2):
clk: shmobile: r8a7779: Add clocks support
clk: shmobile: r8a7779: Add MSTP clock support.../bindings/clock/renesas,cpg-mstp-clocks.txt | 1 + .../bindings/clock/renesas,r8a7779-cpg-clocks.txt | 27 ++++ drivers/clk/shmobile/Makefile | 1 + drivers/clk/shmobile/clk-r8a7779.c | 180 +++++++++++++++++++++ include/linux/clk/shmobile.h | 3 + 5 files changed, 212 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt create mode 100644 drivers/clk/shmobile/clk-r8a7779.cSignature · 1 line
1.8.4
v6 cover clk: shmobile: r8a7779: Add clocks support
Quoting Simon Horman (2014-05-12 18:59:05)
Quoted 5 lines
Hi Mike,
I'm wondering if you would consider this series. I'm happy to take it through my tree and then arm-soc is that works best for you.
I've just taken these into clk-next.
Thanks!
Mike
Quoted 31 lines · Simon Horman
Quoted 29 lines
Hi Mike,
please consider applying this series.
It is the first step on the way towards using the common clock framework and in turn multi-platform on the r8a7779 (R-Car H1) SoC.
It has been acked by Laurent Pinchart who did similar work for the R-Car Gen-2 family of SoCs. This work is based on that work.
The bindings added in this series have not been changed since v4 was posted with devicetree at vger.kernel.org CCed on the 13th of March.
Simon Horman (2):
clk: shmobile: r8a7779: Add clocks support
clk: shmobile: r8a7779: Add MSTP clock support.../bindings/clock/renesas,cpg-mstp-clocks.txt | 1 + .../bindings/clock/renesas,r8a7779-cpg-clocks.txt | 27 ++++ drivers/clk/shmobile/Makefile | 1 + drivers/clk/shmobile/clk-r8a7779.c | 180 +++++++++++++++++++++ include/linux/clk/shmobile.h | 3 + 5 files changed, 212 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt create mode 100644 drivers/clk/shmobile/clk-r8a7779.cSignature · 1 line
1.8.4
v6 cover clk: shmobile: r8a7779: Add clocks support
Quoted 10 lines · Mike Turquette
Quoting Simon Horman (2014-05-12 18:59:05)
Quoted 5 lines
Hi Mike,
I'm wondering if you would consider this series. I'm happy to take it through my tree and then arm-soc is that works best for you.
I've just taken these into clk-next.
Thanks!
Great, thanks!