All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state
@ 2016-06-01 19:20 Geert Uytterhoeven
  2016-06-01 19:20 ` [PATCH/RFC v3 01/22] reset: Add renesas,rst DT bindings Geert Uytterhoeven
                   ` (18 more replies)
  0 siblings, 19 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:20 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

	Hi all,

Currently the R-Car Clock Pulse Generator (CPG) drivers obtains the
state of the mode pins either by a call from the board code, or directly
by using a hardcoded register access. This is a bit messy, and creates a
dependency between driver and platform code.

This RFC patch series converts the various Renesas R-Car clock drivers
and support code from reading the mode pin states using a hardcoded
register access to using a new R-Car RST driver.

This series consists of 5 parts:
  A. Patches 1 and 2 add DT bindings and driver code for the R-Car RST
     driver,
  B. Patches 3-10 add device nodes for the RST modules to the R-Car DTS
     files,
  C. Patches 11-16 convert the clock drivers to call into the new R-Car
     RST driver,
  D. Patches 17-19 remove passing mode pin state to the clock drivers
     from the board code,
  E. Patches 20-22 remove dead code from the clock drivers.

I've kept all parts together as this is an RFC, and to avoid losing the
bigger picture. I will split it in series per maintainer, when we have
decided how to handle the dependencies (see below).

After this, there are still a few users of rcar_gen2_read_mode_pins()
left in board code, which should be converted in one way or another.
However, all R-Car clock drivers will rely on the presence in DT of a
device node for the RST module.  Backwards compatibility with old DTBs
is retained only for R-Car Gen2, which has fallback code calling into
rcar_gen2_read_mode_pins().

As is usually the case with moving functionality from board code to DT,
there are lots of hard dependencies:
  - The DT updates in Part B can be merged as soon as the DT bindings in
    Part A have been approved,
  - The clock driver updates in Part C depend functionally on the driver
    code in Part A,
  - The board code cleanups in Part D depend on the clock driver updates
    in Part C,
  - The block driver cleanups in part E depend on the board code
    cleanups in part D.

This series has evolved over time, cfr.
  - "[PATCH/RFC 00/11] ARM: shmobile: Let CPG use syscon for MD pin
    values" (http://www.spinics.net/lists/linux-clk/msg01478.html),
  - "[PATCH 00/10] arm64: renesas: Obtain MD pin values using
    syscon/regmap".
    (http://www.spinics.net/lists/linux-sh/msg44757.html)

Changes compared to v2:
  - Use "renesas,<soctype>-rst" instead of "renesas,rst-<soctype>",
  - Drop "syscon" compatible value and "renesas,modemr" property, use a
    real driver instead,
  - Add support for R-Car M1A, H1, and M3-W.

Changes compared to v1:
  - Add support for R-Car H3.

An alternative and broader solution was proposed by Simon Horman as
"[PATCH/RFC 0/6] boot-mode-reg: Add core"
(http://www.spinics.net/lists/linux-sh/msg45969.html).

This patch series is against renesas-drivers.
It has been tested on r8a7778/bockw, r8a7779/marzen, r8a7791/koelsch,
and r8a7795/salvator-x.

Thanks for your comments!

Geert Uytterhoeven (22):
  reset: Add renesas,rst DT bindings
  soc: renesas: Add R-Car RST driver
  ARM: dts: r8a7778: Add device node for RESET/WDT module
  ARM: dts: r8a7779: Add device node for RESET/WDT module
  ARM: dts: r8a7790: Add device node for RST module
  ARM: dts: r8a7791: Add device node for RST module
  ARM: dts: r8a7793: Add device node for RST module
  ARM: dts: r8a7794: Add device node for RST module
  arm64: renesas: r8a7795 dtsi: Add device node for RST module
  arm64: renesas: r8a7796 dtsi: Add device node for RST module
  clk: renesas: r8a7778: Obtain mode pin values using R-Car RST driver
  clk: renesas: r8a7779: Obtain mode pin values from R-Car RST driver
  clk: renesas: rcar-gen2: Obtain mode pin values using RST driver
  clk: renesas: r8a7795: Obtain mode pin values from R-Car RST driver
  clk: renesas: r8a7796: Obtain mode pin values from R-Car RST driver
  clk: renesas: rcar-gen3-cpg: Remove obsolete
    rcar_gen3_read_mode_pins()
  ARM: shmobile: r8a7778: Stop passing mode pins state to clock driver
  ARM: shmobile: r8a7779: Stop passing mode pins state to clock driver
  ARM: shmobile: rcar-gen2: Stop passing mode pins state to clock driver
  clk: renesas: r8a7778: Remove obsolete r8a7778_clocks_init()
  clk: renesas: r8a7779: Remove obsolete r8a7779_clocks_init()
  clk: renesas: rcar-gen2: Remove obsolete rcar_gen2_clocks_init()

 .../devicetree/bindings/reset/renesas,rst.txt      | 35 ++++++++
 arch/arm/boot/dts/r8a7778.dtsi                     |  5 ++
 arch/arm/boot/dts/r8a7779.dtsi                     |  5 ++
 arch/arm/boot/dts/r8a7790.dtsi                     |  5 ++
 arch/arm/boot/dts/r8a7791.dtsi                     |  5 ++
 arch/arm/boot/dts/r8a7793.dtsi                     |  5 ++
 arch/arm/boot/dts/r8a7794.dtsi                     |  5 ++
 arch/arm/mach-shmobile/setup-r8a7778.c             | 15 ----
 arch/arm/mach-shmobile/setup-r8a7779.c             | 27 -------
 arch/arm/mach-shmobile/setup-rcar-gen2.c           |  6 +-
 arch/arm64/boot/dts/renesas/r8a7795.dtsi           |  5 ++
 arch/arm64/boot/dts/renesas/r8a7796.dtsi           |  5 ++
 drivers/clk/renesas/clk-r8a7778.c                  | 26 +++---
 drivers/clk/renesas/clk-r8a7779.c                  | 18 ++---
 drivers/clk/renesas/clk-rcar-gen2.c                | 17 ++--
 drivers/clk/renesas/r8a7795-cpg-mssr.c             |  8 +-
 drivers/clk/renesas/r8a7796-cpg-mssr.c             |  8 +-
 drivers/clk/renesas/rcar-gen3-cpg.c                | 17 ----
 drivers/clk/renesas/rcar-gen3-cpg.h                |  1 -
 drivers/soc/renesas/Makefile                       |  5 ++
 drivers/soc/renesas/rcar-rst.c                     | 94 ++++++++++++++++++++++
 include/linux/clk/renesas.h                        |  4 -
 include/linux/soc/renesas/rcar-rst.h               |  6 ++
 23 files changed, 227 insertions(+), 100 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/reset/renesas,rst.txt
 create mode 100644 drivers/soc/renesas/rcar-rst.c
 create mode 100644 include/linux/soc/renesas/rcar-rst.h

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

* [PATCH/RFC v3 01/22] reset: Add renesas,rst DT bindings
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
@ 2016-06-01 19:20 ` Geert Uytterhoeven
  2016-06-02  5:40     ` Dirk Behme
  2016-06-02 21:47     ` Laurent Pinchart
  2016-06-01 19:21 ` [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver Geert Uytterhoeven
                   ` (17 subsequent siblings)
  18 siblings, 2 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:20 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

Add DT bindings for the Renesas R-Car Reset Controller (R-Car Gen1
RESET/WDT and R-Car Gen2/Gen3 RST).

As the features provided by the hardware module differ a lot across the
various SoC families and members, only SoC-specific compatible values
are defined.

For now we use the RST only for providing access to the state of the
mode pins.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Magnus Damm <damm+renesas@opensource.se>
---
v3:
  - Clarify current usage,
  - Use "renesas,<soctype>-rst" instead of "renesas,rst-<soctype>",
  - Drop "syscon" compatible value,
  - Add R-Car M3-W,
  - Add R-Car Gen1,

v2:
  - Add Acked-by.
---
 .../devicetree/bindings/reset/renesas,rst.txt      | 35 ++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/reset/renesas,rst.txt

diff --git a/Documentation/devicetree/bindings/reset/renesas,rst.txt b/Documentation/devicetree/bindings/reset/renesas,rst.txt
new file mode 100644
index 0000000000000000..488c72e1ee849cd3
--- /dev/null
+++ b/Documentation/devicetree/bindings/reset/renesas,rst.txt
@@ -0,0 +1,35 @@
+DT bindings for the Renesas R-Car Reset Controller
+
+The R-Car Reset Controller provides reset control, and implements the following
+functions:
+  - Latching of the levels on mode pins when PRESET# is negated,
+  - Mode monitoring register,
+  - Reset control of peripheral devices (on R-Car Gen1),
+  - Watchdog timer (on R-Car Gen1).
+  - Register-based reset control and boot address registers for the various CPU
+    cores (on R-Car Gen2/Gen3),
+
+
+Required properties:
+  - compatible: Should be
+		  - "renesas,<soctype>-reset-wdt" for R-Car Gen1,
+		  - "renesas,<soctype>-rst" for R-Car Gen2/Gen3.
+		Examples with soctypes are:
+		  - "renesas,r8a7778-reset-wdt" (R-Car M1A)
+		  - "renesas,r8a7779-reset-wdt" (R-Car H1)
+		  - "renesas,r8a7790-rst" (R-Car H2)
+		  - "renesas,r8a7791-rst" (R-Car M2-W)
+		  - "renesas,r8a7792-rst" (R-Car V2H
+		  - "renesas,r8a7793-rst" (R-Car M2-N)
+		  - "renesas,r8a7794-rst" (R-Car E2)
+		  - "renesas,r8a7795-rst" (R-Car H3)
+		  - "renesas,r8a7796-rst" (R-Car M3-W)
+  - reg: Address start and address range for the device.
+
+
+Example:
+
+	rst: reset-controller@e6160000 {
+		compatible = "renesas,r8a7795-rst";
+		reg = <0 0xe6160000 0 0x0200>;
+	};
-- 
1.9.1

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

* [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
  2016-06-01 19:20 ` [PATCH/RFC v3 01/22] reset: Add renesas,rst DT bindings Geert Uytterhoeven
@ 2016-06-01 19:21 ` Geert Uytterhoeven
  2016-06-02  5:42     ` Dirk Behme
  2016-06-02 21:58     ` Laurent Pinchart
  2016-06-01 19:21 ` [PATCH/RFC v3 05/22] ARM: dts: r8a7790: Add device node for RST module Geert Uytterhoeven
                   ` (16 subsequent siblings)
  18 siblings, 2 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

Add a driver for the Renesas R-Car Gen1 RESET/WDT and R-Car Gen2/Gen3
RST module.

For now this driver just provides an API to obtain the state of the mode
pins, as latched at reset time.  As this is typically called from the
probe function of a clock driver, which can run much earlier than any
initcall, calling rcar_rst_read_mode_pins() may force an early
initialization of the driver.

Despite the current simple and almost identical handling for all
supported SoCs, the driver matches against SoC-specific compatible
values only, as the features provided by the hardware module differ a
lot across the various SoC families and members.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  - New.
---
 drivers/soc/renesas/Makefile         |  5 ++
 drivers/soc/renesas/rcar-rst.c       | 94 ++++++++++++++++++++++++++++++++++++
 include/linux/soc/renesas/rcar-rst.h |  6 +++
 3 files changed, 105 insertions(+)
 create mode 100644 drivers/soc/renesas/rcar-rst.c
 create mode 100644 include/linux/soc/renesas/rcar-rst.h

diff --git a/drivers/soc/renesas/Makefile b/drivers/soc/renesas/Makefile
index f32a001c65c3ab44..0d732ff893dd8fba 100644
--- a/drivers/soc/renesas/Makefile
+++ b/drivers/soc/renesas/Makefile
@@ -1,3 +1,8 @@
+obj-$(CONFIG_ARCH_RCAR_GEN1)	+= rcar-rst.o
+obj-$(CONFIG_ARCH_RCAR_GEN2)	+= rcar-rst.o
+obj-$(CONFIG_ARCH_R8A7795)	+= rcar-rst.o
+obj-$(CONFIG_ARCH_R8A7796)	+= rcar-rst.o
+
 obj-$(CONFIG_ARCH_R8A7779)	+= rcar-sysc.o r8a7779-sysc.o
 obj-$(CONFIG_ARCH_R8A7790)	+= rcar-sysc.o r8a7790-sysc.o
 obj-$(CONFIG_ARCH_R8A7791)	+= rcar-sysc.o r8a7791-sysc.o
diff --git a/drivers/soc/renesas/rcar-rst.c b/drivers/soc/renesas/rcar-rst.c
new file mode 100644
index 0000000000000000..1997c348c0853254
--- /dev/null
+++ b/drivers/soc/renesas/rcar-rst.c
@@ -0,0 +1,94 @@
+/*
+ * R-Car Gen1 RESET/WDT and R-Car Gen2/Gen3 RST Driver
+ *
+ * Copyright (C) 2016 Glider bvba
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/of_address.h>
+#include <linux/soc/renesas/rcar-rst.h>
+
+struct rst_config {
+	unsigned int modemr;	/* Mode Monitoring Register Offset */
+};
+
+static const struct rst_config rcar_rst_gen1 __initconst = {
+	.modemr = 0x20,
+};
+
+static const struct rst_config rcar_rst_gen2 __initconst = {
+	.modemr = 0x60,
+};
+
+static const struct rst_config rcar_rst_gen3 __initconst = {
+	.modemr = 0x60,
+};
+
+static const struct of_device_id rcar_rst_matches[] __initconst = {
+	{ .compatible = "renesas,r8a7778-reset-wdt", .data = &rcar_rst_gen1 },
+	{ .compatible = "renesas,r8a7779-reset-wdt", .data = &rcar_rst_gen1 },
+	{ .compatible = "renesas,r8a7790-rst", .data = &rcar_rst_gen2 },
+	{ .compatible = "renesas,r8a7791-rst", .data = &rcar_rst_gen2 },
+	{ .compatible = "renesas,r8a7792-rst", .data = &rcar_rst_gen2 },
+	{ .compatible = "renesas,r8a7793-rst", .data = &rcar_rst_gen2 },
+	{ .compatible = "renesas,r8a7794-rst", .data = &rcar_rst_gen2 },
+	{ .compatible = "renesas,r8a7795-rst", .data = &rcar_rst_gen3 },
+	{ .compatible = "renesas,r8a7796-rst", .data = &rcar_rst_gen3 },
+	{ /* sentinel */ }
+};
+
+static void __iomem *rcar_rst_base __initdata;
+static u32 saved_mode __initdata;
+
+static int __init rcar_rst_init(void)
+{
+	const struct of_device_id *match;
+	const struct rst_config *cfg;
+	struct device_node *np;
+	void __iomem *base;
+	int error = 0;
+
+	if (rcar_rst_base)
+		return 0;
+
+	np = of_find_matching_node_and_match(NULL, rcar_rst_matches, &match);
+	if (!np)
+		return -ENODEV;
+
+	base = of_iomap(np, 0);
+	if (!base) {
+		pr_warn("%s: Cannot map regs\n", np->full_name);
+		error = -ENOMEM;
+		goto out_put;
+	}
+
+	rcar_rst_base = base;
+	cfg = match->data;
+	saved_mode = ioread32(base + cfg->modemr);
+
+	pr_debug("%s: MODE = 0x%08x\n", np->full_name, saved_mode);
+
+out_put:
+	of_node_put(np);
+	return error;
+}
+arch_initcall(rcar_rst_init);
+
+int __init rcar_rst_read_mode_pins(u32 *mode)
+{
+	int error;
+
+	if (!rcar_rst_base) {
+		error = rcar_rst_init();
+		if (error)
+			return error;
+	}
+
+	*mode = saved_mode;
+	return 0;
+}
diff --git a/include/linux/soc/renesas/rcar-rst.h b/include/linux/soc/renesas/rcar-rst.h
new file mode 100644
index 0000000000000000..a18e0783946b66ec
--- /dev/null
+++ b/include/linux/soc/renesas/rcar-rst.h
@@ -0,0 +1,6 @@
+#ifndef __LINUX_SOC_RENESAS_RCAR_RST_H__
+#define __LINUX_SOC_RENESAS_RCAR_RST_H__
+
+int rcar_rst_read_mode_pins(u32 *mode);
+
+#endif /* __LINUX_SOC_RENESAS_RCAR_RST_H__ */
-- 
1.9.1

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

* [PATCH/RFC v3 03/22] ARM: dts: r8a7778: Add device node for RESET/WDT module
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
@ 2016-06-01 19:21     ` Geert Uytterhoeven
  2016-06-01 19:21 ` [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver Geert Uytterhoeven
                       ` (17 subsequent siblings)
  18 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven

Add a device node for the RESET/WDT module, which provides a.o. reset
control, mode pin monitoring, and watchdog control.

Signed-off-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
---
v3:
  - New.
---
 arch/arm/boot/dts/r8a7778.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7778.dtsi b/arch/arm/boot/dts/r8a7778.dtsi
index e571d66ea0fe1721..3d0a18abd408c76d 100644
--- a/arch/arm/boot/dts/r8a7778.dtsi
+++ b/arch/arm/boot/dts/r8a7778.dtsi
@@ -626,4 +626,9 @@
 				"sru-src6", "sru-src7", "sru-src8";
 		};
 	};
+
+	rst: reset-controller@ffcc0000 {
+		compatible = "renesas,r8a7778-reset-wdt";
+		reg = <0xffcc0000 0x40>;
+	};
 };
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH/RFC v3 03/22] ARM: dts: r8a7778: Add device node for RESET/WDT module
@ 2016-06-01 19:21     ` Geert Uytterhoeven
  0 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

Add a device node for the RESET/WDT module, which provides a.o. reset
control, mode pin monitoring, and watchdog control.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  - New.
---
 arch/arm/boot/dts/r8a7778.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7778.dtsi b/arch/arm/boot/dts/r8a7778.dtsi
index e571d66ea0fe1721..3d0a18abd408c76d 100644
--- a/arch/arm/boot/dts/r8a7778.dtsi
+++ b/arch/arm/boot/dts/r8a7778.dtsi
@@ -626,4 +626,9 @@
 				"sru-src6", "sru-src7", "sru-src8";
 		};
 	};
+
+	rst: reset-controller@ffcc0000 {
+		compatible = "renesas,r8a7778-reset-wdt";
+		reg = <0xffcc0000 0x40>;
+	};
 };
-- 
1.9.1

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

* [PATCH/RFC v3 04/22] ARM: dts: r8a7779: Add device node for RESET/WDT module
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
@ 2016-06-01 19:21     ` Geert Uytterhoeven
  2016-06-01 19:21 ` [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver Geert Uytterhoeven
                       ` (17 subsequent siblings)
  18 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven

Add a device node for the RESET/WDT module, which provides a.o. reset
control, mode pin monitoring, and watchdog control.

Signed-off-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
---
v3:
  - New.
---
 arch/arm/boot/dts/r8a7779.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
index b9bbcce69dfbd5b9..4a30b232624e1d24 100644
--- a/arch/arm/boot/dts/r8a7779.dtsi
+++ b/arch/arm/boot/dts/r8a7779.dtsi
@@ -595,4 +595,9 @@
 		reg = <0xffd85000 0x0200>;
 		#power-domain-cells = <1>;
 	};
+
+	rst: reset-controller@ffcc0000 {
+		compatible = "renesas,r8a7779-reset-wdt";
+		reg = <0xffcc0000 0x48>;
+	};
 };
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH/RFC v3 04/22] ARM: dts: r8a7779: Add device node for RESET/WDT module
@ 2016-06-01 19:21     ` Geert Uytterhoeven
  0 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

Add a device node for the RESET/WDT module, which provides a.o. reset
control, mode pin monitoring, and watchdog control.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  - New.
---
 arch/arm/boot/dts/r8a7779.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
index b9bbcce69dfbd5b9..4a30b232624e1d24 100644
--- a/arch/arm/boot/dts/r8a7779.dtsi
+++ b/arch/arm/boot/dts/r8a7779.dtsi
@@ -595,4 +595,9 @@
 		reg = <0xffd85000 0x0200>;
 		#power-domain-cells = <1>;
 	};
+
+	rst: reset-controller@ffcc0000 {
+		compatible = "renesas,r8a7779-reset-wdt";
+		reg = <0xffcc0000 0x48>;
+	};
 };
-- 
1.9.1


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

* [PATCH/RFC v3 05/22] ARM: dts: r8a7790: Add device node for RST module
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
  2016-06-01 19:20 ` [PATCH/RFC v3 01/22] reset: Add renesas,rst DT bindings Geert Uytterhoeven
  2016-06-01 19:21 ` [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver Geert Uytterhoeven
@ 2016-06-01 19:21 ` Geert Uytterhoeven
  2016-06-01 19:21 ` [PATCH/RFC v3 06/22] ARM: dts: r8a7791: " Geert Uytterhoeven
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

Add a device node for the RST module, which provides a.o. reset control
and mode pin monitoring.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  - Use "renesas,<soctype>-rst" instead of "renesas,rst-<soctype>",
  - Drop "syscon" compatible value,

v2:
  - Correct unit address,
  - Drop RFC status and TODO,
  - Change one-line summary prefix to match current arm-soc practices.
---
 arch/arm/boot/dts/r8a7790.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index 9997e7dfabe2250c..0c548e9b180b6c1d 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -1481,6 +1481,11 @@
 		};
 	};
 
+	rst: reset-controller@e6160000 {
+		compatible = "renesas,r8a7790-rst";
+		reg = <0 0xe6160000 0 0x0100>;
+	};
+
 	sysc: system-controller@e6180000 {
 		compatible = "renesas,r8a7790-sysc";
 		reg = <0 0xe6180000 0 0x0200>;
-- 
1.9.1

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

* [PATCH/RFC v3 06/22] ARM: dts: r8a7791: Add device node for RST module
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
                   ` (2 preceding siblings ...)
  2016-06-01 19:21 ` [PATCH/RFC v3 05/22] ARM: dts: r8a7790: Add device node for RST module Geert Uytterhoeven
@ 2016-06-01 19:21 ` Geert Uytterhoeven
  2016-06-01 19:21 ` [PATCH/RFC v3 07/22] ARM: dts: r8a7793: " Geert Uytterhoeven
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

Add a device node for the RST module, which provides a.o. reset control
and mode pin monitoring.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  - Use "renesas,<soctype>-rst" instead of "renesas,rst-<soctype>",
  - Drop "syscon" compatible value,

v2:
  - Correct unit address,
  - Drop RFC status and TODO,
  - Change one-line summary prefix to match current arm-soc practices.
---
 arch/arm/boot/dts/r8a7791.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index 1985bd0dc32ce738..f8f1371f3621d1a3 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -1493,6 +1493,11 @@
 		};
 	};
 
+	rst: reset-controller@e6160000 {
+		compatible = "renesas,r8a7791-rst";
+		reg = <0 0xe6160000 0 0x0100>;
+	};
+
 	sysc: system-controller@e6180000 {
 		compatible = "renesas,r8a7791-sysc";
 		reg = <0 0xe6180000 0 0x0200>;
-- 
1.9.1

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

* [PATCH/RFC v3 07/22] ARM: dts: r8a7793: Add device node for RST module
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
                   ` (3 preceding siblings ...)
  2016-06-01 19:21 ` [PATCH/RFC v3 06/22] ARM: dts: r8a7791: " Geert Uytterhoeven
@ 2016-06-01 19:21 ` Geert Uytterhoeven
  2016-06-01 19:21 ` [PATCH/RFC v3 08/22] ARM: dts: r8a7794: " Geert Uytterhoeven
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

Add a device node for the RST module, which provides a.o. reset control
and mode pin monitoring.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  - Use "renesas,<soctype>-rst" instead of "renesas,rst-<soctype>",
  - Drop "syscon" compatible value,

v2:
  - Correct unit address,
  - Drop RFC status and TODO,
  - Change one-line summary prefix to match current arm-soc practices.
---
 arch/arm/boot/dts/r8a7793.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7793.dtsi b/arch/arm/boot/dts/r8a7793.dtsi
index 9b55c1c6ee31a49d..5a6c9808410761ce 100644
--- a/arch/arm/boot/dts/r8a7793.dtsi
+++ b/arch/arm/boot/dts/r8a7793.dtsi
@@ -1264,6 +1264,11 @@
 		};
 	};
 
+	rst: reset-controller@e6160000 {
+		compatible = "renesas,r8a7793-rst";
+		reg = <0 0xe6160000 0 0x0100>;
+	};
+
 	sysc: system-controller@e6180000 {
 		compatible = "renesas,r8a7793-sysc";
 		reg = <0 0xe6180000 0 0x0200>;
-- 
1.9.1

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

* [PATCH/RFC v3 08/22] ARM: dts: r8a7794: Add device node for RST module
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
                   ` (4 preceding siblings ...)
  2016-06-01 19:21 ` [PATCH/RFC v3 07/22] ARM: dts: r8a7793: " Geert Uytterhoeven
@ 2016-06-01 19:21 ` Geert Uytterhoeven
  2016-06-01 19:21 ` [PATCH/RFC v3 09/22] arm64: renesas: r8a7795 dtsi: " Geert Uytterhoeven
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

Add a device node for the RST module, which provides a.o. reset control
and mode pin monitoring.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  - Use "renesas,<soctype>-rst" instead of "renesas,rst-<soctype>",
  - Drop "syscon" compatible value,

v2:
  - Correct unit address,
  - Drop RFC status and TODO,
  - Change one-line summary prefix to match current arm-soc practices.
---
 arch/arm/boot/dts/r8a7794.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi
index 685f986cf962752f..ce98f358ce731798 100644
--- a/arch/arm/boot/dts/r8a7794.dtsi
+++ b/arch/arm/boot/dts/r8a7794.dtsi
@@ -1249,6 +1249,11 @@
 		};
 	};
 
+	rst: reset-controller@e6160000 {
+		compatible = "renesas,r8a7794-rst";
+		reg = <0 0xe6160000 0 0x0100>;
+	};
+
 	sysc: system-controller@e6180000 {
 		compatible = "renesas,r8a7794-sysc";
 		reg = <0 0xe6180000 0 0x0200>;
-- 
1.9.1

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

* [PATCH/RFC v3 09/22] arm64: renesas: r8a7795 dtsi: Add device node for RST module
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
                   ` (5 preceding siblings ...)
  2016-06-01 19:21 ` [PATCH/RFC v3 08/22] ARM: dts: r8a7794: " Geert Uytterhoeven
@ 2016-06-01 19:21 ` Geert Uytterhoeven
  2016-06-01 19:21 ` [PATCH/RFC v3 10/22] arm64: renesas: r8a7796 " Geert Uytterhoeven
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

Add a device node for the RST module, which provides a.o. reset control
and mode pin monitoring.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  - Use "renesas,<soctype>-rst" instead of "renesas,rst-<soctype>",
  - Drop "syscon" compatible value,

v2:
  - New.
---
 arch/arm64/boot/dts/renesas/r8a7795.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index 9297658534803f43..fca68d7b047dfa1d 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -319,6 +319,11 @@
 			#power-domain-cells = <0>;
 		};
 
+		rst: reset-controller@e6160000 {
+			compatible = "renesas,r8a7795-rst";
+			reg = <0 0xe6160000 0 0x0200>;
+		};
+
 		sysc: system-controller@e6180000 {
 			compatible = "renesas,r8a7795-sysc";
 			reg = <0 0xe6180000 0 0x0400>;
-- 
1.9.1

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

* [PATCH/RFC v3 10/22] arm64: renesas: r8a7796 dtsi: Add device node for RST module
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
                   ` (6 preceding siblings ...)
  2016-06-01 19:21 ` [PATCH/RFC v3 09/22] arm64: renesas: r8a7795 dtsi: " Geert Uytterhoeven
@ 2016-06-01 19:21 ` Geert Uytterhoeven
  2016-06-01 19:21 ` [PATCH/RFC v3 13/22] clk: renesas: rcar-gen2: Obtain mode pin values using RST driver Geert Uytterhoeven
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

Add a device node for the RST module, which provides a.o. reset control
and mode pin monitoring.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  - New.
---
 arch/arm64/boot/dts/renesas/r8a7796.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
index fab61eddede3818c..cb7cd9dceafe4c40 100644
--- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
@@ -107,6 +107,11 @@
 			#power-domain-cells = <0>;
 		};
 
+		rst: reset-controller@e6160000 {
+			compatible = "renesas,r8a7796-rst";
+			reg = <0 0xe6160000 0 0x0200>;
+		};
+
 		sysc: system-controller@e6180000 {
 			compatible = "renesas,r8a7796-sysc";
 			reg = <0 0xe6180000 0 0x0400>;
-- 
1.9.1

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

* [PATCH/RFC v3 11/22] clk: renesas: r8a7778: Obtain mode pin values using R-Car RST driver
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
@ 2016-06-01 19:21     ` Geert Uytterhoeven
  2016-06-01 19:21 ` [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver Geert Uytterhoeven
                       ` (17 subsequent siblings)
  18 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven

Obtain the values of the mode pins from the R-Car RST driver, which
relies on the presence in DT of a device node for the RESET/WDT module.

Signed-off-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
---
v3:
  - New.
---
 drivers/clk/renesas/clk-r8a7778.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/clk/renesas/clk-r8a7778.c b/drivers/clk/renesas/clk-r8a7778.c
index 40e3a501a50e200f..07ea411098a75ad1 100644
--- a/drivers/clk/renesas/clk-r8a7778.c
+++ b/drivers/clk/renesas/clk-r8a7778.c
@@ -12,6 +12,7 @@
 #include <linux/clk/renesas.h>
 #include <linux/of_address.h>
 #include <linux/slab.h>
+#include <linux/soc/renesas/rcar-rst.h>
 
 struct r8a7778_cpg {
 	struct clk_onecell_data data;
@@ -83,6 +84,18 @@ static void __init r8a7778_cpg_clocks_init(struct device_node *np)
 	struct clk **clks;
 	unsigned int i;
 	int num_clks;
+	u32 mode;
+
+	if (rcar_rst_read_mode_pins(&mode))
+		return;
+
+	BUG_ON(!(mode & BIT(19)));
+
+	cpg_mode_rates = (!!(mode & BIT(18)) << 2) |
+			 (!!(mode & BIT(12)) << 1) |
+			 (!!(mode & BIT(11)));
+	cpg_mode_divs = (!!(mode & BIT(2)) << 1) |
+			(!!(mode & BIT(1)));
 
 	num_clks = of_property_count_strings(np, "clock-output-names");
 	if (num_clks < 0) {
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH/RFC v3 11/22] clk: renesas: r8a7778: Obtain mode pin values using R-Car RST driver
@ 2016-06-01 19:21     ` Geert Uytterhoeven
  0 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

Obtain the values of the mode pins from the R-Car RST driver, which
relies on the presence in DT of a device node for the RESET/WDT module.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  - New.
---
 drivers/clk/renesas/clk-r8a7778.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/clk/renesas/clk-r8a7778.c b/drivers/clk/renesas/clk-r8a7778.c
index 40e3a501a50e200f..07ea411098a75ad1 100644
--- a/drivers/clk/renesas/clk-r8a7778.c
+++ b/drivers/clk/renesas/clk-r8a7778.c
@@ -12,6 +12,7 @@
 #include <linux/clk/renesas.h>
 #include <linux/of_address.h>
 #include <linux/slab.h>
+#include <linux/soc/renesas/rcar-rst.h>
 
 struct r8a7778_cpg {
 	struct clk_onecell_data data;
@@ -83,6 +84,18 @@ static void __init r8a7778_cpg_clocks_init(struct device_node *np)
 	struct clk **clks;
 	unsigned int i;
 	int num_clks;
+	u32 mode;
+
+	if (rcar_rst_read_mode_pins(&mode))
+		return;
+
+	BUG_ON(!(mode & BIT(19)));
+
+	cpg_mode_rates = (!!(mode & BIT(18)) << 2) |
+			 (!!(mode & BIT(12)) << 1) |
+			 (!!(mode & BIT(11)));
+	cpg_mode_divs = (!!(mode & BIT(2)) << 1) |
+			(!!(mode & BIT(1)));
 
 	num_clks = of_property_count_strings(np, "clock-output-names");
 	if (num_clks < 0) {
-- 
1.9.1


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

* [PATCH/RFC v3 12/22] clk: renesas: r8a7779: Obtain mode pin values from R-Car RST driver
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
@ 2016-06-01 19:21     ` Geert Uytterhoeven
  2016-06-01 19:21 ` [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver Geert Uytterhoeven
                       ` (17 subsequent siblings)
  18 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven

Obtain the values of the mode pins from the R-Car RST driver, which
relies on the presence in DT of a device node for the RESET/WDT module.

Signed-off-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
---
v3:
  - New.
---
 drivers/clk/renesas/clk-r8a7779.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/renesas/clk-r8a7779.c b/drivers/clk/renesas/clk-r8a7779.c
index cf2a37df03b15e60..ca7551bcb1153c3d 100644
--- a/drivers/clk/renesas/clk-r8a7779.c
+++ b/drivers/clk/renesas/clk-r8a7779.c
@@ -18,6 +18,7 @@
 #include <linux/of_address.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
+#include <linux/soc/renesas/rcar-rst.h>
 
 #include <dt-bindings/clock/r8a7779-clock.h>
 
@@ -127,6 +128,10 @@ static void __init r8a7779_cpg_clocks_init(struct device_node *np)
 	struct clk **clks;
 	unsigned int i, plla_mult;
 	int num_clks;
+	u32 mode;
+
+	if (rcar_rst_read_mode_pins(&mode))
+		return;
 
 	num_clks = of_property_count_strings(np, "clock-output-names");
 	if (num_clks < 0) {
@@ -148,8 +153,8 @@ static void __init r8a7779_cpg_clocks_init(struct device_node *np)
 	cpg->data.clks = clks;
 	cpg->data.clk_num = num_clks;
 
-	config = &cpg_clk_configs[CPG_CLK_CONFIG_INDEX(cpg_mode)];
-	plla_mult = cpg_plla_mult[CPG_PLLA_MULT_INDEX(cpg_mode)];
+	config = &cpg_clk_configs[CPG_CLK_CONFIG_INDEX(mode)];
+	plla_mult = cpg_plla_mult[CPG_PLLA_MULT_INDEX(mode)];
 
 	for (i = 0; i < num_clks; ++i) {
 		const char *name;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH/RFC v3 12/22] clk: renesas: r8a7779: Obtain mode pin values from R-Car RST driver
@ 2016-06-01 19:21     ` Geert Uytterhoeven
  0 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

Obtain the values of the mode pins from the R-Car RST driver, which
relies on the presence in DT of a device node for the RESET/WDT module.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  - New.
---
 drivers/clk/renesas/clk-r8a7779.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/renesas/clk-r8a7779.c b/drivers/clk/renesas/clk-r8a7779.c
index cf2a37df03b15e60..ca7551bcb1153c3d 100644
--- a/drivers/clk/renesas/clk-r8a7779.c
+++ b/drivers/clk/renesas/clk-r8a7779.c
@@ -18,6 +18,7 @@
 #include <linux/of_address.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
+#include <linux/soc/renesas/rcar-rst.h>
 
 #include <dt-bindings/clock/r8a7779-clock.h>
 
@@ -127,6 +128,10 @@ static void __init r8a7779_cpg_clocks_init(struct device_node *np)
 	struct clk **clks;
 	unsigned int i, plla_mult;
 	int num_clks;
+	u32 mode;
+
+	if (rcar_rst_read_mode_pins(&mode))
+		return;
 
 	num_clks = of_property_count_strings(np, "clock-output-names");
 	if (num_clks < 0) {
@@ -148,8 +153,8 @@ static void __init r8a7779_cpg_clocks_init(struct device_node *np)
 	cpg->data.clks = clks;
 	cpg->data.clk_num = num_clks;
 
-	config = &cpg_clk_configs[CPG_CLK_CONFIG_INDEX(cpg_mode)];
-	plla_mult = cpg_plla_mult[CPG_PLLA_MULT_INDEX(cpg_mode)];
+	config = &cpg_clk_configs[CPG_CLK_CONFIG_INDEX(mode)];
+	plla_mult = cpg_plla_mult[CPG_PLLA_MULT_INDEX(mode)];
 
 	for (i = 0; i < num_clks; ++i) {
 		const char *name;
-- 
1.9.1

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

* [PATCH/RFC v3 13/22] clk: renesas: rcar-gen2: Obtain mode pin values using RST driver
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
                   ` (7 preceding siblings ...)
  2016-06-01 19:21 ` [PATCH/RFC v3 10/22] arm64: renesas: r8a7796 " Geert Uytterhoeven
@ 2016-06-01 19:21 ` Geert Uytterhoeven
  2016-06-01 19:21 ` [PATCH/RFC v3 14/22] clk: renesas: r8a7795: Obtain mode pin values from R-Car " Geert Uytterhoeven
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

Obtain the values of the mode pins from the R-Car RST driver, which
relies on the presence in DT of a device node for the RST module.

Fall back to calling rcar_gen2_read_mode_pins() in the R-Car Gen2
platform code for backward-compatibility with old DTs.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  -  Use the R-Car RST driver instead of syscon/regmap and the
     "renesas,modemr" property in DT,

v2:
  - drivers/clk/shmobile/ was renamed to drivers/clk/renesas/.
---
 drivers/clk/renesas/clk-rcar-gen2.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/clk/renesas/clk-rcar-gen2.c b/drivers/clk/renesas/clk-rcar-gen2.c
index 00e6aba4b9c09596..436fc7a7714e4bd7 100644
--- a/drivers/clk/renesas/clk-rcar-gen2.c
+++ b/drivers/clk/renesas/clk-rcar-gen2.c
@@ -19,6 +19,7 @@
 #include <linux/of_address.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
+#include <linux/soc/renesas/rcar-rst.h>
 
 struct rcar_gen2_cpg {
 	struct clk_onecell_data data;
@@ -372,6 +373,15 @@ static void __init rcar_gen2_cpg_clocks_init(struct device_node *np)
 	unsigned int i;
 	int num_clks;
 
+	if (rcar_rst_read_mode_pins(&cpg_mode)) {
+		/* Backward-compatibility with old DT */
+		extern u32 rcar_gen2_read_mode_pins(void);
+
+		pr_warn("%s: failed to obtain mode pins from RST\n",
+			np->full_name);
+		cpg_mode = rcar_gen2_read_mode_pins();
+	}
+
 	num_clks = of_property_count_strings(np, "clock-output-names");
 	if (num_clks < 0) {
 		pr_err("%s: failed to count clocks\n", __func__);
-- 
1.9.1

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

* [PATCH/RFC v3 14/22] clk: renesas: r8a7795: Obtain mode pin values from R-Car RST driver
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
                   ` (8 preceding siblings ...)
  2016-06-01 19:21 ` [PATCH/RFC v3 13/22] clk: renesas: rcar-gen2: Obtain mode pin values using RST driver Geert Uytterhoeven
@ 2016-06-01 19:21 ` Geert Uytterhoeven
  2016-06-02 22:01     ` Laurent Pinchart
  2016-06-01 19:21 ` [PATCH/RFC v3 15/22] clk: renesas: r8a7796: " Geert Uytterhoeven
                   ` (8 subsequent siblings)
  18 siblings, 1 reply; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

Obtain the values of the mode pins from the R-Car RST driver, which
relies on the presence in DT of a device node for the RST module.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  - New.
---
 drivers/clk/renesas/r8a7795-cpg-mssr.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/renesas/r8a7795-cpg-mssr.c b/drivers/clk/renesas/r8a7795-cpg-mssr.c
index e53aff5b23ad4967..e1f2359a59feee7e 100644
--- a/drivers/clk/renesas/r8a7795-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7795-cpg-mssr.c
@@ -15,6 +15,7 @@
 #include <linux/device.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/soc/renesas/rcar-rst.h>
 
 #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
 
@@ -294,7 +295,12 @@ static const struct rcar_gen3_cpg_pll_config cpg_pll_configs[16] __initconst = {
 static int __init r8a7795_cpg_mssr_init(struct device *dev)
 {
 	const struct rcar_gen3_cpg_pll_config *cpg_pll_config;
-	u32 cpg_mode = rcar_gen3_read_mode_pins();
+	u32 cpg_mode;
+	int error;
+
+	error = rcar_rst_read_mode_pins(&cpg_mode);
+	if (error)
+		return error;
 
 	cpg_pll_config = &cpg_pll_configs[CPG_PLL_CONFIG_INDEX(cpg_mode)];
 	if (!cpg_pll_config->extal_div) {
-- 
1.9.1

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

* [PATCH/RFC v3 15/22] clk: renesas: r8a7796: Obtain mode pin values from R-Car RST driver
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
                   ` (9 preceding siblings ...)
  2016-06-01 19:21 ` [PATCH/RFC v3 14/22] clk: renesas: r8a7795: Obtain mode pin values from R-Car " Geert Uytterhoeven
@ 2016-06-01 19:21 ` Geert Uytterhoeven
  2016-06-02 22:02     ` Laurent Pinchart
  2016-06-01 19:21 ` [PATCH/RFC v3 17/22] ARM: shmobile: r8a7778: Stop passing mode pins state to clock driver Geert Uytterhoeven
                   ` (7 subsequent siblings)
  18 siblings, 1 reply; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

Obtain the values of the mode pins from the R-Car RST driver, which
relies on the presence in DT of a device node for the RST module.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  - New.
---
 drivers/clk/renesas/r8a7796-cpg-mssr.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/renesas/r8a7796-cpg-mssr.c b/drivers/clk/renesas/r8a7796-cpg-mssr.c
index c84b549c14d2e57d..3db2d1cfc8cd788e 100644
--- a/drivers/clk/renesas/r8a7796-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7796-cpg-mssr.c
@@ -16,6 +16,7 @@
 #include <linux/device.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/soc/renesas/rcar-rst.h>
 
 #include <dt-bindings/clock/r8a7796-cpg-mssr.h>
 
@@ -159,7 +160,12 @@ static const struct rcar_gen3_cpg_pll_config cpg_pll_configs[16] __initconst = {
 static int __init r8a7796_cpg_mssr_init(struct device *dev)
 {
 	const struct rcar_gen3_cpg_pll_config *cpg_pll_config;
-	u32 cpg_mode = rcar_gen3_read_mode_pins();
+	u32 cpg_mode;
+	int error;
+
+	error = rcar_rst_read_mode_pins(&cpg_mode);
+	if (error)
+		return error;
 
 	cpg_pll_config = &cpg_pll_configs[CPG_PLL_CONFIG_INDEX(cpg_mode)];
 	if (!cpg_pll_config->extal_div) {
-- 
1.9.1

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

* [PATCH/RFC v3 16/22] clk: renesas: rcar-gen3-cpg: Remove obsolete rcar_gen3_read_mode_pins()
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
@ 2016-06-01 19:21     ` Geert Uytterhoeven
  2016-06-01 19:21 ` [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver Geert Uytterhoeven
                       ` (17 subsequent siblings)
  18 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven

All R-Car Gen3 clock drivers now obtain the values of the mode pins from
the R-Car RST driver.

Signed-off-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
---
 drivers/clk/renesas/rcar-gen3-cpg.c | 17 -----------------
 drivers/clk/renesas/rcar-gen3-cpg.h |  1 -
 2 files changed, 18 deletions(-)

diff --git a/drivers/clk/renesas/rcar-gen3-cpg.c b/drivers/clk/renesas/rcar-gen3-cpg.c
index bb4f2f9a8c2f5ba8..9d76076da4948fc4 100644
--- a/drivers/clk/renesas/rcar-gen3-cpg.c
+++ b/drivers/clk/renesas/rcar-gen3-cpg.c
@@ -333,23 +333,6 @@ struct clk * __init rcar_gen3_cpg_clk_register(struct device *dev,
 					 __clk_get_name(parent), 0, mult, div);
 }
 
-/*
- * Reset register definitions.
- */
-#define MODEMR	0xe6160060
-
-u32 __init rcar_gen3_read_mode_pins(void)
-{
-	void __iomem *modemr = ioremap_nocache(MODEMR, 4);
-	u32 mode;
-
-	BUG_ON(!modemr);
-	mode = ioread32(modemr);
-	iounmap(modemr);
-
-	return mode;
-}
-
 int __init rcar_gen3_cpg_init(const struct rcar_gen3_cpg_pll_config *config,
 			      unsigned int clk_extalr)
 {
diff --git a/drivers/clk/renesas/rcar-gen3-cpg.h b/drivers/clk/renesas/rcar-gen3-cpg.h
index f699085147d1aece..f788f481dd42cdf6 100644
--- a/drivers/clk/renesas/rcar-gen3-cpg.h
+++ b/drivers/clk/renesas/rcar-gen3-cpg.h
@@ -33,7 +33,6 @@ struct rcar_gen3_cpg_pll_config {
 
 #define CPG_RCKCR	0x240
 
-u32 rcar_gen3_read_mode_pins(void);
 struct clk *rcar_gen3_cpg_clk_register(struct device *dev,
 	const struct cpg_core_clk *core, const struct cpg_mssr_info *info,
 	struct clk **clks, void __iomem *base);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH/RFC v3 16/22] clk: renesas: rcar-gen3-cpg: Remove obsolete rcar_gen3_read_mode_pins()
@ 2016-06-01 19:21     ` Geert Uytterhoeven
  0 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

All R-Car Gen3 clock drivers now obtain the values of the mode pins from
the R-Car RST driver.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/clk/renesas/rcar-gen3-cpg.c | 17 -----------------
 drivers/clk/renesas/rcar-gen3-cpg.h |  1 -
 2 files changed, 18 deletions(-)

diff --git a/drivers/clk/renesas/rcar-gen3-cpg.c b/drivers/clk/renesas/rcar-gen3-cpg.c
index bb4f2f9a8c2f5ba8..9d76076da4948fc4 100644
--- a/drivers/clk/renesas/rcar-gen3-cpg.c
+++ b/drivers/clk/renesas/rcar-gen3-cpg.c
@@ -333,23 +333,6 @@ struct clk * __init rcar_gen3_cpg_clk_register(struct device *dev,
 					 __clk_get_name(parent), 0, mult, div);
 }
 
-/*
- * Reset register definitions.
- */
-#define MODEMR	0xe6160060
-
-u32 __init rcar_gen3_read_mode_pins(void)
-{
-	void __iomem *modemr = ioremap_nocache(MODEMR, 4);
-	u32 mode;
-
-	BUG_ON(!modemr);
-	mode = ioread32(modemr);
-	iounmap(modemr);
-
-	return mode;
-}
-
 int __init rcar_gen3_cpg_init(const struct rcar_gen3_cpg_pll_config *config,
 			      unsigned int clk_extalr)
 {
diff --git a/drivers/clk/renesas/rcar-gen3-cpg.h b/drivers/clk/renesas/rcar-gen3-cpg.h
index f699085147d1aece..f788f481dd42cdf6 100644
--- a/drivers/clk/renesas/rcar-gen3-cpg.h
+++ b/drivers/clk/renesas/rcar-gen3-cpg.h
@@ -33,7 +33,6 @@ struct rcar_gen3_cpg_pll_config {
 
 #define CPG_RCKCR	0x240
 
-u32 rcar_gen3_read_mode_pins(void);
 struct clk *rcar_gen3_cpg_clk_register(struct device *dev,
 	const struct cpg_core_clk *core, const struct cpg_mssr_info *info,
 	struct clk **clks, void __iomem *base);
-- 
1.9.1

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

* [PATCH/RFC v3 17/22] ARM: shmobile: r8a7778: Stop passing mode pins state to clock driver
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
                   ` (10 preceding siblings ...)
  2016-06-01 19:21 ` [PATCH/RFC v3 15/22] clk: renesas: r8a7796: " Geert Uytterhoeven
@ 2016-06-01 19:21 ` Geert Uytterhoeven
  2016-06-01 19:21 ` [PATCH/RFC v3 18/22] ARM: shmobile: r8a7779: " Geert Uytterhoeven
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

Now the R-Car M1A CPG clock driver obtains the state of the mode pins
from the R-Car RST driver, there's no longer a need to pass this state
explicitly. Hence we can just remove the .init_time() callback, the
generic ARM code will take care of calling of_clk_init().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  - New.
---
 arch/arm/mach-shmobile/setup-r8a7778.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index cf236db686a9dd47..7fa4a0b5f6549287 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -15,7 +15,6 @@
  * GNU General Public License for more details.
  */
 
-#include <linux/clk/renesas.h>
 #include <linux/io.h>
 #include <linux/irqchip.h>
 
@@ -23,19 +22,6 @@
 
 #include "common.h"
 
-#define MODEMR 0xffcc0020
-
-static void __init r8a7778_timer_init(void)
-{
-	u32 mode;
-	void __iomem *modemr = ioremap_nocache(MODEMR, 4);
-
-	BUG_ON(!modemr);
-	mode = ioread32(modemr);
-	iounmap(modemr);
-	r8a7778_clocks_init(mode);
-}
-
 #define INT2SMSKCR0	0x82288 /* 0xfe782288 */
 #define INT2SMSKCR1	0x8228c /* 0xfe78228c */
 
@@ -70,6 +56,5 @@ DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)")
 	.init_early	= shmobile_init_delay,
 	.init_irq	= r8a7778_init_irq_dt,
 	.init_late	= shmobile_init_late,
-	.init_time	= r8a7778_timer_init,
 	.dt_compat	= r8a7778_compat_dt,
 MACHINE_END
-- 
1.9.1

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

* [PATCH/RFC v3 18/22] ARM: shmobile: r8a7779: Stop passing mode pins state to clock driver
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
                   ` (11 preceding siblings ...)
  2016-06-01 19:21 ` [PATCH/RFC v3 17/22] ARM: shmobile: r8a7778: Stop passing mode pins state to clock driver Geert Uytterhoeven
@ 2016-06-01 19:21 ` Geert Uytterhoeven
  2016-06-01 19:21 ` [PATCH/RFC v3 19/22] ARM: shmobile: rcar-gen2: " Geert Uytterhoeven
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

Now the R-Car H1 CPG clock driver obtains the state of the mode pins
from the R-Car RST driver, there's no longer a need to pass this state
explicitly. Hence we can just remove the .init_time() callback, the
generic ARM code will take care of calling of_clk_init() and
clocksource_probe().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  - New.
---
 arch/arm/mach-shmobile/setup-r8a7779.c | 27 ---------------------------
 1 file changed, 27 deletions(-)

diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index 0007ff51d180379f..0686112f243525b6 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -14,8 +14,6 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  */
-#include <linux/clk/renesas.h>
-#include <linux/clocksource.h>
 #include <linux/init.h>
 #include <linux/irq.h>
 #include <linux/irqchip.h>
@@ -76,30 +74,6 @@ static void __init r8a7779_init_irq_dt(void)
 	__raw_writel(0x003fee3f, INT2SMSKCR4);
 }
 
-#define MODEMR		0xffcc0020
-
-static u32 __init r8a7779_read_mode_pins(void)
-{
-	static u32 mode;
-	static bool mode_valid;
-
-	if (!mode_valid) {
-		void __iomem *modemr = ioremap_nocache(MODEMR, PAGE_SIZE);
-		BUG_ON(!modemr);
-		mode = ioread32(modemr);
-		iounmap(modemr);
-		mode_valid = true;
-	}
-
-	return mode;
-}
-
-static void __init r8a7779_init_time(void)
-{
-	r8a7779_clocks_init(r8a7779_read_mode_pins());
-	clocksource_probe();
-}
-
 static const char *const r8a7779_compat_dt[] __initconst = {
 	"renesas,r8a7779",
 	NULL,
@@ -109,7 +83,6 @@ DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)")
 	.smp		= smp_ops(r8a7779_smp_ops),
 	.map_io		= r8a7779_map_io,
 	.init_early	= shmobile_init_delay,
-	.init_time	= r8a7779_init_time,
 	.init_irq	= r8a7779_init_irq_dt,
 	.init_late	= shmobile_init_late,
 	.dt_compat	= r8a7779_compat_dt,
-- 
1.9.1

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

* [PATCH/RFC v3 19/22] ARM: shmobile: rcar-gen2: Stop passing mode pins state to clock driver
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
                   ` (12 preceding siblings ...)
  2016-06-01 19:21 ` [PATCH/RFC v3 18/22] ARM: shmobile: r8a7779: " Geert Uytterhoeven
@ 2016-06-01 19:21 ` Geert Uytterhoeven
  2016-06-01 19:21 ` [PATCH/RFC v3 20/22] clk: renesas: r8a7778: Remove obsolete r8a7778_clocks_init() Geert Uytterhoeven
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

Now the R-Car Gen2 CPG clock driver obtains the state of the mode pins
from the R-Car RST driver, there's no longer a need to pass this state
explicitly. Hence we can just call of_clk_init() instead.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  - Drop "select MFD_SYSCON", as the clock driver no longer uses syscon,

v2:
  - Kill compiler warning if CONFIG_ARM_ARCH_TIMER is not enabled.
---
 arch/arm/mach-shmobile/setup-rcar-gen2.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c
index 1c6fd11c2f824019..755ce7a940c11848 100644
--- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
+++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
@@ -15,7 +15,7 @@
  * GNU General Public License for more details.
  */
 
-#include <linux/clk/renesas.h>
+#include <linux/clk-provider.h>
 #include <linux/clocksource.h>
 #include <linux/device.h>
 #include <linux/dma-contiguous.h>
@@ -51,8 +51,8 @@ u32 rcar_gen2_read_mode_pins(void)
 
 void __init rcar_gen2_timer_init(void)
 {
-	u32 mode = rcar_gen2_read_mode_pins();
 #ifdef CONFIG_ARM_ARCH_TIMER
+	u32 mode = rcar_gen2_read_mode_pins();
 	void __iomem *base;
 	int extal_mhz = 0;
 	u32 freq;
@@ -127,7 +127,7 @@ void __init rcar_gen2_timer_init(void)
 	iounmap(base);
 #endif /* CONFIG_ARM_ARCH_TIMER */
 
-	rcar_gen2_clocks_init(mode);
+	of_clk_init(NULL);
 	clocksource_probe();
 }
 
-- 
1.9.1

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

* [PATCH/RFC v3 20/22] clk: renesas: r8a7778: Remove obsolete r8a7778_clocks_init()
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
                   ` (13 preceding siblings ...)
  2016-06-01 19:21 ` [PATCH/RFC v3 19/22] ARM: shmobile: rcar-gen2: " Geert Uytterhoeven
@ 2016-06-01 19:21 ` Geert Uytterhoeven
  2016-06-02  5:54     ` Dirk Behme
       [not found] ` <1464808880-343-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
                   ` (3 subsequent siblings)
  18 siblings, 1 reply; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

The R-Car M1A board code no longer calls r8a7778_clocks_init().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  - New.
---
 drivers/clk/renesas/clk-r8a7778.c | 13 -------------
 include/linux/clk/renesas.h       |  1 -
 2 files changed, 14 deletions(-)

diff --git a/drivers/clk/renesas/clk-r8a7778.c b/drivers/clk/renesas/clk-r8a7778.c
index 07ea411098a75ad1..886a8380e91247a1 100644
--- a/drivers/clk/renesas/clk-r8a7778.c
+++ b/drivers/clk/renesas/clk-r8a7778.c
@@ -143,16 +143,3 @@ static void __init r8a7778_cpg_clocks_init(struct device_node *np)
 
 CLK_OF_DECLARE(r8a7778_cpg_clks, "renesas,r8a7778-cpg-clocks",
 	       r8a7778_cpg_clocks_init);
-
-void __init r8a7778_clocks_init(u32 mode)
-{
-	BUG_ON(!(mode & BIT(19)));
-
-	cpg_mode_rates = (!!(mode & BIT(18)) << 2) |
-			 (!!(mode & BIT(12)) << 1) |
-			 (!!(mode & BIT(11)));
-	cpg_mode_divs = (!!(mode & BIT(2)) << 1) |
-			(!!(mode & BIT(1)));
-
-	of_clk_init(NULL);
-}
diff --git a/include/linux/clk/renesas.h b/include/linux/clk/renesas.h
index ba6fa4148515e5c9..2b663bba1adcc7c1 100644
--- a/include/linux/clk/renesas.h
+++ b/include/linux/clk/renesas.h
@@ -20,7 +20,6 @@ struct device;
 struct device_node;
 struct generic_pm_domain;
 
-void r8a7778_clocks_init(u32 mode);
 void r8a7779_clocks_init(u32 mode);
 void rcar_gen2_clocks_init(u32 mode);
 
-- 
1.9.1

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

* [PATCH/RFC v3 21/22] clk: renesas: r8a7779: Remove obsolete r8a7779_clocks_init()
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
@ 2016-06-01 19:21     ` Geert Uytterhoeven
  2016-06-01 19:21 ` [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver Geert Uytterhoeven
                       ` (17 subsequent siblings)
  18 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven

The R-Car H1 board code no longer calls r8a7779_clocks_init().

Signed-off-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
---
v3:
  - New.
---
 drivers/clk/renesas/clk-r8a7779.c | 9 ---------
 include/linux/clk/renesas.h       | 1 -
 2 files changed, 10 deletions(-)

diff --git a/drivers/clk/renesas/clk-r8a7779.c b/drivers/clk/renesas/clk-r8a7779.c
index ca7551bcb1153c3d..27fbfafaf2cd0353 100644
--- a/drivers/clk/renesas/clk-r8a7779.c
+++ b/drivers/clk/renesas/clk-r8a7779.c
@@ -89,8 +89,6 @@ static const unsigned int cpg_plla_mult[4] __initconst = { 42, 48, 56, 64 };
  * Initialization
  */
 
-static u32 cpg_mode __initdata;
-
 static struct clk * __init
 r8a7779_cpg_register_clock(struct device_node *np, struct r8a7779_cpg *cpg,
 			   const struct cpg_clk_config *config,
@@ -178,10 +176,3 @@ static void __init r8a7779_cpg_clocks_init(struct device_node *np)
 }
 CLK_OF_DECLARE(r8a7779_cpg_clks, "renesas,r8a7779-cpg-clocks",
 	       r8a7779_cpg_clocks_init);
-
-void __init r8a7779_clocks_init(u32 mode)
-{
-	cpg_mode = mode;
-
-	of_clk_init(NULL);
-}
diff --git a/include/linux/clk/renesas.h b/include/linux/clk/renesas.h
index 2b663bba1adcc7c1..9e969941f3f62878 100644
--- a/include/linux/clk/renesas.h
+++ b/include/linux/clk/renesas.h
@@ -20,7 +20,6 @@ struct device;
 struct device_node;
 struct generic_pm_domain;
 
-void r8a7779_clocks_init(u32 mode);
 void rcar_gen2_clocks_init(u32 mode);
 
 void cpg_mstp_add_clk_domain(struct device_node *np);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH/RFC v3 21/22] clk: renesas: r8a7779: Remove obsolete r8a7779_clocks_init()
@ 2016-06-01 19:21     ` Geert Uytterhoeven
  0 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

The R-Car H1 board code no longer calls r8a7779_clocks_init().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  - New.
---
 drivers/clk/renesas/clk-r8a7779.c | 9 ---------
 include/linux/clk/renesas.h       | 1 -
 2 files changed, 10 deletions(-)

diff --git a/drivers/clk/renesas/clk-r8a7779.c b/drivers/clk/renesas/clk-r8a7779.c
index ca7551bcb1153c3d..27fbfafaf2cd0353 100644
--- a/drivers/clk/renesas/clk-r8a7779.c
+++ b/drivers/clk/renesas/clk-r8a7779.c
@@ -89,8 +89,6 @@ static const unsigned int cpg_plla_mult[4] __initconst = { 42, 48, 56, 64 };
  * Initialization
  */
 
-static u32 cpg_mode __initdata;
-
 static struct clk * __init
 r8a7779_cpg_register_clock(struct device_node *np, struct r8a7779_cpg *cpg,
 			   const struct cpg_clk_config *config,
@@ -178,10 +176,3 @@ static void __init r8a7779_cpg_clocks_init(struct device_node *np)
 }
 CLK_OF_DECLARE(r8a7779_cpg_clks, "renesas,r8a7779-cpg-clocks",
 	       r8a7779_cpg_clocks_init);
-
-void __init r8a7779_clocks_init(u32 mode)
-{
-	cpg_mode = mode;
-
-	of_clk_init(NULL);
-}
diff --git a/include/linux/clk/renesas.h b/include/linux/clk/renesas.h
index 2b663bba1adcc7c1..9e969941f3f62878 100644
--- a/include/linux/clk/renesas.h
+++ b/include/linux/clk/renesas.h
@@ -20,7 +20,6 @@ struct device;
 struct device_node;
 struct generic_pm_domain;
 
-void r8a7779_clocks_init(u32 mode);
 void rcar_gen2_clocks_init(u32 mode);
 
 void cpg_mstp_add_clk_domain(struct device_node *np);
-- 
1.9.1


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

* [PATCH/RFC v3 22/22] clk: renesas: rcar-gen2: Remove obsolete rcar_gen2_clocks_init()
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
                   ` (15 preceding siblings ...)
       [not found] ` <1464808880-343-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
@ 2016-06-01 19:21 ` Geert Uytterhoeven
  2016-06-02  5:57   ` Dirk Behme
  2016-06-30 20:14   ` Stephen Boyd
  18 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-01 19:21 UTC (permalink / raw)
  To: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree, Geert Uytterhoeven

The R-Car Gen2 board code no longer calls rcar_gen2_clocks_init().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  - rebased,

v2:
  - No changes.
---
 drivers/clk/renesas/clk-rcar-gen2.c | 7 -------
 include/linux/clk/renesas.h         | 2 --
 2 files changed, 9 deletions(-)

diff --git a/drivers/clk/renesas/clk-rcar-gen2.c b/drivers/clk/renesas/clk-rcar-gen2.c
index 436fc7a7714e4bd7..4860022627bb455f 100644
--- a/drivers/clk/renesas/clk-rcar-gen2.c
+++ b/drivers/clk/renesas/clk-rcar-gen2.c
@@ -430,10 +430,3 @@ static void __init rcar_gen2_cpg_clocks_init(struct device_node *np)
 }
 CLK_OF_DECLARE(rcar_gen2_cpg_clks, "renesas,rcar-gen2-cpg-clocks",
 	       rcar_gen2_cpg_clocks_init);
