Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1645390 > unrolled thread

[PATCH v2 00/10] clk: renesas: rcar-gen2: Add new CPG/MSSR drivers

Started byGeert Uytterhoeven <geert+renesas@glider.be>
First post2017-05-19 10:50 +0200
Last post2017-05-19 11:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2 00/10] clk: renesas: rcar-gen2: Add new CPG/MSSR drivers Geert Uytterhoeven <geert+renesas@glider.be> - 2017-05-19 10:50 +0200
    Re: [PATCH v2 00/10] clk: renesas: rcar-gen2: Add new CPG/MSSR drivers Geert Uytterhoeven <geert@linux-m68k.org> - 2017-05-19 11:10 +0200

#1645390 — [PATCH v2 00/10] clk: renesas: rcar-gen2: Add new CPG/MSSR drivers

FromGeert Uytterhoeven <geert+renesas@glider.be>
Date2017-05-19 10:50 +0200
Subject[PATCH v2 00/10] clk: renesas: rcar-gen2: Add new CPG/MSSR drivers
Message-ID<tILLI-7Zm-3@gated-at.bofh.it>
	Hi all,

Currently Renesas R-Car Gen2 SoCs use the common clk-rcar-gen2,
clk-mstp, and clk-div6 drivers, which depend on most clocks being
described in DT.  Especially the module (MSTP) clocks are cumbersome and
error prone, due to 3 arrays (clocks, clock-indices, and
clock-output-names) to be kept in sync. In addition, the clk-mstp driver
cannot be extended easily to also support module resets, which are
provided by the same hardware module.

Hence when developing support for R-Car Gen3 SoCs, another approach was
chosen, which led to the CPG/MSSR driver core, and SoC-specific
subdrivers (initially for R-Car Gen3, but later also for RZ/G1).

This series introduces new clock drivers for all supported R-Car Gen2
SoCs, using the CPG/MSSR driver core, and the support for RZ/G1.  They
provide all clocks supported by the old driver, plus a few more.
The old driver can still be used through a Kconfig option, to preserve
backward compatibility with old DTBs.

This series does not include the corresponding DTS updates.  These will
be posted as a separate series later.

Changes compared to v1:
  - Add Acked-by, Reviewed-by,
  - Add more rationale to the clock driver patch descriptions.

This series depends on "[PATCH v2] clk: renesas: Rework Kconfig and
Makefile logic", which I posted before.

For testing, this patch series, incl. all dependencies and the DTS
updates, are available in the topic/rcar2-cpg-mssr-v2 branch of my
renesas-drivers git repository at
git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git.

This has been tested on r8a7790/lager, r8a7791/koelsch, r8a7792/blanche,
r8a7793/gose, and r8a7794/alt.  /sys/kernel/debug/clk/clk_summary has
been compared before and after the conversion.

I plan to queue this up in clk-renesas-for-v4.13, so the DTS updates can
be queued for v4.14 later.

Thanks!

Geert Uytterhoeven (10):
  clk: renesas: cpg-mssr: Document R-Car Gen2 support
  clk: renesas: Add r8a7790 CPG Core Clock Definitions
  clk: renesas: Add r8a7791 CPG Core Clock Definitions
  clk: renesas: Add r8a7792 CPG Core Clock Definitions
  clk: renesas: Add r8a7793 CPG Core Clock Definitions
  clk: renesas: Add r8a7794 CPG Core Clock Definitions
  clk: renesas: r8a7790: Add new CPG/MSSR driver
  clk: renesas: r8a7791/r8a7793: Add new CPG/MSSR driver
  clk: renesas: r8a7792: Add new CPG/MSSR driver
  clk: renesas: r8a7794: Add new CPG/MSSR driver

 .../devicetree/bindings/clock/renesas,cpg-mssr.txt |  10 +-
 drivers/clk/renesas/Kconfig                        |  22 +-
 drivers/clk/renesas/Makefile                       |   4 +
 drivers/clk/renesas/r8a7790-cpg-mssr.c             | 278 ++++++++++++++++++++
 drivers/clk/renesas/r8a7791-cpg-mssr.c             | 286 +++++++++++++++++++++
 drivers/clk/renesas/r8a7792-cpg-mssr.c             | 221 ++++++++++++++++
 drivers/clk/renesas/r8a7794-cpg-mssr.c             | 255 ++++++++++++++++++
 drivers/clk/renesas/renesas-cpg-mssr.c             |  29 +++
 drivers/clk/renesas/renesas-cpg-mssr.h             |   4 +
 include/dt-bindings/clock/r8a7790-cpg-mssr.h       |  52 ++++
 include/dt-bindings/clock/r8a7791-cpg-mssr.h       |  48 ++++
 include/dt-bindings/clock/r8a7792-cpg-mssr.h       |  43 ++++
 include/dt-bindings/clock/r8a7793-cpg-mssr.h       |  48 ++++
 include/dt-bindings/clock/r8a7794-cpg-mssr.h       |  47 ++++
 14 files changed, 1341 insertions(+), 6 deletions(-)
 create mode 100644 drivers/clk/renesas/r8a7790-cpg-mssr.c
 create mode 100644 drivers/clk/renesas/r8a7791-cpg-mssr.c
 create mode 100644 drivers/clk/renesas/r8a7792-cpg-mssr.c
 create mode 100644 drivers/clk/renesas/r8a7794-cpg-mssr.c
 create mode 100644 include/dt-bindings/clock/r8a7790-cpg-mssr.h
 create mode 100644 include/dt-bindings/clock/r8a7791-cpg-mssr.h
 create mode 100644 include/dt-bindings/clock/r8a7792-cpg-mssr.h
 create mode 100644 include/dt-bindings/clock/r8a7793-cpg-mssr.h
 create mode 100644 include/dt-bindings/clock/r8a7794-cpg-mssr.h

