All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC v3 00/25] Fix watchdog on Renesas R-Car Gen2 and RZ/G1
@ 2018-01-30 20:22 ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

Dear All,

while trying to add watchdog support to RZ/G1M and RZ/G1E I discovered
that it couldn't work out of the box. R-Car Gen2 and RZ/G1 are very
similar from a design perspective, and therefore the same problem is
observable on R-Car Gen2 too.

To deal with SMP on R-Car Gen2 and RZ/G1, we install a reset vector
to ICRAM1 and we program the [S]BAR registers so that when we turn ON
the non-boot CPUs they are redirected to the reset vector installed by
Linux in ICRAM1, and eventually they continue the execution to RAM,
where the SMP bring-up code will take care of the rest.
The content of the [S]BAR registers survives a watchdog triggered reset,
and as such after the watchdog fires the boot core will try and execute
the SMP bring-up code instead of jumping to the bootrom code.

This series is a proposal for a fix to the aforementioned problem.
The main strategy for the solution is to let the reset vector decide
if it needs to jump to shmobile_boot_fn or to the bootrom code.
In a watchdog triggered reset scenario, since the [S]BAR registers keep
their values, the boot CPU will jump into the newly designed reset
vector, the assembly routine will eventually test WOVF (a bit in register
RWTCSRA that indicates if the watchdog counter has overflown, the value
of this bit gets retained in this scenario), and jump to the bootrom code
which will in turn load up the bootloader, etc.
When bringing up SMP or using CPU hotplug, the reset vector will jump
to shmobile_boot_fn instead.

v3 takes into account all the feedbacks recieved, and implements a
different logic in the reset vector in order to get rid of
shmobile_wdt_clock_status.

This work was rebased on top of tag renesas-devel-20180122-v4.15-rc9
from the below repository:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git

What do you guys think about this?

Any volunteer for testing this work?

Comments welcome!

Best Regards,

Fabrizio Castro (25):
  ARM: shmobile: Add watchdog support
  ARM: dts: r8a7743: Adjust SMP routine size
  ARM: dts: r8a7745: Adjust SMP routine size
  ARM: dts: r8a7790: Adjust SMP routine size
  ARM: dts: r8a7791: Adjust SMP routine size
  ARM: dts: r8a7792: Adjust SMP routine size
  ARM: dts: r8a7793: Adjust SMP routine size
  ARM: dts: r8a7794: Adjust SMP routine size
  soc: renesas: rcar-rst: Enable watchdog as reset trigger for Gen2
  dt-bindings: watchdog: renesas-wdt: Add R-Car Gen2 support
  watchdog: renesas_wdt: Add R-Car Gen2 support
  ARM: shmobile: rcar-gen2: Add watchdog support
  ARM: shmobile: defconfig: Enable RENESAS_WDT_GEN
  clk: renesas: r8a7743: Add rwdt clock
  clk: renesas: r8a7745: Add rwdt clock
  clk: renesas: r8a7790: Add rwdt clock
  clk: renesas: r8a7791/r8a7793: Add rwdt clock
  clk: renesas: r8a7794: Add rwdt clock
  ARM: dts: r8a7743: Add watchdog support to SoC dtsi
  ARM: dts: r8a7745: Add watchdog support to SoC dtsi
  ARM: dts: r8a7790: Add watchdog support to SoC dtsi
  ARM: dts: r8a7791: Add watchdog support to SoC dtsi
  ARM: dts: r8a7794: Add watchdog support to SoC dtsi
  ARM: dts: iwg20m: Add watchdog support to SoM dtsi
  ARM: dts: iwg22m: Add watchdog support to SoM dtsi

 .../devicetree/bindings/watchdog/renesas-wdt.txt   | 18 +++++--
 arch/arm/boot/dts/r8a7743-iwg20m.dtsi              |  5 ++
 arch/arm/boot/dts/r8a7743.dtsi                     | 12 ++++-
 arch/arm/boot/dts/r8a7745-iwg22m.dtsi              |  5 ++
 arch/arm/boot/dts/r8a7745.dtsi                     | 12 ++++-
 arch/arm/boot/dts/r8a7790.dtsi                     | 12 ++++-
 arch/arm/boot/dts/r8a7791.dtsi                     | 12 ++++-
 arch/arm/boot/dts/r8a7792.dtsi                     |  2 +-
 arch/arm/boot/dts/r8a7793.dtsi                     |  2 +-
 arch/arm/boot/dts/r8a7794.dtsi                     | 12 ++++-
 arch/arm/configs/shmobile_defconfig                |  1 +
 arch/arm/mach-shmobile/common.h                    |  6 +++
 arch/arm/mach-shmobile/headsmp.S                   | 55 +++++++++++++++++++
 arch/arm/mach-shmobile/platsmp-apmu.c              |  1 +
 arch/arm/mach-shmobile/pm-rcar-gen2.c              | 13 +++--
 drivers/clk/renesas/r8a7743-cpg-mssr.c             |  2 +
 drivers/clk/renesas/r8a7745-cpg-mssr.c             |  2 +
 drivers/clk/renesas/r8a7790-cpg-mssr.c             |  2 +
 drivers/clk/renesas/r8a7791-cpg-mssr.c             |  2 +
 drivers/clk/renesas/r8a7794-cpg-mssr.c             |  2 +
 drivers/soc/renesas/rcar-rst.c                     | 35 ++++++++++---
 drivers/watchdog/renesas_wdt.c                     | 61 ++++++++++++++++++++--
 22 files changed, 248 insertions(+), 26 deletions(-)

-- 
2.7.4


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

* [RFC v3 00/25] Fix watchdog on Renesas R-Car Gen2 and RZ/G1
@ 2018-01-30 20:22 ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

Dear All,

while trying to add watchdog support to RZ/G1M and RZ/G1E I discovered
that it couldn't work out of the box. R-Car Gen2 and RZ/G1 are very
similar from a design perspective, and therefore the same problem is
observable on R-Car Gen2 too.

To deal with SMP on R-Car Gen2 and RZ/G1, we install a reset vector
to ICRAM1 and we program the [S]BAR registers so that when we turn ON
the non-boot CPUs they are redirected to the reset vector installed by
Linux in ICRAM1, and eventually they continue the execution to RAM,
where the SMP bring-up code will take care of the rest.
The content of the [S]BAR registers survives a watchdog triggered reset,
and as such after the watchdog fires the boot core will try and execute
the SMP bring-up code instead of jumping to the bootrom code.

This series is a proposal for a fix to the aforementioned problem.
The main strategy for the solution is to let the reset vector decide
if it needs to jump to shmobile_boot_fn or to the bootrom code.
In a watchdog triggered reset scenario, since the [S]BAR registers keep
their values, the boot CPU will jump into the newly designed reset
vector, the assembly routine will eventually test WOVF (a bit in register
RWTCSRA that indicates if the watchdog counter has overflown, the value
of this bit gets retained in this scenario), and jump to the bootrom code
which will in turn load up the bootloader, etc.
When bringing up SMP or using CPU hotplug, the reset vector will jump
to shmobile_boot_fn instead.

v3 takes into account all the feedbacks recieved, and implements a
different logic in the reset vector in order to get rid of
shmobile_wdt_clock_status.

This work was rebased on top of tag renesas-devel-20180122-v4.15-rc9
from the below repository:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git

What do you guys think about this?

Any volunteer for testing this work?

Comments welcome!

Best Regards,

Fabrizio Castro (25):
  ARM: shmobile: Add watchdog support
  ARM: dts: r8a7743: Adjust SMP routine size
  ARM: dts: r8a7745: Adjust SMP routine size
  ARM: dts: r8a7790: Adjust SMP routine size
  ARM: dts: r8a7791: Adjust SMP routine size
  ARM: dts: r8a7792: Adjust SMP routine size
  ARM: dts: r8a7793: Adjust SMP routine size
  ARM: dts: r8a7794: Adjust SMP routine size
  soc: renesas: rcar-rst: Enable watchdog as reset trigger for Gen2
  dt-bindings: watchdog: renesas-wdt: Add R-Car Gen2 support
  watchdog: renesas_wdt: Add R-Car Gen2 support
  ARM: shmobile: rcar-gen2: Add watchdog support
  ARM: shmobile: defconfig: Enable RENESAS_WDT_GEN
  clk: renesas: r8a7743: Add rwdt clock
  clk: renesas: r8a7745: Add rwdt clock
  clk: renesas: r8a7790: Add rwdt clock
  clk: renesas: r8a7791/r8a7793: Add rwdt clock
  clk: renesas: r8a7794: Add rwdt clock
  ARM: dts: r8a7743: Add watchdog support to SoC dtsi
  ARM: dts: r8a7745: Add watchdog support to SoC dtsi
  ARM: dts: r8a7790: Add watchdog support to SoC dtsi
  ARM: dts: r8a7791: Add watchdog support to SoC dtsi
  ARM: dts: r8a7794: Add watchdog support to SoC dtsi
  ARM: dts: iwg20m: Add watchdog support to SoM dtsi
  ARM: dts: iwg22m: Add watchdog support to SoM dtsi

 .../devicetree/bindings/watchdog/renesas-wdt.txt   | 18 +++++--
 arch/arm/boot/dts/r8a7743-iwg20m.dtsi              |  5 ++
 arch/arm/boot/dts/r8a7743.dtsi                     | 12 ++++-
 arch/arm/boot/dts/r8a7745-iwg22m.dtsi              |  5 ++
 arch/arm/boot/dts/r8a7745.dtsi                     | 12 ++++-
 arch/arm/boot/dts/r8a7790.dtsi                     | 12 ++++-
 arch/arm/boot/dts/r8a7791.dtsi                     | 12 ++++-
 arch/arm/boot/dts/r8a7792.dtsi                     |  2 +-
 arch/arm/boot/dts/r8a7793.dtsi                     |  2 +-
 arch/arm/boot/dts/r8a7794.dtsi                     | 12 ++++-
 arch/arm/configs/shmobile_defconfig                |  1 +
 arch/arm/mach-shmobile/common.h                    |  6 +++
 arch/arm/mach-shmobile/headsmp.S                   | 55 +++++++++++++++++++
 arch/arm/mach-shmobile/platsmp-apmu.c              |  1 +
 arch/arm/mach-shmobile/pm-rcar-gen2.c              | 13 +++--
 drivers/clk/renesas/r8a7743-cpg-mssr.c             |  2 +
 drivers/clk/renesas/r8a7745-cpg-mssr.c             |  2 +
 drivers/clk/renesas/r8a7790-cpg-mssr.c             |  2 +
 drivers/clk/renesas/r8a7791-cpg-mssr.c             |  2 +
 drivers/clk/renesas/r8a7794-cpg-mssr.c             |  2 +
 drivers/soc/renesas/rcar-rst.c                     | 35 ++++++++++---
 drivers/watchdog/renesas_wdt.c                     | 61 ++++++++++++++++++++--
 22 files changed, 248 insertions(+), 26 deletions(-)

-- 
2.7.4

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

* [RFC v3 01/25] ARM: shmobile: Add watchdog support
  2018-01-30 20:22 ` Fabrizio Castro
  (?)
@ 2018-01-30 20:22     ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-clk-u79uwXL29TY76Z2rM5mHXA, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

On R-Car Gen2 and RZ/G1 platforms, we use the SBAR registers to make non
boot CPUs run a routine designed to bring up SMP and deal with hot plug.
The value contained in the SBAR registers is not initialized by a WDT
triggered reset, which means that after a WDT triggered reset we jump
to the SMP bring up routine, preventing the system from executing the
bootrom code.

The purpose of this patch is to jump to the bootrom code in case of a
WDT triggered reset, and keep the SMP functionality untouched.
In order to tell if the code had been called due to the WDT overflowing
we are testing WOVF from register RWTCSRA.

The new function shmobile_boot_vector_gen2 isn't replacing
shmobile_boot_vector for backward compatibility reasons. The kernel
will install the best option (either shmobile_boot_vector or
shmobile_boot_vector_gen2) to ICRAM1 after parsing the device tree,
according to the amount of memory available.

Since shmobile_boot_vector has become bigger, "reg" property of nodes
compatible with "renesas,smp-sram" now need to be set to a value
greater or equal to "<0 0x60>".

Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
---
v2->v3:
* purge shmobile_wdt_clock_status variable, and add shmobile_boot_cpu_gen2

v1->v2:
* reinstated shmobile_boot_vector and added shmobile_boot_vector_gen2

 arch/arm/mach-shmobile/common.h  |  6 +++++
 arch/arm/mach-shmobile/headsmp.S | 55 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)

diff --git a/arch/arm/mach-shmobile/common.h b/arch/arm/mach-shmobile/common.h
index a8fa4f7..d8c11f5 100644
--- a/arch/arm/mach-shmobile/common.h
+++ b/arch/arm/mach-shmobile/common.h
@@ -7,6 +7,12 @@ extern void shmobile_init_delay(void);
 extern void shmobile_boot_vector(void);
 extern unsigned long shmobile_boot_fn;
 extern unsigned long shmobile_boot_size;
+#ifdef CONFIG_ARCH_RCAR_GEN2
+extern void shmobile_boot_vector_gen2(void);
+extern unsigned long shmobile_boot_fn_gen2;
+extern unsigned long shmobile_boot_cpu_gen2;
+extern unsigned long shmobile_boot_size_gen2;
+#endif /* CONFIG_ARCH_RCAR_GEN2 */
 extern void shmobile_smp_boot(void);
 extern void shmobile_smp_sleep(void);
 extern void shmobile_smp_hook(unsigned int cpu, unsigned long fn,
diff --git a/arch/arm/mach-shmobile/headsmp.S b/arch/arm/mach-shmobile/headsmp.S
index 32e0bf6..cef8e8c 100644
--- a/arch/arm/mach-shmobile/headsmp.S
+++ b/arch/arm/mach-shmobile/headsmp.S
@@ -16,6 +16,11 @@
 #include <asm/assembler.h>
 #include <asm/memory.h>
 
+#define SCTLR_MMU	0x01
+#define BOOTROM_ADDRESS	0xE6340000
+#define RWTCSRA_ADDRESS 0xE6020004
+#define RWTCSRA_WOVF	0x10
+
 /*
  * Reset vector for secondary CPUs.
  * This will be mapped at address 0 by SBAR register.
@@ -37,6 +42,56 @@ shmobile_boot_fn:
 shmobile_boot_size:
 	.long	. - shmobile_boot_vector
 
+#ifdef CONFIG_ARCH_RCAR_GEN2
+/*
+ * Reset vector for R-Car Gen2 and RZ/G1 secondary CPUs.
+ * This will be mapped at address 0 by SBAR register.
+ */
+ENTRY(shmobile_boot_vector_gen2)
+	mrc	p15, 0, r0, c0, c0, 5		@ r0 = MPIDR
+	ldr	r1, shmobile_boot_cpu_gen2
+	cmp	r0, r1
+	bne	shmobile_smp_continue_gen2
+
+	mrc	p15, 0, r1, c1, c0, 0		@ r1 = SCTLR
+	and	r0, r1, #SCTLR_MMU
+	cmp	r0, #SCTLR_MMU
+	beq	shmobile_smp_continue_gen2
+
+	ldr	r0, rwtcsra
+	mov	r1, #0
+	ldrb	r1, [r0]
+	and	r0, r1, #RWTCSRA_WOVF
+	cmp	r0, #RWTCSRA_WOVF
+	bne	shmobile_smp_continue_gen2
+
+	ldr	r0, bootrom
+	bx	r0
+
+shmobile_smp_continue_gen2:
+	ldr     r1, shmobile_boot_fn_gen2
+	bx	r1
+
+ENDPROC(shmobile_boot_vector_gen2)
+
+	.align	4
+rwtcsra:
+	.word	RWTCSRA_ADDRESS
+bootrom:
+	.word	BOOTROM_ADDRESS
+	.globl	shmobile_boot_cpu_gen2
+shmobile_boot_cpu_gen2:
+	.word	0x00000000
+
+	.align	2
+	.globl	shmobile_boot_fn_gen2
+shmobile_boot_fn_gen2:
+	.space	4
+	.globl	shmobile_boot_size_gen2
+shmobile_boot_size_gen2:
+	.long	. - shmobile_boot_vector_gen2
+#endif /* CONFIG_ARCH_RCAR_GEN2 */
+
 /*
  * Per-CPU SMP boot function/argument selection code based on MPIDR
  */
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" 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] 120+ messages in thread

* [RFC v3 01/25] ARM: shmobile: Add watchdog support
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

On R-Car Gen2 and RZ/G1 platforms, we use the SBAR registers to make non
boot CPUs run a routine designed to bring up SMP and deal with hot plug.
The value contained in the SBAR registers is not initialized by a WDT
triggered reset, which means that after a WDT triggered reset we jump
to the SMP bring up routine, preventing the system from executing the
bootrom code.

The purpose of this patch is to jump to the bootrom code in case of a
WDT triggered reset, and keep the SMP functionality untouched.
In order to tell if the code had been called due to the WDT overflowing
we are testing WOVF from register RWTCSRA.

The new function shmobile_boot_vector_gen2 isn't replacing
shmobile_boot_vector for backward compatibility reasons. The kernel
will install the best option (either shmobile_boot_vector or
shmobile_boot_vector_gen2) to ICRAM1 after parsing the device tree,
according to the amount of memory available.

Since shmobile_boot_vector has become bigger, "reg" property of nodes
compatible with "renesas,smp-sram" now need to be set to a value
greater or equal to "<0 0x60>".

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v2->v3:
* purge shmobile_wdt_clock_status variable, and add shmobile_boot_cpu_gen2

v1->v2:
* reinstated shmobile_boot_vector and added shmobile_boot_vector_gen2

 arch/arm/mach-shmobile/common.h  |  6 +++++
 arch/arm/mach-shmobile/headsmp.S | 55 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)

diff --git a/arch/arm/mach-shmobile/common.h b/arch/arm/mach-shmobile/common.h
index a8fa4f7..d8c11f5 100644
--- a/arch/arm/mach-shmobile/common.h
+++ b/arch/arm/mach-shmobile/common.h
@@ -7,6 +7,12 @@ extern void shmobile_init_delay(void);
 extern void shmobile_boot_vector(void);
 extern unsigned long shmobile_boot_fn;
 extern unsigned long shmobile_boot_size;
+#ifdef CONFIG_ARCH_RCAR_GEN2
+extern void shmobile_boot_vector_gen2(void);
+extern unsigned long shmobile_boot_fn_gen2;
+extern unsigned long shmobile_boot_cpu_gen2;
+extern unsigned long shmobile_boot_size_gen2;
+#endif /* CONFIG_ARCH_RCAR_GEN2 */
 extern void shmobile_smp_boot(void);
 extern void shmobile_smp_sleep(void);
 extern void shmobile_smp_hook(unsigned int cpu, unsigned long fn,
diff --git a/arch/arm/mach-shmobile/headsmp.S b/arch/arm/mach-shmobile/headsmp.S
index 32e0bf6..cef8e8c 100644
--- a/arch/arm/mach-shmobile/headsmp.S
+++ b/arch/arm/mach-shmobile/headsmp.S
@@ -16,6 +16,11 @@
 #include <asm/assembler.h>
 #include <asm/memory.h>
 
+#define SCTLR_MMU	0x01
+#define BOOTROM_ADDRESS	0xE6340000
+#define RWTCSRA_ADDRESS 0xE6020004
+#define RWTCSRA_WOVF	0x10
+
 /*
  * Reset vector for secondary CPUs.
  * This will be mapped at address 0 by SBAR register.
@@ -37,6 +42,56 @@ shmobile_boot_fn:
 shmobile_boot_size:
 	.long	. - shmobile_boot_vector
 
+#ifdef CONFIG_ARCH_RCAR_GEN2
+/*
+ * Reset vector for R-Car Gen2 and RZ/G1 secondary CPUs.
+ * This will be mapped at address 0 by SBAR register.
+ */
+ENTRY(shmobile_boot_vector_gen2)
+	mrc	p15, 0, r0, c0, c0, 5		@ r0 = MPIDR
+	ldr	r1, shmobile_boot_cpu_gen2
+	cmp	r0, r1
+	bne	shmobile_smp_continue_gen2
+
+	mrc	p15, 0, r1, c1, c0, 0		@ r1 = SCTLR
+	and	r0, r1, #SCTLR_MMU
+	cmp	r0, #SCTLR_MMU
+	beq	shmobile_smp_continue_gen2
+
+	ldr	r0, rwtcsra
+	mov	r1, #0
+	ldrb	r1, [r0]
+	and	r0, r1, #RWTCSRA_WOVF
+	cmp	r0, #RWTCSRA_WOVF
+	bne	shmobile_smp_continue_gen2
+
+	ldr	r0, bootrom
+	bx	r0
+
+shmobile_smp_continue_gen2:
+	ldr     r1, shmobile_boot_fn_gen2
+	bx	r1
+
+ENDPROC(shmobile_boot_vector_gen2)
+
+	.align	4
+rwtcsra:
+	.word	RWTCSRA_ADDRESS
+bootrom:
+	.word	BOOTROM_ADDRESS
+	.globl	shmobile_boot_cpu_gen2
+shmobile_boot_cpu_gen2:
+	.word	0x00000000
+
+	.align	2
+	.globl	shmobile_boot_fn_gen2
+shmobile_boot_fn_gen2:
+	.space	4
+	.globl	shmobile_boot_size_gen2
+shmobile_boot_size_gen2:
+	.long	. - shmobile_boot_vector_gen2
+#endif /* CONFIG_ARCH_RCAR_GEN2 */
+
 /*
  * Per-CPU SMP boot function/argument selection code based on MPIDR
  */
-- 
2.7.4


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

* [RFC v3 01/25] ARM: shmobile: Add watchdog support
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

On R-Car Gen2 and RZ/G1 platforms, we use the SBAR registers to make non
boot CPUs run a routine designed to bring up SMP and deal with hot plug.
The value contained in the SBAR registers is not initialized by a WDT
triggered reset, which means that after a WDT triggered reset we jump
to the SMP bring up routine, preventing the system from executing the
bootrom code.

The purpose of this patch is to jump to the bootrom code in case of a
WDT triggered reset, and keep the SMP functionality untouched.
In order to tell if the code had been called due to the WDT overflowing
we are testing WOVF from register RWTCSRA.

The new function shmobile_boot_vector_gen2 isn't replacing
shmobile_boot_vector for backward compatibility reasons. The kernel
will install the best option (either shmobile_boot_vector or
shmobile_boot_vector_gen2) to ICRAM1 after parsing the device tree,
according to the amount of memory available.

Since shmobile_boot_vector has become bigger, "reg" property of nodes
compatible with "renesas,smp-sram" now need to be set to a value
greater or equal to "<0 0x60>".

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v2->v3:
* purge shmobile_wdt_clock_status variable, and add shmobile_boot_cpu_gen2

v1->v2:
* reinstated shmobile_boot_vector and added shmobile_boot_vector_gen2

 arch/arm/mach-shmobile/common.h  |  6 +++++
 arch/arm/mach-shmobile/headsmp.S | 55 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)

diff --git a/arch/arm/mach-shmobile/common.h b/arch/arm/mach-shmobile/common.h
index a8fa4f7..d8c11f5 100644
--- a/arch/arm/mach-shmobile/common.h
+++ b/arch/arm/mach-shmobile/common.h
@@ -7,6 +7,12 @@ extern void shmobile_init_delay(void);
 extern void shmobile_boot_vector(void);
 extern unsigned long shmobile_boot_fn;
 extern unsigned long shmobile_boot_size;
+#ifdef CONFIG_ARCH_RCAR_GEN2
+extern void shmobile_boot_vector_gen2(void);
+extern unsigned long shmobile_boot_fn_gen2;
+extern unsigned long shmobile_boot_cpu_gen2;
+extern unsigned long shmobile_boot_size_gen2;
+#endif /* CONFIG_ARCH_RCAR_GEN2 */
 extern void shmobile_smp_boot(void);
 extern void shmobile_smp_sleep(void);
 extern void shmobile_smp_hook(unsigned int cpu, unsigned long fn,
diff --git a/arch/arm/mach-shmobile/headsmp.S b/arch/arm/mach-shmobile/headsmp.S
index 32e0bf6..cef8e8c 100644
--- a/arch/arm/mach-shmobile/headsmp.S
+++ b/arch/arm/mach-shmobile/headsmp.S
@@ -16,6 +16,11 @@
 #include <asm/assembler.h>
 #include <asm/memory.h>
 
+#define SCTLR_MMU	0x01
+#define BOOTROM_ADDRESS	0xE6340000
+#define RWTCSRA_ADDRESS 0xE6020004
+#define RWTCSRA_WOVF	0x10
+
 /*
  * Reset vector for secondary CPUs.
  * This will be mapped at address 0 by SBAR register.
@@ -37,6 +42,56 @@ shmobile_boot_fn:
 shmobile_boot_size:
 	.long	. - shmobile_boot_vector
 
+#ifdef CONFIG_ARCH_RCAR_GEN2
+/*
+ * Reset vector for R-Car Gen2 and RZ/G1 secondary CPUs.
+ * This will be mapped at address 0 by SBAR register.
+ */
+ENTRY(shmobile_boot_vector_gen2)
+	mrc	p15, 0, r0, c0, c0, 5		@ r0 = MPIDR
+	ldr	r1, shmobile_boot_cpu_gen2
+	cmp	r0, r1
+	bne	shmobile_smp_continue_gen2
+
+	mrc	p15, 0, r1, c1, c0, 0		@ r1 = SCTLR
+	and	r0, r1, #SCTLR_MMU
+	cmp	r0, #SCTLR_MMU
+	beq	shmobile_smp_continue_gen2
+
+	ldr	r0, rwtcsra
+	mov	r1, #0
+	ldrb	r1, [r0]
+	and	r0, r1, #RWTCSRA_WOVF
+	cmp	r0, #RWTCSRA_WOVF
+	bne	shmobile_smp_continue_gen2
+
+	ldr	r0, bootrom
+	bx	r0
+
+shmobile_smp_continue_gen2:
+	ldr     r1, shmobile_boot_fn_gen2
+	bx	r1
+
+ENDPROC(shmobile_boot_vector_gen2)
+
+	.align	4
+rwtcsra:
+	.word	RWTCSRA_ADDRESS
+bootrom:
+	.word	BOOTROM_ADDRESS
+	.globl	shmobile_boot_cpu_gen2
+shmobile_boot_cpu_gen2:
+	.word	0x00000000
+
+	.align	2
+	.globl	shmobile_boot_fn_gen2
+shmobile_boot_fn_gen2:
+	.space	4
+	.globl	shmobile_boot_size_gen2
+shmobile_boot_size_gen2:
+	.long	. - shmobile_boot_vector_gen2
+#endif /* CONFIG_ARCH_RCAR_GEN2 */
+
 /*
  * Per-CPU SMP boot function/argument selection code based on MPIDR
  */
-- 
2.7.4

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

* [RFC v3 02/25] ARM: dts: r8a7743: Adjust SMP routine size
  2018-01-30 20:22 ` Fabrizio Castro
  (?)
@ 2018-01-30 20:22     ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-clk-u79uwXL29TY76Z2rM5mHXA, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This patch adjusts the definition of the SMP routine size according
to the latest changes made by commit:
"ARM: shmobile: Add watchdog support"

Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
---
v1->v3:
* increased size to 0x100

 arch/arm/boot/dts/r8a7743.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/r8a7743.dtsi b/arch/arm/boot/dts/r8a7743.dtsi
index 47b62f6..c2943d7 100644
--- a/arch/arm/boot/dts/r8a7743.dtsi
+++ b/arch/arm/boot/dts/r8a7743.dtsi
@@ -973,7 +973,7 @@
 
 			smp-sram@0 {
 				compatible = "renesas,smp-sram";
-				reg = <0 0x10>;
+				reg = <0 0x100>;
 			};
 		};
 
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" 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] 120+ messages in thread

* [RFC v3 02/25] ARM: dts: r8a7743: Adjust SMP routine size
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This patch adjusts the definition of the SMP routine size according
to the latest changes made by commit:
"ARM: shmobile: Add watchdog support"

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* increased size to 0x100

 arch/arm/boot/dts/r8a7743.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/r8a7743.dtsi b/arch/arm/boot/dts/r8a7743.dtsi
index 47b62f6..c2943d7 100644
--- a/arch/arm/boot/dts/r8a7743.dtsi
+++ b/arch/arm/boot/dts/r8a7743.dtsi
@@ -973,7 +973,7 @@
 
 			smp-sram@0 {
 				compatible = "renesas,smp-sram";
-				reg = <0 0x10>;
+				reg = <0 0x100>;
 			};
 		};
 
-- 
2.7.4


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

* [RFC v3 02/25] ARM: dts: r8a7743: Adjust SMP routine size
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adjusts the definition of the SMP routine size according
to the latest changes made by commit:
"ARM: shmobile: Add watchdog support"

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* increased size to 0x100

 arch/arm/boot/dts/r8a7743.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/r8a7743.dtsi b/arch/arm/boot/dts/r8a7743.dtsi
index 47b62f6..c2943d7 100644
--- a/arch/arm/boot/dts/r8a7743.dtsi
+++ b/arch/arm/boot/dts/r8a7743.dtsi
@@ -973,7 +973,7 @@
 
 			smp-sram at 0 {
 				compatible = "renesas,smp-sram";
-				reg = <0 0x10>;
+				reg = <0 0x100>;
 			};
 		};
 
-- 
2.7.4

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

* [RFC v3 03/25] ARM: dts: r8a7745: Adjust SMP routine size
  2018-01-30 20:22 ` Fabrizio Castro
@ 2018-01-30 20:22   ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This patch adjusts the definition of the SMP routine size according
to the latest changes made by commit:
"ARM: shmobile: Add watchdog support"

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* increased size to 0x100

 arch/arm/boot/dts/r8a7745.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/r8a7745.dtsi b/arch/arm/boot/dts/r8a7745.dtsi
index ddc3da2..6bc1cf4 100644
--- a/arch/arm/boot/dts/r8a7745.dtsi
+++ b/arch/arm/boot/dts/r8a7745.dtsi
@@ -755,7 +755,7 @@
 
 			smp-sram@0 {
 				compatible = "renesas,smp-sram";
-				reg = <0 0x10>;
+				reg = <0 0x100>;
 			};
 		};
 
-- 
2.7.4


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

* [RFC v3 03/25] ARM: dts: r8a7745: Adjust SMP routine size
@ 2018-01-30 20:22   ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adjusts the definition of the SMP routine size according
to the latest changes made by commit:
"ARM: shmobile: Add watchdog support"

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* increased size to 0x100

 arch/arm/boot/dts/r8a7745.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/r8a7745.dtsi b/arch/arm/boot/dts/r8a7745.dtsi
index ddc3da2..6bc1cf4 100644
--- a/arch/arm/boot/dts/r8a7745.dtsi
+++ b/arch/arm/boot/dts/r8a7745.dtsi
@@ -755,7 +755,7 @@
 
 			smp-sram at 0 {
 				compatible = "renesas,smp-sram";
-				reg = <0 0x10>;
+				reg = <0 0x100>;
 			};
 		};
 
-- 
2.7.4

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

* [RFC v3 04/25] ARM: dts: r8a7790: Adjust SMP routine size
  2018-01-30 20:22 ` Fabrizio Castro
  (?)
@ 2018-01-30 20:22     ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-clk-u79uwXL29TY76Z2rM5mHXA, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This patch adjusts the definition of the SMP routine size according
to the latest changes made by commit:
"ARM: shmobile: Add watchdog support"

Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
---
v1->v3:
* increased size to 0x100

 arch/arm/boot/dts/r8a7790.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index 3bbcc0b..a84bf35 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -443,7 +443,7 @@
 
 			smp-sram@0 {
 				compatible = "renesas,smp-sram";
-				reg = <0 0x10>;
+				reg = <0 0x100>;
 			};
 		};
 
-- 
2.7.4

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

* [RFC v3 04/25] ARM: dts: r8a7790: Adjust SMP routine size
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This patch adjusts the definition of the SMP routine size according
to the latest changes made by commit:
"ARM: shmobile: Add watchdog support"

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* increased size to 0x100

 arch/arm/boot/dts/r8a7790.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index 3bbcc0b..a84bf35 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -443,7 +443,7 @@
 
 			smp-sram@0 {
 				compatible = "renesas,smp-sram";
-				reg = <0 0x10>;
+				reg = <0 0x100>;
 			};
 		};
 
-- 
2.7.4


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

* [RFC v3 04/25] ARM: dts: r8a7790: Adjust SMP routine size
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adjusts the definition of the SMP routine size according
to the latest changes made by commit:
"ARM: shmobile: Add watchdog support"

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* increased size to 0x100

 arch/arm/boot/dts/r8a7790.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index 3bbcc0b..a84bf35 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -443,7 +443,7 @@
 
 			smp-sram at 0 {
 				compatible = "renesas,smp-sram";
-				reg = <0 0x10>;
+				reg = <0 0x100>;
 			};
 		};
 
-- 
2.7.4

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