-
-void __init rcar_gen2_clocks_init(u32 mode)
-{
-	cpg_mode = mode;
-
-	of_clk_init(NULL);
-}
diff --git a/include/linux/clk/renesas.h b/include/linux/clk/renesas.h
index 9e969941f3f62878..9ebf1f8243bb57af 100644
--- a/include/linux/clk/renesas.h
+++ b/include/linux/clk/renesas.h
@@ -20,8 +20,6 @@ struct device;
 struct device_node;
 struct generic_pm_domain;
 
-void rcar_gen2_clocks_init(u32 mode);
-
 void cpg_mstp_add_clk_domain(struct device_node *np);
 #ifdef CONFIG_CLK_RENESAS_CPG_MSTP
 int cpg_mstp_attach_dev(struct generic_pm_domain *unused, struct device *dev);
-- 
1.9.1

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

* Re: [PATCH/RFC v3 01/22] reset: Add renesas,rst DT bindings
  2016-06-01 19:20 ` [PATCH/RFC v3 01/22] reset: Add renesas,rst DT bindings Geert Uytterhoeven
  2016-06-02  5:40     ` Dirk Behme
@ 2016-06-02  5:40     ` Dirk Behme
  1 sibling, 0 replies; 74+ messages in thread
From: Dirk Behme @ 2016-06-02  5:40 UTC (permalink / raw)
  To: Geert Uytterhoeven, Simon Horman, Magnus Damm, Laurent Pinchart,
	Philipp Zabel, Michael Turquette, Stephen Boyd
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree

On 01.06.2016 21:20, Geert Uytterhoeven wrote:
> Add DT bindings for the Renesas R-Car Reset Controller (R-Car Gen1
> RESET/WDT and R-Car Gen2/Gen3 RST).
>
> As the features provided by the hardware module differ a lot across the
> various SoC families and members, only SoC-specific compatible values
> are defined.
>
> For now we use the RST only for providing access to the state of the
> mode pins.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Acked-by: Magnus Damm <damm+renesas@opensource.se>
> ---
> v3:
>   - Clarify current usage,
>   - Use "renesas,<soctype>-rst" instead of "renesas,rst-<soctype>",
>   - Drop "syscon" compatible value,
>   - Add R-Car M3-W,
>   - Add R-Car Gen1,
>
> v2:
>   - Add Acked-by.
> ---
>  .../devicetree/bindings/reset/renesas,rst.txt      | 35 ++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/reset/renesas,rst.txt
>
> diff --git a/Documentation/devicetree/bindings/reset/renesas,rst.txt b/Documentation/devicetree/bindings/reset/renesas,rst.txt
> new file mode 100644
> index 0000000000000000..488c72e1ee849cd3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/reset/renesas,rst.txt
> @@ -0,0 +1,35 @@
> +DT bindings for the Renesas R-Car Reset Controller
> +
> +The R-Car Reset Controller provides reset control, and implements the following
> +functions:
> +  - Latching of the levels on mode pins when PRESET# is negated,
> +  - Mode monitoring register,
> +  - Reset control of peripheral devices (on R-Car Gen1),
> +  - Watchdog timer (on R-Car Gen1).


Quite minor nit: s/./,/

Or drop all the ',' completely?


> +  - Register-based reset control and boot address registers for the various CPU
> +    cores (on R-Car Gen2/Gen3),

Best regards

Dirk

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

* Re: [PATCH/RFC v3 01/22] reset: Add renesas,rst DT bindings
@ 2016-06-02  5:40     ` Dirk Behme
  0 siblings, 0 replies; 74+ messages in thread
From: Dirk Behme @ 2016-06-02  5:40 UTC (permalink / raw)
  To: Geert Uytterhoeven, Simon Horman, Magnus Damm, Laurent Pinchart,
	Philipp Zabel, Michael Turquette, Stephen Boyd
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree

On 01.06.2016 21:20, Geert Uytterhoeven wrote:
> Add DT bindings for the Renesas R-Car Reset Controller (R-Car Gen1
> RESET/WDT and R-Car Gen2/Gen3 RST).
>
> As the features provided by the hardware module differ a lot across the
> various SoC families and members, only SoC-specific compatible values
> are defined.
>
> For now we use the RST only for providing access to the state of the
> mode pins.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Acked-by: Magnus Damm <damm+renesas@opensource.se>
> ---
> v3:
>   - Clarify current usage,
>   - Use "renesas,<soctype>-rst" instead of "renesas,rst-<soctype>",
>   - Drop "syscon" compatible value,
>   - Add R-Car M3-W,
>   - Add R-Car Gen1,
>
> v2:
>   - Add Acked-by.
> ---
>  .../devicetree/bindings/reset/renesas,rst.txt      | 35 ++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/reset/renesas,rst.txt
>
> diff --git a/Documentation/devicetree/bindings/reset/renesas,rst.txt b/Documentation/devicetree/bindings/reset/renesas,rst.txt
> new file mode 100644
> index 0000000000000000..488c72e1ee849cd3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/reset/renesas,rst.txt
> @@ -0,0 +1,35 @@
> +DT bindings for the Renesas R-Car Reset Controller
> +
> +The R-Car Reset Controller provides reset control, and implements the following
> +functions:
> +  - Latching of the levels on mode pins when PRESET# is negated,
> +  - Mode monitoring register,
> +  - Reset control of peripheral devices (on R-Car Gen1),
> +  - Watchdog timer (on R-Car Gen1).


Quite minor nit: s/./,/

Or drop all the ',' completely?


> +  - Register-based reset control and boot address registers for the various CPU
> +    cores (on R-Car Gen2/Gen3),

Best regards

Dirk

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