-- 
2.7.4

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

[toc] | [next] | [standalone]


#1645427

FromGeert Uytterhoeven <geert@linux-m68k.org>
Date2017-05-19 11:10 +0200
Message-ID<tIM55-8nS-47@gated-at.bofh.it>
In reply to#1645390
On Fri, May 19, 2017 at 10:45 AM, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
> Currently Renesas R-Car Gen2 SoCs use the common clk-rcar-gen2,
> clk-mstp, and clk-div6 drivers, which depend on most clocks being
> described in DT.  Especially the module (MSTP) clocks are cumbersome and
> error prone, due to 3 arrays (clocks, clock-indices, and
> clock-output-names) to be kept in sync. In addition, the clk-mstp driver
> cannot be extended easily to also support module resets, which are
> provided by the same hardware module.
>
> Hence when developing support for R-Car Gen3 SoCs, another approach was
> chosen, which led to the CPG/MSSR driver core, and SoC-specific
> subdrivers (initially for R-Car Gen3, but later also for RZ/G1).
>
> This series introduces new clock drivers for all supported R-Car Gen2
> SoCs, using the CPG/MSSR driver core, and the support for RZ/G1.  They
> provide all clocks supported by the old driver, plus a few more.
> The old driver can still be used through a Kconfig option, to preserve
> backward compatibility with old DTBs.
>
> This series does not include the corresponding DTS updates.  These will
> be posted as a separate series later.

>  .../devicetree/bindings/clock/renesas,cpg-mssr.txt |  10 +-
>  drivers/clk/renesas/Kconfig                        |  22 +-
>  drivers/clk/renesas/Makefile                       |   4 +
>  drivers/clk/renesas/r8a7790-cpg-mssr.c             | 278 ++++++++++++++++++++
>  drivers/clk/renesas/r8a7791-cpg-mssr.c             | 286 +++++++++++++++++++++
>  drivers/clk/renesas/r8a7792-cpg-mssr.c             | 221 ++++++++++++++++
>  drivers/clk/renesas/r8a7794-cpg-mssr.c             | 255 ++++++++++++++++++
>  drivers/clk/renesas/renesas-cpg-mssr.c             |  29 +++
>  drivers/clk/renesas/renesas-cpg-mssr.h             |   4 +
>  include/dt-bindings/clock/r8a7790-cpg-mssr.h       |  52 ++++
>  include/dt-bindings/clock/r8a7791-cpg-mssr.h       |  48 ++++
>  include/dt-bindings/clock/r8a7792-cpg-mssr.h       |  43 ++++
>  include/dt-bindings/clock/r8a7793-cpg-mssr.h       |  48 ++++
>  include/dt-bindings/clock/r8a7794-cpg-mssr.h       |  47 ++++
>  14 files changed, 1341 insertions(+), 6 deletions(-)

BTW, the above diffstat should be combined with the diffstat for the DTS
conversion:

 arch/arm/boot/dts/r8a7790-lager.dts   |   7 +-
 arch/arm/boot/dts/r8a7790.dtsi        | 557 ++++++----------------------------
 arch/arm/boot/dts/r8a7791-koelsch.dts |   4 +-
 arch/arm/boot/dts/r8a7791-porter.dts  |   4 +-
 arch/arm/boot/dts/r8a7791.dtsi        | 557 +++++++---------------------------
 arch/arm/boot/dts/r8a7792-blanche.dts |   3 +-
 arch/arm/boot/dts/r8a7792-wheat.dts   |   3 +-
 arch/arm/boot/dts/r8a7792.dtsi        | 333 ++++----------------
 arch/arm/boot/dts/r8a7793-gose.dts    |   4 +-
 arch/arm/boot/dts/r8a7793.dtsi        | 459 +++++-----------------------
 arch/arm/boot/dts/r8a7794-alt.dts     |   3 +-
 arch/arm/boot/dts/r8a7794-silk.dts    |   3 +-
 arch/arm/boot/dts/r8a7794.dtsi        | 528 +++++---------------------------
 13 files changed, 430 insertions(+), 2035 deletions(-)

Giving a net removal of 270 lines.
That is, before removal of the backward compatibility of the drivers with
old DTBs, which would remove ca. 500 more lines.

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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web