* [RFC v3 05/25] ARM: dts: r8a7791: Adjust SMP routine size
  2018-01-30 20:22 ` Fabrizio Castro
  (?)
@ 2018-01-30 20:22     ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-clk-u79uwXL29TY76Z2rM5mHXA, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This patch adjusts the definition of the SMP routine size according
to the latest changes made by commit:
"ARM: shmobile: Add watchdog support"

Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
---
v1->v3:
* increased size to 0x100

 arch/arm/boot/dts/r8a7791.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index dc65935..d2a4546 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -407,7 +407,7 @@
 
 			smp-sram@0 {
 				compatible = "renesas,smp-sram";
-				reg = <0 0x10>;
+				reg = <0 0x100>;
 			};
 		};
 
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" 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] 120+ messages in thread

* [RFC v3 05/25] ARM: dts: r8a7791: Adjust SMP routine size
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This patch adjusts the definition of the SMP routine size according
to the latest changes made by commit:
"ARM: shmobile: Add watchdog support"

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* increased size to 0x100

 arch/arm/boot/dts/r8a7791.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index dc65935..d2a4546 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -407,7 +407,7 @@
 
 			smp-sram@0 {
 				compatible = "renesas,smp-sram";
-				reg = <0 0x10>;
+				reg = <0 0x100>;
 			};
 		};
 
-- 
2.7.4


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

* [RFC v3 05/25] ARM: dts: r8a7791: Adjust SMP routine size
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adjusts the definition of the SMP routine size according
to the latest changes made by commit:
"ARM: shmobile: Add watchdog support"

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* increased size to 0x100

 arch/arm/boot/dts/r8a7791.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index dc65935..d2a4546 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -407,7 +407,7 @@
 
 			smp-sram at 0 {
 				compatible = "renesas,smp-sram";
-				reg = <0 0x10>;
+				reg = <0 0x100>;
 			};
 		};
 
-- 
2.7.4

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

* [RFC v3 06/25] ARM: dts: r8a7792: Adjust SMP routine size
  2018-01-30 20:22 ` Fabrizio Castro
@ 2018-01-30 20:22   ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This patch adjusts the definition of the SMP routine size according
to the latest changes made by commit:
"ARM: shmobile: Add watchdog support"

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* increased size to 0x100

 arch/arm/boot/dts/r8a7792.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/r8a7792.dtsi b/arch/arm/boot/dts/r8a7792.dtsi
index 268987f..bea0f12 100644
--- a/arch/arm/boot/dts/r8a7792.dtsi
+++ b/arch/arm/boot/dts/r8a7792.dtsi
@@ -341,7 +341,7 @@
 
 			smp-sram@0 {
 				compatible = "renesas,smp-sram";
-				reg = <0 0x10>;
+				reg = <0 0x100>;
 			};
 		};
 
-- 
2.7.4

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

* [RFC v3 06/25] ARM: dts: r8a7792: Adjust SMP routine size
@ 2018-01-30 20:22   ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adjusts the definition of the SMP routine size according
to the latest changes made by commit:
"ARM: shmobile: Add watchdog support"

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* increased size to 0x100

 arch/arm/boot/dts/r8a7792.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/r8a7792.dtsi b/arch/arm/boot/dts/r8a7792.dtsi
index 268987f..bea0f12 100644
--- a/arch/arm/boot/dts/r8a7792.dtsi
+++ b/arch/arm/boot/dts/r8a7792.dtsi
@@ -341,7 +341,7 @@
 
 			smp-sram at 0 {
 				compatible = "renesas,smp-sram";
-				reg = <0 0x10>;
+				reg = <0 0x100>;
 			};
 		};
 
-- 
2.7.4

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

* [RFC v3 07/25] ARM: dts: r8a7793: Adjust SMP routine size
  2018-01-30 20:22 ` Fabrizio Castro
  (?)
@ 2018-01-30 20:22     ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-clk-u79uwXL29TY76Z2rM5mHXA, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This patch adjusts the definition of the SMP routine size according
to the latest changes made by commit:
"ARM: shmobile: Add watchdog support"

Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
---
v1->v3:
* increased size to 0x100

 arch/arm/boot/dts/r8a7793.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/r8a7793.dtsi b/arch/arm/boot/dts/r8a7793.dtsi
index aa7d779..bde6969 100644
--- a/arch/arm/boot/dts/r8a7793.dtsi
+++ b/arch/arm/boot/dts/r8a7793.dtsi
@@ -392,7 +392,7 @@
 
 			smp-sram@0 {
 				compatible = "renesas,smp-sram";
-				reg = <0 0x10>;
+				reg = <0 0x100>;
 			};
 		};
 
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" 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] 120+ messages in thread

* [RFC v3 07/25] ARM: dts: r8a7793: Adjust SMP routine size
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This patch adjusts the definition of the SMP routine size according
to the latest changes made by commit:
"ARM: shmobile: Add watchdog support"

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* increased size to 0x100

 arch/arm/boot/dts/r8a7793.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/r8a7793.dtsi b/arch/arm/boot/dts/r8a7793.dtsi
index aa7d779..bde6969 100644
--- a/arch/arm/boot/dts/r8a7793.dtsi
+++ b/arch/arm/boot/dts/r8a7793.dtsi
@@ -392,7 +392,7 @@
 
 			smp-sram@0 {
 				compatible = "renesas,smp-sram";
-				reg = <0 0x10>;
+				reg = <0 0x100>;
 			};
 		};
 
-- 
2.7.4


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

* [RFC v3 07/25] ARM: dts: r8a7793: Adjust SMP routine size
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adjusts the definition of the SMP routine size according
to the latest changes made by commit:
"ARM: shmobile: Add watchdog support"

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* increased size to 0x100

 arch/arm/boot/dts/r8a7793.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/r8a7793.dtsi b/arch/arm/boot/dts/r8a7793.dtsi
index aa7d779..bde6969 100644
--- a/arch/arm/boot/dts/r8a7793.dtsi
+++ b/arch/arm/boot/dts/r8a7793.dtsi
@@ -392,7 +392,7 @@
 
 			smp-sram at 0 {
 				compatible = "renesas,smp-sram";
-				reg = <0 0x10>;
+				reg = <0 0x100>;
 			};
 		};
 
-- 
2.7.4

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

* [RFC v3 08/25] ARM: dts: r8a7794: Adjust SMP routine size
  2018-01-30 20:22 ` Fabrizio Castro
  (?)
@ 2018-01-30 20:22     ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-clk-u79uwXL29TY76Z2rM5mHXA, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This patch adjusts the definition of the SMP routine size according
to the latest changes made by commit:
"ARM: shmobile: Add watchdog support"

Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
---
v1->v3:
* increased size to 0x100

 arch/arm/boot/dts/r8a7794.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi
index d588efa..e47c5f4 100644
--- a/arch/arm/boot/dts/r8a7794.dtsi
+++ b/arch/arm/boot/dts/r8a7794.dtsi
@@ -348,7 +348,7 @@
 
 			smp-sram@0 {
 				compatible = "renesas,smp-sram";
-				reg = <0 0x10>;
+				reg = <0 0x100>;
 			};
 		};
 
-- 
2.7.4

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

* [RFC v3 08/25] ARM: dts: r8a7794: Adjust SMP routine size
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This patch adjusts the definition of the SMP routine size according
to the latest changes made by commit:
"ARM: shmobile: Add watchdog support"

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* increased size to 0x100

 arch/arm/boot/dts/r8a7794.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi
index d588efa..e47c5f4 100644
--- a/arch/arm/boot/dts/r8a7794.dtsi
+++ b/arch/arm/boot/dts/r8a7794.dtsi
@@ -348,7 +348,7 @@
 
 			smp-sram@0 {
 				compatible = "renesas,smp-sram";
-				reg = <0 0x10>;
+				reg = <0 0x100>;
 			};
 		};
 
-- 
2.7.4


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

* [RFC v3 08/25] ARM: dts: r8a7794: Adjust SMP routine size
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adjusts the definition of the SMP routine size according
to the latest changes made by commit:
"ARM: shmobile: Add watchdog support"

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* increased size to 0x100

 arch/arm/boot/dts/r8a7794.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi
index d588efa..e47c5f4 100644
--- a/arch/arm/boot/dts/r8a7794.dtsi
+++ b/arch/arm/boot/dts/r8a7794.dtsi
@@ -348,7 +348,7 @@
 
 			smp-sram at 0 {
 				compatible = "renesas,smp-sram";
-				reg = <0 0x10>;
+				reg = <0 0x100>;
 			};
 		};
 
-- 
2.7.4

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

* [RFC v3 09/25] soc: renesas: rcar-rst: Enable watchdog as reset trigger for Gen2
  2018-01-30 20:22 ` Fabrizio Castro
  (?)
@ 2018-01-30 20:22     ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-clk-u79uwXL29TY76Z2rM5mHXA, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This patch allows for platform specific quirks as some of the SoC need
further customization for the watchdog to work properly, like for R-Car
Gen2 and for RZ/G.

Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
---
v1->v3:
* gen2_configuration -> rcar_rst_enable_wdt_reset

 drivers/soc/renesas/rcar-rst.c | 35 +++++++++++++++++++++++++++++------
 1 file changed, 29 insertions(+), 6 deletions(-)

diff --git a/drivers/soc/renesas/rcar-rst.c b/drivers/soc/renesas/rcar-rst.c
index 3316b02..93febe6 100644
--- a/drivers/soc/renesas/rcar-rst.c
+++ b/drivers/soc/renesas/rcar-rst.c
@@ -13,8 +13,18 @@
 #include <linux/of_address.h>
 #include <linux/soc/renesas/rcar-rst.h>
 
+#define WDTRSTCR_RESET		0xA55A0002
+#define WDTRSTCR		0x0054
+
+static int rcar_rst_enable_wdt_reset(void __iomem *base)
+{
+	iowrite32(WDTRSTCR_RESET, base + WDTRSTCR);
+	return 0;
+}
+
 struct rst_config {
-	unsigned int modemr;	/* Mode Monitoring Register Offset */
+	unsigned int modemr;		/* Mode Monitoring Register Offset */
+	int (*configure)(void *base);	/* Platform specific configuration */
 };
 
 static const struct rst_config rcar_rst_gen1 __initconst = {
@@ -23,6 +33,11 @@ static const struct rst_config rcar_rst_gen1 __initconst = {
 
 static const struct rst_config rcar_rst_gen2 __initconst = {
 	.modemr = 0x60,
+	.configure = rcar_rst_enable_wdt_reset,
+};
+
+static const struct rst_config rcar_rst_gen3 __initconst = {
+	.modemr = 0x60,
 };
 
 static const struct of_device_id rcar_rst_matches[] __initconst = {
@@ -38,11 +53,11 @@ static const struct of_device_id rcar_rst_matches[] __initconst = {
 	{ .compatible = "renesas,r8a7792-rst", .data = &rcar_rst_gen2 },
 	{ .compatible = "renesas,r8a7793-rst", .data = &rcar_rst_gen2 },
 	{ .compatible = "renesas,r8a7794-rst", .data = &rcar_rst_gen2 },
-	/* R-Car Gen3 is handled like R-Car Gen2 */
-	{ .compatible = "renesas,r8a7795-rst", .data = &rcar_rst_gen2 },
-	{ .compatible = "renesas,r8a7796-rst", .data = &rcar_rst_gen2 },
-	{ .compatible = "renesas,r8a77970-rst", .data = &rcar_rst_gen2 },
-	{ .compatible = "renesas,r8a77995-rst", .data = &rcar_rst_gen2 },
+	/* R-Car Gen3 */
+	{ .compatible = "renesas,r8a7795-rst", .data = &rcar_rst_gen3 },
+	{ .compatible = "renesas,r8a7796-rst", .data = &rcar_rst_gen3 },
+	{ .compatible = "renesas,r8a77970-rst", .data = &rcar_rst_gen3 },
+	{ .compatible = "renesas,r8a77995-rst", .data = &rcar_rst_gen3 },
 	{ /* sentinel */ }
 };
 
@@ -71,6 +86,14 @@ static int __init rcar_rst_init(void)
 	rcar_rst_base = base;
 	cfg = match->data;
 	saved_mode = ioread32(base + cfg->modemr);
+	if (cfg->configure) {
+		error = cfg->configure(base);
+		if (error) {
+			pr_warn("%pOF: Cannot run SoC specific configuration\n",
+				np);
+			goto out_put;
+		}
+	}
 
 	pr_debug("%pOF: MODE = 0x%08x\n", np, saved_mode);
 
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" 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] 120+ messages in thread

* [RFC v3 09/25] soc: renesas: rcar-rst: Enable watchdog as reset trigger for Gen2
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This patch allows for platform specific quirks as some of the SoC need
further customization for the watchdog to work properly, like for R-Car
Gen2 and for RZ/G.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* gen2_configuration -> rcar_rst_enable_wdt_reset

 drivers/soc/renesas/rcar-rst.c | 35 +++++++++++++++++++++++++++++------
 1 file changed, 29 insertions(+), 6 deletions(-)

diff --git a/drivers/soc/renesas/rcar-rst.c b/drivers/soc/renesas/rcar-rst.c
index 3316b02..93febe6 100644
--- a/drivers/soc/renesas/rcar-rst.c
+++ b/drivers/soc/renesas/rcar-rst.c
@@ -13,8 +13,18 @@
 #include <linux/of_address.h>
 #include <linux/soc/renesas/rcar-rst.h>
 
+#define WDTRSTCR_RESET		0xA55A0002
+#define WDTRSTCR		0x0054
+
+static int rcar_rst_enable_wdt_reset(void __iomem *base)
+{
+	iowrite32(WDTRSTCR_RESET, base + WDTRSTCR);
+	return 0;
+}
+
 struct rst_config {
-	unsigned int modemr;	/* Mode Monitoring Register Offset */
+	unsigned int modemr;		/* Mode Monitoring Register Offset */
+	int (*configure)(void *base);	/* Platform specific configuration */
 };
 
 static const struct rst_config rcar_rst_gen1 __initconst = {
@@ -23,6 +33,11 @@ static const struct rst_config rcar_rst_gen1 __initconst = {
 
 static const struct rst_config rcar_rst_gen2 __initconst = {
 	.modemr = 0x60,
+	.configure = rcar_rst_enable_wdt_reset,
+};
+
+static const struct rst_config rcar_rst_gen3 __initconst = {
+	.modemr = 0x60,
 };
 
 static const struct of_device_id rcar_rst_matches[] __initconst = {
@@ -38,11 +53,11 @@ static const struct of_device_id rcar_rst_matches[] __initconst = {
 	{ .compatible = "renesas,r8a7792-rst", .data = &rcar_rst_gen2 },
 	{ .compatible = "renesas,r8a7793-rst", .data = &rcar_rst_gen2 },
 	{ .compatible = "renesas,r8a7794-rst", .data = &rcar_rst_gen2 },
-	/* R-Car Gen3 is handled like R-Car Gen2 */
-	{ .compatible = "renesas,r8a7795-rst", .data = &rcar_rst_gen2 },
-	{ .compatible = "renesas,r8a7796-rst", .data = &rcar_rst_gen2 },
-	{ .compatible = "renesas,r8a77970-rst", .data = &rcar_rst_gen2 },
-	{ .compatible = "renesas,r8a77995-rst", .data = &rcar_rst_gen2 },
+	/* R-Car Gen3 */
+	{ .compatible = "renesas,r8a7795-rst", .data = &rcar_rst_gen3 },
+	{ .compatible = "renesas,r8a7796-rst", .data = &rcar_rst_gen3 },
+	{ .compatible = "renesas,r8a77970-rst", .data = &rcar_rst_gen3 },
+	{ .compatible = "renesas,r8a77995-rst", .data = &rcar_rst_gen3 },
 	{ /* sentinel */ }
 };
 
@@ -71,6 +86,14 @@ static int __init rcar_rst_init(void)
 	rcar_rst_base = base;
 	cfg = match->data;
 	saved_mode = ioread32(base + cfg->modemr);
+	if (cfg->configure) {
+		error = cfg->configure(base);
+		if (error) {
+			pr_warn("%pOF: Cannot run SoC specific configuration\n",
+				np);
+			goto out_put;
+		}
+	}
 
 	pr_debug("%pOF: MODE = 0x%08x\n", np, saved_mode);
 
-- 
2.7.4


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

* [RFC v3 09/25] soc: renesas: rcar-rst: Enable watchdog as reset trigger for Gen2
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

This patch allows for platform specific quirks as some of the SoC need
further customization for the watchdog to work properly, like for R-Car
Gen2 and for RZ/G.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* gen2_configuration -> rcar_rst_enable_wdt_reset

 drivers/soc/renesas/rcar-rst.c | 35 +++++++++++++++++++++++++++++------
 1 file changed, 29 insertions(+), 6 deletions(-)

diff --git a/drivers/soc/renesas/rcar-rst.c b/drivers/soc/renesas/rcar-rst.c
index 3316b02..93febe6 100644
--- a/drivers/soc/renesas/rcar-rst.c
+++ b/drivers/soc/renesas/rcar-rst.c
@@ -13,8 +13,18 @@
 #include <linux/of_address.h>
 #include <linux/soc/renesas/rcar-rst.h>
 
+#define WDTRSTCR_RESET		0xA55A0002
+#define WDTRSTCR		0x0054
+
+static int rcar_rst_enable_wdt_reset(void __iomem *base)
+{
+	iowrite32(WDTRSTCR_RESET, base + WDTRSTCR);
+	return 0;
+}
+
 struct rst_config {
-	unsigned int modemr;	/* Mode Monitoring Register Offset */
+	unsigned int modemr;		/* Mode Monitoring Register Offset */
+	int (*configure)(void *base);	/* Platform specific configuration */
 };
 
 static const struct rst_config rcar_rst_gen1 __initconst = {
@@ -23,6 +33,11 @@ static const struct rst_config rcar_rst_gen1 __initconst = {
 
 static const struct rst_config rcar_rst_gen2 __initconst = {
 	.modemr = 0x60,
+	.configure = rcar_rst_enable_wdt_reset,
+};
+
+static const struct rst_config rcar_rst_gen3 __initconst = {
+	.modemr = 0x60,
 };
 
 static const struct of_device_id rcar_rst_matches[] __initconst = {
@@ -38,11 +53,11 @@ static const struct of_device_id rcar_rst_matches[] __initconst = {
 	{ .compatible = "renesas,r8a7792-rst", .data = &rcar_rst_gen2 },
 	{ .compatible = "renesas,r8a7793-rst", .data = &rcar_rst_gen2 },
 	{ .compatible = "renesas,r8a7794-rst", .data = &rcar_rst_gen2 },
-	/* R-Car Gen3 is handled like R-Car Gen2 */
-	{ .compatible = "renesas,r8a7795-rst", .data = &rcar_rst_gen2 },
-	{ .compatible = "renesas,r8a7796-rst", .data = &rcar_rst_gen2 },
-	{ .compatible = "renesas,r8a77970-rst", .data = &rcar_rst_gen2 },
-	{ .compatible = "renesas,r8a77995-rst", .data = &rcar_rst_gen2 },
+	/* R-Car Gen3 */
+	{ .compatible = "renesas,r8a7795-rst", .data = &rcar_rst_gen3 },
+	{ .compatible = "renesas,r8a7796-rst", .data = &rcar_rst_gen3 },
+	{ .compatible = "renesas,r8a77970-rst", .data = &rcar_rst_gen3 },
+	{ .compatible = "renesas,r8a77995-rst", .data = &rcar_rst_gen3 },
 	{ /* sentinel */ }
 };
 
@@ -71,6 +86,14 @@ static int __init rcar_rst_init(void)
 	rcar_rst_base = base;
 	cfg = match->data;
 	saved_mode = ioread32(base + cfg->modemr);
+	if (cfg->configure) {
+		error = cfg->configure(base);
+		if (error) {
+			pr_warn("%pOF: Cannot run SoC specific configuration\n",
+				np);
+			goto out_put;
+		}
+	}
 
 	pr_debug("%pOF: MODE = 0x%08x\n", np, saved_mode);
 
-- 
2.7.4

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

* [RFC v3 10/25] dt-bindings: watchdog: renesas-wdt: Add R-Car Gen2 support
  2018-01-30 20:22 ` Fabrizio Castro
  (?)
@ 2018-01-30 20:22     ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-clk-u79uwXL29TY76Z2rM5mHXA, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This commit documents the compatibility with R-Car Gen2 and RZ/G
devices by defining the generic compatible string "renesas,rcar-gen2-wdt".
Also, this patch expands the list of SoC-specific compatible strings to
include RZ/G and R-Car Gen2 devices.

Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
---
v1->v3:
* made description less generic and added compatible strings for r8a779[0-4]

 .../devicetree/bindings/watchdog/renesas-wdt.txt       | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt b/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
index bf6d1ca..a983a74 100644
--- a/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
@@ -1,17 +1,25 @@
 Renesas Watchdog Timer (WDT) Controller
 
 Required properties:
-- compatible : Should be "renesas,<soctype>-wdt", and
-	       "renesas,rcar-gen3-wdt" or "renesas,rza-wdt" as fallback.
+ - compatible : Must be "renesas,<soctype>-wdt", followed by a generic
+		fallback compatible string when compatible with the generic
+		version.
 	       Examples with soctypes are:
+		 - "renesas,r8a7743-wdt" (RZ/G1M)
+		 - "renesas,r8a7745-wdt" (RZ/G1E)
+	         - "renesas,r8a7790-wdt" (R-Car H2)
+	         - "renesas,r8a7791-wdt" (R-Car M2-W)
+	         - "renesas,r8a7792-wdt" (R-Car V2H)
+	         - "renesas,r8a7793-wdt" (R-Car M2-N)
+	         - "renesas,r8a7794-wdt" (R-Car E2)
 	         - "renesas,r8a7795-wdt" (R-Car H3)
 	         - "renesas,r8a7796-wdt" (R-Car M3-W)
 	         - "renesas,r8a77995-wdt" (R-Car D3)
 	         - "renesas,r7s72100-wdt" (RZ/A1)
+		The generic compatible string must be:
+		 - "renesas,rcar-gen2-wdt" for R-Car Gen2 and RZ/G
+		 - "renesas,rcar-gen3-wdt" for R-Car Gen3
 
-  When compatible with the generic version, nodes must list the SoC-specific
-  version corresponding to the platform first, followed by the generic
-  version.
 
 - reg : Should contain WDT registers location and length
 - clocks : the clock feeding the watchdog timer.
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" 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] 120+ messages in thread

* [RFC v3 10/25] dt-bindings: watchdog: renesas-wdt: Add R-Car Gen2 support
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This commit documents the compatibility with R-Car Gen2 and RZ/G
devices by defining the generic compatible string "renesas,rcar-gen2-wdt".
Also, this patch expands the list of SoC-specific compatible strings to
include RZ/G and R-Car Gen2 devices.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* made description less generic and added compatible strings for r8a779[0-4]

 .../devicetree/bindings/watchdog/renesas-wdt.txt       | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt b/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
index bf6d1ca..a983a74 100644
--- a/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
@@ -1,17 +1,25 @@
 Renesas Watchdog Timer (WDT) Controller
 
 Required properties:
-- compatible : Should be "renesas,<soctype>-wdt", and
-	       "renesas,rcar-gen3-wdt" or "renesas,rza-wdt" as fallback.
+ - compatible : Must be "renesas,<soctype>-wdt", followed by a generic
+		fallback compatible string when compatible with the generic
+		version.
 	       Examples with soctypes are:
+		 - "renesas,r8a7743-wdt" (RZ/G1M)
+		 - "renesas,r8a7745-wdt" (RZ/G1E)
+	         - "renesas,r8a7790-wdt" (R-Car H2)
+	         - "renesas,r8a7791-wdt" (R-Car M2-W)
+	         - "renesas,r8a7792-wdt" (R-Car V2H)
+	         - "renesas,r8a7793-wdt" (R-Car M2-N)
+	         - "renesas,r8a7794-wdt" (R-Car E2)
 	         - "renesas,r8a7795-wdt" (R-Car H3)
 	         - "renesas,r8a7796-wdt" (R-Car M3-W)
 	         - "renesas,r8a77995-wdt" (R-Car D3)
 	         - "renesas,r7s72100-wdt" (RZ/A1)
+		The generic compatible string must be:
+		 - "renesas,rcar-gen2-wdt" for R-Car Gen2 and RZ/G
+		 - "renesas,rcar-gen3-wdt" for R-Car Gen3
 
-  When compatible with the generic version, nodes must list the SoC-specific
-  version corresponding to the platform first, followed by the generic
-  version.
 
 - reg : Should contain WDT registers location and length
 - clocks : the clock feeding the watchdog timer.
-- 
2.7.4


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

* [RFC v3 10/25] dt-bindings: watchdog: renesas-wdt: Add R-Car Gen2 support
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

This commit documents the compatibility with R-Car Gen2 and RZ/G
devices by defining the generic compatible string "renesas,rcar-gen2-wdt".
Also, this patch expands the list of SoC-specific compatible strings to
include RZ/G and R-Car Gen2 devices.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* made description less generic and added compatible strings for r8a779[0-4]

 .../devicetree/bindings/watchdog/renesas-wdt.txt       | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt b/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
index bf6d1ca..a983a74 100644
--- a/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
@@ -1,17 +1,25 @@
 Renesas Watchdog Timer (WDT) Controller
 
 Required properties:
-- compatible : Should be "renesas,<soctype>-wdt", and
-	       "renesas,rcar-gen3-wdt" or "renesas,rza-wdt" as fallback.
+ - compatible : Must be "renesas,<soctype>-wdt", followed by a generic
+		fallback compatible string when compatible with the generic
+		version.
 	       Examples with soctypes are:
+		 - "renesas,r8a7743-wdt" (RZ/G1M)
+		 - "renesas,r8a7745-wdt" (RZ/G1E)
+	         - "renesas,r8a7790-wdt" (R-Car H2)
+	         - "renesas,r8a7791-wdt" (R-Car M2-W)
+	         - "renesas,r8a7792-wdt" (R-Car V2H)
+	         - "renesas,r8a7793-wdt" (R-Car M2-N)
+	         - "renesas,r8a7794-wdt" (R-Car E2)
 	         - "renesas,r8a7795-wdt" (R-Car H3)
 	         - "renesas,r8a7796-wdt" (R-Car M3-W)
 	         - "renesas,r8a77995-wdt" (R-Car D3)
 	         - "renesas,r7s72100-wdt" (RZ/A1)
+		The generic compatible string must be:
+		 - "renesas,rcar-gen2-wdt" for R-Car Gen2 and RZ/G
+		 - "renesas,rcar-gen3-wdt" for R-Car Gen3
 
-  When compatible with the generic version, nodes must list the SoC-specific
-  version corresponding to the platform first, followed by the generic
-  version.
 
 - reg : Should contain WDT registers location and length
 - clocks : the clock feeding the watchdog timer.
-- 
2.7.4

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