* [PATCH/RFC v3 01/22] reset: Add renesas,rst DT bindings
@ 2016-06-02  5:40     ` Dirk Behme
  0 siblings, 0 replies; 74+ messages in thread
From: Dirk Behme @ 2016-06-02  5:40 UTC (permalink / raw)
  To: linux-arm-kernel

On 01.06.2016 21:20, Geert Uytterhoeven wrote:
> Add DT bindings for the Renesas R-Car Reset Controller (R-Car Gen1
> RESET/WDT and R-Car Gen2/Gen3 RST).
>
> As the features provided by the hardware module differ a lot across the
> various SoC families and members, only SoC-specific compatible values
> are defined.
>
> For now we use the RST only for providing access to the state of the
> mode pins.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Acked-by: Magnus Damm <damm+renesas@opensource.se>
> ---
> v3:
>   - Clarify current usage,
>   - Use "renesas,<soctype>-rst" instead of "renesas,rst-<soctype>",
>   - Drop "syscon" compatible value,
>   - Add R-Car M3-W,
>   - Add R-Car Gen1,
>
> v2:
>   - Add Acked-by.
> ---
>  .../devicetree/bindings/reset/renesas,rst.txt      | 35 ++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/reset/renesas,rst.txt
>
> diff --git a/Documentation/devicetree/bindings/reset/renesas,rst.txt b/Documentation/devicetree/bindings/reset/renesas,rst.txt
> new file mode 100644
> index 0000000000000000..488c72e1ee849cd3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/reset/renesas,rst.txt
> @@ -0,0 +1,35 @@
> +DT bindings for the Renesas R-Car Reset Controller
> +
> +The R-Car Reset Controller provides reset control, and implements the following
> +functions:
> +  - Latching of the levels on mode pins when PRESET# is negated,
> +  - Mode monitoring register,
> +  - Reset control of peripheral devices (on R-Car Gen1),
> +  - Watchdog timer (on R-Car Gen1).


Quite minor nit: s/./,/

Or drop all the ',' completely?


> +  - Register-based reset control and boot address registers for the various CPU
> +    cores (on R-Car Gen2/Gen3),

Best regards

Dirk

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

* Re: [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver
  2016-06-01 19:21 ` [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver Geert Uytterhoeven
  2016-06-02  5:42     ` Dirk Behme
@ 2016-06-02  5:42     ` Dirk Behme
  1 sibling, 0 replies; 74+ messages in thread
From: Dirk Behme @ 2016-06-02  5:42 UTC (permalink / raw)
  To: Geert Uytterhoeven, Simon Horman, Magnus Damm, Laurent Pinchart,
	Philipp Zabel, Michael Turquette, Stephen Boyd
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree

On 01.06.2016 21:21, Geert Uytterhoeven wrote:
> Add a driver for the Renesas R-Car Gen1 RESET/WDT and R-Car Gen2/Gen3
> RST module.
>
> For now this driver just provides an API to obtain the state of the mode
> pins, as latched at reset time.  As this is typically called from the
> probe function of a clock driver, which can run much earlier than any
> initcall, calling rcar_rst_read_mode_pins() may force an early
> initialization of the driver.
>
> Despite the current simple and almost identical handling for all
> supported SoCs, the driver matches against SoC-specific compatible
> values only, as the features provided by the hardware module differ a
> lot across the various SoC families and members.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v3:
>   - New.
> ---
>  drivers/soc/renesas/Makefile         |  5 ++
>  drivers/soc/renesas/rcar-rst.c       | 94 ++++++++++++++++++++++++++++++++++++
>  include/linux/soc/renesas/rcar-rst.h |  6 +++
>  3 files changed, 105 insertions(+)
>  create mode 100644 drivers/soc/renesas/rcar-rst.c
>  create mode 100644 include/linux/soc/renesas/rcar-rst.h
>
> diff --git a/drivers/soc/renesas/Makefile b/drivers/soc/renesas/Makefile
> index f32a001c65c3ab44..0d732ff893dd8fba 100644
> --- a/drivers/soc/renesas/Makefile
> +++ b/drivers/soc/renesas/Makefile
> @@ -1,3 +1,8 @@
> +obj-$(CONFIG_ARCH_RCAR_GEN1)	+= rcar-rst.o
> +obj-$(CONFIG_ARCH_RCAR_GEN2)	+= rcar-rst.o
> +obj-$(CONFIG_ARCH_R8A7795)	+= rcar-rst.o
> +obj-$(CONFIG_ARCH_R8A7796)	+= rcar-rst.o
> +
>  obj-$(CONFIG_ARCH_R8A7779)	+= rcar-sysc.o r8a7779-sysc.o
>  obj-$(CONFIG_ARCH_R8A7790)	+= rcar-sysc.o r8a7790-sysc.o
>  obj-$(CONFIG_ARCH_R8A7791)	+= rcar-sysc.o r8a7791-sysc.o
> diff --git a/drivers/soc/renesas/rcar-rst.c b/drivers/soc/renesas/rcar-rst.c
> new file mode 100644
> index 0000000000000000..1997c348c0853254
> --- /dev/null
> +++ b/drivers/soc/renesas/rcar-rst.c
> @@ -0,0 +1,94 @@
> +/*
> + * R-Car Gen1 RESET/WDT and R-Car Gen2/Gen3 RST Driver
> + *
> + * Copyright (C) 2016 Glider bvba
> + *
> + * This file is subject to the terms and conditions of the GNU General Public
> + * License.  See the file "COPYING" in the main directory of this archive
> + * for more details.
> + */
> +
> +#include <linux/err.h>
> +#include <linux/io.h>
> +#include <linux/of_address.h>
> +#include <linux/soc/renesas/rcar-rst.h>
> +
> +struct rst_config {
> +	unsigned int modemr;	/* Mode Monitoring Register Offset */
> +};
> +
> +static const struct rst_config rcar_rst_gen1 __initconst = {
> +	.modemr = 0x20,
> +};
> +
> +static const struct rst_config rcar_rst_gen2 __initconst = {
> +	.modemr = 0x60,
> +};
> +
> +static const struct rst_config rcar_rst_gen3 __initconst = {
> +	.modemr = 0x60,
> +};
> +
> +static const struct of_device_id rcar_rst_matches[] __initconst = {
> +	{ .compatible = "renesas,r8a7778-reset-wdt", .data = &rcar_rst_gen1 },
> +	{ .compatible = "renesas,r8a7779-reset-wdt", .data = &rcar_rst_gen1 },
> +	{ .compatible = "renesas,r8a7790-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7791-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7792-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7793-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7794-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7795-rst", .data = &rcar_rst_gen3 },
> +	{ .compatible = "renesas,r8a7796-rst", .data = &rcar_rst_gen3 },
> +	{ /* sentinel */ }
> +};
> +
> +static void __iomem *rcar_rst_base __initdata;
> +static u32 saved_mode __initdata;
> +
> +static int __init rcar_rst_init(void)
> +{
> +	const struct of_device_id *match;
> +	const struct rst_config *cfg;
> +	struct device_node *np;
> +	void __iomem *base;
> +	int error = 0;
> +
> +	if (rcar_rst_base)
> +		return 0;
> +
> +	np = of_find_matching_node_and_match(NULL, rcar_rst_matches, &match);
> +	if (!np)
> +		return -ENODEV;
> +
> +	base = of_iomap(np, 0);
> +	if (!base) {
> +		pr_warn("%s: Cannot map regs\n", np->full_name);
> +		error = -ENOMEM;
> +		goto out_put;
> +	}
> +
> +	rcar_rst_base = base;
> +	cfg = match->data;
> +	saved_mode = ioread32(base + cfg->modemr);
> +
> +	pr_debug("%s: MODE = 0x%08x\n", np->full_name, saved_mode);
> +
> +out_put:
> +	of_node_put(np);
> +	return error;
> +}
> +arch_initcall(rcar_rst_init);
> +
> +int __init rcar_rst_read_mode_pins(u32 *mode)


Just a style issue: Is the string 'pins' in the function name still 
relevant? I.e. what's about just 'rcar_rst_read_mode()'?


Best regards

Dirk

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

* Re: [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver
@ 2016-06-02  5:42     ` Dirk Behme
  0 siblings, 0 replies; 74+ messages in thread
From: Dirk Behme @ 2016-06-02  5:42 UTC (permalink / raw)
  To: Geert Uytterhoeven, Simon Horman, Magnus Damm, Laurent Pinchart,
	Philipp Zabel, Michael Turquette, Stephen Boyd
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree

On 01.06.2016 21:21, Geert Uytterhoeven wrote:
> Add a driver for the Renesas R-Car Gen1 RESET/WDT and R-Car Gen2/Gen3
> RST module.
>
> For now this driver just provides an API to obtain the state of the mode
> pins, as latched at reset time.  As this is typically called from the
> probe function of a clock driver, which can run much earlier than any
> initcall, calling rcar_rst_read_mode_pins() may force an early
> initialization of the driver.
>
> Despite the current simple and almost identical handling for all
> supported SoCs, the driver matches against SoC-specific compatible
> values only, as the features provided by the hardware module differ a
> lot across the various SoC families and members.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v3:
>   - New.
> ---
>  drivers/soc/renesas/Makefile         |  5 ++
>  drivers/soc/renesas/rcar-rst.c       | 94 ++++++++++++++++++++++++++++++++++++
>  include/linux/soc/renesas/rcar-rst.h |  6 +++
>  3 files changed, 105 insertions(+)
>  create mode 100644 drivers/soc/renesas/rcar-rst.c
>  create mode 100644 include/linux/soc/renesas/rcar-rst.h
>
> diff --git a/drivers/soc/renesas/Makefile b/drivers/soc/renesas/Makefile
> index f32a001c65c3ab44..0d732ff893dd8fba 100644
> --- a/drivers/soc/renesas/Makefile
> +++ b/drivers/soc/renesas/Makefile
> @@ -1,3 +1,8 @@
> +obj-$(CONFIG_ARCH_RCAR_GEN1)	+= rcar-rst.o
> +obj-$(CONFIG_ARCH_RCAR_GEN2)	+= rcar-rst.o
> +obj-$(CONFIG_ARCH_R8A7795)	+= rcar-rst.o
> +obj-$(CONFIG_ARCH_R8A7796)	+= rcar-rst.o
> +
>  obj-$(CONFIG_ARCH_R8A7779)	+= rcar-sysc.o r8a7779-sysc.o
>  obj-$(CONFIG_ARCH_R8A7790)	+= rcar-sysc.o r8a7790-sysc.o
>  obj-$(CONFIG_ARCH_R8A7791)	+= rcar-sysc.o r8a7791-sysc.o
> diff --git a/drivers/soc/renesas/rcar-rst.c b/drivers/soc/renesas/rcar-rst.c
> new file mode 100644
> index 0000000000000000..1997c348c0853254
> --- /dev/null
> +++ b/drivers/soc/renesas/rcar-rst.c
> @@ -0,0 +1,94 @@
> +/*
> + * R-Car Gen1 RESET/WDT and R-Car Gen2/Gen3 RST Driver
> + *
> + * Copyright (C) 2016 Glider bvba
> + *
> + * This file is subject to the terms and conditions of the GNU General Public
> + * License.  See the file "COPYING" in the main directory of this archive
> + * for more details.
> + */
> +
> +#include <linux/err.h>
> +#include <linux/io.h>
> +#include <linux/of_address.h>
> +#include <linux/soc/renesas/rcar-rst.h>
> +
> +struct rst_config {
> +	unsigned int modemr;	/* Mode Monitoring Register Offset */
> +};
> +
> +static const struct rst_config rcar_rst_gen1 __initconst = {
> +	.modemr = 0x20,
> +};
> +
> +static const struct rst_config rcar_rst_gen2 __initconst = {
> +	.modemr = 0x60,
> +};
> +
> +static const struct rst_config rcar_rst_gen3 __initconst = {
> +	.modemr = 0x60,
> +};
> +
> +static const struct of_device_id rcar_rst_matches[] __initconst = {
> +	{ .compatible = "renesas,r8a7778-reset-wdt", .data = &rcar_rst_gen1 },
> +	{ .compatible = "renesas,r8a7779-reset-wdt", .data = &rcar_rst_gen1 },
> +	{ .compatible = "renesas,r8a7790-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7791-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7792-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7793-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7794-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7795-rst", .data = &rcar_rst_gen3 },
> +	{ .compatible = "renesas,r8a7796-rst", .data = &rcar_rst_gen3 },
> +	{ /* sentinel */ }
> +};
> +
> +static void __iomem *rcar_rst_base __initdata;
> +static u32 saved_mode __initdata;
> +
> +static int __init rcar_rst_init(void)
> +{
> +	const struct of_device_id *match;
> +	const struct rst_config *cfg;
> +	struct device_node *np;
> +	void __iomem *base;
> +	int error = 0;
> +
> +	if (rcar_rst_base)
> +		return 0;
> +
> +	np = of_find_matching_node_and_match(NULL, rcar_rst_matches, &match);
> +	if (!np)
> +		return -ENODEV;
> +
> +	base = of_iomap(np, 0);
> +	if (!base) {
> +		pr_warn("%s: Cannot map regs\n", np->full_name);
> +		error = -ENOMEM;
> +		goto out_put;
> +	}
> +
> +	rcar_rst_base = base;
> +	cfg = match->data;
> +	saved_mode = ioread32(base + cfg->modemr);
> +
> +	pr_debug("%s: MODE = 0x%08x\n", np->full_name, saved_mode);
> +
> +out_put:
> +	of_node_put(np);
> +	return error;
> +}
> +arch_initcall(rcar_rst_init);
> +
> +int __init rcar_rst_read_mode_pins(u32 *mode)


Just a style issue: Is the string 'pins' in the function name still 
relevant? I.e. what's about just 'rcar_rst_read_mode()'?


Best regards

Dirk

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

* [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver
@ 2016-06-02  5:42     ` Dirk Behme
  0 siblings, 0 replies; 74+ messages in thread
From: Dirk Behme @ 2016-06-02  5:42 UTC (permalink / raw)
  To: linux-arm-kernel

On 01.06.2016 21:21, Geert Uytterhoeven wrote:
> Add a driver for the Renesas R-Car Gen1 RESET/WDT and R-Car Gen2/Gen3
> RST module.
>
> For now this driver just provides an API to obtain the state of the mode
> pins, as latched at reset time.  As this is typically called from the
> probe function of a clock driver, which can run much earlier than any
> initcall, calling rcar_rst_read_mode_pins() may force an early
> initialization of the driver.
>
> Despite the current simple and almost identical handling for all
> supported SoCs, the driver matches against SoC-specific compatible
> values only, as the features provided by the hardware module differ a
> lot across the various SoC families and members.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v3:
>   - New.
> ---
>  drivers/soc/renesas/Makefile         |  5 ++
>  drivers/soc/renesas/rcar-rst.c       | 94 ++++++++++++++++++++++++++++++++++++
>  include/linux/soc/renesas/rcar-rst.h |  6 +++
>  3 files changed, 105 insertions(+)
>  create mode 100644 drivers/soc/renesas/rcar-rst.c
>  create mode 100644 include/linux/soc/renesas/rcar-rst.h
>
> diff --git a/drivers/soc/renesas/Makefile b/drivers/soc/renesas/Makefile
> index f32a001c65c3ab44..0d732ff893dd8fba 100644
> --- a/drivers/soc/renesas/Makefile
> +++ b/drivers/soc/renesas/Makefile
> @@ -1,3 +1,8 @@
> +obj-$(CONFIG_ARCH_RCAR_GEN1)	+= rcar-rst.o
> +obj-$(CONFIG_ARCH_RCAR_GEN2)	+= rcar-rst.o
> +obj-$(CONFIG_ARCH_R8A7795)	+= rcar-rst.o
> +obj-$(CONFIG_ARCH_R8A7796)	+= rcar-rst.o
> +
>  obj-$(CONFIG_ARCH_R8A7779)	+= rcar-sysc.o r8a7779-sysc.o
>  obj-$(CONFIG_ARCH_R8A7790)	+= rcar-sysc.o r8a7790-sysc.o
>  obj-$(CONFIG_ARCH_R8A7791)	+= rcar-sysc.o r8a7791-sysc.o
> diff --git a/drivers/soc/renesas/rcar-rst.c b/drivers/soc/renesas/rcar-rst.c
> new file mode 100644
> index 0000000000000000..1997c348c0853254
> --- /dev/null
> +++ b/drivers/soc/renesas/rcar-rst.c
> @@ -0,0 +1,94 @@
> +/*
> + * R-Car Gen1 RESET/WDT and R-Car Gen2/Gen3 RST Driver
> + *
> + * Copyright (C) 2016 Glider bvba
> + *
> + * This file is subject to the terms and conditions of the GNU General Public
> + * License.  See the file "COPYING" in the main directory of this archive
> + * for more details.
> + */
> +
> +#include <linux/err.h>
> +#include <linux/io.h>
> +#include <linux/of_address.h>
> +#include <linux/soc/renesas/rcar-rst.h>
> +
> +struct rst_config {
> +	unsigned int modemr;	/* Mode Monitoring Register Offset */
> +};
> +
> +static const struct rst_config rcar_rst_gen1 __initconst = {
> +	.modemr = 0x20,
> +};
> +
> +static const struct rst_config rcar_rst_gen2 __initconst = {
> +	.modemr = 0x60,
> +};
> +
> +static const struct rst_config rcar_rst_gen3 __initconst = {
> +	.modemr = 0x60,
> +};
> +
> +static const struct of_device_id rcar_rst_matches[] __initconst = {
> +	{ .compatible = "renesas,r8a7778-reset-wdt", .data = &rcar_rst_gen1 },
> +	{ .compatible = "renesas,r8a7779-reset-wdt", .data = &rcar_rst_gen1 },
> +	{ .compatible = "renesas,r8a7790-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7791-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7792-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7793-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7794-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7795-rst", .data = &rcar_rst_gen3 },
> +	{ .compatible = "renesas,r8a7796-rst", .data = &rcar_rst_gen3 },
> +	{ /* sentinel */ }
> +};
> +
> +static void __iomem *rcar_rst_base __initdata;
> +static u32 saved_mode __initdata;
> +
> +static int __init rcar_rst_init(void)
> +{
> +	const struct of_device_id *match;
> +	const struct rst_config *cfg;
> +	struct device_node *np;
> +	void __iomem *base;
> +	int error = 0;
> +
> +	if (rcar_rst_base)
> +		return 0;
> +
> +	np = of_find_matching_node_and_match(NULL, rcar_rst_matches, &match);
> +	if (!np)
> +		return -ENODEV;
> +
> +	base = of_iomap(np, 0);
> +	if (!base) {
> +		pr_warn("%s: Cannot map regs\n", np->full_name);
> +		error = -ENOMEM;
> +		goto out_put;
> +	}
> +
> +	rcar_rst_base = base;
> +	cfg = match->data;
> +	saved_mode = ioread32(base + cfg->modemr);
> +
> +	pr_debug("%s: MODE = 0x%08x\n", np->full_name, saved_mode);
> +
> +out_put:
> +	of_node_put(np);
> +	return error;
> +}
> +arch_initcall(rcar_rst_init);
> +
> +int __init rcar_rst_read_mode_pins(u32 *mode)


Just a style issue: Is the string 'pins' in the function name still 
relevant? I.e. what's about just 'rcar_rst_read_mode()'?


Best regards

Dirk

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

* Re: [PATCH/RFC v3 20/22] clk: renesas: r8a7778: Remove obsolete r8a7778_clocks_init()
  2016-06-01 19:21 ` [PATCH/RFC v3 20/22] clk: renesas: r8a7778: Remove obsolete r8a7778_clocks_init() Geert Uytterhoeven
  2016-06-02  5:54     ` Dirk Behme
@ 2016-06-02  5:54     ` Dirk Behme
  0 siblings, 0 replies; 74+ messages in thread
From: Dirk Behme @ 2016-06-02  5:54 UTC (permalink / raw)
  To: Geert Uytterhoeven, Simon Horman, Magnus Damm, Laurent Pinchart,
	Philipp Zabel, Michael Turquette, Stephen Boyd
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree

On 01.06.2016 21:21, Geert Uytterhoeven wrote:
> The R-Car M1A board code no longer calls r8a7778_clocks_init().
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v3:
>   - New.
> ---
>  drivers/clk/renesas/clk-r8a7778.c | 13 -------------
>  include/linux/clk/renesas.h       |  1 -
>  2 files changed, 14 deletions(-)
>
> diff --git a/drivers/clk/renesas/clk-r8a7778.c b/drivers/clk/renesas/clk-r8a7778.c
> index 07ea411098a75ad1..886a8380e91247a1 100644
> --- a/drivers/clk/renesas/clk-r8a7778.c
> +++ b/drivers/clk/renesas/clk-r8a7778.c
> @@ -143,16 +143,3 @@ static void __init r8a7778_cpg_clocks_init(struct device_node *np)
>
>  CLK_OF_DECLARE(r8a7778_cpg_clks, "renesas,r8a7778-cpg-clocks",
>  	       r8a7778_cpg_clocks_init);
> -
> -void __init r8a7778_clocks_init(u32 mode)
> -{
> -	BUG_ON(!(mode & BIT(19)));
> -
> -	cpg_mode_rates = (!!(mode & BIT(18)) << 2) |
> -			 (!!(mode & BIT(12)) << 1) |
> -			 (!!(mode & BIT(11)));
> -	cpg_mode_divs = (!!(mode & BIT(2)) << 1) |
> -			(!!(mode & BIT(1)));
> -
> -	of_clk_init(NULL);
> -}


Just a question on how you structured the patches: Is there a special 
reason why you do the adding of new code and the removal of dead code in 
two patches?

Having both in one patch normally makes it more obvious which old code 
is replaced by which new code.

An example: In patch

[PATCH/RFC v3 11/22] clk: renesas: r8a7778: Obtain mode pin values using 
R-Car RST driver

I wondered where the section

+	BUG_ON(!(mode & BIT(19)));
+
+	cpg_mode_rates = (!!(mode & BIT(18)) << 2) |
+			 (!!(mode & BIT(12)) << 1) |
+			 (!!(mode & BIT(11)));
+	cpg_mode_divs = (!!(mode & BIT(2)) << 1) |
+			(!!(mode & BIT(1)));

comes from. This becomes obvious with this patch 20/22. But it's 9 
patches later ;) So why don't make the whole replacement visible in one 
patch?

Best regards

Dirk

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

* Re: [PATCH/RFC v3 20/22] clk: renesas: r8a7778: Remove obsolete r8a7778_clocks_init()
@ 2016-06-02  5:54     ` Dirk Behme
  0 siblings, 0 replies; 74+ messages in thread
From: Dirk Behme @ 2016-06-02  5:54 UTC (permalink / raw)
  To: Geert Uytterhoeven, Simon Horman, Magnus Damm, Laurent Pinchart,
	Philipp Zabel, Michael Turquette, Stephen Boyd
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree

On 01.06.2016 21:21, Geert Uytterhoeven wrote:
> The R-Car M1A board code no longer calls r8a7778_clocks_init().
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v3:
>   - New.
> ---
>  drivers/clk/renesas/clk-r8a7778.c | 13 -------------
>  include/linux/clk/renesas.h       |  1 -
>  2 files changed, 14 deletions(-)
>
> diff --git a/drivers/clk/renesas/clk-r8a7778.c b/drivers/clk/renesas/clk-r8a7778.c
> index 07ea411098a75ad1..886a8380e91247a1 100644
> --- a/drivers/clk/renesas/clk-r8a7778.c
> +++ b/drivers/clk/renesas/clk-r8a7778.c
> @@ -143,16 +143,3 @@ static void __init r8a7778_cpg_clocks_init(struct device_node *np)
>
>  CLK_OF_DECLARE(r8a7778_cpg_clks, "renesas,r8a7778-cpg-clocks",
>  	       r8a7778_cpg_clocks_init);
> -
> -void __init r8a7778_clocks_init(u32 mode)
> -{
> -	BUG_ON(!(mode & BIT(19)));
> -
> -	cpg_mode_rates = (!!(mode & BIT(18)) << 2) |
> -			 (!!(mode & BIT(12)) << 1) |
> -			 (!!(mode & BIT(11)));
> -	cpg_mode_divs = (!!(mode & BIT(2)) << 1) |
> -			(!!(mode & BIT(1)));
> -
> -	of_clk_init(NULL);
> -}


Just a question on how you structured the patches: Is there a special 
reason why you do the adding of new code and the removal of dead code in 
two patches?

Having both in one patch normally makes it more obvious which old code 
is replaced by which new code.

An example: In patch

[PATCH/RFC v3 11/22] clk: renesas: r8a7778: Obtain mode pin values using 
R-Car RST driver

I wondered where the section

+	BUG_ON(!(mode & BIT(19)));
+
+	cpg_mode_rates = (!!(mode & BIT(18)) << 2) |
+			 (!!(mode & BIT(12)) << 1) |
+			 (!!(mode & BIT(11)));
+	cpg_mode_divs = (!!(mode & BIT(2)) << 1) |
+			(!!(mode & BIT(1)));

comes from. This becomes obvious with this patch 20/22. But it's 9 
patches later ;) So why don't make the whole replacement visible in one 
patch?

Best regards

Dirk

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

* [PATCH/RFC v3 20/22] clk: renesas: r8a7778: Remove obsolete r8a7778_clocks_init()
@ 2016-06-02  5:54     ` Dirk Behme
  0 siblings, 0 replies; 74+ messages in thread
From: Dirk Behme @ 2016-06-02  5:54 UTC (permalink / raw)
  To: linux-arm-kernel

On 01.06.2016 21:21, Geert Uytterhoeven wrote:
> The R-Car M1A board code no longer calls r8a7778_clocks_init().
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v3:
>   - New.
> ---
>  drivers/clk/renesas/clk-r8a7778.c | 13 -------------
>  include/linux/clk/renesas.h       |  1 -
>  2 files changed, 14 deletions(-)
>
> diff --git a/drivers/clk/renesas/clk-r8a7778.c b/drivers/clk/renesas/clk-r8a7778.c
> index 07ea411098a75ad1..886a8380e91247a1 100644
> --- a/drivers/clk/renesas/clk-r8a7778.c
> +++ b/drivers/clk/renesas/clk-r8a7778.c
> @@ -143,16 +143,3 @@ static void __init r8a7778_cpg_clocks_init(struct device_node *np)
>
>  CLK_OF_DECLARE(r8a7778_cpg_clks, "renesas,r8a7778-cpg-clocks",
>  	       r8a7778_cpg_clocks_init);
> -
> -void __init r8a7778_clocks_init(u32 mode)
> -{
> -	BUG_ON(!(mode & BIT(19)));
> -
> -	cpg_mode_rates = (!!(mode & BIT(18)) << 2) |
> -			 (!!(mode & BIT(12)) << 1) |
> -			 (!!(mode & BIT(11)));
> -	cpg_mode_divs = (!!(mode & BIT(2)) << 1) |
> -			(!!(mode & BIT(1)));
> -
> -	of_clk_init(NULL);
> -}


Just a question on how you structured the patches: Is there a special 
reason why you do the adding of new code and the removal of dead code in 
two patches?

Having both in one patch normally makes it more obvious which old code 
is replaced by which new code.

An example: In patch

[PATCH/RFC v3 11/22] clk: renesas: r8a7778: Obtain mode pin values using 
R-Car RST driver

I wondered where the section

+	BUG_ON(!(mode & BIT(19)));
+
+	cpg_mode_rates = (!!(mode & BIT(18)) << 2) |
+			 (!!(mode & BIT(12)) << 1) |
+			 (!!(mode & BIT(11)));
+	cpg_mode_divs = (!!(mode & BIT(2)) << 1) |
+			(!!(mode & BIT(1)));

comes from. This becomes obvious with this patch 20/22. But it's 9 
patches later ;) So why don't make the whole replacement visible in one 
patch?

Best regards

Dirk

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

* Re: [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
  2016-06-01 19:20 ` [PATCH/RFC v3 01/22] reset: Add renesas,rst DT bindings Geert Uytterhoeven
@ 2016-06-02  5:57   ` Dirk Behme
  2016-06-01 19:21 ` [PATCH/RFC v3 05/22] ARM: dts: r8a7790: Add device node for RST module Geert Uytterhoeven
                     ` (16 subsequent siblings)
  18 siblings, 0 replies; 74+ messages in thread
From: Dirk Behme @ 2016-06-02  5:57 UTC (permalink / raw)
  To: Geert Uytterhoeven, Simon Horman, Magnus Damm, Laurent Pinchart,
	Philipp Zabel, Michael Turquette, Stephen Boyd
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree

On 01.06.2016 21:20, Geert Uytterhoeven wrote:
> 	Hi all,
>
> Currently the R-Car Clock Pulse Generator (CPG) drivers obtains the
> state of the mode pins either by a call from the board code, or directly
> by using a hardcoded register access. This is a bit messy, and creates a
> dependency between driver and platform code.
>
> This RFC patch series converts the various Renesas R-Car clock drivers
> and support code from reading the mode pin states using a hardcoded
> register access to using a new R-Car RST driver.
>
> This series consists of 5 parts:
>   A. Patches 1 and 2 add DT bindings and driver code for the R-Car RST
>      driver,
>   B. Patches 3-10 add device nodes for the RST modules to the R-Car DTS
>      files,
>   C. Patches 11-16 convert the clock drivers to call into the new R-Car
>      RST driver,
>   D. Patches 17-19 remove passing mode pin state to the clock drivers
>      from the board code,
>   E. Patches 20-22 remove dead code from the clock drivers.
>
> I've kept all parts together as this is an RFC, and to avoid losing the
> bigger picture. I will split it in series per maintainer, when we have
> decided how to handle the dependencies (see below).
>
> After this, there are still a few users of rcar_gen2_read_mode_pins()
> left in board code, which should be converted in one way or another.
> However, all R-Car clock drivers will rely on the presence in DT of a
> device node for the RST module.  Backwards compatibility with old DTBs
> is retained only for R-Car Gen2, which has fallback code calling into
> rcar_gen2_read_mode_pins().
>
> As is usually the case with moving functionality from board code to DT,
> there are lots of hard dependencies:
>   - The DT updates in Part B can be merged as soon as the DT bindings in
>     Part A have been approved,
>   - The clock driver updates in Part C depend functionally on the driver
>     code in Part A,
>   - The board code cleanups in Part D depend on the clock driver updates
>     in Part C,
>   - The block driver cleanups in part E depend on the board code
>     cleanups in part D.
>
> This series has evolved over time, cfr.
>   - "[PATCH/RFC 00/11] ARM: shmobile: Let CPG use syscon for MD pin
>     values" (http://www.spinics.net/lists/linux-clk/msg01478.html),
>   - "[PATCH 00/10] arm64: renesas: Obtain MD pin values using
>     syscon/regmap".
>     (http://www.spinics.net/lists/linux-sh/msg44757.html)
>
> Changes compared to v2:
>   - Use "renesas,<soctype>-rst" instead of "renesas,rst-<soctype>",
>   - Drop "syscon" compatible value and "renesas,modemr" property, use a
>     real driver instead,
>   - Add support for R-Car M1A, H1, and M3-W.
>
> Changes compared to v1:
>   - Add support for R-Car H3.
>
> An alternative and broader solution was proposed by Simon Horman as
> "[PATCH/RFC 0/6] boot-mode-reg: Add core"
> (http://www.spinics.net/lists/linux-sh/msg45969.html).
>
> This patch series is against renesas-drivers.
> It has been tested on r8a7778/bockw, r8a7779/marzen, r8a7791/koelsch,
> and r8a7795/salvator-x.
>
> Thanks for your comments!
>
> Geert Uytterhoeven (22):
>   reset: Add renesas,rst DT bindings
>   soc: renesas: Add R-Car RST driver
>   ARM: dts: r8a7778: Add device node for RESET/WDT module
>   ARM: dts: r8a7779: Add device node for RESET/WDT module
>   ARM: dts: r8a7790: Add device node for RST module
>   ARM: dts: r8a7791: Add device node for RST module
>   ARM: dts: r8a7793: Add device node for RST module
>   ARM: dts: r8a7794: Add device node for RST module
>   arm64: renesas: r8a7795 dtsi: Add device node for RST module
>   arm64: renesas: r8a7796 dtsi: Add device node for RST module
>   clk: renesas: r8a7778: Obtain mode pin values using R-Car RST driver
>   clk: renesas: r8a7779: Obtain mode pin values from R-Car RST driver
>   clk: renesas: rcar-gen2: Obtain mode pin values using RST driver
>   clk: renesas: r8a7795: Obtain mode pin values from R-Car RST driver
>   clk: renesas: r8a7796: Obtain mode pin values from R-Car RST driver
>   clk: renesas: rcar-gen3-cpg: Remove obsolete
>     rcar_gen3_read_mode_pins()
>   ARM: shmobile: r8a7778: Stop passing mode pins state to clock driver
>   ARM: shmobile: r8a7779: Stop passing mode pins state to clock driver
>   ARM: shmobile: rcar-gen2: Stop passing mode pins state to clock driver
>   clk: renesas: r8a7778: Remove obsolete r8a7778_clocks_init()
>   clk: renesas: r8a7779: Remove obsolete r8a7779_clocks_init()
>   clk: renesas: rcar-gen2: Remove obsolete rcar_gen2_clocks_init()
>
>  .../devicetree/bindings/reset/renesas,rst.txt      | 35 ++++++++
>  arch/arm/boot/dts/r8a7778.dtsi                     |  5 ++
>  arch/arm/boot/dts/r8a7779.dtsi                     |  5 ++
>  arch/arm/boot/dts/r8a7790.dtsi                     |  5 ++
>  arch/arm/boot/dts/r8a7791.dtsi                     |  5 ++
>  arch/arm/boot/dts/r8a7793.dtsi                     |  5 ++
>  arch/arm/boot/dts/r8a7794.dtsi                     |  5 ++
>  arch/arm/mach-shmobile/setup-r8a7778.c             | 15 ----
>  arch/arm/mach-shmobile/setup-r8a7779.c             | 27 -------
>  arch/arm/mach-shmobile/setup-rcar-gen2.c           |  6 +-
>  arch/arm64/boot/dts/renesas/r8a7795.dtsi           |  5 ++
>  arch/arm64/boot/dts/renesas/r8a7796.dtsi           |  5 ++
>  drivers/clk/renesas/clk-r8a7778.c                  | 26 +++---
>  drivers/clk/renesas/clk-r8a7779.c                  | 18 ++---
>  drivers/clk/renesas/clk-rcar-gen2.c                | 17 ++--
>  drivers/clk/renesas/r8a7795-cpg-mssr.c             |  8 +-
>  drivers/clk/renesas/r8a7796-cpg-mssr.c             |  8 +-
>  drivers/clk/renesas/rcar-gen3-cpg.c                | 17 ----
>  drivers/clk/renesas/rcar-gen3-cpg.h                |  1 -
>  drivers/soc/renesas/Makefile                       |  5 ++
>  drivers/soc/renesas/rcar-rst.c                     | 94 ++++++++++++++++++++++
>  include/linux/clk/renesas.h                        |  4 -
>  include/linux/soc/renesas/rcar-rst.h               |  6 ++
>  23 files changed, 227 insertions(+), 100 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/reset/renesas,rst.txt
>  create mode 100644 drivers/soc/renesas/rcar-rst.c
>  create mode 100644 include/linux/soc/renesas/rcar-rst.h


Whole series:

Acked-by: Dirk Behme <dirk.behme@de.bosch.com>

Thanks!

Dirk

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

* Re: [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state
@ 2016-06-02  5:57   ` Dirk Behme
  0 siblings, 0 replies; 74+ messages in thread
From: Dirk Behme @ 2016-06-02  5:57 UTC (permalink / raw)
  To: Geert Uytterhoeven, Simon Horman, Magnus Damm, Laurent Pinchart,
	Philipp Zabel, Michael Turquette, Stephen Boyd
  Cc: linux-renesas-soc, linux-arm-kernel, devicetree

On 01.06.2016 21:20, Geert Uytterhoeven wrote:
> 	Hi all,
>
> Currently the R-Car Clock Pulse Generator (CPG) drivers obtains the
> state of the mode pins either by a call from the board code, or directly
> by using a hardcoded register access. This is a bit messy, and creates a
> dependency between driver and platform code.
>
> This RFC patch series converts the various Renesas R-Car clock drivers
> and support code from reading the mode pin states using a hardcoded
> register access to using a new R-Car RST driver.
>
> This series consists of 5 parts:
>   A. Patches 1 and 2 add DT bindings and driver code for the R-Car RST
>      driver,
>   B. Patches 3-10 add device nodes for the RST modules to the R-Car DTS
>      files,
>   C. Patches 11-16 convert the clock drivers to call into the new R-Car
>      RST driver,
>   D. Patches 17-19 remove passing mode pin state to the clock drivers
>      from the board code,
>   E. Patches 20-22 remove dead code from the clock drivers.
>
> I've kept all parts together as this is an RFC, and to avoid losing the
> bigger picture. I will split it in series per maintainer, when we have
> decided how to handle the dependencies (see below).
>
> After this, there are still a few users of rcar_gen2_read_mode_pins()
> left in board code, which should be converted in one way or another.
> However, all R-Car clock drivers will rely on the presence in DT of a
> device node for the RST module.  Backwards compatibility with old DTBs
> is retained only for R-Car Gen2, which has fallback code calling into
> rcar_gen2_read_mode_pins().
>
> As is usually the case with moving functionality from board code to DT,
> there are lots of hard dependencies:
>   - The DT updates in Part B can be merged as soon as the DT bindings in
>     Part A have been approved,
>   - The clock driver updates in Part C depend functionally on the driver
>     code in Part A,
>   - The board code cleanups in Part D depend on the clock driver updates
>     in Part C,
>   - The block driver cleanups in part E depend on the board code
>     cleanups in part D.
>
> This series has evolved over time, cfr.
>   - "[PATCH/RFC 00/11] ARM: shmobile: Let CPG use syscon for MD pin
>     values" (http://www.spinics.net/lists/linux-clk/msg01478.html),
>   - "[PATCH 00/10] arm64: renesas: Obtain MD pin values using
>     syscon/regmap".
>     (http://www.spinics.net/lists/linux-sh/msg44757.html)
>
> Changes compared to v2:
>   - Use "renesas,<soctype>-rst" instead of "renesas,rst-<soctype>",
>   - Drop "syscon" compatible value and "renesas,modemr" property, use a
>     real driver instead,
>   - Add support for R-Car M1A, H1, and M3-W.
>
> Changes compared to v1:
>   - Add support for R-Car H3.
>
> An alternative and broader solution was proposed by Simon Horman as
> "[PATCH/RFC 0/6] boot-mode-reg: Add core"
> (http://www.spinics.net/lists/linux-sh/msg45969.html).
>
> This patch series is against renesas-drivers.
> It has been tested on r8a7778/bockw, r8a7779/marzen, r8a7791/koelsch,
> and r8a7795/salvator-x.
>
> Thanks for your comments!
>
> Geert Uytterhoeven (22):
>   reset: Add renesas,rst DT bindings
>   soc: renesas: Add R-Car RST driver
>   ARM: dts: r8a7778: Add device node for RESET/WDT module
>   ARM: dts: r8a7779: Add device node for RESET/WDT module
>   ARM: dts: r8a7790: Add device node for RST module
>   ARM: dts: r8a7791: Add device node for RST module
>   ARM: dts: r8a7793: Add device node for RST module
>   ARM: dts: r8a7794: Add device node for RST module
>   arm64: renesas: r8a7795 dtsi: Add device node for RST module
>   arm64: renesas: r8a7796 dtsi: Add device node for RST module
>   clk: renesas: r8a7778: Obtain mode pin values using R-Car RST driver
>   clk: renesas: r8a7779: Obtain mode pin values from R-Car RST driver
>   clk: renesas: rcar-gen2: Obtain mode pin values using RST driver
>   clk: renesas: r8a7795: Obtain mode pin values from R-Car RST driver
>   clk: renesas: r8a7796: Obtain mode pin values from R-Car RST driver
>   clk: renesas: rcar-gen3-cpg: Remove obsolete
>     rcar_gen3_read_mode_pins()
>   ARM: shmobile: r8a7778: Stop passing mode pins state to clock driver
>   ARM: shmobile: r8a7779: Stop passing mode pins state to clock driver
>   ARM: shmobile: rcar-gen2: Stop passing mode pins state to clock driver
>   clk: renesas: r8a7778: Remove obsolete r8a7778_clocks_init()
>   clk: renesas: r8a7779: Remove obsolete r8a7779_clocks_init()
>   clk: renesas: rcar-gen2: Remove obsolete rcar_gen2_clocks_init()
>
>  .../devicetree/bindings/reset/renesas,rst.txt      | 35 ++++++++
>  arch/arm/boot/dts/r8a7778.dtsi                     |  5 ++
>  arch/arm/boot/dts/r8a7779.dtsi                     |  5 ++
>  arch/arm/boot/dts/r8a7790.dtsi                     |  5 ++
>  arch/arm/boot/dts/r8a7791.dtsi                     |  5 ++
>  arch/arm/boot/dts/r8a7793.dtsi                     |  5 ++
>  arch/arm/boot/dts/r8a7794.dtsi                     |  5 ++
>  arch/arm/mach-shmobile/setup-r8a7778.c             | 15 ----
>  arch/arm/mach-shmobile/setup-r8a7779.c             | 27 -------
>  arch/arm/mach-shmobile/setup-rcar-gen2.c           |  6 +-
>  arch/arm64/boot/dts/renesas/r8a7795.dtsi           |  5 ++
>  arch/arm64/boot/dts/renesas/r8a7796.dtsi           |  5 ++
>  drivers/clk/renesas/clk-r8a7778.c                  | 26 +++---
>  drivers/clk/renesas/clk-r8a7779.c                  | 18 ++---
>  drivers/clk/renesas/clk-rcar-gen2.c                | 17 ++--
>  drivers/clk/renesas/r8a7795-cpg-mssr.c             |  8 +-
>  drivers/clk/renesas/r8a7796-cpg-mssr.c             |  8 +-
>  drivers/clk/renesas/rcar-gen3-cpg.c                | 17 ----
>  drivers/clk/renesas/rcar-gen3-cpg.h                |  1 -
>  drivers/soc/renesas/Makefile                       |  5 ++
>  drivers/soc/renesas/rcar-rst.c                     | 94 ++++++++++++++++++++++
>  include/linux/clk/renesas.h                        |  4 -
>  include/linux/soc/renesas/rcar-rst.h               |  6 ++
>  23 files changed, 227 insertions(+), 100 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/reset/renesas,rst.txt
>  create mode 100644 drivers/soc/renesas/rcar-rst.c
>  create mode 100644 include/linux/soc/renesas/rcar-rst.h


Whole series:

Acked-by: Dirk Behme <dirk.behme@de.bosch.com>

Thanks!

Dirk

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

* [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state
@ 2016-06-02  5:57   ` Dirk Behme
  0 siblings, 0 replies; 74+ messages in thread
From: Dirk Behme @ 2016-06-02  5:57 UTC (permalink / raw)
  To: linux-arm-kernel

On 01.06.2016 21:20, Geert Uytterhoeven wrote:
> 	Hi all,
>
> Currently the R-Car Clock Pulse Generator (CPG) drivers obtains the
> state of the mode pins either by a call from the board code, or directly
> by using a hardcoded register access. This is a bit messy, and creates a
> dependency between driver and platform code.
>
> This RFC patch series converts the various Renesas R-Car clock drivers
> and support code from reading the mode pin states using a hardcoded
> register access to using a new R-Car RST driver.
>
> This series consists of 5 parts:
>   A. Patches 1 and 2 add DT bindings and driver code for the R-Car RST
>      driver,
>   B. Patches 3-10 add device nodes for the RST modules to the R-Car DTS
>      files,
>   C. Patches 11-16 convert the clock drivers to call into the new R-Car
>      RST driver,
>   D. Patches 17-19 remove passing mode pin state to the clock drivers
>      from the board code,
>   E. Patches 20-22 remove dead code from the clock drivers.
>
> I've kept all parts together as this is an RFC, and to avoid losing the
> bigger picture. I will split it in series per maintainer, when we have
> decided how to handle the dependencies (see below).
>
> After this, there are still a few users of rcar_gen2_read_mode_pins()
> left in board code, which should be converted in one way or another.
> However, all R-Car clock drivers will rely on the presence in DT of a
> device node for the RST module.  Backwards compatibility with old DTBs
> is retained only for R-Car Gen2, which has fallback code calling into
> rcar_gen2_read_mode_pins().
>
> As is usually the case with moving functionality from board code to DT,
> there are lots of hard dependencies:
>   - The DT updates in Part B can be merged as soon as the DT bindings in
>     Part A have been approved,
>   - The clock driver updates in Part C depend functionally on the driver
>     code in Part A,
>   - The board code cleanups in Part D depend on the clock driver updates
>     in Part C,
>   - The block driver cleanups in part E depend on the board code
>     cleanups in part D.
>
> This series has evolved over time, cfr.
>   - "[PATCH/RFC 00/11] ARM: shmobile: Let CPG use syscon for MD pin
>     values" (http://www.spinics.net/lists/linux-clk/msg01478.html),
>   - "[PATCH 00/10] arm64: renesas: Obtain MD pin values using
>     syscon/regmap".
>     (http://www.spinics.net/lists/linux-sh/msg44757.html)
>
> Changes compared to v2:
>   - Use "renesas,<soctype>-rst" instead of "renesas,rst-<soctype>",
>   - Drop "syscon" compatible value and "renesas,modemr" property, use a
>     real driver instead,
>   - Add support for R-Car M1A, H1, and M3-W.
>
> Changes compared to v1:
>   - Add support for R-Car H3.
>
> An alternative and broader solution was proposed by Simon Horman as
> "[PATCH/RFC 0/6] boot-mode-reg: Add core"
> (http://www.spinics.net/lists/linux-sh/msg45969.html).
>
> This patch series is against renesas-drivers.
> It has been tested on r8a7778/bockw, r8a7779/marzen, r8a7791/koelsch,
> and r8a7795/salvator-x.
>
> Thanks for your comments!
>
> Geert Uytterhoeven (22):
>   reset: Add renesas,rst DT bindings
>   soc: renesas: Add R-Car RST driver
>   ARM: dts: r8a7778: Add device node for RESET/WDT module
>   ARM: dts: r8a7779: Add device node for RESET/WDT module
>   ARM: dts: r8a7790: Add device node for RST module
>   ARM: dts: r8a7791: Add device node for RST module
>   ARM: dts: r8a7793: Add device node for RST module
>   ARM: dts: r8a7794: Add device node for RST module
>   arm64: renesas: r8a7795 dtsi: Add device node for RST module
>   arm64: renesas: r8a7796 dtsi: Add device node for RST module
>   clk: renesas: r8a7778: Obtain mode pin values using R-Car RST driver
>   clk: renesas: r8a7779: Obtain mode pin values from R-Car RST driver
>   clk: renesas: rcar-gen2: Obtain mode pin values using RST driver
>   clk: renesas: r8a7795: Obtain mode pin values from R-Car RST driver
>   clk: renesas: r8a7796: Obtain mode pin values from R-Car RST driver
>   clk: renesas: rcar-gen3-cpg: Remove obsolete
>     rcar_gen3_read_mode_pins()
>   ARM: shmobile: r8a7778: Stop passing mode pins state to clock driver
>   ARM: shmobile: r8a7779: Stop passing mode pins state to clock driver
>   ARM: shmobile: rcar-gen2: Stop passing mode pins state to clock driver
>   clk: renesas: r8a7778: Remove obsolete r8a7778_clocks_init()
>   clk: renesas: r8a7779: Remove obsolete r8a7779_clocks_init()
>   clk: renesas: rcar-gen2: Remove obsolete rcar_gen2_clocks_init()
>
>  .../devicetree/bindings/reset/renesas,rst.txt      | 35 ++++++++
>  arch/arm/boot/dts/r8a7778.dtsi                     |  5 ++
>  arch/arm/boot/dts/r8a7779.dtsi                     |  5 ++
>  arch/arm/boot/dts/r8a7790.dtsi                     |  5 ++
>  arch/arm/boot/dts/r8a7791.dtsi                     |  5 ++
>  arch/arm/boot/dts/r8a7793.dtsi                     |  5 ++
>  arch/arm/boot/dts/r8a7794.dtsi                     |  5 ++
>  arch/arm/mach-shmobile/setup-r8a7778.c             | 15 ----
>  arch/arm/mach-shmobile/setup-r8a7779.c             | 27 -------
>  arch/arm/mach-shmobile/setup-rcar-gen2.c           |  6 +-
>  arch/arm64/boot/dts/renesas/r8a7795.dtsi           |  5 ++
>  arch/arm64/boot/dts/renesas/r8a7796.dtsi           |  5 ++
>  drivers/clk/renesas/clk-r8a7778.c                  | 26 +++---
>  drivers/clk/renesas/clk-r8a7779.c                  | 18 ++---
>  drivers/clk/renesas/clk-rcar-gen2.c                | 17 ++--
>  drivers/clk/renesas/r8a7795-cpg-mssr.c             |  8 +-
>  drivers/clk/renesas/r8a7796-cpg-mssr.c             |  8 +-
>  drivers/clk/renesas/rcar-gen3-cpg.c                | 17 ----
>  drivers/clk/renesas/rcar-gen3-cpg.h                |  1 -
>  drivers/soc/renesas/Makefile                       |  5 ++
>  drivers/soc/renesas/rcar-rst.c                     | 94 ++++++++++++++++++++++
>  include/linux/clk/renesas.h                        |  4 -
>  include/linux/soc/renesas/rcar-rst.h               |  6 ++
>  23 files changed, 227 insertions(+), 100 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/reset/renesas,rst.txt
>  create mode 100644 drivers/soc/renesas/rcar-rst.c
>  create mode 100644 include/linux/soc/renesas/rcar-rst.h


Whole series:

Acked-by: Dirk Behme <dirk.behme@de.bosch.com>

Thanks!

Dirk

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

* Re: [PATCH/RFC v3 20/22] clk: renesas: r8a7778: Remove obsolete r8a7778_clocks_init()
  2016-06-02  5:54     ` Dirk Behme
@ 2016-06-02  7:13       ` Geert Uytterhoeven
  -1 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-02  7:13 UTC (permalink / raw)
  To: Dirk Behme
  Cc: Geert Uytterhoeven, Simon Horman, Magnus Damm, Laurent Pinchart,
	Philipp Zabel, Michael Turquette, Stephen Boyd,
	linux-renesas-soc, linux-arm-kernel, devicetree

Hi Dirk,

On Thu, Jun 2, 2016 at 7:54 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
> On 01.06.2016 21:21, Geert Uytterhoeven wrote:
>> The R-Car M1A board code no longer calls r8a7778_clocks_init().
>>
>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>> ---
>> v3:
>>   - New.
>> ---
>>  drivers/clk/renesas/clk-r8a7778.c | 13 -------------
>>  include/linux/clk/renesas.h       |  1 -
>>  2 files changed, 14 deletions(-)
>>
>> diff --git a/drivers/clk/renesas/clk-r8a7778.c
>> b/drivers/clk/renesas/clk-r8a7778.c
>> index 07ea411098a75ad1..886a8380e91247a1 100644
>> --- a/drivers/clk/renesas/clk-r8a7778.c
>> +++ b/drivers/clk/renesas/clk-r8a7778.c
>> @@ -143,16 +143,3 @@ static void __init r8a7778_cpg_clocks_init(struct
>> device_node *np)
>>
>>  CLK_OF_DECLARE(r8a7778_cpg_clks, "renesas,r8a7778-cpg-clocks",
>>                r8a7778_cpg_clocks_init);
>> -
>> -void __init r8a7778_clocks_init(u32 mode)
>> -{
>> -       BUG_ON(!(mode & BIT(19)));
>> -
>> -       cpg_mode_rates = (!!(mode & BIT(18)) << 2) |
>> -                        (!!(mode & BIT(12)) << 1) |
>> -                        (!!(mode & BIT(11)));
>> -       cpg_mode_divs = (!!(mode & BIT(2)) << 1) |
>> -                       (!!(mode & BIT(1)));
>> -
>> -       of_clk_init(NULL);
>> -}
>
> Just a question on how you structured the patches: Is there a special reason
> why you do the adding of new code and the removal of dead code in two
> patches?
>
> Having both in one patch normally makes it more obvious which old code is
> replaced by which new code.
>
> An example: In patch
>
> [PATCH/RFC v3 11/22] clk: renesas: r8a7778: Obtain mode pin values using
> R-Car RST driver
>
> I wondered where the section
>
> +       BUG_ON(!(mode & BIT(19)));
> +
> +       cpg_mode_rates = (!!(mode & BIT(18)) << 2) |
> +                        (!!(mode & BIT(12)) << 1) |
> +                        (!!(mode & BIT(11)));
> +       cpg_mode_divs = (!!(mode & BIT(2)) << 1) |
> +                       (!!(mode & BIT(1)));
>
> comes from. This becomes obvious with this patch 20/22. But it's 9 patches
> later ;) So why don't make the whole replacement visible in one patch?

Because that would break bisection.
Path 20 depends on patch 17, which depends on patch 11.
These three can't be a single patch because they touch multiple subsystems.

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

* [PATCH/RFC v3 20/22] clk: renesas: r8a7778: Remove obsolete r8a7778_clocks_init()
@ 2016-06-02  7:13       ` Geert Uytterhoeven
  0 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-02  7:13 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Dirk,

On Thu, Jun 2, 2016 at 7:54 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
> On 01.06.2016 21:21, Geert Uytterhoeven wrote:
>> The R-Car M1A board code no longer calls r8a7778_clocks_init().
>>
>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>> ---
>> v3:
>>   - New.
>> ---
>>  drivers/clk/renesas/clk-r8a7778.c | 13 -------------
>>  include/linux/clk/renesas.h       |  1 -
>>  2 files changed, 14 deletions(-)
>>
>> diff --git a/drivers/clk/renesas/clk-r8a7778.c
>> b/drivers/clk/renesas/clk-r8a7778.c
>> index 07ea411098a75ad1..886a8380e91247a1 100644
>> --- a/drivers/clk/renesas/clk-r8a7778.c
>> +++ b/drivers/clk/renesas/clk-r8a7778.c
>> @@ -143,16 +143,3 @@ static void __init r8a7778_cpg_clocks_init(struct
>> device_node *np)
>>
>>  CLK_OF_DECLARE(r8a7778_cpg_clks, "renesas,r8a7778-cpg-clocks",
>>                r8a7778_cpg_clocks_init);
>> -
>> -void __init r8a7778_clocks_init(u32 mode)
>> -{
>> -       BUG_ON(!(mode & BIT(19)));
>> -
>> -       cpg_mode_rates = (!!(mode & BIT(18)) << 2) |
>> -                        (!!(mode & BIT(12)) << 1) |
>> -                        (!!(mode & BIT(11)));
>> -       cpg_mode_divs = (!!(mode & BIT(2)) << 1) |
>> -                       (!!(mode & BIT(1)));
>> -
>> -       of_clk_init(NULL);
>> -}
>
> Just a question on how you structured the patches: Is there a special reason
> why you do the adding of new code and the removal of dead code in two
> patches?
>
> Having both in one patch normally makes it more obvious which old code is
> replaced by which new code.
>
> An example: In patch
>
> [PATCH/RFC v3 11/22] clk: renesas: r8a7778: Obtain mode pin values using
> R-Car RST driver
>
> I wondered where the section
>
> +       BUG_ON(!(mode & BIT(19)));
> +
> +       cpg_mode_rates = (!!(mode & BIT(18)) << 2) |
> +                        (!!(mode & BIT(12)) << 1) |
> +                        (!!(mode & BIT(11)));
> +       cpg_mode_divs = (!!(mode & BIT(2)) << 1) |
> +                       (!!(mode & BIT(1)));
>
> comes from. This becomes obvious with this patch 20/22. But it's 9 patches
> later ;) So why don't make the whole replacement visible in one patch?

Because that would break bisection.
Path 20 depends on patch 17, which depends on patch 11.
These three can't be a single patch because they touch multiple subsystems.

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

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

* Re: [PATCH/RFC v3 01/22] reset: Add renesas,rst DT bindings
  2016-06-01 19:20 ` [PATCH/RFC v3 01/22] reset: Add renesas,rst DT bindings Geert Uytterhoeven
@ 2016-06-02 21:47     ` Laurent Pinchart
  2016-06-02 21:47     ` Laurent Pinchart
  1 sibling, 0 replies; 74+ messages in thread
From: Laurent Pinchart @ 2016-06-02 21:47 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme, linux-renesas-soc,
	linux-arm-kernel, devicetree

Hi Geert,

Thank you for the patch.

On Wednesday 01 Jun 2016 21:20:59 Geert Uytterhoeven wrote:
> Add DT bindings for the Renesas R-Car Reset Controller (R-Car Gen1
> RESET/WDT and R-Car Gen2/Gen3 RST).
> 
> As the features provided by the hardware module differ a lot across the
> various SoC families and members, only SoC-specific compatible values
> are defined.
> 
> For now we use the RST only for providing access to the state of the
> mode pins.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Acked-by: Magnus Damm <damm+renesas@opensource.se>
> ---
> v3:
>   - Clarify current usage,
>   - Use "renesas,<soctype>-rst" instead of "renesas,rst-<soctype>",
>   - Drop "syscon" compatible value,
>   - Add R-Car M3-W,
>   - Add R-Car Gen1,
> 
> v2:
>   - Add Acked-by.
> ---
>  .../devicetree/bindings/reset/renesas,rst.txt      | 35 +++++++++++++++++++
>  1 file changed, 35 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/reset/renesas,rst.txt
> 
> diff --git a/Documentation/devicetree/bindings/reset/renesas,rst.txt
> b/Documentation/devicetree/bindings/reset/renesas,rst.txt new file mode
> 100644
> index 0000000000000000..488c72e1ee849cd3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/reset/renesas,rst.txt
> @@ -0,0 +1,35 @@
> +DT bindings for the Renesas R-Car Reset Controller
> +
> +The R-Car Reset Controller provides reset control, and implements the
> following
> +functions:
> +  - Latching of the levels on mode pins when PRESET# is negated,
> +  - Mode monitoring register,
> +  - Reset control of peripheral devices (on R-Car Gen1),
> +  - Watchdog timer (on R-Car Gen1).
> +  - Register-based reset control and boot address registers for the various
> CPU
> +    cores (on R-Car Gen2/Gen3),
> +
> +
> +Required properties:
> +  - compatible: Should be
> +		  - "renesas,<soctype>-reset-wdt" for R-Car Gen1,
> +		  - "renesas,<soctype>-rst" for R-Car Gen2/Gen3.
> +		Examples with soctypes are:
> +		  - "renesas,r8a7778-reset-wdt" (R-Car M1A)
> +		  - "renesas,r8a7779-reset-wdt" (R-Car H1)
> +		  - "renesas,r8a7790-rst" (R-Car H2)
> +		  - "renesas,r8a7791-rst" (R-Car M2-W)
> +		  - "renesas,r8a7792-rst" (R-Car V2H
> +		  - "renesas,r8a7793-rst" (R-Car M2-N)
> +		  - "renesas,r8a7794-rst" (R-Car E2)
> +		  - "renesas,r8a7795-rst" (R-Car H3)
> +		  - "renesas,r8a7796-rst" (R-Car M3-W)

Any specific reason for such a large indentation ? (I know this is really 
nitpicking)

Apart from that, it's just a bit of a shame we can't have generic compatible 
strings, but that would require additional DT properties to describe the reset 
controller features, and I assume that's not a path we want to take.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> +  - reg: Address start and address range for the device.
> +
> +
> +Example:
> +
> +	rst: reset-controller@e6160000 {
> +		compatible = "renesas,r8a7795-rst";
> +		reg = <0 0xe6160000 0 0x0200>;
> +	};

-- 
Regards,

Laurent Pinchart

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

* [PATCH/RFC v3 01/22] reset: Add renesas,rst DT bindings
@ 2016-06-02 21:47     ` Laurent Pinchart
  0 siblings, 0 replies; 74+ messages in thread
From: Laurent Pinchart @ 2016-06-02 21:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Geert,

Thank you for the patch.

On Wednesday 01 Jun 2016 21:20:59 Geert Uytterhoeven wrote:
> Add DT bindings for the Renesas R-Car Reset Controller (R-Car Gen1
> RESET/WDT and R-Car Gen2/Gen3 RST).
> 
> As the features provided by the hardware module differ a lot across the
> various SoC families and members, only SoC-specific compatible values
> are defined.
> 
> For now we use the RST only for providing access to the state of the
> mode pins.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Acked-by: Magnus Damm <damm+renesas@opensource.se>
> ---
> v3:
>   - Clarify current usage,
>   - Use "renesas,<soctype>-rst" instead of "renesas,rst-<soctype>",
>   - Drop "syscon" compatible value,
>   - Add R-Car M3-W,
>   - Add R-Car Gen1,
> 
> v2:
>   - Add Acked-by.
> ---
>  .../devicetree/bindings/reset/renesas,rst.txt      | 35 +++++++++++++++++++
>  1 file changed, 35 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/reset/renesas,rst.txt
> 
> diff --git a/Documentation/devicetree/bindings/reset/renesas,rst.txt
> b/Documentation/devicetree/bindings/reset/renesas,rst.txt new file mode
> 100644
> index 0000000000000000..488c72e1ee849cd3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/reset/renesas,rst.txt
> @@ -0,0 +1,35 @@
> +DT bindings for the Renesas R-Car Reset Controller
> +
> +The R-Car Reset Controller provides reset control, and implements the
> following
> +functions:
> +  - Latching of the levels on mode pins when PRESET# is negated,
> +  - Mode monitoring register,
> +  - Reset control of peripheral devices (on R-Car Gen1),
> +  - Watchdog timer (on R-Car Gen1).
> +  - Register-based reset control and boot address registers for the various
> CPU
> +    cores (on R-Car Gen2/Gen3),
> +
> +
> +Required properties:
> +  - compatible: Should be
> +		  - "renesas,<soctype>-reset-wdt" for R-Car Gen1,
> +		  - "renesas,<soctype>-rst" for R-Car Gen2/Gen3.
> +		Examples with soctypes are:
> +		  - "renesas,r8a7778-reset-wdt" (R-Car M1A)
> +		  - "renesas,r8a7779-reset-wdt" (R-Car H1)
> +		  - "renesas,r8a7790-rst" (R-Car H2)
> +		  - "renesas,r8a7791-rst" (R-Car M2-W)
> +		  - "renesas,r8a7792-rst" (R-Car V2H
> +		  - "renesas,r8a7793-rst" (R-Car M2-N)
> +		  - "renesas,r8a7794-rst" (R-Car E2)
> +		  - "renesas,r8a7795-rst" (R-Car H3)
> +		  - "renesas,r8a7796-rst" (R-Car M3-W)

Any specific reason for such a large indentation ? (I know this is really 
nitpicking)

Apart from that, it's just a bit of a shame we can't have generic compatible 
strings, but that would require additional DT properties to describe the reset 
controller features, and I assume that's not a path we want to take.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> +  - reg: Address start and address range for the device.
> +
> +
> +Example:
> +
> +	rst: reset-controller at e6160000 {
> +		compatible = "renesas,r8a7795-rst";
> +		reg = <0 0xe6160000 0 0x0200>;
> +	};

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver
  2016-06-01 19:21 ` [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver Geert Uytterhoeven
@ 2016-06-02 21:58     ` Laurent Pinchart
  2016-06-02 21:58     ` Laurent Pinchart
  1 sibling, 0 replies; 74+ messages in thread
From: Laurent Pinchart @ 2016-06-02 21:58 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme, linux-renesas-soc,
	linux-arm-kernel, devicetree

Hi Geert,

Thank you for the patch.

On Wednesday 01 Jun 2016 21:21:00 Geert Uytterhoeven wrote:
> Add a driver for the Renesas R-Car Gen1 RESET/WDT and R-Car Gen2/Gen3
> RST module.
> 
> For now this driver just provides an API to obtain the state of the mode
> pins, as latched at reset time.  As this is typically called from the
> probe function of a clock driver, which can run much earlier than any
> initcall, calling rcar_rst_read_mode_pins() may force an early
> initialization of the driver.
> 
> Despite the current simple and almost identical handling for all
> supported SoCs, the driver matches against SoC-specific compatible
> values only, as the features provided by the hardware module differ a
> lot across the various SoC families and members.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v3:
>   - New.
> ---
>  drivers/soc/renesas/Makefile         |  5 ++
>  drivers/soc/renesas/rcar-rst.c       | 94 +++++++++++++++++++++++++++++++++
>  include/linux/soc/renesas/rcar-rst.h |  6 +++
>  3 files changed, 105 insertions(+)
>  create mode 100644 drivers/soc/renesas/rcar-rst.c
>  create mode 100644 include/linux/soc/renesas/rcar-rst.h
> 
> diff --git a/drivers/soc/renesas/Makefile b/drivers/soc/renesas/Makefile
> index f32a001c65c3ab44..0d732ff893dd8fba 100644
> --- a/drivers/soc/renesas/Makefile
> +++ b/drivers/soc/renesas/Makefile
> @@ -1,3 +1,8 @@
> +obj-$(CONFIG_ARCH_RCAR_GEN1)	+= rcar-rst.o
> +obj-$(CONFIG_ARCH_RCAR_GEN2)	+= rcar-rst.o
> +obj-$(CONFIG_ARCH_R8A7795)	+= rcar-rst.o
> +obj-$(CONFIG_ARCH_R8A7796)	+= rcar-rst.o
> +
>  obj-$(CONFIG_ARCH_R8A7779)	+= rcar-sysc.o r8a7779-sysc.o
>  obj-$(CONFIG_ARCH_R8A7790)	+= rcar-sysc.o r8a7790-sysc.o
>  obj-$(CONFIG_ARCH_R8A7791)	+= rcar-sysc.o r8a7791-sysc.o
> diff --git a/drivers/soc/renesas/rcar-rst.c b/drivers/soc/renesas/rcar-rst.c
> new file mode 100644
> index 0000000000000000..1997c348c0853254
> --- /dev/null
> +++ b/drivers/soc/renesas/rcar-rst.c
> @@ -0,0 +1,94 @@
> +/*
> + * R-Car Gen1 RESET/WDT and R-Car Gen2/Gen3 RST Driver
> + *
> + * Copyright (C) 2016 Glider bvba
> + *
> + * This file is subject to the terms and conditions of the GNU General
> Public
> + * License.  See the file "COPYING" in the main directory of this archive
> + * for more details.
> + */
> +
> +#include <linux/err.h>
> +#include <linux/io.h>
> +#include <linux/of_address.h>
> +#include <linux/soc/renesas/rcar-rst.h>
> +
> +struct rst_config {
> +	unsigned int modemr;	/* Mode Monitoring Register Offset */
> +};
> +
> +static const struct rst_config rcar_rst_gen1 __initconst = {
> +	.modemr = 0x20,
> +};
> +
> +static const struct rst_config rcar_rst_gen2 __initconst = {
> +	.modemr = 0x60,
> +};
> +
> +static const struct rst_config rcar_rst_gen3 __initconst = {
> +	.modemr = 0x60,
> +};
> +
> +static const struct of_device_id rcar_rst_matches[] __initconst = {
> +	{ .compatible = "renesas,r8a7778-reset-wdt", .data = &rcar_rst_gen1 },
> +	{ .compatible = "renesas,r8a7779-reset-wdt", .data = &rcar_rst_gen1 },
> +	{ .compatible = "renesas,r8a7790-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7791-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7792-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7793-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7794-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7795-rst", .data = &rcar_rst_gen3 },
> +	{ .compatible = "renesas,r8a7796-rst", .data = &rcar_rst_gen3 },
> +	{ /* sentinel */ }
> +};
> +
> +static void __iomem *rcar_rst_base __initdata;
> +static u32 saved_mode __initdata;
> +
> +static int __init rcar_rst_init(void)
> +{
> +	const struct of_device_id *match;
> +	const struct rst_config *cfg;
> +	struct device_node *np;
> +	void __iomem *base;
> +	int error = 0;
> +
> +	if (rcar_rst_base)
> +		return 0;
> +
> +	np = of_find_matching_node_and_match(NULL, rcar_rst_matches, &match);
> +	if (!np)
> +		return -ENODEV;
> +
> +	base = of_iomap(np, 0);
> +	if (!base) {
> +		pr_warn("%s: Cannot map regs\n", np->full_name);
> +		error = -ENOMEM;
> +		goto out_put;
> +	}
> +
> +	rcar_rst_base = base;
> +	cfg = match->data;
> +	saved_mode = ioread32(base + cfg->modemr);
> +
> +	pr_debug("%s: MODE = 0x%08x\n", np->full_name, saved_mode);
> +
> +out_put:
> +	of_node_put(np);
> +	return error;
> +}
> +arch_initcall(rcar_rst_init);

Given that rcar_rst_init() is only used as a support function for 
rcar_rst_read_mode_pins(), how about removing the initcall ?

> +int __init rcar_rst_read_mode_pins(u32 *mode)
> +{
> +	int error;
> +
> +	if (!rcar_rst_base) {
> +		error = rcar_rst_init();
> +		if (error)
> +			return error;
> +	}
> +
> +	*mode = saved_mode;
> +	return 0;
> +}
> diff --git a/include/linux/soc/renesas/rcar-rst.h
> b/include/linux/soc/renesas/rcar-rst.h new file mode 100644
> index 0000000000000000..a18e0783946b66ec
> --- /dev/null
> +++ b/include/linux/soc/renesas/rcar-rst.h
> @@ -0,0 +1,6 @@
> +#ifndef __LINUX_SOC_RENESAS_RCAR_RST_H__
> +#define __LINUX_SOC_RENESAS_RCAR_RST_H__
> +
> +int rcar_rst_read_mode_pins(u32 *mode);
> +
> +#endif /* __LINUX_SOC_RENESAS_RCAR_RST_H__ */

-- 
Regards,

Laurent Pinchart

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

* [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver
@ 2016-06-02 21:58     ` Laurent Pinchart
  0 siblings, 0 replies; 74+ messages in thread
From: Laurent Pinchart @ 2016-06-02 21:58 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Geert,

Thank you for the patch.

On Wednesday 01 Jun 2016 21:21:00 Geert Uytterhoeven wrote:
> Add a driver for the Renesas R-Car Gen1 RESET/WDT and R-Car Gen2/Gen3
> RST module.
> 
> For now this driver just provides an API to obtain the state of the mode
> pins, as latched at reset time.  As this is typically called from the
> probe function of a clock driver, which can run much earlier than any
> initcall, calling rcar_rst_read_mode_pins() may force an early
> initialization of the driver.
> 
> Despite the current simple and almost identical handling for all
> supported SoCs, the driver matches against SoC-specific compatible
> values only, as the features provided by the hardware module differ a
> lot across the various SoC families and members.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v3:
>   - New.
> ---
>  drivers/soc/renesas/Makefile         |  5 ++
>  drivers/soc/renesas/rcar-rst.c       | 94 +++++++++++++++++++++++++++++++++
>  include/linux/soc/renesas/rcar-rst.h |  6 +++
>  3 files changed, 105 insertions(+)
>  create mode 100644 drivers/soc/renesas/rcar-rst.c
>  create mode 100644 include/linux/soc/renesas/rcar-rst.h
> 
> diff --git a/drivers/soc/renesas/Makefile b/drivers/soc/renesas/Makefile
> index f32a001c65c3ab44..0d732ff893dd8fba 100644
> --- a/drivers/soc/renesas/Makefile
> +++ b/drivers/soc/renesas/Makefile
> @@ -1,3 +1,8 @@
> +obj-$(CONFIG_ARCH_RCAR_GEN1)	+= rcar-rst.o
> +obj-$(CONFIG_ARCH_RCAR_GEN2)	+= rcar-rst.o
> +obj-$(CONFIG_ARCH_R8A7795)	+= rcar-rst.o
> +obj-$(CONFIG_ARCH_R8A7796)	+= rcar-rst.o
> +
>  obj-$(CONFIG_ARCH_R8A7779)	+= rcar-sysc.o r8a7779-sysc.o
>  obj-$(CONFIG_ARCH_R8A7790)	+= rcar-sysc.o r8a7790-sysc.o
>  obj-$(CONFIG_ARCH_R8A7791)	+= rcar-sysc.o r8a7791-sysc.o
> diff --git a/drivers/soc/renesas/rcar-rst.c b/drivers/soc/renesas/rcar-rst.c
> new file mode 100644
> index 0000000000000000..1997c348c0853254
> --- /dev/null
> +++ b/drivers/soc/renesas/rcar-rst.c
> @@ -0,0 +1,94 @@
> +/*
> + * R-Car Gen1 RESET/WDT and R-Car Gen2/Gen3 RST Driver
> + *
> + * Copyright (C) 2016 Glider bvba
> + *
> + * This file is subject to the terms and conditions of the GNU General
> Public
> + * License.  See the file "COPYING" in the main directory of this archive
> + * for more details.
> + */
> +
> +#include <linux/err.h>
> +#include <linux/io.h>
> +#include <linux/of_address.h>
> +#include <linux/soc/renesas/rcar-rst.h>
> +
> +struct rst_config {
> +	unsigned int modemr;	/* Mode Monitoring Register Offset */
> +};
> +
> +static const struct rst_config rcar_rst_gen1 __initconst = {
> +	.modemr = 0x20,
> +};
> +
> +static const struct rst_config rcar_rst_gen2 __initconst = {
> +	.modemr = 0x60,
> +};
> +
> +static const struct rst_config rcar_rst_gen3 __initconst = {
> +	.modemr = 0x60,
> +};
> +
> +static const struct of_device_id rcar_rst_matches[] __initconst = {
> +	{ .compatible = "renesas,r8a7778-reset-wdt", .data = &rcar_rst_gen1 },
> +	{ .compatible = "renesas,r8a7779-reset-wdt", .data = &rcar_rst_gen1 },
> +	{ .compatible = "renesas,r8a7790-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7791-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7792-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7793-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7794-rst", .data = &rcar_rst_gen2 },
> +	{ .compatible = "renesas,r8a7795-rst", .data = &rcar_rst_gen3 },
> +	{ .compatible = "renesas,r8a7796-rst", .data = &rcar_rst_gen3 },
> +	{ /* sentinel */ }
> +};
> +
> +static void __iomem *rcar_rst_base __initdata;
> +static u32 saved_mode __initdata;
> +
> +static int __init rcar_rst_init(void)
> +{
> +	const struct of_device_id *match;
> +	const struct rst_config *cfg;
> +	struct device_node *np;
> +	void __iomem *base;
> +	int error = 0;
> +
> +	if (rcar_rst_base)
> +		return 0;
> +
> +	np = of_find_matching_node_and_match(NULL, rcar_rst_matches, &match);
> +	if (!np)
> +		return -ENODEV;
> +
> +	base = of_iomap(np, 0);
> +	if (!base) {
> +		pr_warn("%s: Cannot map regs\n", np->full_name);
> +		error = -ENOMEM;
> +		goto out_put;
> +	}
> +
> +	rcar_rst_base = base;
> +	cfg = match->data;
> +	saved_mode = ioread32(base + cfg->modemr);
> +
> +	pr_debug("%s: MODE = 0x%08x\n", np->full_name, saved_mode);
> +
> +out_put:
> +	of_node_put(np);
> +	return error;
> +}
> +arch_initcall(rcar_rst_init);

Given that rcar_rst_init() is only used as a support function for 
rcar_rst_read_mode_pins(), how about removing the initcall ?

> +int __init rcar_rst_read_mode_pins(u32 *mode)
> +{
> +	int error;
> +
> +	if (!rcar_rst_base) {
> +		error = rcar_rst_init();
> +		if (error)
> +			return error;
> +	}
> +
> +	*mode = saved_mode;
> +	return 0;
> +}
> diff --git a/include/linux/soc/renesas/rcar-rst.h
> b/include/linux/soc/renesas/rcar-rst.h new file mode 100644
> index 0000000000000000..a18e0783946b66ec
> --- /dev/null
> +++ b/include/linux/soc/renesas/rcar-rst.h
> @@ -0,0 +1,6 @@
> +#ifndef __LINUX_SOC_RENESAS_RCAR_RST_H__
> +#define __LINUX_SOC_RENESAS_RCAR_RST_H__
> +
> +int rcar_rst_read_mode_pins(u32 *mode);
> +
> +#endif /* __LINUX_SOC_RENESAS_RCAR_RST_H__ */

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH/RFC v3 14/22] clk: renesas: r8a7795: Obtain mode pin values from R-Car RST driver
  2016-06-01 19:21 ` [PATCH/RFC v3 14/22] clk: renesas: r8a7795: Obtain mode pin values from R-Car " Geert Uytterhoeven
@ 2016-06-02 22:01     ` Laurent Pinchart
  0 siblings, 0 replies; 74+ messages in thread
From: Laurent Pinchart @ 2016-06-02 22:01 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme, linux-renesas-soc,
	linux-arm-kernel, devicetree

Hi Geert,

Thank you for the patch.

On Wednesday 01 Jun 2016 21:21:12 Geert Uytterhoeven wrote:
> Obtain the values of the mode pins from the R-Car RST driver, which
> relies on the presence in DT of a device node for the RST module.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
> v3:
>   - New.
> ---
>  drivers/clk/renesas/r8a7795-cpg-mssr.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/renesas/r8a7795-cpg-mssr.c
> b/drivers/clk/renesas/r8a7795-cpg-mssr.c index
> e53aff5b23ad4967..e1f2359a59feee7e 100644
> --- a/drivers/clk/renesas/r8a7795-cpg-mssr.c
> +++ b/drivers/clk/renesas/r8a7795-cpg-mssr.c
> @@ -15,6 +15,7 @@
>  #include <linux/device.h>
>  #include <linux/init.h>
>  #include <linux/kernel.h>
> +#include <linux/soc/renesas/rcar-rst.h>
> 
>  #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
> 
> @@ -294,7 +295,12 @@ static const struct rcar_gen3_cpg_pll_config
> cpg_pll_configs[16] __initconst = { static int __init
> r8a7795_cpg_mssr_init(struct device *dev)
>  {
>  	const struct rcar_gen3_cpg_pll_config *cpg_pll_config;
> -	u32 cpg_mode = rcar_gen3_read_mode_pins();
> +	u32 cpg_mode;
> +	int error;
> +
> +	error = rcar_rst_read_mode_pins(&cpg_mode);
> +	if (error)
> +		return error;
> 
>  	cpg_pll_config = &cpg_pll_configs[CPG_PLL_CONFIG_INDEX(cpg_mode)];
>  	if (!cpg_pll_config->extal_div) {

-- 
Regards,

Laurent Pinchart

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

* [PATCH/RFC v3 14/22] clk: renesas: r8a7795: Obtain mode pin values from R-Car RST driver
@ 2016-06-02 22:01     ` Laurent Pinchart
  0 siblings, 0 replies; 74+ messages in thread
From: Laurent Pinchart @ 2016-06-02 22:01 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Geert,

Thank you for the patch.

On Wednesday 01 Jun 2016 21:21:12 Geert Uytterhoeven wrote:
> Obtain the values of the mode pins from the R-Car RST driver, which
> relies on the presence in DT of a device node for the RST module.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
> v3:
>   - New.
> ---
>  drivers/clk/renesas/r8a7795-cpg-mssr.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/renesas/r8a7795-cpg-mssr.c
> b/drivers/clk/renesas/r8a7795-cpg-mssr.c index
> e53aff5b23ad4967..e1f2359a59feee7e 100644
> --- a/drivers/clk/renesas/r8a7795-cpg-mssr.c
> +++ b/drivers/clk/renesas/r8a7795-cpg-mssr.c
> @@ -15,6 +15,7 @@
>  #include <linux/device.h>
>  #include <linux/init.h>
>  #include <linux/kernel.h>
> +#include <linux/soc/renesas/rcar-rst.h>
> 
>  #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
> 
> @@ -294,7 +295,12 @@ static const struct rcar_gen3_cpg_pll_config
> cpg_pll_configs[16] __initconst = { static int __init
> r8a7795_cpg_mssr_init(struct device *dev)
>  {
>  	const struct rcar_gen3_cpg_pll_config *cpg_pll_config;
> -	u32 cpg_mode = rcar_gen3_read_mode_pins();
> +	u32 cpg_mode;
> +	int error;
> +
> +	error = rcar_rst_read_mode_pins(&cpg_mode);
> +	if (error)
> +		return error;
> 
>  	cpg_pll_config = &cpg_pll_configs[CPG_PLL_CONFIG_INDEX(cpg_mode)];
>  	if (!cpg_pll_config->extal_div) {

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH/RFC v3 15/22] clk: renesas: r8a7796: Obtain mode pin values from R-Car RST driver
  2016-06-01 19:21 ` [PATCH/RFC v3 15/22] clk: renesas: r8a7796: " Geert Uytterhoeven
@ 2016-06-02 22:02     ` Laurent Pinchart
  0 siblings, 0 replies; 74+ messages in thread
From: Laurent Pinchart @ 2016-06-02 22:02 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme, linux-renesas-soc,
	linux-arm-kernel, devicetree

Hi Geert,

Thank you for the patch.

On Wednesday 01 Jun 2016 21:21:13 Geert Uytterhoeven wrote:
> Obtain the values of the mode pins from the R-Car RST driver, which
> relies on the presence in DT of a device node for the RST module.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
> v3:
>   - New.
> ---
>  drivers/clk/renesas/r8a7796-cpg-mssr.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/renesas/r8a7796-cpg-mssr.c
> b/drivers/clk/renesas/r8a7796-cpg-mssr.c index
> c84b549c14d2e57d..3db2d1cfc8cd788e 100644
> --- a/drivers/clk/renesas/r8a7796-cpg-mssr.c
> +++ b/drivers/clk/renesas/r8a7796-cpg-mssr.c
> @@ -16,6 +16,7 @@
>  #include <linux/device.h>
>  #include <linux/init.h>
>  #include <linux/kernel.h>
> +#include <linux/soc/renesas/rcar-rst.h>
> 
>  #include <dt-bindings/clock/r8a7796-cpg-mssr.h>
> 
> @@ -159,7 +160,12 @@ static const struct rcar_gen3_cpg_pll_config
> cpg_pll_configs[16] __initconst = { static int __init
> r8a7796_cpg_mssr_init(struct device *dev)
>  {
>  	const struct rcar_gen3_cpg_pll_config *cpg_pll_config;
> -	u32 cpg_mode = rcar_gen3_read_mode_pins();
> +	u32 cpg_mode;
> +	int error;
> +
> +	error = rcar_rst_read_mode_pins(&cpg_mode);
> +	if (error)
> +		return error;
> 
>  	cpg_pll_config = &cpg_pll_configs[CPG_PLL_CONFIG_INDEX(cpg_mode)];
>  	if (!cpg_pll_config->extal_div) {

-- 
Regards,

Laurent Pinchart

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

* [PATCH/RFC v3 15/22] clk: renesas: r8a7796: Obtain mode pin values from R-Car RST driver
@ 2016-06-02 22:02     ` Laurent Pinchart
  0 siblings, 0 replies; 74+ messages in thread
From: Laurent Pinchart @ 2016-06-02 22:02 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Geert,

Thank you for the patch.

On Wednesday 01 Jun 2016 21:21:13 Geert Uytterhoeven wrote:
> Obtain the values of the mode pins from the R-Car RST driver, which
> relies on the presence in DT of a device node for the RST module.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
> v3:
>   - New.
> ---
>  drivers/clk/renesas/r8a7796-cpg-mssr.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/renesas/r8a7796-cpg-mssr.c
> b/drivers/clk/renesas/r8a7796-cpg-mssr.c index
> c84b549c14d2e57d..3db2d1cfc8cd788e 100644
> --- a/drivers/clk/renesas/r8a7796-cpg-mssr.c
> +++ b/drivers/clk/renesas/r8a7796-cpg-mssr.c
> @@ -16,6 +16,7 @@
>  #include <linux/device.h>
>  #include <linux/init.h>
>  #include <linux/kernel.h>
> +#include <linux/soc/renesas/rcar-rst.h>
> 
>  #include <dt-bindings/clock/r8a7796-cpg-mssr.h>
> 
> @@ -159,7 +160,12 @@ static const struct rcar_gen3_cpg_pll_config
> cpg_pll_configs[16] __initconst = { static int __init
> r8a7796_cpg_mssr_init(struct device *dev)
>  {
>  	const struct rcar_gen3_cpg_pll_config *cpg_pll_config;
> -	u32 cpg_mode = rcar_gen3_read_mode_pins();
> +	u32 cpg_mode;
> +	int error;
> +
> +	error = rcar_rst_read_mode_pins(&cpg_mode);
> +	if (error)
> +		return error;
> 
>  	cpg_pll_config = &cpg_pll_configs[CPG_PLL_CONFIG_INDEX(cpg_mode)];
>  	if (!cpg_pll_config->extal_div) {

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH/RFC v3 16/22] clk: renesas: rcar-gen3-cpg: Remove obsolete rcar_gen3_read_mode_pins()
  2016-06-01 19:21     ` Geert Uytterhoeven
  (?)
@ 2016-06-02 22:02         ` Laurent Pinchart
  -1 siblings, 0 replies; 74+ messages in thread
From: Laurent Pinchart @ 2016-06-02 22:02 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Hi Geert,

Thank you for the patch.

On Wednesday 01 Jun 2016 21:21:14 Geert Uytterhoeven wrote:
> All R-Car Gen3 clock drivers now obtain the values of the mode pins from
> the R-Car RST driver.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>

Reviewed-by: Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>

> ---
>  drivers/clk/renesas/rcar-gen3-cpg.c | 17 -----------------
>  drivers/clk/renesas/rcar-gen3-cpg.h |  1 -
>  2 files changed, 18 deletions(-)
> 
> diff --git a/drivers/clk/renesas/rcar-gen3-cpg.c
> b/drivers/clk/renesas/rcar-gen3-cpg.c index
> bb4f2f9a8c2f5ba8..9d76076da4948fc4 100644
> --- a/drivers/clk/renesas/rcar-gen3-cpg.c
> +++ b/drivers/clk/renesas/rcar-gen3-cpg.c
> @@ -333,23 +333,6 @@ struct clk * __init rcar_gen3_cpg_clk_register(struct
> device *dev, __clk_get_name(parent), 0, mult, div);
>  }
> 
> -/*
> - * Reset register definitions.
> - */
> -#define MODEMR	0xe6160060
> -
> -u32 __init rcar_gen3_read_mode_pins(void)
> -{
> -	void __iomem *modemr = ioremap_nocache(MODEMR, 4);
> -	u32 mode;
> -
> -	BUG_ON(!modemr);
> -	mode = ioread32(modemr);
> -	iounmap(modemr);
> -
> -	return mode;
> -}
> -
>  int __init rcar_gen3_cpg_init(const struct rcar_gen3_cpg_pll_config
> *config, unsigned int clk_extalr)
>  {
> diff --git a/drivers/clk/renesas/rcar-gen3-cpg.h
> b/drivers/clk/renesas/rcar-gen3-cpg.h index
> f699085147d1aece..f788f481dd42cdf6 100644
> --- a/drivers/clk/renesas/rcar-gen3-cpg.h
> +++ b/drivers/clk/renesas/rcar-gen3-cpg.h
> @@ -33,7 +33,6 @@ struct rcar_gen3_cpg_pll_config {
> 
>  #define CPG_RCKCR	0x240
> 
> -u32 rcar_gen3_read_mode_pins(void);
>  struct clk *rcar_gen3_cpg_clk_register(struct device *dev,
>  	const struct cpg_core_clk *core, const struct cpg_mssr_info *info,
>  	struct clk **clks, void __iomem *base);

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH/RFC v3 16/22] clk: renesas: rcar-gen3-cpg: Remove obsolete rcar_gen3_read_mode_pins()
@ 2016-06-02 22:02         ` Laurent Pinchart
  0 siblings, 0 replies; 74+ messages in thread
From: Laurent Pinchart @ 2016-06-02 22:02 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Stephen Boyd, Dirk Behme, linux-renesas-soc,
	linux-arm-kernel, devicetree

Hi Geert,

Thank you for the patch.

On Wednesday 01 Jun 2016 21:21:14 Geert Uytterhoeven wrote:
> All R-Car Gen3 clock drivers now obtain the values of the mode pins from
> the R-Car RST driver.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/clk/renesas/rcar-gen3-cpg.c | 17 -----------------
>  drivers/clk/renesas/rcar-gen3-cpg.h |  1 -
>  2 files changed, 18 deletions(-)
> 
> diff --git a/drivers/clk/renesas/rcar-gen3-cpg.c
> b/drivers/clk/renesas/rcar-gen3-cpg.c index
> bb4f2f9a8c2f5ba8..9d76076da4948fc4 100644
> --- a/drivers/clk/renesas/rcar-gen3-cpg.c
> +++ b/drivers/clk/renesas/rcar-gen3-cpg.c
> @@ -333,23 +333,6 @@ struct clk * __init rcar_gen3_cpg_clk_register(struct
> device *dev, __clk_get_name(parent), 0, mult, div);
>  }
> 
> -/*
> - * Reset register definitions.
> - */
> -#define MODEMR	0xe6160060
> -
> -u32 __init rcar_gen3_read_mode_pins(void)
> -{
> -	void __iomem *modemr = ioremap_nocache(MODEMR, 4);
> -	u32 mode;
> -
> -	BUG_ON(!modemr);
> -	mode = ioread32(modemr);
> -	iounmap(modemr);
> -
> -	return mode;
> -}
> -
>  int __init rcar_gen3_cpg_init(const struct rcar_gen3_cpg_pll_config
> *config, unsigned int clk_extalr)
>  {
> diff --git a/drivers/clk/renesas/rcar-gen3-cpg.h
> b/drivers/clk/renesas/rcar-gen3-cpg.h index
> f699085147d1aece..f788f481dd42cdf6 100644
> --- a/drivers/clk/renesas/rcar-gen3-cpg.h
> +++ b/drivers/clk/renesas/rcar-gen3-cpg.h
> @@ -33,7 +33,6 @@ struct rcar_gen3_cpg_pll_config {
> 
>  #define CPG_RCKCR	0x240
> 
> -u32 rcar_gen3_read_mode_pins(void);
>  struct clk *rcar_gen3_cpg_clk_register(struct device *dev,
>  	const struct cpg_core_clk *core, const struct cpg_mssr_info *info,
>  	struct clk **clks, void __iomem *base);

-- 
Regards,

Laurent Pinchart


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

* [PATCH/RFC v3 16/22] clk: renesas: rcar-gen3-cpg: Remove obsolete rcar_gen3_read_mode_pins()
@ 2016-06-02 22:02         ` Laurent Pinchart
  0 siblings, 0 replies; 74+ messages in thread
From: Laurent Pinchart @ 2016-06-02 22:02 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Geert,

Thank you for the patch.

On Wednesday 01 Jun 2016 21:21:14 Geert Uytterhoeven wrote:
> All R-Car Gen3 clock drivers now obtain the values of the mode pins from
> the R-Car RST driver.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/clk/renesas/rcar-gen3-cpg.c | 17 -----------------
>  drivers/clk/renesas/rcar-gen3-cpg.h |  1 -
>  2 files changed, 18 deletions(-)
> 
> diff --git a/drivers/clk/renesas/rcar-gen3-cpg.c
> b/drivers/clk/renesas/rcar-gen3-cpg.c index
> bb4f2f9a8c2f5ba8..9d76076da4948fc4 100644
> --- a/drivers/clk/renesas/rcar-gen3-cpg.c
> +++ b/drivers/clk/renesas/rcar-gen3-cpg.c
> @@ -333,23 +333,6 @@ struct clk * __init rcar_gen3_cpg_clk_register(struct
> device *dev, __clk_get_name(parent), 0, mult, div);
>  }
> 
> -/*
> - * Reset register definitions.
> - */
> -#define MODEMR	0xe6160060
> -
> -u32 __init rcar_gen3_read_mode_pins(void)
> -{
> -	void __iomem *modemr = ioremap_nocache(MODEMR, 4);
> -	u32 mode;
> -
> -	BUG_ON(!modemr);
> -	mode = ioread32(modemr);
> -	iounmap(modemr);
> -
> -	return mode;
> -}
> -
>  int __init rcar_gen3_cpg_init(const struct rcar_gen3_cpg_pll_config
> *config, unsigned int clk_extalr)
>  {
> diff --git a/drivers/clk/renesas/rcar-gen3-cpg.h
> b/drivers/clk/renesas/rcar-gen3-cpg.h index
> f699085147d1aece..f788f481dd42cdf6 100644
> --- a/drivers/clk/renesas/rcar-gen3-cpg.h
> +++ b/drivers/clk/renesas/rcar-gen3-cpg.h
> @@ -33,7 +33,6 @@ struct rcar_gen3_cpg_pll_config {
> 
>  #define CPG_RCKCR	0x240
> 
> -u32 rcar_gen3_read_mode_pins(void);
>  struct clk *rcar_gen3_cpg_clk_register(struct device *dev,
>  	const struct cpg_core_clk *core, const struct cpg_mssr_info *info,
>  	struct clk **clks, void __iomem *base);

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH/RFC v3 01/22] reset: Add renesas,rst DT bindings
  2016-06-02 21:47     ` Laurent Pinchart
@ 2016-06-10  7:52       ` Geert Uytterhoeven
  -1 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-10  7:52 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Geert Uytterhoeven, Simon Horman, Magnus Damm, Laurent Pinchart,
	Philipp Zabel, Michael Turquette, Stephen Boyd, Dirk Behme,
	linux-renesas-soc, linux-arm-kernel, devicetree

Hi Laurent,

On Thu, Jun 2, 2016 at 11:47 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/reset/renesas,rst.txt
>> @@ -0,0 +1,35 @@
>> +DT bindings for the Renesas R-Car Reset Controller
>> +
>> +The R-Car Reset Controller provides reset control, and implements the
>> following
>> +functions:
>> +  - Latching of the levels on mode pins when PRESET# is negated,
>> +  - Mode monitoring register,
>> +  - Reset control of peripheral devices (on R-Car Gen1),
>> +  - Watchdog timer (on R-Car Gen1).
>> +  - Register-based reset control and boot address registers for the various
>> CPU
>> +    cores (on R-Car Gen2/Gen3),
>> +
>> +
>> +Required properties:
>> +  - compatible: Should be
>> +               - "renesas,<soctype>-reset-wdt" for R-Car Gen1,
>> +               - "renesas,<soctype>-rst" for R-Car Gen2/Gen3.
>> +             Examples with soctypes are:
>> +               - "renesas,r8a7778-reset-wdt" (R-Car M1A)
>> +               - "renesas,r8a7779-reset-wdt" (R-Car H1)
>> +               - "renesas,r8a7790-rst" (R-Car H2)
>> +               - "renesas,r8a7791-rst" (R-Car M2-W)
>> +               - "renesas,r8a7792-rst" (R-Car V2H
>> +               - "renesas,r8a7793-rst" (R-Car M2-N)
>> +               - "renesas,r8a7794-rst" (R-Car E2)
>> +               - "renesas,r8a7795-rst" (R-Car H3)
>> +               - "renesas,r8a7796-rst" (R-Car M3-W)
>
> Any specific reason for such a large indentation ? (I know this is really
> nitpicking)

To align the two paragraphs and lists.

> Apart from that, it's just a bit of a shame we can't have generic compatible
> strings, but that would require additional DT properties to describe the reset
> controller features, and I assume that's not a path we want to take.

The reset controller is one of the few blocks that really differs
between members
of the same family, due to the relationship with the various CPU cores.

> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Thanks!

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

* [PATCH/RFC v3 01/22] reset: Add renesas,rst DT bindings
@ 2016-06-10  7:52       ` Geert Uytterhoeven
  0 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-10  7:52 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Laurent,

On Thu, Jun 2, 2016 at 11:47 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/reset/renesas,rst.txt
>> @@ -0,0 +1,35 @@
>> +DT bindings for the Renesas R-Car Reset Controller
>> +
>> +The R-Car Reset Controller provides reset control, and implements the
>> following
>> +functions:
>> +  - Latching of the levels on mode pins when PRESET# is negated,
>> +  - Mode monitoring register,
>> +  - Reset control of peripheral devices (on R-Car Gen1),
>> +  - Watchdog timer (on R-Car Gen1).
>> +  - Register-based reset control and boot address registers for the various
>> CPU
>> +    cores (on R-Car Gen2/Gen3),
>> +
>> +
>> +Required properties:
>> +  - compatible: Should be
>> +               - "renesas,<soctype>-reset-wdt" for R-Car Gen1,
>> +               - "renesas,<soctype>-rst" for R-Car Gen2/Gen3.
>> +             Examples with soctypes are:
>> +               - "renesas,r8a7778-reset-wdt" (R-Car M1A)
>> +               - "renesas,r8a7779-reset-wdt" (R-Car H1)
>> +               - "renesas,r8a7790-rst" (R-Car H2)
>> +               - "renesas,r8a7791-rst" (R-Car M2-W)
>> +               - "renesas,r8a7792-rst" (R-Car V2H
>> +               - "renesas,r8a7793-rst" (R-Car M2-N)
>> +               - "renesas,r8a7794-rst" (R-Car E2)
>> +               - "renesas,r8a7795-rst" (R-Car H3)
>> +               - "renesas,r8a7796-rst" (R-Car M3-W)
>
> Any specific reason for such a large indentation ? (I know this is really
> nitpicking)

To align the two paragraphs and lists.

> Apart from that, it's just a bit of a shame we can't have generic compatible
> strings, but that would require additional DT properties to describe the reset
> controller features, and I assume that's not a path we want to take.

The reset controller is one of the few blocks that really differs
between members
of the same family, due to the relationship with the various CPU cores.

> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Thanks!

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

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

* Re: [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver
  2016-06-02 21:58     ` Laurent Pinchart
  (?)
@ 2016-06-10  7:54       ` Geert Uytterhoeven
  -1 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-10  7:54 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Geert Uytterhoeven, Simon Horman, Magnus Damm, Laurent Pinchart,
	Philipp Zabel, Michael Turquette, Stephen Boyd, Dirk Behme,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Hi Laurent,

On Thu, Jun 2, 2016 at 11:58 PM, Laurent Pinchart
<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org> wrote:
>> --- /dev/null
>> +++ b/drivers/soc/renesas/rcar-rst.c

>> +static int __init rcar_rst_init(void)
>> +{

[...]

>> +}
>> +arch_initcall(rcar_rst_init);
>
> Given that rcar_rst_init() is only used as a support function for
> rcar_rst_read_mode_pins(), how about removing the initcall ?

Thanks, good idea!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver
@ 2016-06-10  7:54       ` Geert Uytterhoeven
  0 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-10  7:54 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Geert Uytterhoeven, Simon Horman, Magnus Damm, Laurent Pinchart,
	Philipp Zabel, Michael Turquette, Stephen Boyd, Dirk Behme,
	linux-renesas-soc, linux-arm-kernel, devicetree

Hi Laurent,

On Thu, Jun 2, 2016 at 11:58 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>> --- /dev/null
>> +++ b/drivers/soc/renesas/rcar-rst.c

>> +static int __init rcar_rst_init(void)
>> +{

[...]

>> +}
>> +arch_initcall(rcar_rst_init);
>
> Given that rcar_rst_init() is only used as a support function for
> rcar_rst_read_mode_pins(), how about removing the initcall ?

Thanks, good idea!

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

* [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver
@ 2016-06-10  7:54       ` Geert Uytterhoeven
  0 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-10  7:54 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Laurent,

On Thu, Jun 2, 2016 at 11:58 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>> --- /dev/null
>> +++ b/drivers/soc/renesas/rcar-rst.c

>> +static int __init rcar_rst_init(void)
>> +{

[...]

>> +}
>> +arch_initcall(rcar_rst_init);
>
> Given that rcar_rst_init() is only used as a support function for
> rcar_rst_read_mode_pins(), how about removing the initcall ?

Thanks, good idea!

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

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

* Re: [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver
  2016-06-02  5:42     ` Dirk Behme
@ 2016-06-10  7:58       ` Geert Uytterhoeven
  -1 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-10  7:58 UTC (permalink / raw)
  To: Dirk Behme
  Cc: Geert Uytterhoeven, Simon Horman, Magnus Damm, Laurent Pinchart,
	Philipp Zabel, Michael Turquette, Stephen Boyd,
	linux-renesas-soc, linux-arm-kernel, devicetree

Hi Dirk,

On Thu, Jun 2, 2016 at 7:42 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
>> +int __init rcar_rst_read_mode_pins(u32 *mode)
>
> Just a style issue: Is the string 'pins' in the function name still
> relevant? I.e. what's about just 'rcar_rst_read_mode()'?

I feel "mode" is a too generic word for a public API.
It's used a several contexts inside the RST module (secure mode, 64-bit
addressing mode, free-running mode, step-up mode).

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

* [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver
@ 2016-06-10  7:58       ` Geert Uytterhoeven
  0 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-06-10  7:58 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Dirk,

On Thu, Jun 2, 2016 at 7:42 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
>> +int __init rcar_rst_read_mode_pins(u32 *mode)
>
> Just a style issue: Is the string 'pins' in the function name still
> relevant? I.e. what's about just 'rcar_rst_read_mode()'?

I feel "mode" is a too generic word for a public API.
It's used a several contexts inside the RST module (secure mode, 64-bit
addressing mode, free-running mode, step-up mode).

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

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

* Re: [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver
  2016-06-10  7:58       ` Geert Uytterhoeven
  (?)
@ 2016-06-10  8:38         ` Dirk Behme
  -1 siblings, 0 replies; 74+ messages in thread
From: Dirk Behme @ 2016-06-10  8:38 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Geert Uytterhoeven, Simon Horman, Magnus Damm, Laurent Pinchart,
	Philipp Zabel, Michael Turquette, Stephen Boyd,
	linux-renesas-soc, linux-arm-kernel, devicetree

On 10.06.2016 09:58, Geert Uytterhoeven wrote:
> Hi Dirk,
>
> On Thu, Jun 2, 2016 at 7:42 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
>>> +int __init rcar_rst_read_mode_pins(u32 *mode)
>>
>> Just a style issue: Is the string 'pins' in the function name still
>> relevant? I.e. what's about just 'rcar_rst_read_mode()'?
>
> I feel "mode" is a too generic word for a public API.
> It's used a several contexts inside the RST module (secure mode, 64-bit
> addressing mode, free-running mode, step-up mode).

What's about

rcar_rst_read_mode_monitor()

then?

Taken from the manual ;)


Best regards

Dirk

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

* Re: [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver
@ 2016-06-10  8:38         ` Dirk Behme
  0 siblings, 0 replies; 74+ messages in thread
From: Dirk Behme @ 2016-06-10  8:38 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Geert Uytterhoeven, Simon Horman, Magnus Damm, Laurent Pinchart,
	Philipp Zabel, Michael Turquette, Stephen Boyd,
	linux-renesas-soc, linux-arm-kernel, devicetree

On 10.06.2016 09:58, Geert Uytterhoeven wrote:
> Hi Dirk,
>
> On Thu, Jun 2, 2016 at 7:42 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
>>> +int __init rcar_rst_read_mode_pins(u32 *mode)
>>
>> Just a style issue: Is the string 'pins' in the function name still
>> relevant? I.e. what's about just 'rcar_rst_read_mode()'?
>
> I feel "mode" is a too generic word for a public API.
> It's used a several contexts inside the RST module (secure mode, 64-bit
> addressing mode, free-running mode, step-up mode).

What's about

rcar_rst_read_mode_monitor()

then?

Taken from the manual ;)


Best regards

Dirk

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

* [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver
@ 2016-06-10  8:38         ` Dirk Behme
  0 siblings, 0 replies; 74+ messages in thread
From: Dirk Behme @ 2016-06-10  8:38 UTC (permalink / raw)
  To: linux-arm-kernel

On 10.06.2016 09:58, Geert Uytterhoeven wrote:
> Hi Dirk,
>
> On Thu, Jun 2, 2016 at 7:42 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
>>> +int __init rcar_rst_read_mode_pins(u32 *mode)
>>
>> Just a style issue: Is the string 'pins' in the function name still
>> relevant? I.e. what's about just 'rcar_rst_read_mode()'?
>
> I feel "mode" is a too generic word for a public API.
> It's used a several contexts inside the RST module (secure mode, 64-bit
> addressing mode, free-running mode, step-up mode).

What's about

rcar_rst_read_mode_monitor()

then?

Taken from the manual ;)


Best regards

Dirk

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

* Re: [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver
  2016-06-10  7:58       ` Geert Uytterhoeven
@ 2016-06-10 13:08         ` Laurent Pinchart
  -1 siblings, 0 replies; 74+ messages in thread
From: Laurent Pinchart @ 2016-06-10 13:08 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Dirk Behme, Geert Uytterhoeven, Simon Horman, Magnus Damm,
	Laurent Pinchart, Philipp Zabel, Michael Turquette, Stephen Boyd,
	linux-renesas-soc, linux-arm-kernel, devicetree

On Friday 10 Jun 2016 09:58:28 Geert Uytterhoeven wrote:
> Hi Dirk,
> 
> On Thu, Jun 2, 2016 at 7:42 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
> >> +int __init rcar_rst_read_mode_pins(u32 *mode)
> > 
> > Just a style issue: Is the string 'pins' in the function name still
> > relevant? I.e. what's about just 'rcar_rst_read_mode()'?
> 
> I feel "mode" is a too generic word for a public API.
> It's used a several contexts inside the RST module (secure mode, 64-bit
> addressing mode, free-running mode, step-up mode).

<bikeshedding>

If it's "pins" that bothers Dirk, how about rcar_rst_read_boot_mode() ? Or 
maybe rcar_rst_boot_mode(), given that the function caches the value, it 
doesn't read it every time.

</bikeshedding>

-- 
Regards,

Laurent Pinchart

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

* [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver
@ 2016-06-10 13:08         ` Laurent Pinchart
  0 siblings, 0 replies; 74+ messages in thread
From: Laurent Pinchart @ 2016-06-10 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 10 Jun 2016 09:58:28 Geert Uytterhoeven wrote:
> Hi Dirk,
> 
> On Thu, Jun 2, 2016 at 7:42 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote:
> >> +int __init rcar_rst_read_mode_pins(u32 *mode)
> > 
> > Just a style issue: Is the string 'pins' in the function name still
> > relevant? I.e. what's about just 'rcar_rst_read_mode()'?
> 
> I feel "mode" is a too generic word for a public API.
> It's used a several contexts inside the RST module (secure mode, 64-bit
> addressing mode, free-running mode, step-up mode).

<bikeshedding>

If it's "pins" that bothers Dirk, how about rcar_rst_read_boot_mode() ? Or 
maybe rcar_rst_boot_mode(), given that the function caches the value, it 
doesn't read it every time.

</bikeshedding>

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state
  2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
@ 2016-06-30 20:14   ` Stephen Boyd
  2016-06-01 19:21 ` [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver Geert Uytterhoeven
                     ` (17 subsequent siblings)
  18 siblings, 0 replies; 74+ messages in thread
From: Stephen Boyd @ 2016-06-30 20:14 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Simon Horman, Magnus Damm, Laurent Pinchart, Philipp Zabel,
	Michael Turquette, Dirk Behme, linux-renesas-soc,
	linux-arm-kernel, devicetree

On 06/01, Geert Uytterhoeven wrote:
> 	Hi all,
> 
> Currently the R-Car Clock Pulse Generator (CPG) drivers obtains the
> state of the mode pins either by a call from the board code, or directly
> by using a hardcoded register access. This is a bit messy, and creates a
> dependency between driver and platform code.
> 
> This RFC patch series converts the various Renesas R-Car clock drivers
> and support code from reading the mode pin states using a hardcoded
> register access to using a new R-Car RST driver.

Dumb question, can we use the nvmem reading APIs instead of an
SoC specific function to read the modes?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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

* [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state
@ 2016-06-30 20:14   ` Stephen Boyd
  0 siblings, 0 replies; 74+ messages in thread
From: Stephen Boyd @ 2016-06-30 20:14 UTC (permalink / raw)
  To: linux-arm-kernel

On 06/01, Geert Uytterhoeven wrote:
> 	Hi all,
> 
> Currently the R-Car Clock Pulse Generator (CPG) drivers obtains the
> state of the mode pins either by a call from the board code, or directly
> by using a hardcoded register access. This is a bit messy, and creates a
> dependency between driver and platform code.
> 
> This RFC patch series converts the various Renesas R-Car clock drivers
> and support code from reading the mode pin states using a hardcoded
> register access to using a new R-Car RST driver.

Dumb question, can we use the nvmem reading APIs instead of an
SoC specific function to read the modes?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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

* Re: [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state
  2016-06-30 20:14   ` Stephen Boyd
@ 2016-09-01 11:46     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-09-01 11:46 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Geert Uytterhoeven, Simon Horman, Magnus Damm, Laurent Pinchart,
	Philipp Zabel, Michael Turquette, Dirk Behme, Linux-Renesas,
	linux-arm-kernel, devicetree, Maxime Ripard, Srinivas Kandagatla

Hi Stephen,

On Thu, Jun 30, 2016 at 10:14 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> On 06/01, Geert Uytterhoeven wrote:
>> Currently the R-Car Clock Pulse Generator (CPG) drivers obtains the
>> state of the mode pins either by a call from the board code, or directly
>> by using a hardcoded register access. This is a bit messy, and creates a
>> dependency between driver and platform code.
>>
>> This RFC patch series converts the various Renesas R-Car clock drivers
>> and support code from reading the mode pin states using a hardcoded
>> register access to using a new R-Car RST driver.
>
> Dumb question, can we use the nvmem reading APIs instead of an
> SoC specific function to read the modes?

Thanks for your suggestion, the nvmem API indeed looks like a suitable API,
as it does support read-only nvmems.

Unfortunately I also see a few disadvantages:
  1. nvmem_init() is a subsys_initcall(), while most of our users (except for
     the recent renesas-cpg-mssr driver) are clock drivers using
     CLK_OF_DECLARE(), and are thus initialized from of_clk_init() at much
     earlier time_init() time.
     Of course the mvmem subsystem and/or the clock drivers can be changed, if
     deemed useful.
  2. Using the nvmem DT bindings means we have to add more DT glue from the
     nvmem consumer(s) to the nvmem provider. As we need to provide backwards
     compatibility with old DTSes, this means we need more C code or DT fixup
     code to handle that.
  3. The nvmem subsystem may be overkill to provide access to a simple 32-bit
     read-only register that never changes value after boot.

Thoughts?

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

* [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state
@ 2016-09-01 11:46     ` Geert Uytterhoeven
  0 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-09-01 11:46 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Stephen,

On Thu, Jun 30, 2016 at 10:14 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> On 06/01, Geert Uytterhoeven wrote:
>> Currently the R-Car Clock Pulse Generator (CPG) drivers obtains the
>> state of the mode pins either by a call from the board code, or directly
>> by using a hardcoded register access. This is a bit messy, and creates a
>> dependency between driver and platform code.
>>
>> This RFC patch series converts the various Renesas R-Car clock drivers
>> and support code from reading the mode pin states using a hardcoded
>> register access to using a new R-Car RST driver.
>
> Dumb question, can we use the nvmem reading APIs instead of an
> SoC specific function to read the modes?

Thanks for your suggestion, the nvmem API indeed looks like a suitable API,
as it does support read-only nvmems.

Unfortunately I also see a few disadvantages:
  1. nvmem_init() is a subsys_initcall(), while most of our users (except for
     the recent renesas-cpg-mssr driver) are clock drivers using
     CLK_OF_DECLARE(), and are thus initialized from of_clk_init() at much
     earlier time_init() time.
     Of course the mvmem subsystem and/or the clock drivers can be changed, if
     deemed useful.
  2. Using the nvmem DT bindings means we have to add more DT glue from the
     nvmem consumer(s) to the nvmem provider. As we need to provide backwards
     compatibility with old DTSes, this means we need more C code or DT fixup
     code to handle that.
  3. The nvmem subsystem may be overkill to provide access to a simple 32-bit
     read-only register that never changes value after boot.

Thoughts?

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

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

* Re: [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state
  2016-09-01 11:46     ` Geert Uytterhoeven
@ 2016-09-12 22:16       ` Stephen Boyd
  -1 siblings, 0 replies; 74+ messages in thread
From: Stephen Boyd @ 2016-09-12 22:16 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Geert Uytterhoeven, Simon Horman, Magnus Damm, Laurent Pinchart,
	Philipp Zabel, Michael Turquette, Dirk Behme, Linux-Renesas,
	linux-arm-kernel, devicetree, Maxime Ripard, Srinivas Kandagatla

On 09/01, Geert Uytterhoeven wrote:
> Hi Stephen,
> 
> On Thu, Jun 30, 2016 at 10:14 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> > On 06/01, Geert Uytterhoeven wrote:
> >> Currently the R-Car Clock Pulse Generator (CPG) drivers obtains the
> >> state of the mode pins either by a call from the board code, or directly
> >> by using a hardcoded register access. This is a bit messy, and creates a
> >> dependency between driver and platform code.
> >>
> >> This RFC patch series converts the various Renesas R-Car clock drivers
> >> and support code from reading the mode pin states using a hardcoded
> >> register access to using a new R-Car RST driver.
> >
> > Dumb question, can we use the nvmem reading APIs instead of an
> > SoC specific function to read the modes?
> 
> Thanks for your suggestion, the nvmem API indeed looks like a suitable API,
> as it does support read-only nvmems.
> 
> Unfortunately I also see a few disadvantages:
>   1. nvmem_init() is a subsys_initcall(), while most of our users (except for
>      the recent renesas-cpg-mssr driver) are clock drivers using
>      CLK_OF_DECLARE(), and are thus initialized from of_clk_init() at much
>      earlier time_init() time.
>      Of course the mvmem subsystem and/or the clock drivers can be changed, if
>      deemed useful.

Sounds like this is solvable.

>   2. Using the nvmem DT bindings means we have to add more DT glue from the
>      nvmem consumer(s) to the nvmem provider. As we need to provide backwards
>      compatibility with old DTSes, this means we need more C code or DT fixup
>      code to handle that.

Ah I wasn't aware we were keeping backwards compatibility around.


>   3. The nvmem subsystem may be overkill to provide access to a simple 32-bit
>      read-only register that never changes value after boot.

The nvmem subsystem is designed to read values from things that
mostly never change. Overkill may be true, but the nice thing
about using nvmem APIs is that the driver doesn't have to use
some platform specific function that duplicates similar
functionality. It's unfortunate that backwards incompatibility
limits our ability to move to common linux frameworks when they
are created after the binding is used.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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

* [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state
@ 2016-09-12 22:16       ` Stephen Boyd
  0 siblings, 0 replies; 74+ messages in thread
From: Stephen Boyd @ 2016-09-12 22:16 UTC (permalink / raw)
  To: linux-arm-kernel

On 09/01, Geert Uytterhoeven wrote:
> Hi Stephen,
> 
> On Thu, Jun 30, 2016 at 10:14 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> > On 06/01, Geert Uytterhoeven wrote:
> >> Currently the R-Car Clock Pulse Generator (CPG) drivers obtains the
> >> state of the mode pins either by a call from the board code, or directly
> >> by using a hardcoded register access. This is a bit messy, and creates a
> >> dependency between driver and platform code.
> >>
> >> This RFC patch series converts the various Renesas R-Car clock drivers
> >> and support code from reading the mode pin states using a hardcoded
> >> register access to using a new R-Car RST driver.
> >
> > Dumb question, can we use the nvmem reading APIs instead of an
> > SoC specific function to read the modes?
> 
> Thanks for your suggestion, the nvmem API indeed looks like a suitable API,
> as it does support read-only nvmems.
> 
> Unfortunately I also see a few disadvantages:
>   1. nvmem_init() is a subsys_initcall(), while most of our users (except for
>      the recent renesas-cpg-mssr driver) are clock drivers using
>      CLK_OF_DECLARE(), and are thus initialized from of_clk_init() at much
>      earlier time_init() time.
>      Of course the mvmem subsystem and/or the clock drivers can be changed, if
>      deemed useful.

Sounds like this is solvable.

>   2. Using the nvmem DT bindings means we have to add more DT glue from the
>      nvmem consumer(s) to the nvmem provider. As we need to provide backwards
>      compatibility with old DTSes, this means we need more C code or DT fixup
>      code to handle that.

Ah I wasn't aware we were keeping backwards compatibility around.


>   3. The nvmem subsystem may be overkill to provide access to a simple 32-bit
>      read-only register that never changes value after boot.

The nvmem subsystem is designed to read values from things that
mostly never change. Overkill may be true, but the nice thing
about using nvmem APIs is that the driver doesn't have to use
some platform specific function that duplicates similar
functionality. It's unfortunate that backwards incompatibility
limits our ability to move to common linux frameworks when they
are created after the binding is used.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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

* Re: [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state
  2016-09-12 22:16       ` Stephen Boyd
@ 2016-09-13  6:48         ` Geert Uytterhoeven
  -1 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-09-13  6:48 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Geert Uytterhoeven, Simon Horman, Magnus Damm, Laurent Pinchart,
	Philipp Zabel, Michael Turquette, Dirk Behme, Linux-Renesas,
	linux-arm-kernel, devicetree, Maxime Ripard, Srinivas Kandagatla

Hi Stephen,

On Tue, Sep 13, 2016 at 12:16 AM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> On 09/01, Geert Uytterhoeven wrote:
>> On Thu, Jun 30, 2016 at 10:14 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
>> > On 06/01, Geert Uytterhoeven wrote:
>> >> Currently the R-Car Clock Pulse Generator (CPG) drivers obtains the
>> >> state of the mode pins either by a call from the board code, or directly
>> >> by using a hardcoded register access. This is a bit messy, and creates a
>> >> dependency between driver and platform code.
>> >>
>> >> This RFC patch series converts the various Renesas R-Car clock drivers
>> >> and support code from reading the mode pin states using a hardcoded
>> >> register access to using a new R-Car RST driver.
>> >
>> > Dumb question, can we use the nvmem reading APIs instead of an
>> > SoC specific function to read the modes?
>>
>> Thanks for your suggestion, the nvmem API indeed looks like a suitable API,
>> as it does support read-only nvmems.
>>
>> Unfortunately I also see a few disadvantages:
>>   1. nvmem_init() is a subsys_initcall(), while most of our users (except for
>>      the recent renesas-cpg-mssr driver) are clock drivers using
>>      CLK_OF_DECLARE(), and are thus initialized from of_clk_init() at much
>>      earlier time_init() time.
>>      Of course the mvmem subsystem and/or the clock drivers can be changed, if
>>      deemed useful.
>
> Sounds like this is solvable.

Sure.

>>   2. Using the nvmem DT bindings means we have to add more DT glue from the
>>      nvmem consumer(s) to the nvmem provider. As we need to provide backwards
>>      compatibility with old DTSes, this means we need more C code or DT fixup
>>      code to handle that.
>
> Ah I wasn't aware we were keeping backwards compatibility around.
>
>>   3. The nvmem subsystem may be overkill to provide access to a simple 32-bit
>>      read-only register that never changes value after boot.
>
> The nvmem subsystem is designed to read values from things that
> mostly never change. Overkill may be true, but the nice thing
> about using nvmem APIs is that the driver doesn't have to use
> some platform specific function that duplicates similar
> functionality. It's unfortunate that backwards incompatibility
> limits our ability to move to common linux frameworks when they
> are created after the binding is used.

This is continuing work to support old, current, and new SoCs properly.
When the first support for R-Car Gen2 SoCs was added, many frameworks
didn't have DT support, or didn't even exist.

Unlike in the mobile market, development and life span is much larger than
6 months here...

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

* [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state
@ 2016-09-13  6:48         ` Geert Uytterhoeven
  0 siblings, 0 replies; 74+ messages in thread
From: Geert Uytterhoeven @ 2016-09-13  6:48 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Stephen,

On Tue, Sep 13, 2016 at 12:16 AM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> On 09/01, Geert Uytterhoeven wrote:
>> On Thu, Jun 30, 2016 at 10:14 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
>> > On 06/01, Geert Uytterhoeven wrote:
>> >> Currently the R-Car Clock Pulse Generator (CPG) drivers obtains the
>> >> state of the mode pins either by a call from the board code, or directly
>> >> by using a hardcoded register access. This is a bit messy, and creates a
>> >> dependency between driver and platform code.
>> >>
>> >> This RFC patch series converts the various Renesas R-Car clock drivers
>> >> and support code from reading the mode pin states using a hardcoded
>> >> register access to using a new R-Car RST driver.
>> >
>> > Dumb question, can we use the nvmem reading APIs instead of an
>> > SoC specific function to read the modes?
>>
>> Thanks for your suggestion, the nvmem API indeed looks like a suitable API,
>> as it does support read-only nvmems.
>>
>> Unfortunately I also see a few disadvantages:
>>   1. nvmem_init() is a subsys_initcall(), while most of our users (except for
>>      the recent renesas-cpg-mssr driver) are clock drivers using
>>      CLK_OF_DECLARE(), and are thus initialized from of_clk_init() at much
>>      earlier time_init() time.
>>      Of course the mvmem subsystem and/or the clock drivers can be changed, if
>>      deemed useful.
>
> Sounds like this is solvable.

Sure.

>>   2. Using the nvmem DT bindings means we have to add more DT glue from the
>>      nvmem consumer(s) to the nvmem provider. As we need to provide backwards
>>      compatibility with old DTSes, this means we need more C code or DT fixup
>>      code to handle that.
>
> Ah I wasn't aware we were keeping backwards compatibility around.
>
>>   3. The nvmem subsystem may be overkill to provide access to a simple 32-bit
>>      read-only register that never changes value after boot.
>
> The nvmem subsystem is designed to read values from things that
> mostly never change. Overkill may be true, but the nice thing
> about using nvmem APIs is that the driver doesn't have to use
> some platform specific function that duplicates similar
> functionality. It's unfortunate that backwards incompatibility
> limits our ability to move to common linux frameworks when they
> are created after the binding is used.

This is continuing work to support old, current, and new SoCs properly.
When the first support for R-Car Gen2 SoCs was added, many frameworks
didn't have DT support, or didn't even exist.

Unlike in the mobile market, development and life span is much larger than
6 months here...

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

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

end of thread, other threads:[~2016-09-13  6:48 UTC | newest]

Thread overview: 74+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-01 19:20 [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Geert Uytterhoeven
2016-06-01 19:20 ` [PATCH/RFC v3 01/22] reset: Add renesas,rst DT bindings Geert Uytterhoeven
2016-06-02  5:40   ` Dirk Behme
2016-06-02  5:40     ` Dirk Behme
2016-06-02  5:40     ` Dirk Behme
2016-06-02 21:47   ` Laurent Pinchart
2016-06-02 21:47     ` Laurent Pinchart
2016-06-10  7:52     ` Geert Uytterhoeven
2016-06-10  7:52       ` Geert Uytterhoeven
2016-06-01 19:21 ` [PATCH/RFC v3 02/22] soc: renesas: Add R-Car RST driver Geert Uytterhoeven
2016-06-02  5:42   ` Dirk Behme
2016-06-02  5:42     ` Dirk Behme
2016-06-02  5:42     ` Dirk Behme
2016-06-10  7:58     ` Geert Uytterhoeven
2016-06-10  7:58       ` Geert Uytterhoeven
2016-06-10  8:38       ` Dirk Behme
2016-06-10  8:38         ` Dirk Behme
2016-06-10  8:38         ` Dirk Behme
2016-06-10 13:08       ` Laurent Pinchart
2016-06-10 13:08         ` Laurent Pinchart
2016-06-02 21:58   ` Laurent Pinchart
2016-06-02 21:58     ` Laurent Pinchart
2016-06-10  7:54     ` Geert Uytterhoeven
2016-06-10  7:54       ` Geert Uytterhoeven
2016-06-10  7:54       ` Geert Uytterhoeven
2016-06-01 19:21 ` [PATCH/RFC v3 05/22] ARM: dts: r8a7790: Add device node for RST module Geert Uytterhoeven
2016-06-01 19:21 ` [PATCH/RFC v3 06/22] ARM: dts: r8a7791: " Geert Uytterhoeven
2016-06-01 19:21 ` [PATCH/RFC v3 07/22] ARM: dts: r8a7793: " Geert Uytterhoeven
2016-06-01 19:21 ` [PATCH/RFC v3 08/22] ARM: dts: r8a7794: " Geert Uytterhoeven
2016-06-01 19:21 ` [PATCH/RFC v3 09/22] arm64: renesas: r8a7795 dtsi: " Geert Uytterhoeven
2016-06-01 19:21 ` [PATCH/RFC v3 10/22] arm64: renesas: r8a7796 " Geert Uytterhoeven
2016-06-01 19:21 ` [PATCH/RFC v3 13/22] clk: renesas: rcar-gen2: Obtain mode pin values using RST driver Geert Uytterhoeven
2016-06-01 19:21 ` [PATCH/RFC v3 14/22] clk: renesas: r8a7795: Obtain mode pin values from R-Car " Geert Uytterhoeven
2016-06-02 22:01   ` Laurent Pinchart
2016-06-02 22:01     ` Laurent Pinchart
2016-06-01 19:21 ` [PATCH/RFC v3 15/22] clk: renesas: r8a7796: " Geert Uytterhoeven
2016-06-02 22:02   ` Laurent Pinchart
2016-06-02 22:02     ` Laurent Pinchart
2016-06-01 19:21 ` [PATCH/RFC v3 17/22] ARM: shmobile: r8a7778: Stop passing mode pins state to clock driver Geert Uytterhoeven
2016-06-01 19:21 ` [PATCH/RFC v3 18/22] ARM: shmobile: r8a7779: " Geert Uytterhoeven
2016-06-01 19:21 ` [PATCH/RFC v3 19/22] ARM: shmobile: rcar-gen2: " Geert Uytterhoeven
2016-06-01 19:21 ` [PATCH/RFC v3 20/22] clk: renesas: r8a7778: Remove obsolete r8a7778_clocks_init() Geert Uytterhoeven
2016-06-02  5:54   ` Dirk Behme
2016-06-02  5:54     ` Dirk Behme
2016-06-02  5:54     ` Dirk Behme
2016-06-02  7:13     ` Geert Uytterhoeven
2016-06-02  7:13       ` Geert Uytterhoeven
     [not found] ` <1464808880-343-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
2016-06-01 19:21   ` [PATCH/RFC v3 03/22] ARM: dts: r8a7778: Add device node for RESET/WDT module Geert Uytterhoeven
2016-06-01 19:21     ` Geert Uytterhoeven
2016-06-01 19:21   ` [PATCH/RFC v3 04/22] ARM: dts: r8a7779: " Geert Uytterhoeven
2016-06-01 19:21     ` Geert Uytterhoeven
2016-06-01 19:21   ` [PATCH/RFC v3 11/22] clk: renesas: r8a7778: Obtain mode pin values using R-Car RST driver Geert Uytterhoeven
2016-06-01 19:21     ` Geert Uytterhoeven
2016-06-01 19:21   ` [PATCH/RFC v3 12/22] clk: renesas: r8a7779: Obtain mode pin values from " Geert Uytterhoeven
2016-06-01 19:21     ` Geert Uytterhoeven
2016-06-01 19:21   ` [PATCH/RFC v3 16/22] clk: renesas: rcar-gen3-cpg: Remove obsolete rcar_gen3_read_mode_pins() Geert Uytterhoeven
2016-06-01 19:21     ` Geert Uytterhoeven
     [not found]     ` <1464808880-343-17-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
2016-06-02 22:02       ` Laurent Pinchart
2016-06-02 22:02         ` Laurent Pinchart
2016-06-02 22:02         ` Laurent Pinchart
2016-06-01 19:21   ` [PATCH/RFC v3 21/22] clk: renesas: r8a7779: Remove obsolete r8a7779_clocks_init() Geert Uytterhoeven
2016-06-01 19:21     ` Geert Uytterhoeven
2016-06-01 19:21 ` [PATCH/RFC v3 22/22] clk: renesas: rcar-gen2: Remove obsolete rcar_gen2_clocks_init() Geert Uytterhoeven
2016-06-02  5:57 ` [PATCH/RFC v3 00/22] soc: renesas: Add R-Car RST driver for obtaining mode pin state Dirk Behme
2016-06-02  5:57   ` Dirk Behme
2016-06-02  5:57   ` Dirk Behme
2016-06-30 20:14 ` Stephen Boyd
2016-06-30 20:14   ` Stephen Boyd
2016-09-01 11:46   ` Geert Uytterhoeven
2016-09-01 11:46     ` Geert Uytterhoeven
2016-09-12 22:16     ` Stephen Boyd
2016-09-12 22:16       ` Stephen Boyd
2016-09-13  6:48       ` Geert Uytterhoeven
2016-09-13  6:48         ` Geert Uytterhoeven

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.