* [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
  2018-01-30 20:22 ` Fabrizio Castro
  (?)
@ 2018-01-30 20:22     ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-clk-u79uwXL29TY76Z2rM5mHXA, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
when suspending to RAM we need to explicitly disable the counting by
clearing TME from RWTCSRA.
Also, on some systems RWDT is the only piece of HW that allows the SoC
to be restarted, therefore this patch implements the restart callback.

Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
---
Wolfram, was the restart callback implementation missing for a reason?
Is its implementation going to break any Gen3 platform?

v1->v3:
* unified Gen2 and Gen3 drivers.

 drivers/watchdog/renesas_wdt.c | 61 ++++++++++++++++++++++++++++++++++++++----
 1 file changed, 56 insertions(+), 5 deletions(-)

diff --git a/drivers/watchdog/renesas_wdt.c b/drivers/watchdog/renesas_wdt.c
index 831ef83..eedb016 100644
--- a/drivers/watchdog/renesas_wdt.c
+++ b/drivers/watchdog/renesas_wdt.c
@@ -107,6 +107,24 @@ static unsigned int rwdt_get_timeleft(struct watchdog_device *wdev)
 	return DIV_BY_CLKS_PER_SEC(priv, 65536 - val);
 }
 
+static int rwdt_restart(struct watchdog_device *wdev, unsigned long action,
+			void *data)
+{
+	struct rwdt_priv *priv = watchdog_get_drvdata(wdev);
+
+	pm_runtime_get_sync(wdev->parent);
+
+	rwdt_write(priv, 0x00, RWTCSRB);
+	rwdt_write(priv, 0x00, RWTCSRA);
+	rwdt_write(priv, 0xffff, RWTCNT);
+
+	while (readb_relaxed(priv->base + RWTCSRA) & RWTCSRA_WRFLG)
+		cpu_relax();
+
+	rwdt_write(priv, 0x80, RWTCSRA);
+	return 0;
+}
+
 static const struct watchdog_info rwdt_ident = {
 	.options = WDIOF_MAGICCLOSE | WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT,
 	.identity = "Renesas WDT Watchdog",
@@ -118,6 +136,7 @@ static const struct watchdog_ops rwdt_ops = {
 	.stop = rwdt_stop,
 	.ping = rwdt_init_timeout,
 	.get_timeleft = rwdt_get_timeleft,
+	.restart = rwdt_restart,
 };
 
 static int rwdt_probe(struct platform_device *pdev)
@@ -203,13 +222,42 @@ static int rwdt_remove(struct platform_device *pdev)
 	return 0;
 }
 
-/*
- * This driver does also fit for R-Car Gen2 (r8a779[0-4]) WDT. However, for SMP
- * to work there, one also needs a RESET (RST) driver which does not exist yet
- * due to HW issues. This needs to be solved before adding compatibles here.
- */
+#ifdef CONFIG_PM
+static int rwdt_suspend(struct device *dev)
+{
+	struct platform_device *pdev;
+	struct rwdt_priv *priv;
+
+	pdev = to_platform_device(dev);
+	priv = platform_get_drvdata(pdev);
+	if (watchdog_active(&priv->wdev)) {
+		rwdt_write(priv, priv->cks, RWTCSRA);
+	}
+	return 0;
+}
+
+static int rwdt_resume(struct device *dev)
+{
+	struct platform_device *pdev;
+	struct rwdt_priv *priv;
+
+	pdev = to_platform_device(dev);
+	priv = platform_get_drvdata(pdev);
+	if (watchdog_active(&priv->wdev)) {
+		rwdt_write(priv, priv->cks | RWTCSRA_TME, RWTCSRA);
+	}
+	return 0;
+}
+
+static const struct dev_pm_ops rwdt_pm = {
+	.suspend = rwdt_suspend,
+	.resume = rwdt_resume,
+};
+#endif
+
 static const struct of_device_id rwdt_ids[] = {
 	{ .compatible = "renesas,rcar-gen3-wdt", },
+	{ .compatible = "renesas,rcar-gen2-wdt", },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, rwdt_ids);
@@ -218,6 +266,9 @@ static struct platform_driver rwdt_driver = {
 	.driver = {
 		.name = "renesas_wdt",
 		.of_match_table = rwdt_ids,
+#ifdef CONFIG_PM
+		.pm = &rwdt_pm,
+#endif
 	},
 	.probe = rwdt_probe,
 	.remove = rwdt_remove,
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" 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] 120+ messages in thread

* [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
when suspending to RAM we need to explicitly disable the counting by
clearing TME from RWTCSRA.
Also, on some systems RWDT is the only piece of HW that allows the SoC
to be restarted, therefore this patch implements the restart callback.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
Wolfram, was the restart callback implementation missing for a reason?
Is its implementation going to break any Gen3 platform?

v1->v3:
* unified Gen2 and Gen3 drivers.

 drivers/watchdog/renesas_wdt.c | 61 ++++++++++++++++++++++++++++++++++++++----
 1 file changed, 56 insertions(+), 5 deletions(-)

diff --git a/drivers/watchdog/renesas_wdt.c b/drivers/watchdog/renesas_wdt.c
index 831ef83..eedb016 100644
--- a/drivers/watchdog/renesas_wdt.c
+++ b/drivers/watchdog/renesas_wdt.c
@@ -107,6 +107,24 @@ static unsigned int rwdt_get_timeleft(struct watchdog_device *wdev)
 	return DIV_BY_CLKS_PER_SEC(priv, 65536 - val);
 }
 
+static int rwdt_restart(struct watchdog_device *wdev, unsigned long action,
+			void *data)
+{
+	struct rwdt_priv *priv = watchdog_get_drvdata(wdev);
+
+	pm_runtime_get_sync(wdev->parent);
+
+	rwdt_write(priv, 0x00, RWTCSRB);
+	rwdt_write(priv, 0x00, RWTCSRA);
+	rwdt_write(priv, 0xffff, RWTCNT);
+
+	while (readb_relaxed(priv->base + RWTCSRA) & RWTCSRA_WRFLG)
+		cpu_relax();
+
+	rwdt_write(priv, 0x80, RWTCSRA);
+	return 0;
+}
+
 static const struct watchdog_info rwdt_ident = {
 	.options = WDIOF_MAGICCLOSE | WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT,
 	.identity = "Renesas WDT Watchdog",
@@ -118,6 +136,7 @@ static const struct watchdog_ops rwdt_ops = {
 	.stop = rwdt_stop,
 	.ping = rwdt_init_timeout,
 	.get_timeleft = rwdt_get_timeleft,
+	.restart = rwdt_restart,
 };
 
 static int rwdt_probe(struct platform_device *pdev)
@@ -203,13 +222,42 @@ static int rwdt_remove(struct platform_device *pdev)
 	return 0;
 }
 
-/*
- * This driver does also fit for R-Car Gen2 (r8a779[0-4]) WDT. However, for SMP
- * to work there, one also needs a RESET (RST) driver which does not exist yet
- * due to HW issues. This needs to be solved before adding compatibles here.
- */
+#ifdef CONFIG_PM
+static int rwdt_suspend(struct device *dev)
+{
+	struct platform_device *pdev;
+	struct rwdt_priv *priv;
+
+	pdev = to_platform_device(dev);
+	priv = platform_get_drvdata(pdev);
+	if (watchdog_active(&priv->wdev)) {
+		rwdt_write(priv, priv->cks, RWTCSRA);
+	}
+	return 0;
+}
+
+static int rwdt_resume(struct device *dev)
+{
+	struct platform_device *pdev;
+	struct rwdt_priv *priv;
+
+	pdev = to_platform_device(dev);
+	priv = platform_get_drvdata(pdev);
+	if (watchdog_active(&priv->wdev)) {
+		rwdt_write(priv, priv->cks | RWTCSRA_TME, RWTCSRA);
+	}
+	return 0;
+}
+
+static const struct dev_pm_ops rwdt_pm = {
+	.suspend = rwdt_suspend,
+	.resume = rwdt_resume,
+};
+#endif
+
 static const struct of_device_id rwdt_ids[] = {
 	{ .compatible = "renesas,rcar-gen3-wdt", },
+	{ .compatible = "renesas,rcar-gen2-wdt", },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, rwdt_ids);
@@ -218,6 +266,9 @@ static struct platform_driver rwdt_driver = {
 	.driver = {
 		.name = "renesas_wdt",
 		.of_match_table = rwdt_ids,
+#ifdef CONFIG_PM
+		.pm = &rwdt_pm,
+#endif
 	},
 	.probe = rwdt_probe,
 	.remove = rwdt_remove,
-- 
2.7.4


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

* [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
when suspending to RAM we need to explicitly disable the counting by
clearing TME from RWTCSRA.
Also, on some systems RWDT is the only piece of HW that allows the SoC
to be restarted, therefore this patch implements the restart callback.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
Wolfram, was the restart callback implementation missing for a reason?
Is its implementation going to break any Gen3 platform?

v1->v3:
* unified Gen2 and Gen3 drivers.

 drivers/watchdog/renesas_wdt.c | 61 ++++++++++++++++++++++++++++++++++++++----
 1 file changed, 56 insertions(+), 5 deletions(-)

diff --git a/drivers/watchdog/renesas_wdt.c b/drivers/watchdog/renesas_wdt.c
index 831ef83..eedb016 100644
--- a/drivers/watchdog/renesas_wdt.c
+++ b/drivers/watchdog/renesas_wdt.c
@@ -107,6 +107,24 @@ static unsigned int rwdt_get_timeleft(struct watchdog_device *wdev)
 	return DIV_BY_CLKS_PER_SEC(priv, 65536 - val);
 }
 
+static int rwdt_restart(struct watchdog_device *wdev, unsigned long action,
+			void *data)
+{
+	struct rwdt_priv *priv = watchdog_get_drvdata(wdev);
+
+	pm_runtime_get_sync(wdev->parent);
+
+	rwdt_write(priv, 0x00, RWTCSRB);
+	rwdt_write(priv, 0x00, RWTCSRA);
+	rwdt_write(priv, 0xffff, RWTCNT);
+
+	while (readb_relaxed(priv->base + RWTCSRA) & RWTCSRA_WRFLG)
+		cpu_relax();
+
+	rwdt_write(priv, 0x80, RWTCSRA);
+	return 0;
+}
+
 static const struct watchdog_info rwdt_ident = {
 	.options = WDIOF_MAGICCLOSE | WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT,
 	.identity = "Renesas WDT Watchdog",
@@ -118,6 +136,7 @@ static const struct watchdog_ops rwdt_ops = {
 	.stop = rwdt_stop,
 	.ping = rwdt_init_timeout,
 	.get_timeleft = rwdt_get_timeleft,
+	.restart = rwdt_restart,
 };
 
 static int rwdt_probe(struct platform_device *pdev)
@@ -203,13 +222,42 @@ static int rwdt_remove(struct platform_device *pdev)
 	return 0;
 }
 
-/*
- * This driver does also fit for R-Car Gen2 (r8a779[0-4]) WDT. However, for SMP
- * to work there, one also needs a RESET (RST) driver which does not exist yet
- * due to HW issues. This needs to be solved before adding compatibles here.
- */
+#ifdef CONFIG_PM
+static int rwdt_suspend(struct device *dev)
+{
+	struct platform_device *pdev;
+	struct rwdt_priv *priv;
+
+	pdev = to_platform_device(dev);
+	priv = platform_get_drvdata(pdev);
+	if (watchdog_active(&priv->wdev)) {
+		rwdt_write(priv, priv->cks, RWTCSRA);
+	}
+	return 0;
+}
+
+static int rwdt_resume(struct device *dev)
+{
+	struct platform_device *pdev;
+	struct rwdt_priv *priv;
+
+	pdev = to_platform_device(dev);
+	priv = platform_get_drvdata(pdev);
+	if (watchdog_active(&priv->wdev)) {
+		rwdt_write(priv, priv->cks | RWTCSRA_TME, RWTCSRA);
+	}
+	return 0;
+}
+
+static const struct dev_pm_ops rwdt_pm = {
+	.suspend = rwdt_suspend,
+	.resume = rwdt_resume,
+};
+#endif
+
 static const struct of_device_id rwdt_ids[] = {
 	{ .compatible = "renesas,rcar-gen3-wdt", },
+	{ .compatible = "renesas,rcar-gen2-wdt", },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, rwdt_ids);
@@ -218,6 +266,9 @@ static struct platform_driver rwdt_driver = {
 	.driver = {
 		.name = "renesas_wdt",
 		.of_match_table = rwdt_ids,
+#ifdef CONFIG_PM
+		.pm = &rwdt_pm,
+#endif
 	},
 	.probe = rwdt_probe,
 	.remove = rwdt_remove,
-- 
2.7.4

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

* [RFC v3 12/25] ARM: shmobile: rcar-gen2: Add watchdog support
  2018-01-30 20:22 ` Fabrizio Castro
@ 2018-01-30 20:22   ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This patch adds watchdog support by installing shmobile_boot_vector_gen2
to ICRAM1 when enough memory is available, in which case we also keep a
copy of MPIDR to complete the reset vector logic.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v2->v3:
* purge shmobile_wdt_clock status and save mpidr of boot cpu

v1->v2:
* make the reset vector backward compatible

 arch/arm/mach-shmobile/platsmp-apmu.c |  1 +
 arch/arm/mach-shmobile/pm-rcar-gen2.c | 13 ++++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c
index 4422b61..ba732ef 100644
--- a/arch/arm/mach-shmobile/platsmp-apmu.c
+++ b/arch/arm/mach-shmobile/platsmp-apmu.c
@@ -191,6 +191,7 @@ static void __init shmobile_smp_apmu_setup_boot(void)
 {
 	/* install boot code shared by all CPUs */
 	shmobile_boot_fn = __pa_symbol(shmobile_smp_boot);
+	shmobile_boot_fn_gen2 = shmobile_boot_fn;
 }
 
 void __init shmobile_smp_apmu_prepare_cpus(unsigned int max_cpus,
diff --git a/arch/arm/mach-shmobile/pm-rcar-gen2.c b/arch/arm/mach-shmobile/pm-rcar-gen2.c
index e5f215c..bfad202 100644
--- a/arch/arm/mach-shmobile/pm-rcar-gen2.c
+++ b/arch/arm/mach-shmobile/pm-rcar-gen2.c
@@ -17,6 +17,7 @@
 #include <linux/smp.h>
 #include <linux/soc/renesas/rcar-sysc.h>
 #include <asm/io.h>
+#include <asm/cputype.h>
 #include "common.h"
 #include "rcar-gen2.h"
 
@@ -37,7 +38,6 @@
 #define CA7RESCNT_CODE	0x5a5a0000
 #define CA7RESCNT_CPUS	0xf		/* CPU0-3 */
 
-
 /* On-chip RAM */
 #define ICRAM1		0xe63c0000	/* Inter Connect RAM1 (4 KiB) */
 
@@ -119,8 +119,15 @@ void __init rcar_gen2_pm_init(void)
 	p = ioremap(res.start, resource_size(&res));
 	if (!p)
 		return;
-
-	memcpy_toio(p, shmobile_boot_vector, shmobile_boot_size);
+	/* install the reset vector, use the largest version if we have enough
+	 * memory available */
+	if (resource_size(&res) >= shmobile_boot_size_gen2) {
+		shmobile_boot_cpu_gen2 = read_cpuid_mpidr();
+		memcpy_toio(p, shmobile_boot_vector_gen2,
+			    shmobile_boot_size_gen2);
+	} else {
+		memcpy_toio(p, shmobile_boot_vector, shmobile_boot_size);
+	}
 	iounmap(p);
 
 	/* setup reset vectors */
-- 
2.7.4

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

* [RFC v3 12/25] ARM: shmobile: rcar-gen2: Add watchdog support
@ 2018-01-30 20:22   ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds watchdog support by installing shmobile_boot_vector_gen2
to ICRAM1 when enough memory is available, in which case we also keep a
copy of MPIDR to complete the reset vector logic.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v2->v3:
* purge shmobile_wdt_clock status and save mpidr of boot cpu

v1->v2:
* make the reset vector backward compatible

 arch/arm/mach-shmobile/platsmp-apmu.c |  1 +
 arch/arm/mach-shmobile/pm-rcar-gen2.c | 13 ++++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c
index 4422b61..ba732ef 100644
--- a/arch/arm/mach-shmobile/platsmp-apmu.c
+++ b/arch/arm/mach-shmobile/platsmp-apmu.c
@@ -191,6 +191,7 @@ static void __init shmobile_smp_apmu_setup_boot(void)
 {
 	/* install boot code shared by all CPUs */
 	shmobile_boot_fn = __pa_symbol(shmobile_smp_boot);
+	shmobile_boot_fn_gen2 = shmobile_boot_fn;
 }
 
 void __init shmobile_smp_apmu_prepare_cpus(unsigned int max_cpus,
diff --git a/arch/arm/mach-shmobile/pm-rcar-gen2.c b/arch/arm/mach-shmobile/pm-rcar-gen2.c
index e5f215c..bfad202 100644
--- a/arch/arm/mach-shmobile/pm-rcar-gen2.c
+++ b/arch/arm/mach-shmobile/pm-rcar-gen2.c
@@ -17,6 +17,7 @@
 #include <linux/smp.h>
 #include <linux/soc/renesas/rcar-sysc.h>
 #include <asm/io.h>
+#include <asm/cputype.h>
 #include "common.h"
 #include "rcar-gen2.h"
 
@@ -37,7 +38,6 @@
 #define CA7RESCNT_CODE	0x5a5a0000
 #define CA7RESCNT_CPUS	0xf		/* CPU0-3 */
 
-
 /* On-chip RAM */
 #define ICRAM1		0xe63c0000	/* Inter Connect RAM1 (4 KiB) */
 
@@ -119,8 +119,15 @@ void __init rcar_gen2_pm_init(void)
 	p = ioremap(res.start, resource_size(&res));
 	if (!p)
 		return;
-
-	memcpy_toio(p, shmobile_boot_vector, shmobile_boot_size);
+	/* install the reset vector, use the largest version if we have enough
+	 * memory available */
+	if (resource_size(&res) >= shmobile_boot_size_gen2) {
+		shmobile_boot_cpu_gen2 = read_cpuid_mpidr();
+		memcpy_toio(p, shmobile_boot_vector_gen2,
+			    shmobile_boot_size_gen2);
+	} else {
+		memcpy_toio(p, shmobile_boot_vector, shmobile_boot_size);
+	}
 	iounmap(p);
 
 	/* setup reset vectors */
-- 
2.7.4

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

* [RFC v3 13/25] ARM: shmobile: defconfig: Enable CONFIG_RENESAS_WDT
  2018-01-30 20:22 ` Fabrizio Castro
  (?)
@ 2018-01-30 20:22     ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-clk-u79uwXL29TY76Z2rM5mHXA, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

R-Car Gen2 and RZ/G1 platforms come with a watchdog IP, therefore enable
its driver by default.

Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
---
v1->v3:
* CONFIG_RENESAS_WDT_GEN2 -> CONFIG_RENESAS_WDT

 arch/arm/configs/shmobile_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
index 578434c..d5cdad8 100644
--- a/arch/arm/configs/shmobile_defconfig
+++ b/arch/arm/configs/shmobile_defconfig
@@ -132,6 +132,7 @@ CONFIG_CPU_THERMAL=y
 CONFIG_RCAR_THERMAL=y
 CONFIG_WATCHDOG=y
 CONFIG_DA9063_WATCHDOG=y
+CONFIG_RENESAS_WDT=y
 CONFIG_MFD_AS3711=y
 CONFIG_MFD_DA9063=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" 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] 120+ messages in thread

* [RFC v3 13/25] ARM: shmobile: defconfig: Enable CONFIG_RENESAS_WDT
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

R-Car Gen2 and RZ/G1 platforms come with a watchdog IP, therefore enable
its driver by default.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* CONFIG_RENESAS_WDT_GEN2 -> CONFIG_RENESAS_WDT

 arch/arm/configs/shmobile_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
index 578434c..d5cdad8 100644
--- a/arch/arm/configs/shmobile_defconfig
+++ b/arch/arm/configs/shmobile_defconfig
@@ -132,6 +132,7 @@ CONFIG_CPU_THERMAL=y
 CONFIG_RCAR_THERMAL=y
 CONFIG_WATCHDOG=y
 CONFIG_DA9063_WATCHDOG=y
+CONFIG_RENESAS_WDT=y
 CONFIG_MFD_AS3711=y
 CONFIG_MFD_DA9063=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
-- 
2.7.4


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

* [RFC v3 13/25] ARM: shmobile: defconfig: Enable CONFIG_RENESAS_WDT
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

R-Car Gen2 and RZ/G1 platforms come with a watchdog IP, therefore enable
its driver by default.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* CONFIG_RENESAS_WDT_GEN2 -> CONFIG_RENESAS_WDT

 arch/arm/configs/shmobile_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
index 578434c..d5cdad8 100644
--- a/arch/arm/configs/shmobile_defconfig
+++ b/arch/arm/configs/shmobile_defconfig
@@ -132,6 +132,7 @@ CONFIG_CPU_THERMAL=y
 CONFIG_RCAR_THERMAL=y
 CONFIG_WATCHDOG=y
 CONFIG_DA9063_WATCHDOG=y
+CONFIG_RENESAS_WDT=y
 CONFIG_MFD_AS3711=y
 CONFIG_MFD_DA9063=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
-- 
2.7.4

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

* [RFC v3 14/25] clk: renesas: r8a7743: Add rwdt clock
  2018-01-30 20:22 ` Fabrizio Castro
  (?)
@ 2018-01-30 20:22     ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-clk-u79uwXL29TY76Z2rM5mHXA, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

Add "rwdt" clock to r8a7743_mod_clks. Also, since we may need to access
the watchdog registers at any time, declare the clock as critical.

Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
---
v1->v3:
* no change

 drivers/clk/renesas/r8a7743-cpg-mssr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/renesas/r8a7743-cpg-mssr.c b/drivers/clk/renesas/r8a7743-cpg-mssr.c
index 6dc0b30..d3c8b1e 100644
--- a/drivers/clk/renesas/r8a7743-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7743-cpg-mssr.c
@@ -117,6 +117,7 @@ static const struct mssr_mod_clk r8a7743_mod_clks[] __initconst = {
 	DEF_MOD("cmt1",			 329,	R8A7743_CLK_R),
 	DEF_MOD("usbhs-dmac0",		 330,	R8A7743_CLK_HP),
 	DEF_MOD("usbhs-dmac1",		 331,	R8A7743_CLK_HP),
+	DEF_MOD("rwdt",			 402,	R8A7743_CLK_R),
 	DEF_MOD("irqc",			 407,	R8A7743_CLK_CP),
 	DEF_MOD("intc-sys",		 408,	R8A7743_CLK_ZS),
 	DEF_MOD("audio-dmac1",		 501,	R8A7743_CLK_HP),
@@ -195,6 +196,7 @@ static const struct mssr_mod_clk r8a7743_mod_clks[] __initconst = {
 };
 
 static const unsigned int r8a7743_crit_mod_clks[] __initconst = {
+	MOD_CLK_ID(402),	/* RWDT */
 	MOD_CLK_ID(408),	/* INTC-SYS (GIC) */
 };
 
-- 
2.7.4

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

* [RFC v3 14/25] clk: renesas: r8a7743: Add rwdt clock
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

Add "rwdt" clock to r8a7743_mod_clks. Also, since we may need to access
the watchdog registers at any time, declare the clock as critical.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* no change

 drivers/clk/renesas/r8a7743-cpg-mssr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/renesas/r8a7743-cpg-mssr.c b/drivers/clk/renesas/r8a7743-cpg-mssr.c
index 6dc0b30..d3c8b1e 100644
--- a/drivers/clk/renesas/r8a7743-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7743-cpg-mssr.c
@@ -117,6 +117,7 @@ static const struct mssr_mod_clk r8a7743_mod_clks[] __initconst = {
 	DEF_MOD("cmt1",			 329,	R8A7743_CLK_R),
 	DEF_MOD("usbhs-dmac0",		 330,	R8A7743_CLK_HP),
 	DEF_MOD("usbhs-dmac1",		 331,	R8A7743_CLK_HP),
+	DEF_MOD("rwdt",			 402,	R8A7743_CLK_R),
 	DEF_MOD("irqc",			 407,	R8A7743_CLK_CP),
 	DEF_MOD("intc-sys",		 408,	R8A7743_CLK_ZS),
 	DEF_MOD("audio-dmac1",		 501,	R8A7743_CLK_HP),
@@ -195,6 +196,7 @@ static const struct mssr_mod_clk r8a7743_mod_clks[] __initconst = {
 };
 
 static const unsigned int r8a7743_crit_mod_clks[] __initconst = {
+	MOD_CLK_ID(402),	/* RWDT */
 	MOD_CLK_ID(408),	/* INTC-SYS (GIC) */
 };
 
-- 
2.7.4


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

* [RFC v3 14/25] clk: renesas: r8a7743: Add rwdt clock
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

Add "rwdt" clock to r8a7743_mod_clks. Also, since we may need to access
the watchdog registers at any time, declare the clock as critical.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* no change

 drivers/clk/renesas/r8a7743-cpg-mssr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/renesas/r8a7743-cpg-mssr.c b/drivers/clk/renesas/r8a7743-cpg-mssr.c
index 6dc0b30..d3c8b1e 100644
--- a/drivers/clk/renesas/r8a7743-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7743-cpg-mssr.c
@@ -117,6 +117,7 @@ static const struct mssr_mod_clk r8a7743_mod_clks[] __initconst = {
 	DEF_MOD("cmt1",			 329,	R8A7743_CLK_R),
 	DEF_MOD("usbhs-dmac0",		 330,	R8A7743_CLK_HP),
 	DEF_MOD("usbhs-dmac1",		 331,	R8A7743_CLK_HP),
+	DEF_MOD("rwdt",			 402,	R8A7743_CLK_R),
 	DEF_MOD("irqc",			 407,	R8A7743_CLK_CP),
 	DEF_MOD("intc-sys",		 408,	R8A7743_CLK_ZS),
 	DEF_MOD("audio-dmac1",		 501,	R8A7743_CLK_HP),
@@ -195,6 +196,7 @@ static const struct mssr_mod_clk r8a7743_mod_clks[] __initconst = {
 };
 
 static const unsigned int r8a7743_crit_mod_clks[] __initconst = {
+	MOD_CLK_ID(402),	/* RWDT */
 	MOD_CLK_ID(408),	/* INTC-SYS (GIC) */
 };
 
-- 
2.7.4

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

* [RFC v3 15/25] clk: renesas: r8a7745: Add rwdt clock
  2018-01-30 20:22 ` Fabrizio Castro
  (?)
@ 2018-01-30 20:22     ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-clk-u79uwXL29TY76Z2rM5mHXA, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

Add "rwdt" clock to r8a7745_mod_clks. Also, since we may need to access
the watchdog registers at any time, declare the clock as critical.

Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
---
v1->v3:
* no change

 drivers/clk/renesas/r8a7745-cpg-mssr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/renesas/r8a7745-cpg-mssr.c b/drivers/clk/renesas/r8a7745-cpg-mssr.c
index 2859504..87f5a36 100644
--- a/drivers/clk/renesas/r8a7745-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7745-cpg-mssr.c
@@ -114,6 +114,7 @@ static const struct mssr_mod_clk r8a7745_mod_clks[] __initconst = {
 	DEF_MOD("cmt1",			 329,	R8A7745_CLK_R),
 	DEF_MOD("usbhs-dmac0",		 330,	R8A7745_CLK_HP),
 	DEF_MOD("usbhs-dmac1",		 331,	R8A7745_CLK_HP),
+	DEF_MOD("rwdt",			 402,	R8A7745_CLK_R),
 	DEF_MOD("irqc",			 407,	R8A7745_CLK_CP),
 	DEF_MOD("intc-sys",		 408,	R8A7745_CLK_ZS),
 	DEF_MOD("audio-dmac0",		 502,	R8A7745_CLK_HP),
@@ -180,6 +181,7 @@ static const struct mssr_mod_clk r8a7745_mod_clks[] __initconst = {
 };
 
 static const unsigned int r8a7745_crit_mod_clks[] __initconst = {
+	MOD_CLK_ID(402),	/* RWDT */
 	MOD_CLK_ID(408),	/* INTC-SYS (GIC) */
 };
 
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" 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] 120+ messages in thread

* [RFC v3 15/25] clk: renesas: r8a7745: Add rwdt clock
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

Add "rwdt" clock to r8a7745_mod_clks. Also, since we may need to access
the watchdog registers at any time, declare the clock as critical.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* no change

 drivers/clk/renesas/r8a7745-cpg-mssr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/renesas/r8a7745-cpg-mssr.c b/drivers/clk/renesas/r8a7745-cpg-mssr.c
index 2859504..87f5a36 100644
--- a/drivers/clk/renesas/r8a7745-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7745-cpg-mssr.c
@@ -114,6 +114,7 @@ static const struct mssr_mod_clk r8a7745_mod_clks[] __initconst = {
 	DEF_MOD("cmt1",			 329,	R8A7745_CLK_R),
 	DEF_MOD("usbhs-dmac0",		 330,	R8A7745_CLK_HP),
 	DEF_MOD("usbhs-dmac1",		 331,	R8A7745_CLK_HP),
+	DEF_MOD("rwdt",			 402,	R8A7745_CLK_R),
 	DEF_MOD("irqc",			 407,	R8A7745_CLK_CP),
 	DEF_MOD("intc-sys",		 408,	R8A7745_CLK_ZS),
 	DEF_MOD("audio-dmac0",		 502,	R8A7745_CLK_HP),
@@ -180,6 +181,7 @@ static const struct mssr_mod_clk r8a7745_mod_clks[] __initconst = {
 };
 
 static const unsigned int r8a7745_crit_mod_clks[] __initconst = {
+	MOD_CLK_ID(402),	/* RWDT */
 	MOD_CLK_ID(408),	/* INTC-SYS (GIC) */
 };
 
-- 
2.7.4


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

* [RFC v3 15/25] clk: renesas: r8a7745: Add rwdt clock
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

Add "rwdt" clock to r8a7745_mod_clks. Also, since we may need to access
the watchdog registers at any time, declare the clock as critical.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* no change

 drivers/clk/renesas/r8a7745-cpg-mssr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/renesas/r8a7745-cpg-mssr.c b/drivers/clk/renesas/r8a7745-cpg-mssr.c
index 2859504..87f5a36 100644
--- a/drivers/clk/renesas/r8a7745-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7745-cpg-mssr.c
@@ -114,6 +114,7 @@ static const struct mssr_mod_clk r8a7745_mod_clks[] __initconst = {
 	DEF_MOD("cmt1",			 329,	R8A7745_CLK_R),
 	DEF_MOD("usbhs-dmac0",		 330,	R8A7745_CLK_HP),
 	DEF_MOD("usbhs-dmac1",		 331,	R8A7745_CLK_HP),
+	DEF_MOD("rwdt",			 402,	R8A7745_CLK_R),
 	DEF_MOD("irqc",			 407,	R8A7745_CLK_CP),
 	DEF_MOD("intc-sys",		 408,	R8A7745_CLK_ZS),
 	DEF_MOD("audio-dmac0",		 502,	R8A7745_CLK_HP),
@@ -180,6 +181,7 @@ static const struct mssr_mod_clk r8a7745_mod_clks[] __initconst = {
 };
 
 static const unsigned int r8a7745_crit_mod_clks[] __initconst = {
+	MOD_CLK_ID(402),	/* RWDT */
 	MOD_CLK_ID(408),	/* INTC-SYS (GIC) */
 };
 
-- 
2.7.4

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

* [RFC v3 16/25] clk: renesas: r8a7790: Add rwdt clock
  2018-01-30 20:22 ` Fabrizio Castro
  (?)
@ 2018-01-30 20:22     ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-clk-u79uwXL29TY76Z2rM5mHXA, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

Add "rwdt" clock to r8a7790_mod_clks. Also, since we may need to access
the watchdog registers at any time, declare the clock as critical.

Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
---
v1->v3:
* no change

 drivers/clk/renesas/r8a7790-cpg-mssr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/renesas/r8a7790-cpg-mssr.c b/drivers/clk/renesas/r8a7790-cpg-mssr.c
index 46bb55b..f936cb7 100644
--- a/drivers/clk/renesas/r8a7790-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7790-cpg-mssr.c
@@ -140,6 +140,7 @@ static const struct mssr_mod_clk r8a7790_mod_clks[] __initconst = {
 	DEF_MOD("cmt1",			 329,	R8A7790_CLK_R),
 	DEF_MOD("usbhs-dmac0",		 330,	R8A7790_CLK_HP),
 	DEF_MOD("usbhs-dmac1",		 331,	R8A7790_CLK_HP),
+	DEF_MOD("rwdt",			 402,	R8A7790_CLK_R),
 	DEF_MOD("irqc",			 407,	R8A7790_CLK_CP),
 	DEF_MOD("intc-sys",		 408,	R8A7790_CLK_ZS),
 	DEF_MOD("audio-dmac1",		 501,	R8A7790_CLK_HP),
@@ -211,6 +212,7 @@ static const struct mssr_mod_clk r8a7790_mod_clks[] __initconst = {
 };
 
 static const unsigned int r8a7790_crit_mod_clks[] __initconst = {
+	MOD_CLK_ID(402),	/* RWDT */
 	MOD_CLK_ID(408),	/* INTC-SYS (GIC) */
 };
 
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" 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] 120+ messages in thread

* [RFC v3 16/25] clk: renesas: r8a7790: Add rwdt clock
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

Add "rwdt" clock to r8a7790_mod_clks. Also, since we may need to access
the watchdog registers at any time, declare the clock as critical.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* no change

 drivers/clk/renesas/r8a7790-cpg-mssr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/renesas/r8a7790-cpg-mssr.c b/drivers/clk/renesas/r8a7790-cpg-mssr.c
index 46bb55b..f936cb7 100644
--- a/drivers/clk/renesas/r8a7790-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7790-cpg-mssr.c
@@ -140,6 +140,7 @@ static const struct mssr_mod_clk r8a7790_mod_clks[] __initconst = {
 	DEF_MOD("cmt1",			 329,	R8A7790_CLK_R),
 	DEF_MOD("usbhs-dmac0",		 330,	R8A7790_CLK_HP),
 	DEF_MOD("usbhs-dmac1",		 331,	R8A7790_CLK_HP),
+	DEF_MOD("rwdt",			 402,	R8A7790_CLK_R),
 	DEF_MOD("irqc",			 407,	R8A7790_CLK_CP),
 	DEF_MOD("intc-sys",		 408,	R8A7790_CLK_ZS),
 	DEF_MOD("audio-dmac1",		 501,	R8A7790_CLK_HP),
@@ -211,6 +212,7 @@ static const struct mssr_mod_clk r8a7790_mod_clks[] __initconst = {
 };
 
 static const unsigned int r8a7790_crit_mod_clks[] __initconst = {
+	MOD_CLK_ID(402),	/* RWDT */
 	MOD_CLK_ID(408),	/* INTC-SYS (GIC) */
 };
 
-- 
2.7.4


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

* [RFC v3 16/25] clk: renesas: r8a7790: Add rwdt clock
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

Add "rwdt" clock to r8a7790_mod_clks. Also, since we may need to access
the watchdog registers at any time, declare the clock as critical.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* no change

 drivers/clk/renesas/r8a7790-cpg-mssr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/renesas/r8a7790-cpg-mssr.c b/drivers/clk/renesas/r8a7790-cpg-mssr.c
index 46bb55b..f936cb7 100644
--- a/drivers/clk/renesas/r8a7790-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7790-cpg-mssr.c
@@ -140,6 +140,7 @@ static const struct mssr_mod_clk r8a7790_mod_clks[] __initconst = {
 	DEF_MOD("cmt1",			 329,	R8A7790_CLK_R),
 	DEF_MOD("usbhs-dmac0",		 330,	R8A7790_CLK_HP),
 	DEF_MOD("usbhs-dmac1",		 331,	R8A7790_CLK_HP),
+	DEF_MOD("rwdt",			 402,	R8A7790_CLK_R),
 	DEF_MOD("irqc",			 407,	R8A7790_CLK_CP),
 	DEF_MOD("intc-sys",		 408,	R8A7790_CLK_ZS),
 	DEF_MOD("audio-dmac1",		 501,	R8A7790_CLK_HP),
@@ -211,6 +212,7 @@ static const struct mssr_mod_clk r8a7790_mod_clks[] __initconst = {
 };
 
 static const unsigned int r8a7790_crit_mod_clks[] __initconst = {
+	MOD_CLK_ID(402),	/* RWDT */
 	MOD_CLK_ID(408),	/* INTC-SYS (GIC) */
 };
 
-- 
2.7.4

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

* [RFC v3 17/25] clk: renesas: r8a7791/r8a7793: Add rwdt clock
  2018-01-30 20:22 ` Fabrizio Castro
@ 2018-01-30 20:22   ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

Add "rwdt" clock to r8a7791_mod_clks. Also, since we may need to access
the watchdog registers at any time, declare the clock as critical.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* no change

 drivers/clk/renesas/r8a7791-cpg-mssr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/renesas/r8a7791-cpg-mssr.c b/drivers/clk/renesas/r8a7791-cpg-mssr.c
index c0b51f9..820b220 100644
--- a/drivers/clk/renesas/r8a7791-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7791-cpg-mssr.c
@@ -128,6 +128,7 @@ static const struct mssr_mod_clk r8a7791_mod_clks[] __initconst = {
 	DEF_MOD("cmt1",			 329,	R8A7791_CLK_R),
 	DEF_MOD("usbhs-dmac0",		 330,	R8A7791_CLK_HP),
 	DEF_MOD("usbhs-dmac1",		 331,	R8A7791_CLK_HP),
+	DEF_MOD("rwdt",			 402,	R8A7791_CLK_R),
 	DEF_MOD("irqc",			 407,	R8A7791_CLK_CP),
 	DEF_MOD("intc-sys",		 408,	R8A7791_CLK_ZS),
 	DEF_MOD("audio-dmac1",		 501,	R8A7791_CLK_HP),
@@ -209,6 +210,7 @@ static const struct mssr_mod_clk r8a7791_mod_clks[] __initconst = {
 };
 
 static const unsigned int r8a7791_crit_mod_clks[] __initconst = {
+	MOD_CLK_ID(402),	/* RWDT */
 	MOD_CLK_ID(408),	/* INTC-SYS (GIC) */
 };
 
-- 
2.7.4


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

* [RFC v3 17/25] clk: renesas: r8a7791/r8a7793: Add rwdt clock
@ 2018-01-30 20:22   ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

Add "rwdt" clock to r8a7791_mod_clks. Also, since we may need to access
the watchdog registers at any time, declare the clock as critical.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* no change

 drivers/clk/renesas/r8a7791-cpg-mssr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/renesas/r8a7791-cpg-mssr.c b/drivers/clk/renesas/r8a7791-cpg-mssr.c
index c0b51f9..820b220 100644
--- a/drivers/clk/renesas/r8a7791-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7791-cpg-mssr.c
@@ -128,6 +128,7 @@ static const struct mssr_mod_clk r8a7791_mod_clks[] __initconst = {
 	DEF_MOD("cmt1",			 329,	R8A7791_CLK_R),
 	DEF_MOD("usbhs-dmac0",		 330,	R8A7791_CLK_HP),
 	DEF_MOD("usbhs-dmac1",		 331,	R8A7791_CLK_HP),
+	DEF_MOD("rwdt",			 402,	R8A7791_CLK_R),
 	DEF_MOD("irqc",			 407,	R8A7791_CLK_CP),
 	DEF_MOD("intc-sys",		 408,	R8A7791_CLK_ZS),
 	DEF_MOD("audio-dmac1",		 501,	R8A7791_CLK_HP),
@@ -209,6 +210,7 @@ static const struct mssr_mod_clk r8a7791_mod_clks[] __initconst = {
 };
 
 static const unsigned int r8a7791_crit_mod_clks[] __initconst = {
+	MOD_CLK_ID(402),	/* RWDT */
 	MOD_CLK_ID(408),	/* INTC-SYS (GIC) */
 };
 
-- 
2.7.4

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

* [RFC v3 18/25] clk: renesas: r8a7794: Add rwdt clock
  2018-01-30 20:22 ` Fabrizio Castro
@ 2018-01-30 20:22   ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

Add "rwdt" clock to r8a7794_mod_clks. Also, since we may need to access
the watchdog registers at any time, declare the clock as critical.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* no change

 drivers/clk/renesas/r8a7794-cpg-mssr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/renesas/r8a7794-cpg-mssr.c b/drivers/clk/renesas/r8a7794-cpg-mssr.c
index ec091a4..2a40bbe 100644
--- a/drivers/clk/renesas/r8a7794-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7794-cpg-mssr.c
@@ -121,6 +121,7 @@ static const struct mssr_mod_clk r8a7794_mod_clks[] __initconst = {
 	DEF_MOD("cmt1",			 329,	R8A7794_CLK_R),
 	DEF_MOD("usbhs-dmac0",		 330,	R8A7794_CLK_HP),
 	DEF_MOD("usbhs-dmac1",		 331,	R8A7794_CLK_HP),
+	DEF_MOD("rwdt",			 402,	R8A7794_CLK_R),
 	DEF_MOD("irqc",			 407,	R8A7794_CLK_CP),
 	DEF_MOD("intc-sys",		 408,	R8A7794_CLK_ZS),
 	DEF_MOD("audio-dmac0",		 502,	R8A7794_CLK_HP),
@@ -190,6 +191,7 @@ static const struct mssr_mod_clk r8a7794_mod_clks[] __initconst = {
 };
 
 static const unsigned int r8a7794_crit_mod_clks[] __initconst = {
+	MOD_CLK_ID(402),	/* RWDT */
 	MOD_CLK_ID(408),	/* INTC-SYS (GIC) */
 };
 
-- 
2.7.4

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

* [RFC v3 18/25] clk: renesas: r8a7794: Add rwdt clock
@ 2018-01-30 20:22   ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

Add "rwdt" clock to r8a7794_mod_clks. Also, since we may need to access
the watchdog registers at any time, declare the clock as critical.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
---
v1->v3:
* no change

 drivers/clk/renesas/r8a7794-cpg-mssr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/renesas/r8a7794-cpg-mssr.c b/drivers/clk/renesas/r8a7794-cpg-mssr.c
index ec091a4..2a40bbe 100644
--- a/drivers/clk/renesas/r8a7794-cpg-mssr.c
+++ b/drivers/clk/renesas/r8a7794-cpg-mssr.c
@@ -121,6 +121,7 @@ static const struct mssr_mod_clk r8a7794_mod_clks[] __initconst = {
 	DEF_MOD("cmt1",			 329,	R8A7794_CLK_R),
 	DEF_MOD("usbhs-dmac0",		 330,	R8A7794_CLK_HP),
 	DEF_MOD("usbhs-dmac1",		 331,	R8A7794_CLK_HP),
+	DEF_MOD("rwdt",			 402,	R8A7794_CLK_R),
 	DEF_MOD("irqc",			 407,	R8A7794_CLK_CP),
 	DEF_MOD("intc-sys",		 408,	R8A7794_CLK_ZS),
 	DEF_MOD("audio-dmac0",		 502,	R8A7794_CLK_HP),
@@ -190,6 +191,7 @@ static const struct mssr_mod_clk r8a7794_mod_clks[] __initconst = {
 };
 
 static const unsigned int r8a7794_crit_mod_clks[] __initconst = {
+	MOD_CLK_ID(402),	/* RWDT */
 	MOD_CLK_ID(408),	/* INTC-SYS (GIC) */
 };
 
-- 
2.7.4

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

* [RFC v3 19/25] ARM: dts: r8a7743: Add watchdog support to SoC dtsi
  2018-01-30 20:22 ` Fabrizio Castro
@ 2018-01-30 20:22   ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This patch adds watchdog support to the r8a7743 SoC dtsi.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v1->v3:
* no change

 arch/arm/boot/dts/r8a7743.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7743.dtsi b/arch/arm/boot/dts/r8a7743.dtsi
index c2943d7..1d4505f 100644
--- a/arch/arm/boot/dts/r8a7743.dtsi
+++ b/arch/arm/boot/dts/r8a7743.dtsi
@@ -368,6 +368,16 @@
 			reg = <0 0xe6160000 0 0x100>;
 		};
 
+		rwdt: watchdog@e6020000 {
+			compatible = "renesas,r8a7743-wdt",
+				     "renesas,rcar-gen2-wdt";
+			reg = <0 0xe6020000 0 0x0c>;
+			clocks = <&cpg CPG_MOD 402>;
+			power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
+			resets = <&cpg 402>;
+			status = "disabled";
+		};
+
 		sysc: system-controller@e6180000 {
 			compatible = "renesas,r8a7743-sysc";
 			reg = <0 0xe6180000 0 0x200>;
-- 
2.7.4


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

* [RFC v3 19/25] ARM: dts: r8a7743: Add watchdog support to SoC dtsi
@ 2018-01-30 20:22   ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds watchdog support to the r8a7743 SoC dtsi.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v1->v3:
* no change

 arch/arm/boot/dts/r8a7743.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7743.dtsi b/arch/arm/boot/dts/r8a7743.dtsi
index c2943d7..1d4505f 100644
--- a/arch/arm/boot/dts/r8a7743.dtsi
+++ b/arch/arm/boot/dts/r8a7743.dtsi
@@ -368,6 +368,16 @@
 			reg = <0 0xe6160000 0 0x100>;
 		};
 
+		rwdt: watchdog at e6020000 {
+			compatible = "renesas,r8a7743-wdt",
+				     "renesas,rcar-gen2-wdt";
+			reg = <0 0xe6020000 0 0x0c>;
+			clocks = <&cpg CPG_MOD 402>;
+			power-domains = <&sysc R8A7743_PD_ALWAYS_ON>;
+			resets = <&cpg 402>;
+			status = "disabled";
+		};
+
 		sysc: system-controller at e6180000 {
 			compatible = "renesas,r8a7743-sysc";
 			reg = <0 0xe6180000 0 0x200>;
-- 
2.7.4

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

* [RFC v3 20/25] ARM: dts: r8a7745: Add watchdog support to SoC dtsi
  2018-01-30 20:22 ` Fabrizio Castro
  (?)
@ 2018-01-30 20:22     ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-clk-u79uwXL29TY76Z2rM5mHXA, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This patch adds watchdog support to the r8a7745 SoC dtsi.

Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
---
v1->v3:
* no change

 arch/arm/boot/dts/r8a7745.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7745.dtsi b/arch/arm/boot/dts/r8a7745.dtsi
index 6bc1cf4..5d1b8f2 100644
--- a/arch/arm/boot/dts/r8a7745.dtsi
+++ b/arch/arm/boot/dts/r8a7745.dtsi
@@ -321,6 +321,16 @@
 			reg = <0 0xe6160000 0 0x100>;
 		};
 
+		rwdt: watchdog@e6020000 {
+			compatible = "renesas,r8a7745-wdt",
+				     "renesas,rcar-gen2-wdt";
+			reg = <0 0xe6020000 0 0x0c>;
+			clocks = <&cpg CPG_MOD 402>;
+			power-domains = <&sysc R8A7745_PD_ALWAYS_ON>;
+			resets = <&cpg 402>;
+			status = "disabled";
+		};
+
 		sysc: system-controller@e6180000 {
 			compatible = "renesas,r8a7745-sysc";
 			reg = <0 0xe6180000 0 0x200>;
-- 
2.7.4

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

* [RFC v3 20/25] ARM: dts: r8a7745: Add watchdog support to SoC dtsi
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This patch adds watchdog support to the r8a7745 SoC dtsi.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v1->v3:
* no change

 arch/arm/boot/dts/r8a7745.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7745.dtsi b/arch/arm/boot/dts/r8a7745.dtsi
index 6bc1cf4..5d1b8f2 100644
--- a/arch/arm/boot/dts/r8a7745.dtsi
+++ b/arch/arm/boot/dts/r8a7745.dtsi
@@ -321,6 +321,16 @@
 			reg = <0 0xe6160000 0 0x100>;
 		};
 
+		rwdt: watchdog@e6020000 {
+			compatible = "renesas,r8a7745-wdt",
+				     "renesas,rcar-gen2-wdt";
+			reg = <0 0xe6020000 0 0x0c>;
+			clocks = <&cpg CPG_MOD 402>;
+			power-domains = <&sysc R8A7745_PD_ALWAYS_ON>;
+			resets = <&cpg 402>;
+			status = "disabled";
+		};
+
 		sysc: system-controller@e6180000 {
 			compatible = "renesas,r8a7745-sysc";
 			reg = <0 0xe6180000 0 0x200>;
-- 
2.7.4


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

* [RFC v3 20/25] ARM: dts: r8a7745: Add watchdog support to SoC dtsi
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds watchdog support to the r8a7745 SoC dtsi.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v1->v3:
* no change

 arch/arm/boot/dts/r8a7745.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7745.dtsi b/arch/arm/boot/dts/r8a7745.dtsi
index 6bc1cf4..5d1b8f2 100644
--- a/arch/arm/boot/dts/r8a7745.dtsi
+++ b/arch/arm/boot/dts/r8a7745.dtsi
@@ -321,6 +321,16 @@
 			reg = <0 0xe6160000 0 0x100>;
 		};
 
+		rwdt: watchdog at e6020000 {
+			compatible = "renesas,r8a7745-wdt",
+				     "renesas,rcar-gen2-wdt";
+			reg = <0 0xe6020000 0 0x0c>;
+			clocks = <&cpg CPG_MOD 402>;
+			power-domains = <&sysc R8A7745_PD_ALWAYS_ON>;
+			resets = <&cpg 402>;
+			status = "disabled";
+		};
+
 		sysc: system-controller at e6180000 {
 			compatible = "renesas,r8a7745-sysc";
 			reg = <0 0xe6180000 0 0x200>;
-- 
2.7.4

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

* [RFC v3 21/25] ARM: dts: r8a7790: Add watchdog support to SoC dtsi
  2018-01-30 20:22 ` Fabrizio Castro
  (?)
@ 2018-01-30 20:22     ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-clk-u79uwXL29TY76Z2rM5mHXA, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This commit adds watchdog support to the r8a7790 dtsi.

Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
---
v1->v3:
* rwdt moved before gpio@e6050000

 arch/arm/boot/dts/r8a7790.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index a84bf35..83d6704 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -218,6 +218,16 @@
 		#size-cells = <2>;
 		ranges;
 
+		rwdt: watchdog@e6020000 {
+			compatible = "renesas,r8a7790-wdt",
+				     "renesas,rcar-gen2-wdt";
+			reg = <0 0xe6020000 0 0x0c>;
+			clocks = <&cpg CPG_MOD 402>;
+			power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
+			resets = <&cpg 402>;
+			status = "disabled";
+		};
+
 		gpio0: gpio@e6050000 {
 			compatible = "renesas,gpio-r8a7790",
 				     "renesas,rcar-gen2-gpio";
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" 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] 120+ messages in thread

* [RFC v3 21/25] ARM: dts: r8a7790: Add watchdog support to SoC dtsi
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This commit adds watchdog support to the r8a7790 dtsi.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v1->v3:
* rwdt moved before gpio@e6050000

 arch/arm/boot/dts/r8a7790.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index a84bf35..83d6704 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -218,6 +218,16 @@
 		#size-cells = <2>;
 		ranges;
 
+		rwdt: watchdog@e6020000 {
+			compatible = "renesas,r8a7790-wdt",
+				     "renesas,rcar-gen2-wdt";
+			reg = <0 0xe6020000 0 0x0c>;
+			clocks = <&cpg CPG_MOD 402>;
+			power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
+			resets = <&cpg 402>;
+			status = "disabled";
+		};
+
 		gpio0: gpio@e6050000 {
 			compatible = "renesas,gpio-r8a7790",
 				     "renesas,rcar-gen2-gpio";
-- 
2.7.4


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

* [RFC v3 21/25] ARM: dts: r8a7790: Add watchdog support to SoC dtsi
@ 2018-01-30 20:22     ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

This commit adds watchdog support to the r8a7790 dtsi.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v1->v3:
* rwdt moved before gpio at e6050000

 arch/arm/boot/dts/r8a7790.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index a84bf35..83d6704 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -218,6 +218,16 @@
 		#size-cells = <2>;
 		ranges;
 
+		rwdt: watchdog at e6020000 {
+			compatible = "renesas,r8a7790-wdt",
+				     "renesas,rcar-gen2-wdt";
+			reg = <0 0xe6020000 0 0x0c>;
+			clocks = <&cpg CPG_MOD 402>;
+			power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
+			resets = <&cpg 402>;
+			status = "disabled";
+		};
+
 		gpio0: gpio at e6050000 {
 			compatible = "renesas,gpio-r8a7790",
 				     "renesas,rcar-gen2-gpio";
-- 
2.7.4

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

* [RFC v3 22/25] ARM: dts: r8a7791: Add watchdog support to SoC dtsi
  2018-01-30 20:22 ` Fabrizio Castro
@ 2018-01-30 20:22   ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This commit adds watchdog support to the r8a7791 dtsi.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v1->v3:
* rwdt moved before gpio@e6050000

 arch/arm/boot/dts/r8a7791.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index d2a4546..80e20ecd 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -142,6 +142,16 @@
 		#size-cells = <2>;
 		ranges;
 
+		rwdt: watchdog@e6020000 {
+			compatible = "renesas,r8a7791-wdt",
+				     "renesas,rcar-gen2-wdt";
+			reg = <0 0xe6020000 0 0x0c>;
+			clocks = <&cpg CPG_MOD 402>;
+			power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
+			resets = <&cpg 402>;
+			status = "disabled";
+		};
+
 		gpio0: gpio@e6050000 {
 			compatible = "renesas,gpio-r8a7791",
 				     "renesas,rcar-gen2-gpio";
-- 
2.7.4

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

* [RFC v3 22/25] ARM: dts: r8a7791: Add watchdog support to SoC dtsi
@ 2018-01-30 20:22   ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

This commit adds watchdog support to the r8a7791 dtsi.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v1->v3:
* rwdt moved before gpio at e6050000

 arch/arm/boot/dts/r8a7791.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index d2a4546..80e20ecd 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -142,6 +142,16 @@
 		#size-cells = <2>;
 		ranges;
 
+		rwdt: watchdog at e6020000 {
+			compatible = "renesas,r8a7791-wdt",
+				     "renesas,rcar-gen2-wdt";
+			reg = <0 0xe6020000 0 0x0c>;
+			clocks = <&cpg CPG_MOD 402>;
+			power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
+			resets = <&cpg 402>;
+			status = "disabled";
+		};
+
 		gpio0: gpio at e6050000 {
 			compatible = "renesas,gpio-r8a7791",
 				     "renesas,rcar-gen2-gpio";
-- 
2.7.4

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

* [RFC v3 23/25] ARM: dts: r8a7794: Add watchdog support to SoC dtsi
  2018-01-30 20:22 ` Fabrizio Castro
@ 2018-01-30 20:22   ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This commit adds watchdog support to the r8a7794 dtsi.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v1->v3:
* rwdt moved before gpio@e6050000

 arch/arm/boot/dts/r8a7794.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi
index e47c5f4..1c9b149 100644
--- a/arch/arm/boot/dts/r8a7794.dtsi
+++ b/arch/arm/boot/dts/r8a7794.dtsi
@@ -119,6 +119,16 @@
 		#size-cells = <2>;
 		ranges;
 
+		rwdt: watchdog@e6020000 {
+			compatible = "renesas,r8a7794-wdt",
+				     "renesas,rcar-gen2-wdt";
+			reg = <0 0xe6020000 0 0x0c>;
+			clocks = <&cpg CPG_MOD 402>;
+			power-domains = <&sysc R8A7794_PD_ALWAYS_ON>;
+			resets = <&cpg 402>;
+			status = "disabled";
+		};
+
 		gpio0: gpio@e6050000 {
 			compatible = "renesas,gpio-r8a7794",
 				     "renesas,rcar-gen2-gpio";
-- 
2.7.4

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

* [RFC v3 23/25] ARM: dts: r8a7794: Add watchdog support to SoC dtsi
@ 2018-01-30 20:22   ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

This commit adds watchdog support to the r8a7794 dtsi.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v1->v3:
* rwdt moved before gpio at e6050000

 arch/arm/boot/dts/r8a7794.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi
index e47c5f4..1c9b149 100644
--- a/arch/arm/boot/dts/r8a7794.dtsi
+++ b/arch/arm/boot/dts/r8a7794.dtsi
@@ -119,6 +119,16 @@
 		#size-cells = <2>;
 		ranges;
 
+		rwdt: watchdog at e6020000 {
+			compatible = "renesas,r8a7794-wdt",
+				     "renesas,rcar-gen2-wdt";
+			reg = <0 0xe6020000 0 0x0c>;
+			clocks = <&cpg CPG_MOD 402>;
+			power-domains = <&sysc R8A7794_PD_ALWAYS_ON>;
+			resets = <&cpg 402>;
+			status = "disabled";
+		};
+
 		gpio0: gpio at e6050000 {
 			compatible = "renesas,gpio-r8a7794",
 				     "renesas,rcar-gen2-gpio";
-- 
2.7.4

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

* [RFC v3 24/25] ARM: dts: iwg20m: Add watchdog support to SoM dtsi
  2018-01-30 20:22 ` Fabrizio Castro
@ 2018-01-30 20:22   ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This patch enables the watchdog from within the iwg20m SoM dtsi.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v1->v3:
* no change

 arch/arm/boot/dts/r8a7743-iwg20m.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7743-iwg20m.dtsi b/arch/arm/boot/dts/r8a7743-iwg20m.dtsi
index 1d3e950..d364685 100644
--- a/arch/arm/boot/dts/r8a7743-iwg20m.dtsi
+++ b/arch/arm/boot/dts/r8a7743-iwg20m.dtsi
@@ -91,6 +91,11 @@
 	};
 };
 
+&rwdt {
+	timeout-sec = <60>;
+	status = "okay";
+};
+
 &sdhi0 {
 	pinctrl-0 = <&sdhi0_pins>;
 	pinctrl-names = "default";
-- 
2.7.4

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

* [RFC v3 24/25] ARM: dts: iwg20m: Add watchdog support to SoM dtsi
@ 2018-01-30 20:22   ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

This patch enables the watchdog from within the iwg20m SoM dtsi.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v1->v3:
* no change

 arch/arm/boot/dts/r8a7743-iwg20m.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7743-iwg20m.dtsi b/arch/arm/boot/dts/r8a7743-iwg20m.dtsi
index 1d3e950..d364685 100644
--- a/arch/arm/boot/dts/r8a7743-iwg20m.dtsi
+++ b/arch/arm/boot/dts/r8a7743-iwg20m.dtsi
@@ -91,6 +91,11 @@
 	};
 };
 
+&rwdt {
+	timeout-sec = <60>;
+	status = "okay";
+};
+
 &sdhi0 {
 	pinctrl-0 = <&sdhi0_pins>;
 	pinctrl-names = "default";
-- 
2.7.4

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

* [RFC v3 25/25] ARM: dts: iwg22m: Add watchdog support to SoM dtsi
  2018-01-30 20:22 ` Fabrizio Castro
@ 2018-01-30 20:22   ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang
  Cc: Guenter Roeck, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Fabrizio Castro, Ramesh Shanmugasundaram

This patch enables the watchdog from within the iwg20m SoM dtsi.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v1->v3:
* no change

 arch/arm/boot/dts/r8a7745-iwg22m.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7745-iwg22m.dtsi b/arch/arm/boot/dts/r8a7745-iwg22m.dtsi
index 8d0a392b..29b6e10 100644
--- a/arch/arm/boot/dts/r8a7745-iwg22m.dtsi
+++ b/arch/arm/boot/dts/r8a7745-iwg22m.dtsi
@@ -91,6 +91,11 @@
 	};
 };
 
+&rwdt {
+	timeout-sec = <60>;
+	status = "okay";
+};
+
 &sdhi1 {
 	pinctrl-0 = <&sdhi1_pins>;
 	pinctrl-names = "default";
-- 
2.7.4

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

* [RFC v3 25/25] ARM: dts: iwg22m: Add watchdog support to SoM dtsi
@ 2018-01-30 20:22   ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-30 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

This patch enables the watchdog from within the iwg20m SoM dtsi.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v1->v3:
* no change

 arch/arm/boot/dts/r8a7745-iwg22m.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7745-iwg22m.dtsi b/arch/arm/boot/dts/r8a7745-iwg22m.dtsi
index 8d0a392b..29b6e10 100644
--- a/arch/arm/boot/dts/r8a7745-iwg22m.dtsi
+++ b/arch/arm/boot/dts/r8a7745-iwg22m.dtsi
@@ -91,6 +91,11 @@
 	};
 };
 
+&rwdt {
+	timeout-sec = <60>;
+	status = "okay";
+};
+
 &sdhi1 {
 	pinctrl-0 = <&sdhi1_pins>;
 	pinctrl-names = "default";
-- 
2.7.4

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

* Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
  2018-01-30 20:22     ` Fabrizio Castro
  (?)
@ 2018-01-30 22:05       ` Guenter Roeck
  -1 siblings, 0 replies; 120+ messages in thread
From: Guenter Roeck @ 2018-01-30 22:05 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das

On Tue, Jan 30, 2018 at 08:22:44PM +0000, Fabrizio Castro wrote:
> On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
> when suspending to RAM we need to explicitly disable the counting by
> clearing TME from RWTCSRA.
> Also, on some systems RWDT is the only piece of HW that allows the SoC
> to be restarted, therefore this patch implements the restart callback.
> 
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
> ---
> Wolfram, was the restart callback implementation missing for a reason?
> Is its implementation going to break any Gen3 platform?
> 

The changes clearly are way more than claimed in the subject. Adding
restart handler and PM support may be prerequisites for Gen2, but the
changes apply to Gen3 as well. What happened to "one patch per logical
change" ?

> v1->v3:
> * unified Gen2 and Gen3 drivers.
> 
>  drivers/watchdog/renesas_wdt.c | 61 ++++++++++++++++++++++++++++++++++++++----
>  1 file changed, 56 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/watchdog/renesas_wdt.c b/drivers/watchdog/renesas_wdt.c
> index 831ef83..eedb016 100644
> --- a/drivers/watchdog/renesas_wdt.c
> +++ b/drivers/watchdog/renesas_wdt.c
> @@ -107,6 +107,24 @@ static unsigned int rwdt_get_timeleft(struct watchdog_device *wdev)
>  	return DIV_BY_CLKS_PER_SEC(priv, 65536 - val);
>  }
>  
> +static int rwdt_restart(struct watchdog_device *wdev, unsigned long action,
> +			void *data)
> +{
> +	struct rwdt_priv *priv = watchdog_get_drvdata(wdev);
> +
> +	pm_runtime_get_sync(wdev->parent);
> +
> +	rwdt_write(priv, 0x00, RWTCSRB);
> +	rwdt_write(priv, 0x00, RWTCSRA);
> +	rwdt_write(priv, 0xffff, RWTCNT);
> +
> +	while (readb_relaxed(priv->base + RWTCSRA) & RWTCSRA_WRFLG)
> +		cpu_relax();
> +
> +	rwdt_write(priv, 0x80, RWTCSRA);
> +	return 0;
> +}
> +
>  static const struct watchdog_info rwdt_ident = {
>  	.options = WDIOF_MAGICCLOSE | WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT,
>  	.identity = "Renesas WDT Watchdog",
> @@ -118,6 +136,7 @@ static const struct watchdog_ops rwdt_ops = {
>  	.stop = rwdt_stop,
>  	.ping = rwdt_init_timeout,
>  	.get_timeleft = rwdt_get_timeleft,
> +	.restart = rwdt_restart,
>  };
>  
>  static int rwdt_probe(struct platform_device *pdev)
> @@ -203,13 +222,42 @@ static int rwdt_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -/*
> - * This driver does also fit for R-Car Gen2 (r8a779[0-4]) WDT. However, for SMP
> - * to work there, one also needs a RESET (RST) driver which does not exist yet
> - * due to HW issues. This needs to be solved before adding compatibles here.
> - */

Have those issues been resolved ?

> +#ifdef CONFIG_PM
> +static int rwdt_suspend(struct device *dev)
> +{
> +	struct platform_device *pdev;
> +	struct rwdt_priv *priv;
> +
> +	pdev = to_platform_device(dev);
> +	priv = platform_get_drvdata(pdev);
> +	if (watchdog_active(&priv->wdev)) {
> +		rwdt_write(priv, priv->cks, RWTCSRA);
> +	}
> +	return 0;
> +}
> +
> +static int rwdt_resume(struct device *dev)
> +{
> +	struct platform_device *pdev;
> +	struct rwdt_priv *priv;
> +
> +	pdev = to_platform_device(dev);
> +	priv = platform_get_drvdata(pdev);
> +	if (watchdog_active(&priv->wdev)) {
> +		rwdt_write(priv, priv->cks | RWTCSRA_TME, RWTCSRA);
> +	}
> +	return 0;
> +}
> +
> +static const struct dev_pm_ops rwdt_pm = {
> +	.suspend = rwdt_suspend,
> +	.resume = rwdt_resume,
> +};
> +#endif
> +
>  static const struct of_device_id rwdt_ids[] = {
>  	{ .compatible = "renesas,rcar-gen3-wdt", },
> +	{ .compatible = "renesas,rcar-gen2-wdt", },
>  	{ /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, rwdt_ids);
> @@ -218,6 +266,9 @@ static struct platform_driver rwdt_driver = {
>  	.driver = {
>  		.name = "renesas_wdt",
>  		.of_match_table = rwdt_ids,
> +#ifdef CONFIG_PM
> +		.pm = &rwdt_pm,
> +#endif
>  	},
>  	.probe = rwdt_probe,
>  	.remove = rwdt_remove,
> -- 
> 2.7.4
> 

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

* Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
@ 2018-01-30 22:05       ` Guenter Roeck
  0 siblings, 0 replies; 120+ messages in thread
From: Guenter Roeck @ 2018-01-30 22:05 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Ramesh Shanmugasundaram

On Tue, Jan 30, 2018 at 08:22:44PM +0000, Fabrizio Castro wrote:
> On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
> when suspending to RAM we need to explicitly disable the counting by
> clearing TME from RWTCSRA.
> Also, on some systems RWDT is the only piece of HW that allows the SoC
> to be restarted, therefore this patch implements the restart callback.
> 
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
> ---
> Wolfram, was the restart callback implementation missing for a reason?
> Is its implementation going to break any Gen3 platform?
> 

The changes clearly are way more than claimed in the subject. Adding
restart handler and PM support may be prerequisites for Gen2, but the
changes apply to Gen3 as well. What happened to "one patch per logical
change" ?

> v1->v3:
> * unified Gen2 and Gen3 drivers.
> 
>  drivers/watchdog/renesas_wdt.c | 61 ++++++++++++++++++++++++++++++++++++++----
>  1 file changed, 56 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/watchdog/renesas_wdt.c b/drivers/watchdog/renesas_wdt.c
> index 831ef83..eedb016 100644
> --- a/drivers/watchdog/renesas_wdt.c
> +++ b/drivers/watchdog/renesas_wdt.c
> @@ -107,6 +107,24 @@ static unsigned int rwdt_get_timeleft(struct watchdog_device *wdev)
>  	return DIV_BY_CLKS_PER_SEC(priv, 65536 - val);
>  }
>  
> +static int rwdt_restart(struct watchdog_device *wdev, unsigned long action,
> +			void *data)
> +{
> +	struct rwdt_priv *priv = watchdog_get_drvdata(wdev);
> +
> +	pm_runtime_get_sync(wdev->parent);
> +
> +	rwdt_write(priv, 0x00, RWTCSRB);
> +	rwdt_write(priv, 0x00, RWTCSRA);
> +	rwdt_write(priv, 0xffff, RWTCNT);
> +
> +	while (readb_relaxed(priv->base + RWTCSRA) & RWTCSRA_WRFLG)
> +		cpu_relax();
> +
> +	rwdt_write(priv, 0x80, RWTCSRA);
> +	return 0;
> +}
> +
>  static const struct watchdog_info rwdt_ident = {
>  	.options = WDIOF_MAGICCLOSE | WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT,
>  	.identity = "Renesas WDT Watchdog",
> @@ -118,6 +136,7 @@ static const struct watchdog_ops rwdt_ops = {
>  	.stop = rwdt_stop,
>  	.ping = rwdt_init_timeout,
>  	.get_timeleft = rwdt_get_timeleft,
> +	.restart = rwdt_restart,
>  };
>  
>  static int rwdt_probe(struct platform_device *pdev)
> @@ -203,13 +222,42 @@ static int rwdt_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -/*
> - * This driver does also fit for R-Car Gen2 (r8a779[0-4]) WDT. However, for SMP
> - * to work there, one also needs a RESET (RST) driver which does not exist yet
> - * due to HW issues. This needs to be solved before adding compatibles here.
> - */

Have those issues been resolved ?

> +#ifdef CONFIG_PM
> +static int rwdt_suspend(struct device *dev)
> +{
> +	struct platform_device *pdev;
> +	struct rwdt_priv *priv;
> +
> +	pdev = to_platform_device(dev);
> +	priv = platform_get_drvdata(pdev);
> +	if (watchdog_active(&priv->wdev)) {
> +		rwdt_write(priv, priv->cks, RWTCSRA);
> +	}
> +	return 0;
> +}
> +
> +static int rwdt_resume(struct device *dev)
> +{
> +	struct platform_device *pdev;
> +	struct rwdt_priv *priv;
> +
> +	pdev = to_platform_device(dev);
> +	priv = platform_get_drvdata(pdev);
> +	if (watchdog_active(&priv->wdev)) {
> +		rwdt_write(priv, priv->cks | RWTCSRA_TME, RWTCSRA);
> +	}
> +	return 0;
> +}
> +
> +static const struct dev_pm_ops rwdt_pm = {
> +	.suspend = rwdt_suspend,
> +	.resume = rwdt_resume,
> +};
> +#endif
> +
>  static const struct of_device_id rwdt_ids[] = {
>  	{ .compatible = "renesas,rcar-gen3-wdt", },
> +	{ .compatible = "renesas,rcar-gen2-wdt", },
>  	{ /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, rwdt_ids);
> @@ -218,6 +266,9 @@ static struct platform_driver rwdt_driver = {
>  	.driver = {
>  		.name = "renesas_wdt",
>  		.of_match_table = rwdt_ids,
> +#ifdef CONFIG_PM
> +		.pm = &rwdt_pm,
> +#endif
>  	},
>  	.probe = rwdt_probe,
>  	.remove = rwdt_remove,
> -- 
> 2.7.4
> 

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

* [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
@ 2018-01-30 22:05       ` Guenter Roeck
  0 siblings, 0 replies; 120+ messages in thread
From: Guenter Roeck @ 2018-01-30 22:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 30, 2018 at 08:22:44PM +0000, Fabrizio Castro wrote:
> On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
> when suspending to RAM we need to explicitly disable the counting by
> clearing TME from RWTCSRA.
> Also, on some systems RWDT is the only piece of HW that allows the SoC
> to be restarted, therefore this patch implements the restart callback.
> 
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
> ---
> Wolfram, was the restart callback implementation missing for a reason?
> Is its implementation going to break any Gen3 platform?
> 

The changes clearly are way more than claimed in the subject. Adding
restart handler and PM support may be prerequisites for Gen2, but the
changes apply to Gen3 as well. What happened to "one patch per logical
change" ?

> v1->v3:
> * unified Gen2 and Gen3 drivers.
> 
>  drivers/watchdog/renesas_wdt.c | 61 ++++++++++++++++++++++++++++++++++++++----
>  1 file changed, 56 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/watchdog/renesas_wdt.c b/drivers/watchdog/renesas_wdt.c
> index 831ef83..eedb016 100644
> --- a/drivers/watchdog/renesas_wdt.c
> +++ b/drivers/watchdog/renesas_wdt.c
> @@ -107,6 +107,24 @@ static unsigned int rwdt_get_timeleft(struct watchdog_device *wdev)
>  	return DIV_BY_CLKS_PER_SEC(priv, 65536 - val);
>  }
>  
> +static int rwdt_restart(struct watchdog_device *wdev, unsigned long action,
> +			void *data)
> +{
> +	struct rwdt_priv *priv = watchdog_get_drvdata(wdev);
> +
> +	pm_runtime_get_sync(wdev->parent);
> +
> +	rwdt_write(priv, 0x00, RWTCSRB);
> +	rwdt_write(priv, 0x00, RWTCSRA);
> +	rwdt_write(priv, 0xffff, RWTCNT);
> +
> +	while (readb_relaxed(priv->base + RWTCSRA) & RWTCSRA_WRFLG)
> +		cpu_relax();
> +
> +	rwdt_write(priv, 0x80, RWTCSRA);
> +	return 0;
> +}
> +
>  static const struct watchdog_info rwdt_ident = {
>  	.options = WDIOF_MAGICCLOSE | WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT,
>  	.identity = "Renesas WDT Watchdog",
> @@ -118,6 +136,7 @@ static const struct watchdog_ops rwdt_ops = {
>  	.stop = rwdt_stop,
>  	.ping = rwdt_init_timeout,
>  	.get_timeleft = rwdt_get_timeleft,
> +	.restart = rwdt_restart,
>  };
>  
>  static int rwdt_probe(struct platform_device *pdev)
> @@ -203,13 +222,42 @@ static int rwdt_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -/*
> - * This driver does also fit for R-Car Gen2 (r8a779[0-4]) WDT. However, for SMP
> - * to work there, one also needs a RESET (RST) driver which does not exist yet
> - * due to HW issues. This needs to be solved before adding compatibles here.
> - */

Have those issues been resolved ?

> +#ifdef CONFIG_PM
> +static int rwdt_suspend(struct device *dev)
> +{
> +	struct platform_device *pdev;
> +	struct rwdt_priv *priv;
> +
> +	pdev = to_platform_device(dev);
> +	priv = platform_get_drvdata(pdev);
> +	if (watchdog_active(&priv->wdev)) {
> +		rwdt_write(priv, priv->cks, RWTCSRA);
> +	}
> +	return 0;
> +}
> +
> +static int rwdt_resume(struct device *dev)
> +{
> +	struct platform_device *pdev;
> +	struct rwdt_priv *priv;
> +
> +	pdev = to_platform_device(dev);
> +	priv = platform_get_drvdata(pdev);
> +	if (watchdog_active(&priv->wdev)) {
> +		rwdt_write(priv, priv->cks | RWTCSRA_TME, RWTCSRA);
> +	}
> +	return 0;
> +}
> +
> +static const struct dev_pm_ops rwdt_pm = {
> +	.suspend = rwdt_suspend,
> +	.resume = rwdt_resume,
> +};
> +#endif
> +
>  static const struct of_device_id rwdt_ids[] = {
>  	{ .compatible = "renesas,rcar-gen3-wdt", },
> +	{ .compatible = "renesas,rcar-gen2-wdt", },
>  	{ /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, rwdt_ids);
> @@ -218,6 +266,9 @@ static struct platform_driver rwdt_driver = {
>  	.driver = {
>  		.name = "renesas_wdt",
>  		.of_match_table = rwdt_ids,
> +#ifdef CONFIG_PM
> +		.pm = &rwdt_pm,
> +#endif
>  	},
>  	.probe = rwdt_probe,
>  	.remove = rwdt_remove,
> -- 
> 2.7.4
> 

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

* Re: [RFC v3 02/25] ARM: dts: r8a7743: Adjust SMP routine size
  2018-01-30 20:22     ` Fabrizio Castro
  (?)
@ 2018-01-31  8:42         ` Geert Uytterhoeven
  -1 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:42 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, Guenter Roeck,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Watchdog Mailing List, Linux-Renesas

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org> wrote:
> This patch adjusts the definition of the SMP routine size according
> to the latest changes made by commit:
> "ARM: shmobile: Add watchdog support"
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>

Reviewed-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>

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 linux-watchdog" 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] 120+ messages in thread

* Re: [RFC v3 02/25] ARM: dts: r8a7743: Adjust SMP routine size
@ 2018-01-31  8:42         ` Geert Uytterhoeven
  0 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:42 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, Guenter Roeck,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Watchdog Mailing List, Linux-Renesas, linux-arm-kernel,
	linux-clk, Chris Paterson, Biju Das, Ramesh Shanmugasundaram

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
> This patch adjusts the definition of the SMP routine size according
> to the latest changes made by commit:
> "ARM: shmobile: Add watchdog support"
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>

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

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

* [RFC v3 02/25] ARM: dts: r8a7743: Adjust SMP routine size
@ 2018-01-31  8:42         ` Geert Uytterhoeven
  0 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
> This patch adjusts the definition of the SMP routine size according
> to the latest changes made by commit:
> "ARM: shmobile: Add watchdog support"
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>

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

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

* Re: [RFC v3 03/25] ARM: dts: r8a7745: Adjust SMP routine size
  2018-01-30 20:22   ` Fabrizio Castro
  (?)
@ 2018-01-31  8:42       ` Geert Uytterhoeven
  -1 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:42 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, Guenter Roeck,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Watchdog Mailing List, Linux-Renesas

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org> wrote:
> This patch adjusts the definition of the SMP routine size according
> to the latest changes made by commit:
> "ARM: shmobile: Add watchdog support"
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>

Reviewed-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>

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 linux-watchdog" 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] 120+ messages in thread

* Re: [RFC v3 03/25] ARM: dts: r8a7745: Adjust SMP routine size
@ 2018-01-31  8:42       ` Geert Uytterhoeven
  0 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:42 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, Guenter Roeck,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Watchdog Mailing List, Linux-Renesas, linux-arm-kernel,
	linux-clk, Chris Paterson, Biju Das, Ramesh Shanmugasundaram

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
> This patch adjusts the definition of the SMP routine size according
> to the latest changes made by commit:
> "ARM: shmobile: Add watchdog support"
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>

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

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

* [RFC v3 03/25] ARM: dts: r8a7745: Adjust SMP routine size
@ 2018-01-31  8:42       ` Geert Uytterhoeven
  0 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
> This patch adjusts the definition of the SMP routine size according
> to the latest changes made by commit:
> "ARM: shmobile: Add watchdog support"
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>

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

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

* Re: [RFC v3 04/25] ARM: dts: r8a7790: Adjust SMP routine size
  2018-01-30 20:22     ` Fabrizio Castro
  (?)
@ 2018-01-31  8:43         ` Geert Uytterhoeven
  -1 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:43 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, Guenter Roeck,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Watchdog Mailing List, Linux-Renesas

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org> wrote:
> This patch adjusts the definition of the SMP routine size according
> to the latest changes made by commit:
> "ARM: shmobile: Add watchdog support"
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>

Reviewed-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>

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 linux-watchdog" 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] 120+ messages in thread

* Re: [RFC v3 04/25] ARM: dts: r8a7790: Adjust SMP routine size
@ 2018-01-31  8:43         ` Geert Uytterhoeven
  0 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:43 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, Guenter Roeck,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Watchdog Mailing List, Linux-Renesas, linux-arm-kernel,
	linux-clk, Chris Paterson, Biju Das, Ramesh Shanmugasundaram

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
> This patch adjusts the definition of the SMP routine size according
> to the latest changes made by commit:
> "ARM: shmobile: Add watchdog support"
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>

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

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

* [RFC v3 04/25] ARM: dts: r8a7790: Adjust SMP routine size
@ 2018-01-31  8:43         ` Geert Uytterhoeven
  0 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
> This patch adjusts the definition of the SMP routine size according
> to the latest changes made by commit:
> "ARM: shmobile: Add watchdog support"
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>

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

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

* Re: [RFC v3 05/25] ARM: dts: r8a7791: Adjust SMP routine size
  2018-01-30 20:22     ` Fabrizio Castro
  (?)
@ 2018-01-31  8:43         ` Geert Uytterhoeven
  -1 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:43 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, Guenter Roeck,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Watchdog Mailing List, Linux-Renesas

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org> wrote:
> This patch adjusts the definition of the SMP routine size according
> to the latest changes made by commit:
> "ARM: shmobile: Add watchdog support"
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>

Reviewed-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>

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

* Re: [RFC v3 05/25] ARM: dts: r8a7791: Adjust SMP routine size
@ 2018-01-31  8:43         ` Geert Uytterhoeven
  0 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:43 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, Guenter Roeck,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Watchdog Mailing List, Linux-Renesas, linux-arm-kernel,
	linux-clk, Chris Paterson, Biju Das, Ramesh Shanmugasundaram

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
> This patch adjusts the definition of the SMP routine size according
> to the latest changes made by commit:
> "ARM: shmobile: Add watchdog support"
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>

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

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

* [RFC v3 05/25] ARM: dts: r8a7791: Adjust SMP routine size
@ 2018-01-31  8:43         ` Geert Uytterhoeven
  0 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
> This patch adjusts the definition of the SMP routine size according
> to the latest changes made by commit:
> "ARM: shmobile: Add watchdog support"
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>

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

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

* Re: [RFC v3 06/25] ARM: dts: r8a7792: Adjust SMP routine size
  2018-01-30 20:22   ` Fabrizio Castro
  (?)
@ 2018-01-31  8:43     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:43 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, Guenter Roeck,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Watchdog Mailing List, Linux-Renesas

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
> This patch adjusts the definition of the SMP routine size according
> to the latest changes made by commit:
> "ARM: shmobile: Add watchdog support"
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>

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

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

* Re: [RFC v3 06/25] ARM: dts: r8a7792: Adjust SMP routine size
@ 2018-01-31  8:43     ` Geert Uytterhoeven
  0 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:43 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, Guenter Roeck,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Watchdog Mailing List, Linux-Renesas, linux-arm-kernel,
	linux-clk, Chris Paterson, Biju Das, Ramesh Shanmugasundaram

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
> This patch adjusts the definition of the SMP routine size according
> to the latest changes made by commit:
> "ARM: shmobile: Add watchdog support"
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>

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

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

* [RFC v3 06/25] ARM: dts: r8a7792: Adjust SMP routine size
@ 2018-01-31  8:43     ` Geert Uytterhoeven
  0 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
> This patch adjusts the definition of the SMP routine size according
> to the latest changes made by commit:
> "ARM: shmobile: Add watchdog support"
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>

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

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

* Re: [RFC v3 07/25] ARM: dts: r8a7793: Adjust SMP routine size
  2018-01-30 20:22     ` Fabrizio Castro
  (?)
@ 2018-01-31  8:43         ` Geert Uytterhoeven
  -1 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:43 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, Guenter Roeck,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Watchdog Mailing List, Linux-Renesas

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org> wrote:
> This patch adjusts the definition of the SMP routine size according
> to the latest changes made by commit:
> "ARM: shmobile: Add watchdog support"
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>

Reviewed-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>

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

* Re: [RFC v3 07/25] ARM: dts: r8a7793: Adjust SMP routine size
@ 2018-01-31  8:43         ` Geert Uytterhoeven
  0 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:43 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, Guenter Roeck,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Watchdog Mailing List, Linux-Renesas, linux-arm-kernel,
	linux-clk, Chris Paterson, Biju Das, Ramesh Shanmugasundaram

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
> This patch adjusts the definition of the SMP routine size according
> to the latest changes made by commit:
> "ARM: shmobile: Add watchdog support"
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>

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

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

* [RFC v3 07/25] ARM: dts: r8a7793: Adjust SMP routine size
@ 2018-01-31  8:43         ` Geert Uytterhoeven
  0 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
> This patch adjusts the definition of the SMP routine size according
> to the latest changes made by commit:
> "ARM: shmobile: Add watchdog support"
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>

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

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

* Re: [RFC v3 08/25] ARM: dts: r8a7794: Adjust SMP routine size
  2018-01-30 20:22     ` Fabrizio Castro
  (?)
@ 2018-01-31  8:44       ` Geert Uytterhoeven
  -1 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:44 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, Guenter Roeck,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Watchdog Mailing List, Linux-Renesas

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
> This patch adjusts the definition of the SMP routine size according
> to the latest changes made by commit:
> "ARM: shmobile: Add watchdog support"
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>

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

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

* Re: [RFC v3 08/25] ARM: dts: r8a7794: Adjust SMP routine size
@ 2018-01-31  8:44       ` Geert Uytterhoeven
  0 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:44 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, Guenter Roeck,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Watchdog Mailing List, Linux-Renesas, linux-arm-kernel,
	linux-clk, Chris Paterson, Biju Das, Ramesh Shanmugasundaram

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
> This patch adjusts the definition of the SMP routine size according
> to the latest changes made by commit:
> "ARM: shmobile: Add watchdog support"
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>

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

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

* [RFC v3 08/25] ARM: dts: r8a7794: Adjust SMP routine size
@ 2018-01-31  8:44       ` Geert Uytterhoeven
  0 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
> This patch adjusts the definition of the SMP routine size according
> to the latest changes made by commit:
> "ARM: shmobile: Add watchdog support"
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>

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

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

* Re: [RFC v3 10/25] dt-bindings: watchdog: renesas-wdt: Add R-Car Gen2 support
  2018-01-30 20:22     ` Fabrizio Castro
  (?)
@ 2018-01-31  8:46       ` Geert Uytterhoeven
  -1 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:46 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, Guenter Roeck,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Watchdog Mailing List, Linux-Renesas

Hi Fabrizio,

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
> This commit documents the compatibility with R-Car Gen2 and RZ/G
> devices by defining the generic compatible string "renesas,rcar-gen2-wdt".
> Also, this patch expands the list of SoC-specific compatible strings to
> include RZ/G and R-Car Gen2 devices.
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>

Thanks for your patch!

> --- a/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
> +++ b/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
> @@ -1,17 +1,25 @@
>  Renesas Watchdog Timer (WDT) Controller
>
>  Required properties:
> -- compatible : Should be "renesas,<soctype>-wdt", and
> -              "renesas,rcar-gen3-wdt" or "renesas,rza-wdt" as fallback.
> + - compatible : Must be "renesas,<soctype>-wdt", followed by a generic
> +               fallback compatible string when compatible with the generic
> +               version.
>                Examples with soctypes are:
> +                - "renesas,r8a7743-wdt" (RZ/G1M)
> +                - "renesas,r8a7745-wdt" (RZ/G1E)
> +                - "renesas,r8a7790-wdt" (R-Car H2)
> +                - "renesas,r8a7791-wdt" (R-Car M2-W)
> +                - "renesas,r8a7792-wdt" (R-Car V2H)
> +                - "renesas,r8a7793-wdt" (R-Car M2-N)
> +                - "renesas,r8a7794-wdt" (R-Car E2)
>                  - "renesas,r8a7795-wdt" (R-Car H3)
>                  - "renesas,r8a7796-wdt" (R-Car M3-W)
>                  - "renesas,r8a77995-wdt" (R-Car D3)
>                  - "renesas,r7s72100-wdt" (RZ/A1)
> +               The generic compatible string must be:
> +                - "renesas,rcar-gen2-wdt" for R-Car Gen2 and RZ/G
> +                - "renesas,rcar-gen3-wdt" for R-Car Gen3

You've lost the generic "renesas,rza-wdt".

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

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

* Re: [RFC v3 10/25] dt-bindings: watchdog: renesas-wdt: Add R-Car Gen2 support
@ 2018-01-31  8:46       ` Geert Uytterhoeven
  0 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:46 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, Guenter Roeck,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Watchdog Mailing List, Linux-Renesas, linux-arm-kernel,
	linux-clk, Chris Paterson, Biju Das, Ramesh Shanmugasundaram

Hi Fabrizio,

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
> This commit documents the compatibility with R-Car Gen2 and RZ/G
> devices by defining the generic compatible string "renesas,rcar-gen2-wdt".
> Also, this patch expands the list of SoC-specific compatible strings to
> include RZ/G and R-Car Gen2 devices.
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>

Thanks for your patch!

> --- a/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
> +++ b/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
> @@ -1,17 +1,25 @@
>  Renesas Watchdog Timer (WDT) Controller
>
>  Required properties:
> -- compatible : Should be "renesas,<soctype>-wdt", and
> -              "renesas,rcar-gen3-wdt" or "renesas,rza-wdt" as fallback.
> + - compatible : Must be "renesas,<soctype>-wdt", followed by a generic
> +               fallback compatible string when compatible with the generic
> +               version.
>                Examples with soctypes are:
> +                - "renesas,r8a7743-wdt" (RZ/G1M)
> +                - "renesas,r8a7745-wdt" (RZ/G1E)
> +                - "renesas,r8a7790-wdt" (R-Car H2)
> +                - "renesas,r8a7791-wdt" (R-Car M2-W)
> +                - "renesas,r8a7792-wdt" (R-Car V2H)
> +                - "renesas,r8a7793-wdt" (R-Car M2-N)
> +                - "renesas,r8a7794-wdt" (R-Car E2)
>                  - "renesas,r8a7795-wdt" (R-Car H3)
>                  - "renesas,r8a7796-wdt" (R-Car M3-W)
>                  - "renesas,r8a77995-wdt" (R-Car D3)
>                  - "renesas,r7s72100-wdt" (RZ/A1)
> +               The generic compatible string must be:
> +                - "renesas,rcar-gen2-wdt" for R-Car Gen2 and RZ/G
> +                - "renesas,rcar-gen3-wdt" for R-Car Gen3

You've lost the generic "renesas,rza-wdt".

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

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

* [RFC v3 10/25] dt-bindings: watchdog: renesas-wdt: Add R-Car Gen2 support
@ 2018-01-31  8:46       ` Geert Uytterhoeven
  0 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31  8:46 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Fabrizio,

On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
> This commit documents the compatibility with R-Car Gen2 and RZ/G
> devices by defining the generic compatible string "renesas,rcar-gen2-wdt".
> Also, this patch expands the list of SoC-specific compatible strings to
> include RZ/G and R-Car Gen2 devices.
>
> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>

Thanks for your patch!

> --- a/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
> +++ b/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
> @@ -1,17 +1,25 @@
>  Renesas Watchdog Timer (WDT) Controller
>
>  Required properties:
> -- compatible : Should be "renesas,<soctype>-wdt", and
> -              "renesas,rcar-gen3-wdt" or "renesas,rza-wdt" as fallback.
> + - compatible : Must be "renesas,<soctype>-wdt", followed by a generic
> +               fallback compatible string when compatible with the generic
> +               version.
>                Examples with soctypes are:
> +                - "renesas,r8a7743-wdt" (RZ/G1M)
> +                - "renesas,r8a7745-wdt" (RZ/G1E)
> +                - "renesas,r8a7790-wdt" (R-Car H2)
> +                - "renesas,r8a7791-wdt" (R-Car M2-W)
> +                - "renesas,r8a7792-wdt" (R-Car V2H)
> +                - "renesas,r8a7793-wdt" (R-Car M2-N)
> +                - "renesas,r8a7794-wdt" (R-Car E2)
>                  - "renesas,r8a7795-wdt" (R-Car H3)
>                  - "renesas,r8a7796-wdt" (R-Car M3-W)
>                  - "renesas,r8a77995-wdt" (R-Car D3)
>                  - "renesas,r7s72100-wdt" (RZ/A1)
> +               The generic compatible string must be:
> +                - "renesas,rcar-gen2-wdt" for R-Car Gen2 and RZ/G
> +                - "renesas,rcar-gen3-wdt" for R-Car Gen3

You've lost the generic "renesas,rza-wdt".

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

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

* RE: [RFC v3 10/25] dt-bindings: watchdog: renesas-wdt: Add R-Car Gen2 support
  2018-01-31  8:46       ` Geert Uytterhoeven
  (?)
  (?)
@ 2018-01-31 10:27           ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-31 10:27 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, Guenter Roeck,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Watchdog Mailing List, Linux-Renesas

Hi Geert,

> Subject: Re: [RFC v3 10/25] dt-bindings: watchdog: renesas-wdt: Add R-Car Gen2 support
>
> Hi Fabrizio,
>
> On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
> <fabrizio.castro@bp.renesas.com> wrote:
> > This commit documents the compatibility with R-Car Gen2 and RZ/G
> > devices by defining the generic compatible string "renesas,rcar-gen2-wdt".
> > Also, this patch expands the list of SoC-specific compatible strings to
> > include RZ/G and R-Car Gen2 devices.
> >
> > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
>
> Thanks for your patch!

Thanks for your feedback!

>
> > --- a/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
> > +++ b/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
> > @@ -1,17 +1,25 @@
> >  Renesas Watchdog Timer (WDT) Controller
> >
> >  Required properties:
> > -- compatible : Should be "renesas,<soctype>-wdt", and
> > -              "renesas,rcar-gen3-wdt" or "renesas,rza-wdt" as fallback.
> > + - compatible : Must be "renesas,<soctype>-wdt", followed by a generic
> > +               fallback compatible string when compatible with the generic
> > +               version.
> >                Examples with soctypes are:
> > +                - "renesas,r8a7743-wdt" (RZ/G1M)
> > +                - "renesas,r8a7745-wdt" (RZ/G1E)
> > +                - "renesas,r8a7790-wdt" (R-Car H2)
> > +                - "renesas,r8a7791-wdt" (R-Car M2-W)
> > +                - "renesas,r8a7792-wdt" (R-Car V2H)
> > +                - "renesas,r8a7793-wdt" (R-Car M2-N)
> > +                - "renesas,r8a7794-wdt" (R-Car E2)
> >                  - "renesas,r8a7795-wdt" (R-Car H3)
> >                  - "renesas,r8a7796-wdt" (R-Car M3-W)
> >                  - "renesas,r8a77995-wdt" (R-Car D3)
> >                  - "renesas,r7s72100-wdt" (RZ/A1)
> > +               The generic compatible string must be:
> > +                - "renesas,rcar-gen2-wdt" for R-Car Gen2 and RZ/G
> > +                - "renesas,rcar-gen3-wdt" for R-Car Gen3
>
> You've lost the generic "renesas,rza-wdt".

Ooops, I'll fix that.

Cheers,
Fab

>
> With that fixed:
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> 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



Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

* RE: [RFC v3 10/25] dt-bindings: watchdog: renesas-wdt: Add R-Car Gen2 support
@ 2018-01-31 10:27           ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-31 10:27 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, Guenter Roeck,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Watchdog Mailing List, Linux-Renesas, linux-arm-kernel,
	linux-clk, Chris Paterson, Biju Das, Ramesh Shanmugasundaram

Hi Geert,

> Subject: Re: [RFC v3 10/25] dt-bindings: watchdog: renesas-wdt: Add R-Car Gen2 support
>
> Hi Fabrizio,
>
> On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
> <fabrizio.castro@bp.renesas.com> wrote:
> > This commit documents the compatibility with R-Car Gen2 and RZ/G
> > devices by defining the generic compatible string "renesas,rcar-gen2-wdt".
> > Also, this patch expands the list of SoC-specific compatible strings to
> > include RZ/G and R-Car Gen2 devices.
> >
> > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
>
> Thanks for your patch!

Thanks for your feedback!

>
> > --- a/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
> > +++ b/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
> > @@ -1,17 +1,25 @@
> >  Renesas Watchdog Timer (WDT) Controller
> >
> >  Required properties:
> > -- compatible : Should be "renesas,<soctype>-wdt", and
> > -              "renesas,rcar-gen3-wdt" or "renesas,rza-wdt" as fallback.
> > + - compatible : Must be "renesas,<soctype>-wdt", followed by a generic
> > +               fallback compatible string when compatible with the generic
> > +               version.
> >                Examples with soctypes are:
> > +                - "renesas,r8a7743-wdt" (RZ/G1M)
> > +                - "renesas,r8a7745-wdt" (RZ/G1E)
> > +                - "renesas,r8a7790-wdt" (R-Car H2)
> > +                - "renesas,r8a7791-wdt" (R-Car M2-W)
> > +                - "renesas,r8a7792-wdt" (R-Car V2H)
> > +                - "renesas,r8a7793-wdt" (R-Car M2-N)
> > +                - "renesas,r8a7794-wdt" (R-Car E2)
> >                  - "renesas,r8a7795-wdt" (R-Car H3)
> >                  - "renesas,r8a7796-wdt" (R-Car M3-W)
> >                  - "renesas,r8a77995-wdt" (R-Car D3)
> >                  - "renesas,r7s72100-wdt" (RZ/A1)
> > +               The generic compatible string must be:
> > +                - "renesas,rcar-gen2-wdt" for R-Car Gen2 and RZ/G
> > +                - "renesas,rcar-gen3-wdt" for R-Car Gen3
>
> You've lost the generic "renesas,rza-wdt".

Ooops, I'll fix that.

Cheers,
Fab

>
> With that fixed:
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> 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



Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

* RE: [RFC v3 10/25] dt-bindings: watchdog: renesas-wdt: Add R-Car Gen2 support
@ 2018-01-31 10:27           ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-31 10:27 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, Guenter Roeck,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Watchdog Mailing List, Linux-Renesas, linux-arm-kernel,
	linux-clk, Chris Paterson, Biju Das, Ramesh Shanmugasundaram

SGkgR2VlcnQsDQoNCj4gU3ViamVjdDogUmU6IFtSRkMgdjMgMTAvMjVdIGR0LWJpbmRpbmdzOiB3
YXRjaGRvZzogcmVuZXNhcy13ZHQ6IEFkZCBSLUNhciBHZW4yIHN1cHBvcnQNCj4NCj4gSGkgRmFi
cml6aW8sDQo+DQo+IE9uIFR1ZSwgSmFuIDMwLCAyMDE4IGF0IDk6MjIgUE0sIEZhYnJpemlvIENh
c3Rybw0KPiA8ZmFicml6aW8uY2FzdHJvQGJwLnJlbmVzYXMuY29tPiB3cm90ZToNCj4gPiBUaGlz
IGNvbW1pdCBkb2N1bWVudHMgdGhlIGNvbXBhdGliaWxpdHkgd2l0aCBSLUNhciBHZW4yIGFuZCBS
Wi9HDQo+ID4gZGV2aWNlcyBieSBkZWZpbmluZyB0aGUgZ2VuZXJpYyBjb21wYXRpYmxlIHN0cmlu
ZyAicmVuZXNhcyxyY2FyLWdlbjItd2R0Ii4NCj4gPiBBbHNvLCB0aGlzIHBhdGNoIGV4cGFuZHMg
dGhlIGxpc3Qgb2YgU29DLXNwZWNpZmljIGNvbXBhdGlibGUgc3RyaW5ncyB0bw0KPiA+IGluY2x1
ZGUgUlovRyBhbmQgUi1DYXIgR2VuMiBkZXZpY2VzLg0KPiA+DQo+ID4gU2lnbmVkLW9mZi1ieTog
RmFicml6aW8gQ2FzdHJvIDxmYWJyaXppby5jYXN0cm9AYnAucmVuZXNhcy5jb20+DQo+ID4gU2ln
bmVkLW9mZi1ieTogUmFtZXNoIFNoYW5tdWdhc3VuZGFyYW0gPHJhbWVzaC5zaGFubXVnYXN1bmRh
cmFtQGJwLnJlbmVzYXMuY29tPg0KPg0KPiBUaGFua3MgZm9yIHlvdXIgcGF0Y2ghDQoNClRoYW5r
cyBmb3IgeW91ciBmZWVkYmFjayENCg0KPg0KPiA+IC0tLSBhL0RvY3VtZW50YXRpb24vZGV2aWNl
dHJlZS9iaW5kaW5ncy93YXRjaGRvZy9yZW5lc2FzLXdkdC50eHQNCj4gPiArKysgYi9Eb2N1bWVu
dGF0aW9uL2RldmljZXRyZWUvYmluZGluZ3Mvd2F0Y2hkb2cvcmVuZXNhcy13ZHQudHh0DQo+ID4g
QEAgLTEsMTcgKzEsMjUgQEANCj4gPiAgUmVuZXNhcyBXYXRjaGRvZyBUaW1lciAoV0RUKSBDb250
cm9sbGVyDQo+ID4NCj4gPiAgUmVxdWlyZWQgcHJvcGVydGllczoNCj4gPiAtLSBjb21wYXRpYmxl
IDogU2hvdWxkIGJlICJyZW5lc2FzLDxzb2N0eXBlPi13ZHQiLCBhbmQNCj4gPiAtICAgICAgICAg
ICAgICAicmVuZXNhcyxyY2FyLWdlbjMtd2R0IiBvciAicmVuZXNhcyxyemEtd2R0IiBhcyBmYWxs
YmFjay4NCj4gPiArIC0gY29tcGF0aWJsZSA6IE11c3QgYmUgInJlbmVzYXMsPHNvY3R5cGU+LXdk
dCIsIGZvbGxvd2VkIGJ5IGEgZ2VuZXJpYw0KPiA+ICsgICAgICAgICAgICAgICBmYWxsYmFjayBj
b21wYXRpYmxlIHN0cmluZyB3aGVuIGNvbXBhdGlibGUgd2l0aCB0aGUgZ2VuZXJpYw0KPiA+ICsg
ICAgICAgICAgICAgICB2ZXJzaW9uLg0KPiA+ICAgICAgICAgICAgICAgIEV4YW1wbGVzIHdpdGgg
c29jdHlwZXMgYXJlOg0KPiA+ICsgICAgICAgICAgICAgICAgLSAicmVuZXNhcyxyOGE3NzQzLXdk
dCIgKFJaL0cxTSkNCj4gPiArICAgICAgICAgICAgICAgIC0gInJlbmVzYXMscjhhNzc0NS13ZHQi
IChSWi9HMUUpDQo+ID4gKyAgICAgICAgICAgICAgICAtICJyZW5lc2FzLHI4YTc3OTAtd2R0IiAo
Ui1DYXIgSDIpDQo+ID4gKyAgICAgICAgICAgICAgICAtICJyZW5lc2FzLHI4YTc3OTEtd2R0IiAo
Ui1DYXIgTTItVykNCj4gPiArICAgICAgICAgICAgICAgIC0gInJlbmVzYXMscjhhNzc5Mi13ZHQi
IChSLUNhciBWMkgpDQo+ID4gKyAgICAgICAgICAgICAgICAtICJyZW5lc2FzLHI4YTc3OTMtd2R0
IiAoUi1DYXIgTTItTikNCj4gPiArICAgICAgICAgICAgICAgIC0gInJlbmVzYXMscjhhNzc5NC13
ZHQiIChSLUNhciBFMikNCj4gPiAgICAgICAgICAgICAgICAgIC0gInJlbmVzYXMscjhhNzc5NS13
ZHQiIChSLUNhciBIMykNCj4gPiAgICAgICAgICAgICAgICAgIC0gInJlbmVzYXMscjhhNzc5Ni13
ZHQiIChSLUNhciBNMy1XKQ0KPiA+ICAgICAgICAgICAgICAgICAgLSAicmVuZXNhcyxyOGE3Nzk5
NS13ZHQiIChSLUNhciBEMykNCj4gPiAgICAgICAgICAgICAgICAgIC0gInJlbmVzYXMscjdzNzIx
MDAtd2R0IiAoUlovQTEpDQo+ID4gKyAgICAgICAgICAgICAgIFRoZSBnZW5lcmljIGNvbXBhdGli
bGUgc3RyaW5nIG11c3QgYmU6DQo+ID4gKyAgICAgICAgICAgICAgICAtICJyZW5lc2FzLHJjYXIt
Z2VuMi13ZHQiIGZvciBSLUNhciBHZW4yIGFuZCBSWi9HDQo+ID4gKyAgICAgICAgICAgICAgICAt
ICJyZW5lc2FzLHJjYXItZ2VuMy13ZHQiIGZvciBSLUNhciBHZW4zDQo+DQo+IFlvdSd2ZSBsb3N0
IHRoZSBnZW5lcmljICJyZW5lc2FzLHJ6YS13ZHQiLg0KDQpPb29wcywgSSdsbCBmaXggdGhhdC4N
Cg0KQ2hlZXJzLA0KRmFiDQoNCj4NCj4gV2l0aCB0aGF0IGZpeGVkOg0KPiBSZXZpZXdlZC1ieTog
R2VlcnQgVXl0dGVyaG9ldmVuIDxnZWVydCtyZW5lc2FzQGdsaWRlci5iZT4NCj4NCj4gR3J7b2V0
amUsZWV0aW5nfXMsDQo+DQo+ICAgICAgICAgICAgICAgICAgICAgICAgIEdlZXJ0DQo+DQo+IC0t
DQo+IEdlZXJ0IFV5dHRlcmhvZXZlbiAtLSBUaGVyZSdzIGxvdHMgb2YgTGludXggYmV5b25kIGlh
MzIgLS0gZ2VlcnRAbGludXgtbTY4ay5vcmcNCj4NCj4gSW4gcGVyc29uYWwgY29udmVyc2F0aW9u
cyB3aXRoIHRlY2huaWNhbCBwZW9wbGUsIEkgY2FsbCBteXNlbGYgYSBoYWNrZXIuIEJ1dA0KPiB3
aGVuIEknbSB0YWxraW5nIHRvIGpvdXJuYWxpc3RzIEkganVzdCBzYXkgInByb2dyYW1tZXIiIG9y
IHNvbWV0aGluZyBsaWtlIHRoYXQuDQo+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
LS0gTGludXMgVG9ydmFsZHMNCg0KDQoNClJlbmVzYXMgRWxlY3Ryb25pY3MgRXVyb3BlIEx0ZCwg
RHVrZXMgTWVhZG93LCBNaWxsYm9hcmQgUm9hZCwgQm91cm5lIEVuZCwgQnVja2luZ2hhbXNoaXJl
LCBTTDggNUZILCBVSy4gUmVnaXN0ZXJlZCBpbiBFbmdsYW5kICYgV2FsZXMgdW5kZXIgUmVnaXN0
ZXJlZCBOby4gMDQ1ODY3MDkuDQo=

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

* [RFC v3 10/25] dt-bindings: watchdog: renesas-wdt: Add R-Car Gen2 support
@ 2018-01-31 10:27           ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-31 10:27 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Geert,

> Subject: Re: [RFC v3 10/25] dt-bindings: watchdog: renesas-wdt: Add R-Car Gen2 support
>
> Hi Fabrizio,
>
> On Tue, Jan 30, 2018 at 9:22 PM, Fabrizio Castro
> <fabrizio.castro@bp.renesas.com> wrote:
> > This commit documents the compatibility with R-Car Gen2 and RZ/G
> > devices by defining the generic compatible string "renesas,rcar-gen2-wdt".
> > Also, this patch expands the list of SoC-specific compatible strings to
> > include RZ/G and R-Car Gen2 devices.
> >
> > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
>
> Thanks for your patch!

Thanks for your feedback!

>
> > --- a/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
> > +++ b/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
> > @@ -1,17 +1,25 @@
> >  Renesas Watchdog Timer (WDT) Controller
> >
> >  Required properties:
> > -- compatible : Should be "renesas,<soctype>-wdt", and
> > -              "renesas,rcar-gen3-wdt" or "renesas,rza-wdt" as fallback.
> > + - compatible : Must be "renesas,<soctype>-wdt", followed by a generic
> > +               fallback compatible string when compatible with the generic
> > +               version.
> >                Examples with soctypes are:
> > +                - "renesas,r8a7743-wdt" (RZ/G1M)
> > +                - "renesas,r8a7745-wdt" (RZ/G1E)
> > +                - "renesas,r8a7790-wdt" (R-Car H2)
> > +                - "renesas,r8a7791-wdt" (R-Car M2-W)
> > +                - "renesas,r8a7792-wdt" (R-Car V2H)
> > +                - "renesas,r8a7793-wdt" (R-Car M2-N)
> > +                - "renesas,r8a7794-wdt" (R-Car E2)
> >                  - "renesas,r8a7795-wdt" (R-Car H3)
> >                  - "renesas,r8a7796-wdt" (R-Car M3-W)
> >                  - "renesas,r8a77995-wdt" (R-Car D3)
> >                  - "renesas,r7s72100-wdt" (RZ/A1)
> > +               The generic compatible string must be:
> > +                - "renesas,rcar-gen2-wdt" for R-Car Gen2 and RZ/G
> > +                - "renesas,rcar-gen3-wdt" for R-Car Gen3
>
> You've lost the generic "renesas,rza-wdt".

Ooops, I'll fix that.

Cheers,
Fab

>
> With that fixed:
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> 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



Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

* RE: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
  2018-01-30 22:05       ` Guenter Roeck
  (?)
  (?)
@ 2018-01-31 10:47           ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-31 10:47 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hello Guenter,

thank you for your feedback.

> Subject: Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
>
> On Tue, Jan 30, 2018 at 08:22:44PM +0000, Fabrizio Castro wrote:
> > On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
> > when suspending to RAM we need to explicitly disable the counting by
> > clearing TME from RWTCSRA.
> > Also, on some systems RWDT is the only piece of HW that allows the SoC
> > to be restarted, therefore this patch implements the restart callback.
> >
> > Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
> > Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram-+3GIUL1IS+U@public.gmane.orgsas.com>
> > ---
> > Wolfram, was the restart callback implementation missing for a reason?
> > Is its implementation going to break any Gen3 platform?
> >
>
> The changes clearly are way more than claimed in the subject. Adding
> restart handler and PM support may be prerequisites for Gen2, but the
> changes apply to Gen3 as well. What happened to "one patch per logical
> change" ?

The PM implementation should be ok for Gen3 too, without this patch series the kernel
would disable the rwdt clock when suspending to RAM, this would "pause" the counting.
This patch series declares the rwdt clock as critical for Gen2 and RZ/G1, which means we
need to explicitly disable the counting to keep the same behaviour in place.
With respect to the restart callback implementation, that may well have consequences on
Gen3, hopefully Wolfram will give us a feedback on this.
In particular I would like to know if we should be installing the restart callback only when
we use "renesas,rcar-gen2-wdt" as compatible string, or it's ok to make it available for
Gen3 as well.
The only way to reboot iWave's boards iwg20d and iwg22d is to use the internal watchdog,
that's why the restart implementation was merged into this patch.
I can split this patch in two, one for PM support and one for restart support for the next
version, what do you think about this?

>
> > v1->v3:
> > * unified Gen2 and Gen3 drivers.
> >
> >  drivers/watchdog/renesas_wdt.c | 61 ++++++++++++++++++++++++++++++++++++++----
> >  1 file changed, 56 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/watchdog/renesas_wdt.c b/drivers/watchdog/renesas_wdt.c
> > index 831ef83..eedb016 100644
> > --- a/drivers/watchdog/renesas_wdt.c
> > +++ b/drivers/watchdog/renesas_wdt.c
> > @@ -107,6 +107,24 @@ static unsigned int rwdt_get_timeleft(struct watchdog_device *wdev)
> >  return DIV_BY_CLKS_PER_SEC(priv, 65536 - val);
> >  }
> >
> > +static int rwdt_restart(struct watchdog_device *wdev, unsigned long action,
> > +void *data)
> > +{
> > +struct rwdt_priv *priv = watchdog_get_drvdata(wdev);
> > +
> > +pm_runtime_get_sync(wdev->parent);
> > +
> > +rwdt_write(priv, 0x00, RWTCSRB);
> > +rwdt_write(priv, 0x00, RWTCSRA);
> > +rwdt_write(priv, 0xffff, RWTCNT);
> > +
> > +while (readb_relaxed(priv->base + RWTCSRA) & RWTCSRA_WRFLG)
> > +cpu_relax();
> > +
> > +rwdt_write(priv, 0x80, RWTCSRA);
> > +return 0;
> > +}
> > +
> >  static const struct watchdog_info rwdt_ident = {
> >  .options = WDIOF_MAGICCLOSE | WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT,
> >  .identity = "Renesas WDT Watchdog",
> > @@ -118,6 +136,7 @@ static const struct watchdog_ops rwdt_ops = {
> >  .stop = rwdt_stop,
> >  .ping = rwdt_init_timeout,
> >  .get_timeleft = rwdt_get_timeleft,
> > +.restart = rwdt_restart,
> >  };
> >
> >  static int rwdt_probe(struct platform_device *pdev)
> > @@ -203,13 +222,42 @@ static int rwdt_remove(struct platform_device *pdev)
> >  return 0;
> >  }
> >
> > -/*
> > - * This driver does also fit for R-Car Gen2 (r8a779[0-4]) WDT. However, for SMP
> > - * to work there, one also needs a RESET (RST) driver which does not exist yet
> > - * due to HW issues. This needs to be solved before adding compatibles here.
> > - */
>
> Have those issues been resolved ?

This patch series addresses precisely those issues. The first implementation
used a flag that the watchdog driver needed to explicitly set to make everything
work as expected. This new version uses a different concept that doesn't require
such an hack, and that's why the proposal now is to merge Gen2 and Gen3 drivers.

Thanks,
Fab

>
> > +#ifdef CONFIG_PM
> > +static int rwdt_suspend(struct device *dev)
> > +{
> > +struct platform_device *pdev;
> > +struct rwdt_priv *priv;
> > +
> > +pdev = to_platform_device(dev);
> > +priv = platform_get_drvdata(pdev);
> > +if (watchdog_active(&priv->wdev)) {
> > +rwdt_write(priv, priv->cks, RWTCSRA);
> > +}
> > +return 0;
> > +}
> > +
> > +static int rwdt_resume(struct device *dev)
> > +{
> > +struct platform_device *pdev;
> > +struct rwdt_priv *priv;
> > +
> > +pdev = to_platform_device(dev);
> > +priv = platform_get_drvdata(pdev);
> > +if (watchdog_active(&priv->wdev)) {
> > +rwdt_write(priv, priv->cks | RWTCSRA_TME, RWTCSRA);
> > +}
> > +return 0;
> > +}
> > +
> > +static const struct dev_pm_ops rwdt_pm = {
> > +.suspend = rwdt_suspend,
> > +.resume = rwdt_resume,
> > +};
> > +#endif
> > +
> >  static const struct of_device_id rwdt_ids[] = {
> >  { .compatible = "renesas,rcar-gen3-wdt", },
> > +{ .compatible = "renesas,rcar-gen2-wdt", },
> >  { /* sentinel */ }
> >  };
> >  MODULE_DEVICE_TABLE(of, rwdt_ids);
> > @@ -218,6 +266,9 @@ static struct platform_driver rwdt_driver = {
> >  .driver = {
> >  .name = "renesas_wdt",
> >  .of_match_table = rwdt_ids,
> > +#ifdef CONFIG_PM
> > +.pm = &rwdt_pm,
> > +#endif
> >  },
> >  .probe = rwdt_probe,
> >  .remove = rwdt_remove,
> > --
> > 2.7.4
> >



Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.
--
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] 120+ messages in thread

* RE: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
@ 2018-01-31 10:47           ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-31 10:47 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Ramesh Shanmugasundaram

Hello Guenter,

thank you for your feedback.

> Subject: Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
>
> On Tue, Jan 30, 2018 at 08:22:44PM +0000, Fabrizio Castro wrote:
> > On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
> > when suspending to RAM we need to explicitly disable the counting by
> > clearing TME from RWTCSRA.
> > Also, on some systems RWDT is the only piece of HW that allows the SoC
> > to be restarted, therefore this patch implements the restart callback.
> >
> > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
> > ---
> > Wolfram, was the restart callback implementation missing for a reason?
> > Is its implementation going to break any Gen3 platform?
> >
>
> The changes clearly are way more than claimed in the subject. Adding
> restart handler and PM support may be prerequisites for Gen2, but the
> changes apply to Gen3 as well. What happened to "one patch per logical
> change" ?

The PM implementation should be ok for Gen3 too, without this patch series the kernel
would disable the rwdt clock when suspending to RAM, this would "pause" the counting.
This patch series declares the rwdt clock as critical for Gen2 and RZ/G1, which means we
need to explicitly disable the counting to keep the same behaviour in place.
With respect to the restart callback implementation, that may well have consequences on
Gen3, hopefully Wolfram will give us a feedback on this.
In particular I would like to know if we should be installing the restart callback only when
we use "renesas,rcar-gen2-wdt" as compatible string, or it's ok to make it available for
Gen3 as well.
The only way to reboot iWave's boards iwg20d and iwg22d is to use the internal watchdog,
that's why the restart implementation was merged into this patch.
I can split this patch in two, one for PM support and one for restart support for the next
version, what do you think about this?

>
> > v1->v3:
> > * unified Gen2 and Gen3 drivers.
> >
> >  drivers/watchdog/renesas_wdt.c | 61 ++++++++++++++++++++++++++++++++++++++----
> >  1 file changed, 56 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/watchdog/renesas_wdt.c b/drivers/watchdog/renesas_wdt.c
> > index 831ef83..eedb016 100644
> > --- a/drivers/watchdog/renesas_wdt.c
> > +++ b/drivers/watchdog/renesas_wdt.c
> > @@ -107,6 +107,24 @@ static unsigned int rwdt_get_timeleft(struct watchdog_device *wdev)
> >  return DIV_BY_CLKS_PER_SEC(priv, 65536 - val);
> >  }
> >
> > +static int rwdt_restart(struct watchdog_device *wdev, unsigned long action,
> > +void *data)
> > +{
> > +struct rwdt_priv *priv = watchdog_get_drvdata(wdev);
> > +
> > +pm_runtime_get_sync(wdev->parent);
> > +
> > +rwdt_write(priv, 0x00, RWTCSRB);
> > +rwdt_write(priv, 0x00, RWTCSRA);
> > +rwdt_write(priv, 0xffff, RWTCNT);
> > +
> > +while (readb_relaxed(priv->base + RWTCSRA) & RWTCSRA_WRFLG)
> > +cpu_relax();
> > +
> > +rwdt_write(priv, 0x80, RWTCSRA);
> > +return 0;
> > +}
> > +
> >  static const struct watchdog_info rwdt_ident = {
> >  .options = WDIOF_MAGICCLOSE | WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT,
> >  .identity = "Renesas WDT Watchdog",
> > @@ -118,6 +136,7 @@ static const struct watchdog_ops rwdt_ops = {
> >  .stop = rwdt_stop,
> >  .ping = rwdt_init_timeout,
> >  .get_timeleft = rwdt_get_timeleft,
> > +.restart = rwdt_restart,
> >  };
> >
> >  static int rwdt_probe(struct platform_device *pdev)
> > @@ -203,13 +222,42 @@ static int rwdt_remove(struct platform_device *pdev)
> >  return 0;
> >  }
> >
> > -/*
> > - * This driver does also fit for R-Car Gen2 (r8a779[0-4]) WDT. However, for SMP
> > - * to work there, one also needs a RESET (RST) driver which does not exist yet
> > - * due to HW issues. This needs to be solved before adding compatibles here.
> > - */
>
> Have those issues been resolved ?

This patch series addresses precisely those issues. The first implementation
used a flag that the watchdog driver needed to explicitly set to make everything
work as expected. This new version uses a different concept that doesn't require
such an hack, and that's why the proposal now is to merge Gen2 and Gen3 drivers.

Thanks,
Fab

>
> > +#ifdef CONFIG_PM
> > +static int rwdt_suspend(struct device *dev)
> > +{
> > +struct platform_device *pdev;
> > +struct rwdt_priv *priv;
> > +
> > +pdev = to_platform_device(dev);
> > +priv = platform_get_drvdata(pdev);
> > +if (watchdog_active(&priv->wdev)) {
> > +rwdt_write(priv, priv->cks, RWTCSRA);
> > +}
> > +return 0;
> > +}
> > +
> > +static int rwdt_resume(struct device *dev)
> > +{
> > +struct platform_device *pdev;
> > +struct rwdt_priv *priv;
> > +
> > +pdev = to_platform_device(dev);
> > +priv = platform_get_drvdata(pdev);
> > +if (watchdog_active(&priv->wdev)) {
> > +rwdt_write(priv, priv->cks | RWTCSRA_TME, RWTCSRA);
> > +}
> > +return 0;
> > +}
> > +
> > +static const struct dev_pm_ops rwdt_pm = {
> > +.suspend = rwdt_suspend,
> > +.resume = rwdt_resume,
> > +};
> > +#endif
> > +
> >  static const struct of_device_id rwdt_ids[] = {
> >  { .compatible = "renesas,rcar-gen3-wdt", },
> > +{ .compatible = "renesas,rcar-gen2-wdt", },
> >  { /* sentinel */ }
> >  };
> >  MODULE_DEVICE_TABLE(of, rwdt_ids);
> > @@ -218,6 +266,9 @@ static struct platform_driver rwdt_driver = {
> >  .driver = {
> >  .name = "renesas_wdt",
> >  .of_match_table = rwdt_ids,
> > +#ifdef CONFIG_PM
> > +.pm = &rwdt_pm,
> > +#endif
> >  },
> >  .probe = rwdt_probe,
> >  .remove = rwdt_remove,
> > --
> > 2.7.4
> >



Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

* RE: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
@ 2018-01-31 10:47           ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-31 10:47 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Ramesh Shanmugasundaram

Hello Guenter,

thank you for your feedback.

> Subject: Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
>
> On Tue, Jan 30, 2018 at 08:22:44PM +0000, Fabrizio Castro wrote:
> > On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
> > when suspending to RAM we need to explicitly disable the counting by
> > clearing TME from RWTCSRA.
> > Also, on some systems RWDT is the only piece of HW that allows the SoC
> > to be restarted, therefore this patch implements the restart callback.
> >
> > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.rene=
sas.com>
> > ---
> > Wolfram, was the restart callback implementation missing for a reason?
> > Is its implementation going to break any Gen3 platform?
> >
>
> The changes clearly are way more than claimed in the subject. Adding
> restart handler and PM support may be prerequisites for Gen2, but the
> changes apply to Gen3 as well. What happened to "one patch per logical
> change" ?

The PM implementation should be ok for Gen3 too, without this patch series =
the kernel
would disable the rwdt clock when suspending to RAM, this would "pause" the=
 counting.
This patch series declares the rwdt clock as critical for Gen2 and RZ/G1, w=
hich means we
need to explicitly disable the counting to keep the same behaviour in place=
.
With respect to the restart callback implementation, that may well have con=
sequences on
Gen3, hopefully Wolfram will give us a feedback on this.
In particular I would like to know if we should be installing the restart c=
allback only when
we use "renesas,rcar-gen2-wdt" as compatible string, or it's ok to make it =
available for
Gen3 as well.
The only way to reboot iWave's boards iwg20d and iwg22d is to use the inter=
nal watchdog,
that's why the restart implementation was merged into this patch.
I can split this patch in two, one for PM support and one for restart suppo=
rt for the next
version, what do you think about this?

>
> > v1->v3:
> > * unified Gen2 and Gen3 drivers.
> >
> >  drivers/watchdog/renesas_wdt.c | 61 ++++++++++++++++++++++++++++++++++=
++++----
> >  1 file changed, 56 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/watchdog/renesas_wdt.c b/drivers/watchdog/renesas_=
wdt.c
> > index 831ef83..eedb016 100644
> > --- a/drivers/watchdog/renesas_wdt.c
> > +++ b/drivers/watchdog/renesas_wdt.c
> > @@ -107,6 +107,24 @@ static unsigned int rwdt_get_timeleft(struct watch=
dog_device *wdev)
> >  return DIV_BY_CLKS_PER_SEC(priv, 65536 - val);
> >  }
> >
> > +static int rwdt_restart(struct watchdog_device *wdev, unsigned long ac=
tion,
> > +void *data)
> > +{
> > +struct rwdt_priv *priv =3D watchdog_get_drvdata(wdev);
> > +
> > +pm_runtime_get_sync(wdev->parent);
> > +
> > +rwdt_write(priv, 0x00, RWTCSRB);
> > +rwdt_write(priv, 0x00, RWTCSRA);
> > +rwdt_write(priv, 0xffff, RWTCNT);
> > +
> > +while (readb_relaxed(priv->base + RWTCSRA) & RWTCSRA_WRFLG)
> > +cpu_relax();
> > +
> > +rwdt_write(priv, 0x80, RWTCSRA);
> > +return 0;
> > +}
> > +
> >  static const struct watchdog_info rwdt_ident =3D {
> >  .options =3D WDIOF_MAGICCLOSE | WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT=
,
> >  .identity =3D "Renesas WDT Watchdog",
> > @@ -118,6 +136,7 @@ static const struct watchdog_ops rwdt_ops =3D {
> >  .stop =3D rwdt_stop,
> >  .ping =3D rwdt_init_timeout,
> >  .get_timeleft =3D rwdt_get_timeleft,
> > +.restart =3D rwdt_restart,
> >  };
> >
> >  static int rwdt_probe(struct platform_device *pdev)
> > @@ -203,13 +222,42 @@ static int rwdt_remove(struct platform_device *pd=
ev)
> >  return 0;
> >  }
> >
> > -/*
> > - * This driver does also fit for R-Car Gen2 (r8a779[0-4]) WDT. However=
, for SMP
> > - * to work there, one also needs a RESET (RST) driver which does not e=
xist yet
> > - * due to HW issues. This needs to be solved before adding compatibles=
 here.
> > - */
>
> Have those issues been resolved ?

This patch series addresses precisely those issues. The first implementatio=
n
used a flag that the watchdog driver needed to explicitly set to make every=
thing
work as expected. This new version uses a different concept that doesn't re=
quire
such an hack, and that's why the proposal now is to merge Gen2 and Gen3 dri=
vers.

Thanks,
Fab

>
> > +#ifdef CONFIG_PM
> > +static int rwdt_suspend(struct device *dev)
> > +{
> > +struct platform_device *pdev;
> > +struct rwdt_priv *priv;
> > +
> > +pdev =3D to_platform_device(dev);
> > +priv =3D platform_get_drvdata(pdev);
> > +if (watchdog_active(&priv->wdev)) {
> > +rwdt_write(priv, priv->cks, RWTCSRA);
> > +}
> > +return 0;
> > +}
> > +
> > +static int rwdt_resume(struct device *dev)
> > +{
> > +struct platform_device *pdev;
> > +struct rwdt_priv *priv;
> > +
> > +pdev =3D to_platform_device(dev);
> > +priv =3D platform_get_drvdata(pdev);
> > +if (watchdog_active(&priv->wdev)) {
> > +rwdt_write(priv, priv->cks | RWTCSRA_TME, RWTCSRA);
> > +}
> > +return 0;
> > +}
> > +
> > +static const struct dev_pm_ops rwdt_pm =3D {
> > +.suspend =3D rwdt_suspend,
> > +.resume =3D rwdt_resume,
> > +};
> > +#endif
> > +
> >  static const struct of_device_id rwdt_ids[] =3D {
> >  { .compatible =3D "renesas,rcar-gen3-wdt", },
> > +{ .compatible =3D "renesas,rcar-gen2-wdt", },
> >  { /* sentinel */ }
> >  };
> >  MODULE_DEVICE_TABLE(of, rwdt_ids);
> > @@ -218,6 +266,9 @@ static struct platform_driver rwdt_driver =3D {
> >  .driver =3D {
> >  .name =3D "renesas_wdt",
> >  .of_match_table =3D rwdt_ids,
> > +#ifdef CONFIG_PM
> > +.pm =3D &rwdt_pm,
> > +#endif
> >  },
> >  .probe =3D rwdt_probe,
> >  .remove =3D rwdt_remove,
> > --
> > 2.7.4
> >



Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, B=
uckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered=
 No. 04586709.

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

* [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
@ 2018-01-31 10:47           ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-31 10:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Guenter,

thank you for your feedback.

> Subject: Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
>
> On Tue, Jan 30, 2018 at 08:22:44PM +0000, Fabrizio Castro wrote:
> > On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
> > when suspending to RAM we need to explicitly disable the counting by
> > clearing TME from RWTCSRA.
> > Also, on some systems RWDT is the only piece of HW that allows the SoC
> > to be restarted, therefore this patch implements the restart callback.
> >
> > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
> > ---
> > Wolfram, was the restart callback implementation missing for a reason?
> > Is its implementation going to break any Gen3 platform?
> >
>
> The changes clearly are way more than claimed in the subject. Adding
> restart handler and PM support may be prerequisites for Gen2, but the
> changes apply to Gen3 as well. What happened to "one patch per logical
> change" ?

The PM implementation should be ok for Gen3 too, without this patch series the kernel
would disable the rwdt clock when suspending to RAM, this would "pause" the counting.
This patch series declares the rwdt clock as critical for Gen2 and RZ/G1, which means we
need to explicitly disable the counting to keep the same behaviour in place.
With respect to the restart callback implementation, that may well have consequences on
Gen3, hopefully Wolfram will give us a feedback on this.
In particular I would like to know if we should be installing the restart callback only when
we use "renesas,rcar-gen2-wdt" as compatible string, or it's ok to make it available for
Gen3 as well.
The only way to reboot iWave's boards iwg20d and iwg22d is to use the internal watchdog,
that's why the restart implementation was merged into this patch.
I can split this patch in two, one for PM support and one for restart support for the next
version, what do you think about this?

>
> > v1->v3:
> > * unified Gen2 and Gen3 drivers.
> >
> >  drivers/watchdog/renesas_wdt.c | 61 ++++++++++++++++++++++++++++++++++++++----
> >  1 file changed, 56 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/watchdog/renesas_wdt.c b/drivers/watchdog/renesas_wdt.c
> > index 831ef83..eedb016 100644
> > --- a/drivers/watchdog/renesas_wdt.c
> > +++ b/drivers/watchdog/renesas_wdt.c
> > @@ -107,6 +107,24 @@ static unsigned int rwdt_get_timeleft(struct watchdog_device *wdev)
> >  return DIV_BY_CLKS_PER_SEC(priv, 65536 - val);
> >  }
> >
> > +static int rwdt_restart(struct watchdog_device *wdev, unsigned long action,
> > +void *data)
> > +{
> > +struct rwdt_priv *priv = watchdog_get_drvdata(wdev);
> > +
> > +pm_runtime_get_sync(wdev->parent);
> > +
> > +rwdt_write(priv, 0x00, RWTCSRB);
> > +rwdt_write(priv, 0x00, RWTCSRA);
> > +rwdt_write(priv, 0xffff, RWTCNT);
> > +
> > +while (readb_relaxed(priv->base + RWTCSRA) & RWTCSRA_WRFLG)
> > +cpu_relax();
> > +
> > +rwdt_write(priv, 0x80, RWTCSRA);
> > +return 0;
> > +}
> > +
> >  static const struct watchdog_info rwdt_ident = {
> >  .options = WDIOF_MAGICCLOSE | WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT,
> >  .identity = "Renesas WDT Watchdog",
> > @@ -118,6 +136,7 @@ static const struct watchdog_ops rwdt_ops = {
> >  .stop = rwdt_stop,
> >  .ping = rwdt_init_timeout,
> >  .get_timeleft = rwdt_get_timeleft,
> > +.restart = rwdt_restart,
> >  };
> >
> >  static int rwdt_probe(struct platform_device *pdev)
> > @@ -203,13 +222,42 @@ static int rwdt_remove(struct platform_device *pdev)
> >  return 0;
> >  }
> >
> > -/*
> > - * This driver does also fit for R-Car Gen2 (r8a779[0-4]) WDT. However, for SMP
> > - * to work there, one also needs a RESET (RST) driver which does not exist yet
> > - * due to HW issues. This needs to be solved before adding compatibles here.
> > - */
>
> Have those issues been resolved ?

This patch series addresses precisely those issues. The first implementation
used a flag that the watchdog driver needed to explicitly set to make everything
work as expected. This new version uses a different concept that doesn't require
such an hack, and that's why the proposal now is to merge Gen2 and Gen3 drivers.

Thanks,
Fab

>
> > +#ifdef CONFIG_PM
> > +static int rwdt_suspend(struct device *dev)
> > +{
> > +struct platform_device *pdev;
> > +struct rwdt_priv *priv;
> > +
> > +pdev = to_platform_device(dev);
> > +priv = platform_get_drvdata(pdev);
> > +if (watchdog_active(&priv->wdev)) {
> > +rwdt_write(priv, priv->cks, RWTCSRA);
> > +}
> > +return 0;
> > +}
> > +
> > +static int rwdt_resume(struct device *dev)
> > +{
> > +struct platform_device *pdev;
> > +struct rwdt_priv *priv;
> > +
> > +pdev = to_platform_device(dev);
> > +priv = platform_get_drvdata(pdev);
> > +if (watchdog_active(&priv->wdev)) {
> > +rwdt_write(priv, priv->cks | RWTCSRA_TME, RWTCSRA);
> > +}
> > +return 0;
> > +}
> > +
> > +static const struct dev_pm_ops rwdt_pm = {
> > +.suspend = rwdt_suspend,
> > +.resume = rwdt_resume,
> > +};
> > +#endif
> > +
> >  static const struct of_device_id rwdt_ids[] = {
> >  { .compatible = "renesas,rcar-gen3-wdt", },
> > +{ .compatible = "renesas,rcar-gen2-wdt", },
> >  { /* sentinel */ }
> >  };
> >  MODULE_DEVICE_TABLE(of, rwdt_ids);
> > @@ -218,6 +266,9 @@ static struct platform_driver rwdt_driver = {
> >  .driver = {
> >  .name = "renesas_wdt",
> >  .of_match_table = rwdt_ids,
> > +#ifdef CONFIG_PM
> > +.pm = &rwdt_pm,
> > +#endif
> >  },
> >  .probe = rwdt_probe,
> >  .remove = rwdt_remove,
> > --
> > 2.7.4
> >



Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

* Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
  2018-01-31 10:47           ` Fabrizio Castro
  (?)
@ 2018-01-31 12:13               ` Geert Uytterhoeven
  -1 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31 12:13 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Guenter Roeck, Philipp Zabel, Rob Herring, Mark Rutland,
	Wim Van Sebroeck, Russell King, Catalin Marinas, Will Deacon,
	Michael Turquette, Stephen Boyd, Simon Horman, Magnus Damm,
	Geert Uytterhoeven, Wolfram Sang,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA

Hi Fabrizio,

On Wed, Jan 31, 2018 at 11:47 AM, Fabrizio Castro
<fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org> wrote:
>> Subject: Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
>> On Tue, Jan 30, 2018 at 08:22:44PM +0000, Fabrizio Castro wrote:
>> > On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
>> > when suspending to RAM we need to explicitly disable the counting by
>> > clearing TME from RWTCSRA.
>> > Also, on some systems RWDT is the only piece of HW that allows the SoC
>> > to be restarted, therefore this patch implements the restart callback.
>> >
>> > Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
>> > Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
>> > ---
>> > Wolfram, was the restart callback implementation missing for a reason?
>> > Is its implementation going to break any Gen3 platform?
>>
>> The changes clearly are way more than claimed in the subject. Adding
>> restart handler and PM support may be prerequisites for Gen2, but the
>> changes apply to Gen3 as well. What happened to "one patch per logical
>> change" ?
>
> The PM implementation should be ok for Gen3 too, without this patch series the kernel
> would disable the rwdt clock when suspending to RAM, this would "pause" the counting.
> This patch series declares the rwdt clock as critical for Gen2 and RZ/G1, which means we
> need to explicitly disable the counting to keep the same behaviour in place.

Note that if the kernel crashes after rwdt_suspend(), the watchdog won't
restart the system. But that's an issue common to many watchdog driver, right?

> With respect to the restart callback implementation, that may well have consequences on
> Gen3, hopefully Wolfram will give us a feedback on this.
> In particular I would like to know if we should be installing the restart callback only when
> we use "renesas,rcar-gen2-wdt" as compatible string, or it's ok to make it available for
> Gen3 as well.

IIRC, the reason we don't have the restart callback on R-Car Gen3 is the
arm64 maintainers insisting on using PSCI, and vetoing other means,
to restart the system.

Which leaves us with a few boards where we have to use the watchdog, and
wait until the timeout triggers...

> The only way to reboot iWave's boards iwg20d and iwg22d is to use the internal watchdog,
> that's why the restart implementation was merged into this patch.
> I can split this patch in two, one for PM support and one for restart support for the next
> version, what do you think about this?

Splitting in individual logical changes sounds like a good idea to me.

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

* Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
@ 2018-01-31 12:13               ` Geert Uytterhoeven
  0 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31 12:13 UTC (permalink / raw)
  To: Fabrizio Castro
  Cc: Guenter Roeck, Philipp Zabel, Rob Herring, Mark Rutland,
	Wim Van Sebroeck, Russell King, Catalin Marinas, Will Deacon,
	Michael Turquette, Stephen Boyd, Simon Horman, Magnus Damm,
	Geert Uytterhoeven, Wolfram Sang, devicetree, linux-watchdog,
	linux-renesas-soc, linux-arm-kernel, linux-clk, Chris Paterson,
	Biju Das, Ramesh Shanmugasundaram

Hi Fabrizio,

On Wed, Jan 31, 2018 at 11:47 AM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
>> Subject: Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
>> On Tue, Jan 30, 2018 at 08:22:44PM +0000, Fabrizio Castro wrote:
>> > On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
>> > when suspending to RAM we need to explicitly disable the counting by
>> > clearing TME from RWTCSRA.
>> > Also, on some systems RWDT is the only piece of HW that allows the SoC
>> > to be restarted, therefore this patch implements the restart callback.
>> >
>> > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
>> > Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
>> > ---
>> > Wolfram, was the restart callback implementation missing for a reason?
>> > Is its implementation going to break any Gen3 platform?
>>
>> The changes clearly are way more than claimed in the subject. Adding
>> restart handler and PM support may be prerequisites for Gen2, but the
>> changes apply to Gen3 as well. What happened to "one patch per logical
>> change" ?
>
> The PM implementation should be ok for Gen3 too, without this patch series the kernel
> would disable the rwdt clock when suspending to RAM, this would "pause" the counting.
> This patch series declares the rwdt clock as critical for Gen2 and RZ/G1, which means we
> need to explicitly disable the counting to keep the same behaviour in place.

Note that if the kernel crashes after rwdt_suspend(), the watchdog won't
restart the system. But that's an issue common to many watchdog driver, right?

> With respect to the restart callback implementation, that may well have consequences on
> Gen3, hopefully Wolfram will give us a feedback on this.
> In particular I would like to know if we should be installing the restart callback only when
> we use "renesas,rcar-gen2-wdt" as compatible string, or it's ok to make it available for
> Gen3 as well.

IIRC, the reason we don't have the restart callback on R-Car Gen3 is the
arm64 maintainers insisting on using PSCI, and vetoing other means,
to restart the system.

Which leaves us with a few boards where we have to use the watchdog, and
wait until the timeout triggers...

> The only way to reboot iWave's boards iwg20d and iwg22d is to use the internal watchdog,
> that's why the restart implementation was merged into this patch.
> I can split this patch in two, one for PM support and one for restart support for the next
> version, what do you think about this?

Splitting in individual logical changes sounds like a good idea to me.

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

* [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
@ 2018-01-31 12:13               ` Geert Uytterhoeven
  0 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31 12:13 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Fabrizio,

On Wed, Jan 31, 2018 at 11:47 AM, Fabrizio Castro
<fabrizio.castro@bp.renesas.com> wrote:
>> Subject: Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
>> On Tue, Jan 30, 2018 at 08:22:44PM +0000, Fabrizio Castro wrote:
>> > On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
>> > when suspending to RAM we need to explicitly disable the counting by
>> > clearing TME from RWTCSRA.
>> > Also, on some systems RWDT is the only piece of HW that allows the SoC
>> > to be restarted, therefore this patch implements the restart callback.
>> >
>> > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
>> > Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
>> > ---
>> > Wolfram, was the restart callback implementation missing for a reason?
>> > Is its implementation going to break any Gen3 platform?
>>
>> The changes clearly are way more than claimed in the subject. Adding
>> restart handler and PM support may be prerequisites for Gen2, but the
>> changes apply to Gen3 as well. What happened to "one patch per logical
>> change" ?
>
> The PM implementation should be ok for Gen3 too, without this patch series the kernel
> would disable the rwdt clock when suspending to RAM, this would "pause" the counting.
> This patch series declares the rwdt clock as critical for Gen2 and RZ/G1, which means we
> need to explicitly disable the counting to keep the same behaviour in place.

Note that if the kernel crashes after rwdt_suspend(), the watchdog won't
restart the system. But that's an issue common to many watchdog driver, right?

> With respect to the restart callback implementation, that may well have consequences on
> Gen3, hopefully Wolfram will give us a feedback on this.
> In particular I would like to know if we should be installing the restart callback only when
> we use "renesas,rcar-gen2-wdt" as compatible string, or it's ok to make it available for
> Gen3 as well.

IIRC, the reason we don't have the restart callback on R-Car Gen3 is the
arm64 maintainers insisting on using PSCI, and vetoing other means,
to restart the system.

Which leaves us with a few boards where we have to use the watchdog, and
wait until the timeout triggers...

> The only way to reboot iWave's boards iwg20d and iwg22d is to use the internal watchdog,
> that's why the restart implementation was merged into this patch.
> I can split this patch in two, one for PM support and one for restart support for the next
> version, what do you think about this?

Splitting in individual logical changes sounds like a good idea to me.

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

* RE: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
  2018-01-31 12:13               ` Geert Uytterhoeven
  (?)
  (?)
@ 2018-01-31 13:58                 ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-31 13:58 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Guenter Roeck, Philipp Zabel, Rob Herring, Mark Rutland,
	Wim Van Sebroeck, Russell King, Catalin Marinas, Will Deacon,
	Michael Turquette, Stephen Boyd, Simon Horman, Magnus Damm,
	Geert Uytterhoeven, Wolfram Sang, devicetree, linux-watchdog,
	linux-renesas-soc

Hi Geert,

thank you for your feedback!

> Subject: Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
>
> Hi Fabrizio,
>
> On Wed, Jan 31, 2018 at 11:47 AM, Fabrizio Castro
> <fabrizio.castro@bp.renesas.com> wrote:
> >> Subject: Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
> >> On Tue, Jan 30, 2018 at 08:22:44PM +0000, Fabrizio Castro wrote:
> >> > On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
> >> > when suspending to RAM we need to explicitly disable the counting by
> >> > clearing TME from RWTCSRA.
> >> > Also, on some systems RWDT is the only piece of HW that allows the SoC
> >> > to be restarted, therefore this patch implements the restart callback.
> >> >
> >> > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> >> > Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
> >> > ---
> >> > Wolfram, was the restart callback implementation missing for a reason?
> >> > Is its implementation going to break any Gen3 platform?
> >>
> >> The changes clearly are way more than claimed in the subject. Adding
> >> restart handler and PM support may be prerequisites for Gen2, but the
> >> changes apply to Gen3 as well. What happened to "one patch per logical
> >> change" ?
> >
> > The PM implementation should be ok for Gen3 too, without this patch series the kernel
> > would disable the rwdt clock when suspending to RAM, this would "pause" the counting.
> > This patch series declares the rwdt clock as critical for Gen2 and RZ/G1, which means we
> > need to explicitly disable the counting to keep the same behaviour in place.
>
> Note that if the kernel crashes after rwdt_suspend(), the watchdog won't
> restart the system. But that's an issue common to many watchdog driver, right?

yeah, there isn't much we can do about this. Even without rwdt_suspend in place, if the
kernel crashes after disabling the rwdt clock the watchdog won't restart the system.

>
> > With respect to the restart callback implementation, that may well have consequences on
> > Gen3, hopefully Wolfram will give us a feedback on this.
> > In particular I would like to know if we should be installing the restart callback only when
> > we use "renesas,rcar-gen2-wdt" as compatible string, or it's ok to make it available for
> > Gen3 as well.
>
> IIRC, the reason we don't have the restart callback on R-Car Gen3 is the
> arm64 maintainers insisting on using PSCI, and vetoing other means,
> to restart the system.
>
> Which leaves us with a few boards where we have to use the watchdog, and
> wait until the timeout triggers...

ok, for the next version I'll register the restart callback only when we match
"renesas,rcar-gen2-wdt". Since currently there is no watchdog support on Gen2
I believe such a change is perfectly safe.

>
> > The only way to reboot iWave's boards iwg20d and iwg22d is to use the internal watchdog,
> > that's why the restart implementation was merged into this patch.
> > I can split this patch in two, one for PM support and one for restart support for the next
> > version, what do you think about this?
>
> Splitting in individual logical changes sounds like a good idea to me.

agreed then, I'll split the commit in two for the next version.

Thanks,
Fab

>
> 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



Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

* RE: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
@ 2018-01-31 13:58                 ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-31 13:58 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Guenter Roeck, Philipp Zabel, Rob Herring, Mark Rutland,
	Wim Van Sebroeck, Russell King, Catalin Marinas, Will Deacon,
	Michael Turquette, Stephen Boyd, Simon Horman, Magnus Damm,
	Geert Uytterhoeven, Wolfram Sang, devicetree, linux-watchdog,
	linux-renesas-soc, linux-arm-kernel, linux-clk, Chris Paterson,
	Biju Das, Ramesh Shanmugasundaram

Hi Geert,

thank you for your feedback!

> Subject: Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
>
> Hi Fabrizio,
>
> On Wed, Jan 31, 2018 at 11:47 AM, Fabrizio Castro
> <fabrizio.castro@bp.renesas.com> wrote:
> >> Subject: Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
> >> On Tue, Jan 30, 2018 at 08:22:44PM +0000, Fabrizio Castro wrote:
> >> > On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
> >> > when suspending to RAM we need to explicitly disable the counting by
> >> > clearing TME from RWTCSRA.
> >> > Also, on some systems RWDT is the only piece of HW that allows the SoC
> >> > to be restarted, therefore this patch implements the restart callback.
> >> >
> >> > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> >> > Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
> >> > ---
> >> > Wolfram, was the restart callback implementation missing for a reason?
> >> > Is its implementation going to break any Gen3 platform?
> >>
> >> The changes clearly are way more than claimed in the subject. Adding
> >> restart handler and PM support may be prerequisites for Gen2, but the
> >> changes apply to Gen3 as well. What happened to "one patch per logical
> >> change" ?
> >
> > The PM implementation should be ok for Gen3 too, without this patch series the kernel
> > would disable the rwdt clock when suspending to RAM, this would "pause" the counting.
> > This patch series declares the rwdt clock as critical for Gen2 and RZ/G1, which means we
> > need to explicitly disable the counting to keep the same behaviour in place.
>
> Note that if the kernel crashes after rwdt_suspend(), the watchdog won't
> restart the system. But that's an issue common to many watchdog driver, right?

yeah, there isn't much we can do about this. Even without rwdt_suspend in place, if the
kernel crashes after disabling the rwdt clock the watchdog won't restart the system.

>
> > With respect to the restart callback implementation, that may well have consequences on
> > Gen3, hopefully Wolfram will give us a feedback on this.
> > In particular I would like to know if we should be installing the restart callback only when
> > we use "renesas,rcar-gen2-wdt" as compatible string, or it's ok to make it available for
> > Gen3 as well.
>
> IIRC, the reason we don't have the restart callback on R-Car Gen3 is the
> arm64 maintainers insisting on using PSCI, and vetoing other means,
> to restart the system.
>
> Which leaves us with a few boards where we have to use the watchdog, and
> wait until the timeout triggers...

ok, for the next version I'll register the restart callback only when we match
"renesas,rcar-gen2-wdt". Since currently there is no watchdog support on Gen2
I believe such a change is perfectly safe.

>
> > The only way to reboot iWave's boards iwg20d and iwg22d is to use the internal watchdog,
> > that's why the restart implementation was merged into this patch.
> > I can split this patch in two, one for PM support and one for restart support for the next
> > version, what do you think about this?
>
> Splitting in individual logical changes sounds like a good idea to me.

agreed then, I'll split the commit in two for the next version.

Thanks,
Fab

>
> 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



Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

* RE: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
@ 2018-01-31 13:58                 ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-31 13:58 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Guenter Roeck, Philipp Zabel, Rob Herring, Mark Rutland,
	Wim Van Sebroeck, Russell King, Catalin Marinas, Will Deacon,
	Michael Turquette, Stephen Boyd, Simon Horman, Magnus Damm,
	Geert Uytterhoeven, Wolfram Sang, devicetree, linux-watchdog,
	linux-renesas-soc, linux-arm-kernel, linux-clk, Chris Paterson,
	Biju Das, Ramesh Shanmugasundaram

SGkgR2VlcnQsDQoNCnRoYW5rIHlvdSBmb3IgeW91ciBmZWVkYmFjayENCg0KPiBTdWJqZWN0OiBS
ZTogW1JGQyB2MyAxMS8yNV0gd2F0Y2hkb2c6IHJlbmVzYXNfd2R0OiBBZGQgUi1DYXIgR2VuMiBz
dXBwb3J0DQo+DQo+IEhpIEZhYnJpemlvLA0KPg0KPiBPbiBXZWQsIEphbiAzMSwgMjAxOCBhdCAx
MTo0NyBBTSwgRmFicml6aW8gQ2FzdHJvDQo+IDxmYWJyaXppby5jYXN0cm9AYnAucmVuZXNhcy5j
b20+IHdyb3RlOg0KPiA+PiBTdWJqZWN0OiBSZTogW1JGQyB2MyAxMS8yNV0gd2F0Y2hkb2c6IHJl
bmVzYXNfd2R0OiBBZGQgUi1DYXIgR2VuMiBzdXBwb3J0DQo+ID4+IE9uIFR1ZSwgSmFuIDMwLCAy
MDE4IGF0IDA4OjIyOjQ0UE0gKzAwMDAsIEZhYnJpemlvIENhc3RybyB3cm90ZToNCj4gPj4gPiBP
biBSLUNhciBHZW4yIGFuZCBSWi9HMSB0aGUgcndkdCBjbG9jayBuZWVkcyB0byBiZSBhbHdheXMg
T04sIHRoZXJlZm9yZQ0KPiA+PiA+IHdoZW4gc3VzcGVuZGluZyB0byBSQU0gd2UgbmVlZCB0byBl
eHBsaWNpdGx5IGRpc2FibGUgdGhlIGNvdW50aW5nIGJ5DQo+ID4+ID4gY2xlYXJpbmcgVE1FIGZy
b20gUldUQ1NSQS4NCj4gPj4gPiBBbHNvLCBvbiBzb21lIHN5c3RlbXMgUldEVCBpcyB0aGUgb25s
eSBwaWVjZSBvZiBIVyB0aGF0IGFsbG93cyB0aGUgU29DDQo+ID4+ID4gdG8gYmUgcmVzdGFydGVk
LCB0aGVyZWZvcmUgdGhpcyBwYXRjaCBpbXBsZW1lbnRzIHRoZSByZXN0YXJ0IGNhbGxiYWNrLg0K
PiA+PiA+DQo+ID4+ID4gU2lnbmVkLW9mZi1ieTogRmFicml6aW8gQ2FzdHJvIDxmYWJyaXppby5j
YXN0cm9AYnAucmVuZXNhcy5jb20+DQo+ID4+ID4gU2lnbmVkLW9mZi1ieTogUmFtZXNoIFNoYW5t
dWdhc3VuZGFyYW0gPHJhbWVzaC5zaGFubXVnYXN1bmRhcmFtQGJwLnJlbmVzYXMuY29tPg0KPiA+
PiA+IC0tLQ0KPiA+PiA+IFdvbGZyYW0sIHdhcyB0aGUgcmVzdGFydCBjYWxsYmFjayBpbXBsZW1l
bnRhdGlvbiBtaXNzaW5nIGZvciBhIHJlYXNvbj8NCj4gPj4gPiBJcyBpdHMgaW1wbGVtZW50YXRp
b24gZ29pbmcgdG8gYnJlYWsgYW55IEdlbjMgcGxhdGZvcm0/DQo+ID4+DQo+ID4+IFRoZSBjaGFu
Z2VzIGNsZWFybHkgYXJlIHdheSBtb3JlIHRoYW4gY2xhaW1lZCBpbiB0aGUgc3ViamVjdC4gQWRk
aW5nDQo+ID4+IHJlc3RhcnQgaGFuZGxlciBhbmQgUE0gc3VwcG9ydCBtYXkgYmUgcHJlcmVxdWlz
aXRlcyBmb3IgR2VuMiwgYnV0IHRoZQ0KPiA+PiBjaGFuZ2VzIGFwcGx5IHRvIEdlbjMgYXMgd2Vs
bC4gV2hhdCBoYXBwZW5lZCB0byAib25lIHBhdGNoIHBlciBsb2dpY2FsDQo+ID4+IGNoYW5nZSIg
Pw0KPiA+DQo+ID4gVGhlIFBNIGltcGxlbWVudGF0aW9uIHNob3VsZCBiZSBvayBmb3IgR2VuMyB0
b28sIHdpdGhvdXQgdGhpcyBwYXRjaCBzZXJpZXMgdGhlIGtlcm5lbA0KPiA+IHdvdWxkIGRpc2Fi
bGUgdGhlIHJ3ZHQgY2xvY2sgd2hlbiBzdXNwZW5kaW5nIHRvIFJBTSwgdGhpcyB3b3VsZCAicGF1
c2UiIHRoZSBjb3VudGluZy4NCj4gPiBUaGlzIHBhdGNoIHNlcmllcyBkZWNsYXJlcyB0aGUgcndk
dCBjbG9jayBhcyBjcml0aWNhbCBmb3IgR2VuMiBhbmQgUlovRzEsIHdoaWNoIG1lYW5zIHdlDQo+
ID4gbmVlZCB0byBleHBsaWNpdGx5IGRpc2FibGUgdGhlIGNvdW50aW5nIHRvIGtlZXAgdGhlIHNh
bWUgYmVoYXZpb3VyIGluIHBsYWNlLg0KPg0KPiBOb3RlIHRoYXQgaWYgdGhlIGtlcm5lbCBjcmFz
aGVzIGFmdGVyIHJ3ZHRfc3VzcGVuZCgpLCB0aGUgd2F0Y2hkb2cgd29uJ3QNCj4gcmVzdGFydCB0
aGUgc3lzdGVtLiBCdXQgdGhhdCdzIGFuIGlzc3VlIGNvbW1vbiB0byBtYW55IHdhdGNoZG9nIGRy
aXZlciwgcmlnaHQ/DQoNCnllYWgsIHRoZXJlIGlzbid0IG11Y2ggd2UgY2FuIGRvIGFib3V0IHRo
aXMuIEV2ZW4gd2l0aG91dCByd2R0X3N1c3BlbmQgaW4gcGxhY2UsIGlmIHRoZQ0Ka2VybmVsIGNy
YXNoZXMgYWZ0ZXIgZGlzYWJsaW5nIHRoZSByd2R0IGNsb2NrIHRoZSB3YXRjaGRvZyB3b24ndCBy
ZXN0YXJ0IHRoZSBzeXN0ZW0uDQoNCj4NCj4gPiBXaXRoIHJlc3BlY3QgdG8gdGhlIHJlc3RhcnQg
Y2FsbGJhY2sgaW1wbGVtZW50YXRpb24sIHRoYXQgbWF5IHdlbGwgaGF2ZSBjb25zZXF1ZW5jZXMg
b24NCj4gPiBHZW4zLCBob3BlZnVsbHkgV29sZnJhbSB3aWxsIGdpdmUgdXMgYSBmZWVkYmFjayBv
biB0aGlzLg0KPiA+IEluIHBhcnRpY3VsYXIgSSB3b3VsZCBsaWtlIHRvIGtub3cgaWYgd2Ugc2hv
dWxkIGJlIGluc3RhbGxpbmcgdGhlIHJlc3RhcnQgY2FsbGJhY2sgb25seSB3aGVuDQo+ID4gd2Ug
dXNlICJyZW5lc2FzLHJjYXItZ2VuMi13ZHQiIGFzIGNvbXBhdGlibGUgc3RyaW5nLCBvciBpdCdz
IG9rIHRvIG1ha2UgaXQgYXZhaWxhYmxlIGZvcg0KPiA+IEdlbjMgYXMgd2VsbC4NCj4NCj4gSUlS
QywgdGhlIHJlYXNvbiB3ZSBkb24ndCBoYXZlIHRoZSByZXN0YXJ0IGNhbGxiYWNrIG9uIFItQ2Fy
IEdlbjMgaXMgdGhlDQo+IGFybTY0IG1haW50YWluZXJzIGluc2lzdGluZyBvbiB1c2luZyBQU0NJ
LCBhbmQgdmV0b2luZyBvdGhlciBtZWFucywNCj4gdG8gcmVzdGFydCB0aGUgc3lzdGVtLg0KPg0K
PiBXaGljaCBsZWF2ZXMgdXMgd2l0aCBhIGZldyBib2FyZHMgd2hlcmUgd2UgaGF2ZSB0byB1c2Ug
dGhlIHdhdGNoZG9nLCBhbmQNCj4gd2FpdCB1bnRpbCB0aGUgdGltZW91dCB0cmlnZ2Vycy4uLg0K
DQpvaywgZm9yIHRoZSBuZXh0IHZlcnNpb24gSSdsbCByZWdpc3RlciB0aGUgcmVzdGFydCBjYWxs
YmFjayBvbmx5IHdoZW4gd2UgbWF0Y2gNCiJyZW5lc2FzLHJjYXItZ2VuMi13ZHQiLiBTaW5jZSBj
dXJyZW50bHkgdGhlcmUgaXMgbm8gd2F0Y2hkb2cgc3VwcG9ydCBvbiBHZW4yDQpJIGJlbGlldmUg
c3VjaCBhIGNoYW5nZSBpcyBwZXJmZWN0bHkgc2FmZS4NCg0KPg0KPiA+IFRoZSBvbmx5IHdheSB0
byByZWJvb3QgaVdhdmUncyBib2FyZHMgaXdnMjBkIGFuZCBpd2cyMmQgaXMgdG8gdXNlIHRoZSBp
bnRlcm5hbCB3YXRjaGRvZywNCj4gPiB0aGF0J3Mgd2h5IHRoZSByZXN0YXJ0IGltcGxlbWVudGF0
aW9uIHdhcyBtZXJnZWQgaW50byB0aGlzIHBhdGNoLg0KPiA+IEkgY2FuIHNwbGl0IHRoaXMgcGF0
Y2ggaW4gdHdvLCBvbmUgZm9yIFBNIHN1cHBvcnQgYW5kIG9uZSBmb3IgcmVzdGFydCBzdXBwb3J0
IGZvciB0aGUgbmV4dA0KPiA+IHZlcnNpb24sIHdoYXQgZG8geW91IHRoaW5rIGFib3V0IHRoaXM/
DQo+DQo+IFNwbGl0dGluZyBpbiBpbmRpdmlkdWFsIGxvZ2ljYWwgY2hhbmdlcyBzb3VuZHMgbGlr
ZSBhIGdvb2QgaWRlYSB0byBtZS4NCg0KYWdyZWVkIHRoZW4sIEknbGwgc3BsaXQgdGhlIGNvbW1p
dCBpbiB0d28gZm9yIHRoZSBuZXh0IHZlcnNpb24uDQoNClRoYW5rcywNCkZhYg0KDQo+DQo+IEdy
e29ldGplLGVldGluZ31zLA0KPg0KPiAgICAgICAgICAgICAgICAgICAgICAgICBHZWVydA0KPg0K
PiAtLQ0KPiBHZWVydCBVeXR0ZXJob2V2ZW4gLS0gVGhlcmUncyBsb3RzIG9mIExpbnV4IGJleW9u
ZCBpYTMyIC0tIGdlZXJ0QGxpbnV4LW02OGsub3JnDQo+DQo+IEluIHBlcnNvbmFsIGNvbnZlcnNh
dGlvbnMgd2l0aCB0ZWNobmljYWwgcGVvcGxlLCBJIGNhbGwgbXlzZWxmIGEgaGFja2VyLiBCdXQN
Cj4gd2hlbiBJJ20gdGFsa2luZyB0byBqb3VybmFsaXN0cyBJIGp1c3Qgc2F5ICJwcm9ncmFtbWVy
IiBvciBzb21ldGhpbmcgbGlrZSB0aGF0Lg0KPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgIC0tIExpbnVzIFRvcnZhbGRzDQoNCg0KDQpSZW5lc2FzIEVsZWN0cm9uaWNzIEV1cm9wZSBM
dGQsIER1a2VzIE1lYWRvdywgTWlsbGJvYXJkIFJvYWQsIEJvdXJuZSBFbmQsIEJ1Y2tpbmdoYW1z
aGlyZSwgU0w4IDVGSCwgVUsuIFJlZ2lzdGVyZWQgaW4gRW5nbGFuZCAmIFdhbGVzIHVuZGVyIFJl
Z2lzdGVyZWQgTm8uIDA0NTg2NzA5Lg0K

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

* [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
@ 2018-01-31 13:58                 ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-31 13:58 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Geert,

thank you for your feedback!

> Subject: Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
>
> Hi Fabrizio,
>
> On Wed, Jan 31, 2018 at 11:47 AM, Fabrizio Castro
> <fabrizio.castro@bp.renesas.com> wrote:
> >> Subject: Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
> >> On Tue, Jan 30, 2018 at 08:22:44PM +0000, Fabrizio Castro wrote:
> >> > On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
> >> > when suspending to RAM we need to explicitly disable the counting by
> >> > clearing TME from RWTCSRA.
> >> > Also, on some systems RWDT is the only piece of HW that allows the SoC
> >> > to be restarted, therefore this patch implements the restart callback.
> >> >
> >> > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> >> > Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
> >> > ---
> >> > Wolfram, was the restart callback implementation missing for a reason?
> >> > Is its implementation going to break any Gen3 platform?
> >>
> >> The changes clearly are way more than claimed in the subject. Adding
> >> restart handler and PM support may be prerequisites for Gen2, but the
> >> changes apply to Gen3 as well. What happened to "one patch per logical
> >> change" ?
> >
> > The PM implementation should be ok for Gen3 too, without this patch series the kernel
> > would disable the rwdt clock when suspending to RAM, this would "pause" the counting.
> > This patch series declares the rwdt clock as critical for Gen2 and RZ/G1, which means we
> > need to explicitly disable the counting to keep the same behaviour in place.
>
> Note that if the kernel crashes after rwdt_suspend(), the watchdog won't
> restart the system. But that's an issue common to many watchdog driver, right?

yeah, there isn't much we can do about this. Even without rwdt_suspend in place, if the
kernel crashes after disabling the rwdt clock the watchdog won't restart the system.

>
> > With respect to the restart callback implementation, that may well have consequences on
> > Gen3, hopefully Wolfram will give us a feedback on this.
> > In particular I would like to know if we should be installing the restart callback only when
> > we use "renesas,rcar-gen2-wdt" as compatible string, or it's ok to make it available for
> > Gen3 as well.
>
> IIRC, the reason we don't have the restart callback on R-Car Gen3 is the
> arm64 maintainers insisting on using PSCI, and vetoing other means,
> to restart the system.
>
> Which leaves us with a few boards where we have to use the watchdog, and
> wait until the timeout triggers...

ok, for the next version I'll register the restart callback only when we match
"renesas,rcar-gen2-wdt". Since currently there is no watchdog support on Gen2
I believe such a change is perfectly safe.

>
> > The only way to reboot iWave's boards iwg20d and iwg22d is to use the internal watchdog,
> > that's why the restart implementation was merged into this patch.
> > I can split this patch in two, one for PM support and one for restart support for the next
> > version, what do you think about this?
>
> Splitting in individual logical changes sounds like a good idea to me.

agreed then, I'll split the commit in two for the next version.

Thanks,
Fab

>
> 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



Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

* Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
  2018-01-31 12:13               ` Geert Uytterhoeven
  (?)
@ 2018-01-31 14:48                 ` Guenter Roeck
  -1 siblings, 0 replies; 120+ messages in thread
From: Guenter Roeck @ 2018-01-31 14:48 UTC (permalink / raw)
  To: Geert Uytterhoeven, Fabrizio Castro
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, devicetree, linux-watchdog, linux-renesas-soc

On 01/31/2018 04:13 AM, Geert Uytterhoeven wrote:
> Hi Fabrizio,
> 
> On Wed, Jan 31, 2018 at 11:47 AM, Fabrizio Castro
> <fabrizio.castro@bp.renesas.com> wrote:
>>> Subject: Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
>>> On Tue, Jan 30, 2018 at 08:22:44PM +0000, Fabrizio Castro wrote:
>>>> On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
>>>> when suspending to RAM we need to explicitly disable the counting by
>>>> clearing TME from RWTCSRA.
>>>> Also, on some systems RWDT is the only piece of HW that allows the SoC
>>>> to be restarted, therefore this patch implements the restart callback.
>>>>
>>>> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
>>>> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
>>>> ---
>>>> Wolfram, was the restart callback implementation missing for a reason?
>>>> Is its implementation going to break any Gen3 platform?
>>>
>>> The changes clearly are way more than claimed in the subject. Adding
>>> restart handler and PM support may be prerequisites for Gen2, but the
>>> changes apply to Gen3 as well. What happened to "one patch per logical
>>> change" ?
>>
>> The PM implementation should be ok for Gen3 too, without this patch series the kernel
>> would disable the rwdt clock when suspending to RAM, this would "pause" the counting.
>> This patch series declares the rwdt clock as critical for Gen2 and RZ/G1, which means we
>> need to explicitly disable the counting to keep the same behaviour in place.
> 
> Note that if the kernel crashes after rwdt_suspend(), the watchdog won't
> restart the system. But that's an issue common to many watchdog driver, right?
> 
If so, that would be buggy.

>> With respect to the restart callback implementation, that may well have consequences on
>> Gen3, hopefully Wolfram will give us a feedback on this.
>> In particular I would like to know if we should be installing the restart callback only when
>> we use "renesas,rcar-gen2-wdt" as compatible string, or it's ok to make it available for
>> Gen3 as well.
> 
> IIRC, the reason we don't have the restart callback on R-Car Gen3 is the
> arm64 maintainers insisting on using PSCI, and vetoing other means,
> to restart the system.
> 

You could just give it lower priority than PSCI.

> Which leaves us with a few boards where we have to use the watchdog, and
> wait until the timeout triggers...
> 

Which means the veto is counter-productive and thus meaningless.

Guenter

>> The only way to reboot iWave's boards iwg20d and iwg22d is to use the internal watchdog,
>> that's why the restart implementation was merged into this patch.
>> I can split this patch in two, one for PM support and one for restart support for the next
>> version, what do you think about this?
> 
> Splitting in individual logical changes sounds like a good idea to me.
> 
> 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] 120+ messages in thread

* Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
@ 2018-01-31 14:48                 ` Guenter Roeck
  0 siblings, 0 replies; 120+ messages in thread
From: Guenter Roeck @ 2018-01-31 14:48 UTC (permalink / raw)
  To: Geert Uytterhoeven, Fabrizio Castro
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Ramesh Shanmugasundaram

On 01/31/2018 04:13 AM, Geert Uytterhoeven wrote:
> Hi Fabrizio,
> 
> On Wed, Jan 31, 2018 at 11:47 AM, Fabrizio Castro
> <fabrizio.castro@bp.renesas.com> wrote:
>>> Subject: Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
>>> On Tue, Jan 30, 2018 at 08:22:44PM +0000, Fabrizio Castro wrote:
>>>> On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
>>>> when suspending to RAM we need to explicitly disable the counting by
>>>> clearing TME from RWTCSRA.
>>>> Also, on some systems RWDT is the only piece of HW that allows the SoC
>>>> to be restarted, therefore this patch implements the restart callback.
>>>>
>>>> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
>>>> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
>>>> ---
>>>> Wolfram, was the restart callback implementation missing for a reason?
>>>> Is its implementation going to break any Gen3 platform?
>>>
>>> The changes clearly are way more than claimed in the subject. Adding
>>> restart handler and PM support may be prerequisites for Gen2, but the
>>> changes apply to Gen3 as well. What happened to "one patch per logical
>>> change" ?
>>
>> The PM implementation should be ok for Gen3 too, without this patch series the kernel
>> would disable the rwdt clock when suspending to RAM, this would "pause" the counting.
>> This patch series declares the rwdt clock as critical for Gen2 and RZ/G1, which means we
>> need to explicitly disable the counting to keep the same behaviour in place.
> 
> Note that if the kernel crashes after rwdt_suspend(), the watchdog won't
> restart the system. But that's an issue common to many watchdog driver, right?
> 
If so, that would be buggy.

>> With respect to the restart callback implementation, that may well have consequences on
>> Gen3, hopefully Wolfram will give us a feedback on this.
>> In particular I would like to know if we should be installing the restart callback only when
>> we use "renesas,rcar-gen2-wdt" as compatible string, or it's ok to make it available for
>> Gen3 as well.
> 
> IIRC, the reason we don't have the restart callback on R-Car Gen3 is the
> arm64 maintainers insisting on using PSCI, and vetoing other means,
> to restart the system.
> 

You could just give it lower priority than PSCI.

> Which leaves us with a few boards where we have to use the watchdog, and
> wait until the timeout triggers...
> 

Which means the veto is counter-productive and thus meaningless.

Guenter

>> The only way to reboot iWave's boards iwg20d and iwg22d is to use the internal watchdog,
>> that's why the restart implementation was merged into this patch.
>> I can split this patch in two, one for PM support and one for restart support for the next
>> version, what do you think about this?
> 
> Splitting in individual logical changes sounds like a good idea to me.
> 
> 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] 120+ messages in thread

* [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
@ 2018-01-31 14:48                 ` Guenter Roeck
  0 siblings, 0 replies; 120+ messages in thread
From: Guenter Roeck @ 2018-01-31 14:48 UTC (permalink / raw)
  To: linux-arm-kernel

On 01/31/2018 04:13 AM, Geert Uytterhoeven wrote:
> Hi Fabrizio,
> 
> On Wed, Jan 31, 2018 at 11:47 AM, Fabrizio Castro
> <fabrizio.castro@bp.renesas.com> wrote:
>>> Subject: Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
>>> On Tue, Jan 30, 2018 at 08:22:44PM +0000, Fabrizio Castro wrote:
>>>> On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
>>>> when suspending to RAM we need to explicitly disable the counting by
>>>> clearing TME from RWTCSRA.
>>>> Also, on some systems RWDT is the only piece of HW that allows the SoC
>>>> to be restarted, therefore this patch implements the restart callback.
>>>>
>>>> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
>>>> Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
>>>> ---
>>>> Wolfram, was the restart callback implementation missing for a reason?
>>>> Is its implementation going to break any Gen3 platform?
>>>
>>> The changes clearly are way more than claimed in the subject. Adding
>>> restart handler and PM support may be prerequisites for Gen2, but the
>>> changes apply to Gen3 as well. What happened to "one patch per logical
>>> change" ?
>>
>> The PM implementation should be ok for Gen3 too, without this patch series the kernel
>> would disable the rwdt clock when suspending to RAM, this would "pause" the counting.
>> This patch series declares the rwdt clock as critical for Gen2 and RZ/G1, which means we
>> need to explicitly disable the counting to keep the same behaviour in place.
> 
> Note that if the kernel crashes after rwdt_suspend(), the watchdog won't
> restart the system. But that's an issue common to many watchdog driver, right?
> 
If so, that would be buggy.

>> With respect to the restart callback implementation, that may well have consequences on
>> Gen3, hopefully Wolfram will give us a feedback on this.
>> In particular I would like to know if we should be installing the restart callback only when
>> we use "renesas,rcar-gen2-wdt" as compatible string, or it's ok to make it available for
>> Gen3 as well.
> 
> IIRC, the reason we don't have the restart callback on R-Car Gen3 is the
> arm64 maintainers insisting on using PSCI, and vetoing other means,
> to restart the system.
> 

You could just give it lower priority than PSCI.

> Which leaves us with a few boards where we have to use the watchdog, and
> wait until the timeout triggers...
> 

Which means the veto is counter-productive and thus meaningless.

Guenter

>> The only way to reboot iWave's boards iwg20d and iwg22d is to use the internal watchdog,
>> that's why the restart implementation was merged into this patch.
>> I can split this patch in two, one for PM support and one for restart support for the next
>> version, what do you think about this?
> 
> Splitting in individual logical changes sounds like a good idea to me.
> 
> 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] 120+ messages in thread

* RE: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
  2018-01-31 14:48                 ` Guenter Roeck
  (?)
  (?)
@ 2018-01-31 15:27                   ` Fabrizio Castro
  -1 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-31 15:27 UTC (permalink / raw)
  To: Guenter Roeck, Geert Uytterhoeven
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel

Hello Guenter, Geert

thank you for your feedback!

> >
> > IIRC, the reason we don't have the restart callback on R-Car Gen3 is the
> > arm64 maintainers insisting on using PSCI, and vetoing other means,
> > to restart the system.
> >
>
> You could just give it lower priority than PSCI.

I am looking at the implementation of machine_restart() for both arm and arm64,
and it looks like that if arm_pm_restart gets set, then arm_pm_restart has the
highest priority of all. If arm_pm_restart is not set, then the kernel will go through
the restart_handler_list, and the registered priority for the restart method will matter
at that point.
My understanding is that Gen3 does set arm_pm_restart due to
drivers/firmware/psci.c, and therefore other restart handlers shouldn't matter too
much, but I am not familiar with Gen3 at all.
Shall I just set the restart priority to 128 and leave the callback in place for both Gen2
and Gen3?

Thanks,
Fab

>
> > Which leaves us with a few boards where we have to use the watchdog, and
> > wait until the timeout triggers...
> >
>
> Which means the veto is counter-productive and thus meaningless.
>
> Guenter
>



Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

* RE: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
@ 2018-01-31 15:27                   ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-31 15:27 UTC (permalink / raw)
  To: Guenter Roeck, Geert Uytterhoeven
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Ramesh Shanmugasundaram

Hello Guenter, Geert

thank you for your feedback!

> >
> > IIRC, the reason we don't have the restart callback on R-Car Gen3 is the
> > arm64 maintainers insisting on using PSCI, and vetoing other means,
> > to restart the system.
> >
>
> You could just give it lower priority than PSCI.

I am looking at the implementation of machine_restart() for both arm and arm64,
and it looks like that if arm_pm_restart gets set, then arm_pm_restart has the
highest priority of all. If arm_pm_restart is not set, then the kernel will go through
the restart_handler_list, and the registered priority for the restart method will matter
at that point.
My understanding is that Gen3 does set arm_pm_restart due to
drivers/firmware/psci.c, and therefore other restart handlers shouldn't matter too
much, but I am not familiar with Gen3 at all.
Shall I just set the restart priority to 128 and leave the callback in place for both Gen2
and Gen3?

Thanks,
Fab

>
> > Which leaves us with a few boards where we have to use the watchdog, and
> > wait until the timeout triggers...
> >
>
> Which means the veto is counter-productive and thus meaningless.
>
> Guenter
>



Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

* RE: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
@ 2018-01-31 15:27                   ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-31 15:27 UTC (permalink / raw)
  To: Guenter Roeck, Geert Uytterhoeven
  Cc: Philipp Zabel, Rob Herring, Mark Rutland, Wim Van Sebroeck,
	Russell King, Catalin Marinas, Will Deacon, Michael Turquette,
	Stephen Boyd, Simon Horman, Magnus Damm, Geert Uytterhoeven,
	Wolfram Sang, devicetree, linux-watchdog, linux-renesas-soc,
	linux-arm-kernel, linux-clk, Chris Paterson, Biju Das,
	Ramesh Shanmugasundaram

SGVsbG8gR3VlbnRlciwgR2VlcnQNCg0KdGhhbmsgeW91IGZvciB5b3VyIGZlZWRiYWNrIQ0KDQo+
ID4NCj4gPiBJSVJDLCB0aGUgcmVhc29uIHdlIGRvbid0IGhhdmUgdGhlIHJlc3RhcnQgY2FsbGJh
Y2sgb24gUi1DYXIgR2VuMyBpcyB0aGUNCj4gPiBhcm02NCBtYWludGFpbmVycyBpbnNpc3Rpbmcg
b24gdXNpbmcgUFNDSSwgYW5kIHZldG9pbmcgb3RoZXIgbWVhbnMsDQo+ID4gdG8gcmVzdGFydCB0
aGUgc3lzdGVtLg0KPiA+DQo+DQo+IFlvdSBjb3VsZCBqdXN0IGdpdmUgaXQgbG93ZXIgcHJpb3Jp
dHkgdGhhbiBQU0NJLg0KDQpJIGFtIGxvb2tpbmcgYXQgdGhlIGltcGxlbWVudGF0aW9uIG9mIG1h
Y2hpbmVfcmVzdGFydCgpIGZvciBib3RoIGFybSBhbmQgYXJtNjQsDQphbmQgaXQgbG9va3MgbGlr
ZSB0aGF0IGlmIGFybV9wbV9yZXN0YXJ0IGdldHMgc2V0LCB0aGVuIGFybV9wbV9yZXN0YXJ0IGhh
cyB0aGUNCmhpZ2hlc3QgcHJpb3JpdHkgb2YgYWxsLiBJZiBhcm1fcG1fcmVzdGFydCBpcyBub3Qg
c2V0LCB0aGVuIHRoZSBrZXJuZWwgd2lsbCBnbyB0aHJvdWdoDQp0aGUgcmVzdGFydF9oYW5kbGVy
X2xpc3QsIGFuZCB0aGUgcmVnaXN0ZXJlZCBwcmlvcml0eSBmb3IgdGhlIHJlc3RhcnQgbWV0aG9k
IHdpbGwgbWF0dGVyDQphdCB0aGF0IHBvaW50Lg0KTXkgdW5kZXJzdGFuZGluZyBpcyB0aGF0IEdl
bjMgZG9lcyBzZXQgYXJtX3BtX3Jlc3RhcnQgZHVlIHRvDQpkcml2ZXJzL2Zpcm13YXJlL3BzY2ku
YywgYW5kIHRoZXJlZm9yZSBvdGhlciByZXN0YXJ0IGhhbmRsZXJzIHNob3VsZG4ndCBtYXR0ZXIg
dG9vDQptdWNoLCBidXQgSSBhbSBub3QgZmFtaWxpYXIgd2l0aCBHZW4zIGF0IGFsbC4NClNoYWxs
IEkganVzdCBzZXQgdGhlIHJlc3RhcnQgcHJpb3JpdHkgdG8gMTI4IGFuZCBsZWF2ZSB0aGUgY2Fs
bGJhY2sgaW4gcGxhY2UgZm9yIGJvdGggR2VuMg0KYW5kIEdlbjM/DQoNClRoYW5rcywNCkZhYg0K
DQo+DQo+ID4gV2hpY2ggbGVhdmVzIHVzIHdpdGggYSBmZXcgYm9hcmRzIHdoZXJlIHdlIGhhdmUg
dG8gdXNlIHRoZSB3YXRjaGRvZywgYW5kDQo+ID4gd2FpdCB1bnRpbCB0aGUgdGltZW91dCB0cmln
Z2Vycy4uLg0KPiA+DQo+DQo+IFdoaWNoIG1lYW5zIHRoZSB2ZXRvIGlzIGNvdW50ZXItcHJvZHVj
dGl2ZSBhbmQgdGh1cyBtZWFuaW5nbGVzcy4NCj4NCj4gR3VlbnRlcg0KPg0KDQoNCg0KUmVuZXNh
cyBFbGVjdHJvbmljcyBFdXJvcGUgTHRkLCBEdWtlcyBNZWFkb3csIE1pbGxib2FyZCBSb2FkLCBC
b3VybmUgRW5kLCBCdWNraW5naGFtc2hpcmUsIFNMOCA1RkgsIFVLLiBSZWdpc3RlcmVkIGluIEVu
Z2xhbmQgJiBXYWxlcyB1bmRlciBSZWdpc3RlcmVkIE5vLiAwNDU4NjcwOS4NCg==

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

* [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
@ 2018-01-31 15:27                   ` Fabrizio Castro
  0 siblings, 0 replies; 120+ messages in thread
From: Fabrizio Castro @ 2018-01-31 15:27 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Guenter, Geert

thank you for your feedback!

> >
> > IIRC, the reason we don't have the restart callback on R-Car Gen3 is the
> > arm64 maintainers insisting on using PSCI, and vetoing other means,
> > to restart the system.
> >
>
> You could just give it lower priority than PSCI.

I am looking at the implementation of machine_restart() for both arm and arm64,
and it looks like that if arm_pm_restart gets set, then arm_pm_restart has the
highest priority of all. If arm_pm_restart is not set, then the kernel will go through
the restart_handler_list, and the registered priority for the restart method will matter
at that point.
My understanding is that Gen3 does set arm_pm_restart due to
drivers/firmware/psci.c, and therefore other restart handlers shouldn't matter too
much, but I am not familiar with Gen3 at all.
Shall I just set the restart priority to 128 and leave the callback in place for both Gen2
and Gen3?

Thanks,
Fab

>
> > Which leaves us with a few boards where we have to use the watchdog, and
> > wait until the timeout triggers...
> >
>
> Which means the veto is counter-productive and thus meaningless.
>
> Guenter
>



Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.

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

* Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
  2018-01-31 14:48                 ` Guenter Roeck
  (?)
  (?)
@ 2018-01-31 15:37                     ` Geert Uytterhoeven
  -1 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31 15:37 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Fabrizio Castro, Philipp Zabel, Rob Herring, Mark Rutland,
	Wim Van Sebroeck, Russell King, Catalin Marinas, Will Deacon,
	Michael Turquette, Stephen Boyd, Simon Horman, Magnus Damm,
	Geert Uytterhoeven, Wolfram Sang,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA

Hi Günter,

On Wed, Jan 31, 2018 at 3:48 PM, Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org> wrote:
> On 01/31/2018 04:13 AM, Geert Uytterhoeven wrote:
>> On Wed, Jan 31, 2018 at 11:47 AM, Fabrizio Castro
>> <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org> wrote:
>>>> Subject: Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2
>>>> support
>>>> On Tue, Jan 30, 2018 at 08:22:44PM +0000, Fabrizio Castro wrote:
>>>>>
>>>>> On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
>>>>> when suspending to RAM we need to explicitly disable the counting by
>>>>> clearing TME from RWTCSRA.
>>>>> Also, on some systems RWDT is the only piece of HW that allows the SoC
>>>>> to be restarted, therefore this patch implements the restart callback.
>>>>>
>>>>> Signed-off-by: Fabrizio Castro <fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
>>>>> Signed-off-by: Ramesh Shanmugasundaram
>>>>> <ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
>>>>> ---
>>>>> Wolfram, was the restart callback implementation missing for a reason?
>>>>> Is its implementation going to break any Gen3 platform?
>>>>
>>>> The changes clearly are way more than claimed in the subject. Adding
>>>> restart handler and PM support may be prerequisites for Gen2, but the
>>>> changes apply to Gen3 as well. What happened to "one patch per logical
>>>> change" ?
>>>
>>> The PM implementation should be ok for Gen3 too, without this patch
>>> series the kernel
>>> would disable the rwdt clock when suspending to RAM, this would "pause"
>>> the counting.
>>> This patch series declares the rwdt clock as critical for Gen2 and RZ/G1,
>>> which means we
>>> need to explicitly disable the counting to keep the same behaviour in
>>> place.
>>
>> Note that if the kernel crashes after rwdt_suspend(), the watchdog won't
>> restart the system. But that's an issue common to many watchdog driver,
>> right?
>>
> If so, that would be buggy.

All watchdog drivers implementing a system suspend handler stop the watchdog
before suspending the system. I guess if they wouldn't do that, the watchdog
would restart the system while asleep?

Exceptions are:
  - atlas7_wdt, sirfsoc_wdt: these seem to rely on another driver stopping
    the watchdog clock, so it behaves the same as all above,
  - diag288_wdt: this returns -EBUSY when trying to suspend the system
    while the watchdog is enabled, to put the burden of disabling the
    watchdog on the user,
  - ux500_wdt: this seems to use a hardware feature to automatically
    disable the watchdog during suspend.

So only the last one seems to protect against kernel crashes after the
watchdog's suspend method is called...

Note that two drivers (iTCO_wdt and wdat_wdt) implements suspend_noirq
instead of suspend, which decreases the window of running without a watchdog
a bit.

>>> With respect to the restart callback implementation, that may well have
>>> consequences on
>>> Gen3, hopefully Wolfram will give us a feedback on this.
>>> In particular I would like to know if we should be installing the restart
>>> callback only when
>>> we use "renesas,rcar-gen2-wdt" as compatible string, or it's ok to make
>>> it available for
>>> Gen3 as well.
>>
>> IIRC, the reason we don't have the restart callback on R-Car Gen3 is the
>> arm64 maintainers insisting on using PSCI, and vetoing other means,
>> to restart the system.
>
> You could just give it lower priority than PSCI.
>
>> Which leaves us with a few boards where we have to use the watchdog, and
>> wait until the timeout triggers...
>
> Which means the veto is counter-productive and thus meaningless.

I do welcome that point of view ;-)

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

* Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
@ 2018-01-31 15:37                     ` Geert Uytterhoeven
  0 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31 15:37 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Fabrizio Castro, Philipp Zabel, Rob Herring, Mark Rutland,
	Wim Van Sebroeck, Russell King, Catalin Marinas, Will Deacon,
	Michael Turquette, Stephen Boyd, Simon Horman, Magnus Damm,
	Geert Uytterhoeven, Wolfram Sang, devicetree, linux-watchdog,
	linux-renesas-soc, linux-arm-kernel, linux-clk, Chris Paterson,
	Biju Das, Ramesh Shanmugasundaram

Hi Günter,

On Wed, Jan 31, 2018 at 3:48 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> On 01/31/2018 04:13 AM, Geert Uytterhoeven wrote:
>> On Wed, Jan 31, 2018 at 11:47 AM, Fabrizio Castro
>> <fabrizio.castro@bp.renesas.com> wrote:
>>>> Subject: Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2
>>>> support
>>>> On Tue, Jan 30, 2018 at 08:22:44PM +0000, Fabrizio Castro wrote:
>>>>>
>>>>> On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
>>>>> when suspending to RAM we need to explicitly disable the counting by
>>>>> clearing TME from RWTCSRA.
>>>>> Also, on some systems RWDT is the only piece of HW that allows the SoC
>>>>> to be restarted, therefore this patch implements the restart callback.
>>>>>
>>>>> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
>>>>> Signed-off-by: Ramesh Shanmugasundaram
>>>>> <ramesh.shanmugasundaram@bp.renesas.com>
>>>>> ---
>>>>> Wolfram, was the restart callback implementation missing for a reason?
>>>>> Is its implementation going to break any Gen3 platform?
>>>>
>>>> The changes clearly are way more than claimed in the subject. Adding
>>>> restart handler and PM support may be prerequisites for Gen2, but the
>>>> changes apply to Gen3 as well. What happened to "one patch per logical
>>>> change" ?
>>>
>>> The PM implementation should be ok for Gen3 too, without this patch
>>> series the kernel
>>> would disable the rwdt clock when suspending to RAM, this would "pause"
>>> the counting.
>>> This patch series declares the rwdt clock as critical for Gen2 and RZ/G1,
>>> which means we
>>> need to explicitly disable the counting to keep the same behaviour in
>>> place.
>>
>> Note that if the kernel crashes after rwdt_suspend(), the watchdog won't
>> restart the system. But that's an issue common to many watchdog driver,
>> right?
>>
> If so, that would be buggy.

All watchdog drivers implementing a system suspend handler stop the watchdog
before suspending the system. I guess if they wouldn't do that, the watchdog
would restart the system while asleep?

Exceptions are:
  - atlas7_wdt, sirfsoc_wdt: these seem to rely on another driver stopping
    the watchdog clock, so it behaves the same as all above,
  - diag288_wdt: this returns -EBUSY when trying to suspend the system
    while the watchdog is enabled, to put the burden of disabling the
    watchdog on the user,
  - ux500_wdt: this seems to use a hardware feature to automatically
    disable the watchdog during suspend.

So only the last one seems to protect against kernel crashes after the
watchdog's suspend method is called...

Note that two drivers (iTCO_wdt and wdat_wdt) implements suspend_noirq
instead of suspend, which decreases the window of running without a watchdog
a bit.

>>> With respect to the restart callback implementation, that may well have
>>> consequences on
>>> Gen3, hopefully Wolfram will give us a feedback on this.
>>> In particular I would like to know if we should be installing the restart
>>> callback only when
>>> we use "renesas,rcar-gen2-wdt" as compatible string, or it's ok to make
>>> it available for
>>> Gen3 as well.
>>
>> IIRC, the reason we don't have the restart callback on R-Car Gen3 is the
>> arm64 maintainers insisting on using PSCI, and vetoing other means,
>> to restart the system.
>
> You could just give it lower priority than PSCI.
>
>> Which leaves us with a few boards where we have to use the watchdog, and
>> wait until the timeout triggers...
>
> Which means the veto is counter-productive and thus meaningless.

I do welcome that point of view ;-)

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

* Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
@ 2018-01-31 15:37                     ` Geert Uytterhoeven
  0 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31 15:37 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Fabrizio Castro, Philipp Zabel, Rob Herring, Mark Rutland,
	Wim Van Sebroeck, Russell King, Catalin Marinas, Will Deacon,
	Michael Turquette, Stephen Boyd, Simon Horman, Magnus Damm,
	Geert Uytterhoeven, Wolfram Sang, devicetree, linux-watchdog,
	linux-renesas-soc, linux-arm-kernel, linux-clk, Chris Paterson,
	Biju Das, Ramesh Shanmugasundaram

Hi G=C3=BCnter,

On Wed, Jan 31, 2018 at 3:48 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> On 01/31/2018 04:13 AM, Geert Uytterhoeven wrote:
>> On Wed, Jan 31, 2018 at 11:47 AM, Fabrizio Castro
>> <fabrizio.castro@bp.renesas.com> wrote:
>>>> Subject: Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2
>>>> support
>>>> On Tue, Jan 30, 2018 at 08:22:44PM +0000, Fabrizio Castro wrote:
>>>>>
>>>>> On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefo=
re
>>>>> when suspending to RAM we need to explicitly disable the counting by
>>>>> clearing TME from RWTCSRA.
>>>>> Also, on some systems RWDT is the only piece of HW that allows the So=
C
>>>>> to be restarted, therefore this patch implements the restart callback=
.
>>>>>
>>>>> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
>>>>> Signed-off-by: Ramesh Shanmugasundaram
>>>>> <ramesh.shanmugasundaram@bp.renesas.com>
>>>>> ---
>>>>> Wolfram, was the restart callback implementation missing for a reason=
?
>>>>> Is its implementation going to break any Gen3 platform?
>>>>
>>>> The changes clearly are way more than claimed in the subject. Adding
>>>> restart handler and PM support may be prerequisites for Gen2, but the
>>>> changes apply to Gen3 as well. What happened to "one patch per logical
>>>> change" ?
>>>
>>> The PM implementation should be ok for Gen3 too, without this patch
>>> series the kernel
>>> would disable the rwdt clock when suspending to RAM, this would "pause"
>>> the counting.
>>> This patch series declares the rwdt clock as critical for Gen2 and RZ/G=
1,
>>> which means we
>>> need to explicitly disable the counting to keep the same behaviour in
>>> place.
>>
>> Note that if the kernel crashes after rwdt_suspend(), the watchdog won't
>> restart the system. But that's an issue common to many watchdog driver,
>> right?
>>
> If so, that would be buggy.

All watchdog drivers implementing a system suspend handler stop the watchdo=
g
before suspending the system. I guess if they wouldn't do that, the watchdo=
g
would restart the system while asleep?

Exceptions are:
  - atlas7_wdt, sirfsoc_wdt: these seem to rely on another driver stopping
    the watchdog clock, so it behaves the same as all above,
  - diag288_wdt: this returns -EBUSY when trying to suspend the system
    while the watchdog is enabled, to put the burden of disabling the
    watchdog on the user,
  - ux500_wdt: this seems to use a hardware feature to automatically
    disable the watchdog during suspend.

So only the last one seems to protect against kernel crashes after the
watchdog's suspend method is called...

Note that two drivers (iTCO_wdt and wdat_wdt) implements suspend_noirq
instead of suspend, which decreases the window of running without a watchdo=
g
a bit.

>>> With respect to the restart callback implementation, that may well have
>>> consequences on
>>> Gen3, hopefully Wolfram will give us a feedback on this.
>>> In particular I would like to know if we should be installing the resta=
rt
>>> callback only when
>>> we use "renesas,rcar-gen2-wdt" as compatible string, or it's ok to make
>>> it available for
>>> Gen3 as well.
>>
>> IIRC, the reason we don't have the restart callback on R-Car Gen3 is the
>> arm64 maintainers insisting on using PSCI, and vetoing other means,
>> to restart the system.
>
> You could just give it lower priority than PSCI.
>
>> Which leaves us with a few boards where we have to use the watchdog, and
>> wait until the timeout triggers...
>
> Which means the veto is counter-productive and thus meaningless.

I do welcome that point of view ;-)

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. Bu=
t
when I'm talking to journalists I just say "programmer" or something like t=
hat.
                                -- Linus Torvalds

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

* [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2 support
@ 2018-01-31 15:37                     ` Geert Uytterhoeven
  0 siblings, 0 replies; 120+ messages in thread
From: Geert Uytterhoeven @ 2018-01-31 15:37 UTC (permalink / raw)
  To: linux-arm-kernel

Hi G?nter,

On Wed, Jan 31, 2018 at 3:48 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> On 01/31/2018 04:13 AM, Geert Uytterhoeven wrote:
>> On Wed, Jan 31, 2018 at 11:47 AM, Fabrizio Castro
>> <fabrizio.castro@bp.renesas.com> wrote:
>>>> Subject: Re: [RFC v3 11/25] watchdog: renesas_wdt: Add R-Car Gen2
>>>> support
>>>> On Tue, Jan 30, 2018 at 08:22:44PM +0000, Fabrizio Castro wrote:
>>>>>
>>>>> On R-Car Gen2 and RZ/G1 the rwdt clock needs to be always ON, therefore
>>>>> when suspending to RAM we need to explicitly disable the counting by
>>>>> clearing TME from RWTCSRA.
>>>>> Also, on some systems RWDT is the only piece of HW that allows the SoC
>>>>> to be restarted, therefore this patch implements the restart callback.
>>>>>
>>>>> Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
>>>>> Signed-off-by: Ramesh Shanmugasundaram
>>>>> <ramesh.shanmugasundaram@bp.renesas.com>
>>>>> ---
>>>>> Wolfram, was the restart callback implementation missing for a reason?
>>>>> Is its implementation going to break any Gen3 platform?
>>>>
>>>> The changes clearly are way more than claimed in the subject. Adding
>>>> restart handler and PM support may be prerequisites for Gen2, but the
>>>> changes apply to Gen3 as well. What happened to "one patch per logical
>>>> change" ?
>>>
>>> The PM implementation should be ok for Gen3 too, without this patch
>>> series the kernel
>>> would disable the rwdt clock when suspending to RAM, this would "pause"
>>> the counting.
>>> This patch series declares the rwdt clock as critical for Gen2 and RZ/G1,
>>> which means we
>>> need to explicitly disable the counting to keep the same behaviour in
>>> place.
>>
>> Note that if the kernel crashes after rwdt_suspend(), the watchdog won't
>> restart the system. But that's an issue common to many watchdog driver,
>> right?
>>
> If so, that would be buggy.

All watchdog drivers implementing a system suspend handler stop the watchdog
before suspending the system. I guess if they wouldn't do that, the watchdog
would restart the system while asleep?

Exceptions are:
  - atlas7_wdt, sirfsoc_wdt: these seem to rely on another driver stopping
    the watchdog clock, so it behaves the same as all above,
  - diag288_wdt: this returns -EBUSY when trying to suspend the system
    while the watchdog is enabled, to put the burden of disabling the
    watchdog on the user,
  - ux500_wdt: this seems to use a hardware feature to automatically
    disable the watchdog during suspend.

So only the last one seems to protect against kernel crashes after the
watchdog's suspend method is called...

Note that two drivers (iTCO_wdt and wdat_wdt) implements suspend_noirq
instead of suspend, which decreases the window of running without a watchdog
a bit.

>>> With respect to the restart callback implementation, that may well have
>>> consequences on
>>> Gen3, hopefully Wolfram will give us a feedback on this.
>>> In particular I would like to know if we should be installing the restart
>>> callback only when
>>> we use "renesas,rcar-gen2-wdt" as compatible string, or it's ok to make
>>> it available for
>>> Gen3 as well.
>>
>> IIRC, the reason we don't have the restart callback on R-Car Gen3 is the
>> arm64 maintainers insisting on using PSCI, and vetoing other means,
>> to restart the system.
>
> You could just give it lower priority than PSCI.
>
>> Which leaves us with a few boards where we have to use the watchdog, and
>> wait until the timeout triggers...
>
> Which means the veto is counter-productive and thus meaningless.

I do welcome that point of view ;-)

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

end of thread, other threads:[~2018-01-31 15:37 UTC | newest]

Thread overview: 120+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-30 20:22 [RFC v3 00/25] Fix watchdog on Renesas R-Car Gen2 and RZ/G1 Fabrizio Castro
2018-01-30 20:22 ` Fabrizio Castro
2018-01-30 20:22 ` [RFC v3 03/25] ARM: dts: r8a7745: Adjust SMP routine size Fabrizio Castro
2018-01-30 20:22   ` Fabrizio Castro
     [not found]   ` <1517343778-27902-4-git-send-email-fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
2018-01-31  8:42     ` Geert Uytterhoeven
2018-01-31  8:42       ` Geert Uytterhoeven
2018-01-31  8:42       ` Geert Uytterhoeven
2018-01-30 20:22 ` [RFC v3 06/25] ARM: dts: r8a7792: " Fabrizio Castro
2018-01-30 20:22   ` Fabrizio Castro
2018-01-31  8:43   ` Geert Uytterhoeven
2018-01-31  8:43     ` Geert Uytterhoeven
2018-01-31  8:43     ` Geert Uytterhoeven
2018-01-30 20:22 ` [RFC v3 12/25] ARM: shmobile: rcar-gen2: Add watchdog support Fabrizio Castro
2018-01-30 20:22   ` Fabrizio Castro
     [not found] ` <1517343778-27902-1-git-send-email-fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
2018-01-30 20:22   ` [RFC v3 01/25] ARM: shmobile: " Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22   ` [RFC v3 02/25] ARM: dts: r8a7743: Adjust SMP routine size Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
     [not found]     ` <1517343778-27902-3-git-send-email-fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
2018-01-31  8:42       ` Geert Uytterhoeven
2018-01-31  8:42         ` Geert Uytterhoeven
2018-01-31  8:42         ` Geert Uytterhoeven
2018-01-30 20:22   ` [RFC v3 04/25] ARM: dts: r8a7790: " Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
     [not found]     ` <1517343778-27902-5-git-send-email-fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
2018-01-31  8:43       ` Geert Uytterhoeven
2018-01-31  8:43         ` Geert Uytterhoeven
2018-01-31  8:43         ` Geert Uytterhoeven
2018-01-30 20:22   ` [RFC v3 05/25] ARM: dts: r8a7791: " Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
     [not found]     ` <1517343778-27902-6-git-send-email-fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
2018-01-31  8:43       ` Geert Uytterhoeven
2018-01-31  8:43         ` Geert Uytterhoeven
2018-01-31  8:43         ` Geert Uytterhoeven
2018-01-30 20:22   ` [RFC v3 07/25] ARM: dts: r8a7793: " Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
     [not found]     ` <1517343778-27902-8-git-send-email-fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
2018-01-31  8:43       ` Geert Uytterhoeven
2018-01-31  8:43         ` Geert Uytterhoeven
2018-01-31  8:43         ` Geert Uytterhoeven
2018-01-30 20:22   ` [RFC v3 08/25] ARM: dts: r8a7794: " Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-31  8:44     ` Geert Uytterhoeven
2018-01-31  8:44       ` Geert Uytterhoeven
2018-01-31  8:44       ` Geert Uytterhoeven
2018-01-30 20:22   ` [RFC v3 09/25] soc: renesas: rcar-rst: Enable watchdog as reset trigger for Gen2 Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22   ` [RFC v3 10/25] dt-bindings: watchdog: renesas-wdt: Add R-Car Gen2 support Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-31  8:46     ` Geert Uytterhoeven
2018-01-31  8:46       ` Geert Uytterhoeven
2018-01-31  8:46       ` Geert Uytterhoeven
     [not found]       ` <CAMuHMdXkHF9R0XfcG++s0RRup+Mdtam5p=FXw26z86wAOJhZfQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-31 10:27         ` Fabrizio Castro
2018-01-31 10:27           ` Fabrizio Castro
2018-01-31 10:27           ` Fabrizio Castro
2018-01-31 10:27           ` Fabrizio Castro
2018-01-30 20:22   ` [RFC v3 11/25] watchdog: renesas_wdt: " Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 22:05     ` Guenter Roeck
2018-01-30 22:05       ` Guenter Roeck
2018-01-30 22:05       ` Guenter Roeck
     [not found]       ` <20180130220504.GA16709-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2018-01-31 10:47         ` Fabrizio Castro
2018-01-31 10:47           ` Fabrizio Castro
2018-01-31 10:47           ` Fabrizio Castro
2018-01-31 10:47           ` Fabrizio Castro
     [not found]           ` <TY1PR06MB0895ECB2936323F9D281C1EFC0FB0-/PRLmSCtZ16EeHdvShrxA20DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-01-31 12:13             ` Geert Uytterhoeven
2018-01-31 12:13               ` Geert Uytterhoeven
2018-01-31 12:13               ` Geert Uytterhoeven
2018-01-31 13:58               ` Fabrizio Castro
2018-01-31 13:58                 ` Fabrizio Castro
2018-01-31 13:58                 ` Fabrizio Castro
2018-01-31 13:58                 ` Fabrizio Castro
2018-01-31 14:48               ` Guenter Roeck
2018-01-31 14:48                 ` Guenter Roeck
2018-01-31 14:48                 ` Guenter Roeck
2018-01-31 15:27                 ` Fabrizio Castro
2018-01-31 15:27                   ` Fabrizio Castro
2018-01-31 15:27                   ` Fabrizio Castro
2018-01-31 15:27                   ` Fabrizio Castro
     [not found]                 ` <007dd1e3-70fd-69ad-fd02-4719e958b41c-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2018-01-31 15:37                   ` Geert Uytterhoeven
2018-01-31 15:37                     ` Geert Uytterhoeven
2018-01-31 15:37                     ` Geert Uytterhoeven
2018-01-31 15:37                     ` Geert Uytterhoeven
2018-01-30 20:22   ` [RFC v3 13/25] ARM: shmobile: defconfig: Enable CONFIG_RENESAS_WDT Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22   ` [RFC v3 14/25] clk: renesas: r8a7743: Add rwdt clock Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22   ` [RFC v3 15/25] clk: renesas: r8a7745: " Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22   ` [RFC v3 16/25] clk: renesas: r8a7790: " Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22   ` [RFC v3 20/25] ARM: dts: r8a7745: Add watchdog support to SoC dtsi Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22   ` [RFC v3 21/25] ARM: dts: r8a7790: " Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22     ` Fabrizio Castro
2018-01-30 20:22 ` [RFC v3 17/25] clk: renesas: r8a7791/r8a7793: Add rwdt clock Fabrizio Castro
2018-01-30 20:22   ` Fabrizio Castro
2018-01-30 20:22 ` [RFC v3 18/25] clk: renesas: r8a7794: " Fabrizio Castro
2018-01-30 20:22   ` Fabrizio Castro
2018-01-30 20:22 ` [RFC v3 19/25] ARM: dts: r8a7743: Add watchdog support to SoC dtsi Fabrizio Castro
2018-01-30 20:22   ` Fabrizio Castro
2018-01-30 20:22 ` [RFC v3 22/25] ARM: dts: r8a7791: " Fabrizio Castro
2018-01-30 20:22   ` Fabrizio Castro
2018-01-30 20:22 ` [RFC v3 23/25] ARM: dts: r8a7794: " Fabrizio Castro
2018-01-30 20:22   ` Fabrizio Castro
2018-01-30 20:22 ` [RFC v3 24/25] ARM: dts: iwg20m: Add watchdog support to SoM dtsi Fabrizio Castro
2018-01-30 20:22   ` Fabrizio Castro
2018-01-30 20:22 ` [RFC v3 25/25] ARM: dts: iwg22m: " Fabrizio Castro
2018-01-30 20:22   ` Fabrizio Castro

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.