All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: davinci: turn off DDR PHY when entering deep sleep
@ 2012-05-10 17:52 ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2012-05-10 17:52 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Russell King, Nicolas Pitre,
	Catalin Marinas, Marcus Folkesson, linux-arm-kernel
  Cc: linux-kernel

Deepsleep is the most power saving state on the davinci-platform.
The DDR PHY consumes about 25mW and should be turned off in this low
power state.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 arch/arm/mach-davinci/include/mach/memory.h |    2 ++
 arch/arm/mach-davinci/sleep.S               |   10 ++++++++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-davinci/include/mach/memory.h b/arch/arm/mach-davinci/include/mach/memory.h
index 7873194..1b1b8ac 100644
--- a/arch/arm/mach-davinci/include/mach/memory.h
+++ b/arch/arm/mach-davinci/include/mach/memory.h
@@ -36,6 +36,8 @@
 #define DDR2_MCLKSTOPEN_BIT	BIT(30)
 #define DDR2_LPMODEN_BIT	BIT(31)
 
+#define DDR2_DRPHYC1R_OFFSET 	0xe4
+#define DDR_PWRDNEN_BIT 		BIT(6)
 /*
  * Increase size of DMA-consistent memory region
  */
diff --git a/arch/arm/mach-davinci/sleep.S b/arch/arm/mach-davinci/sleep.S
index 5f1e045..30713b2 100644
--- a/arch/arm/mach-davinci/sleep.S
+++ b/arch/arm/mach-davinci/sleep.S
@@ -57,6 +57,11 @@ ENTRY(davinci_cpu_suspend)
 
 	ldmia	r0, {r0-r4}
 
+	/* Turn PHY off */
+	ldr	ip, [r0, #DDR2_DRPHYC1R_OFFSET]
+	orr	ip, ip, #DDR_PWRDNEN_BIT 	
+	str	ip, [r0, #DDR2_DRPHYC1R_OFFSET]
+
 	/*
 	 * Switch DDR to self-refresh mode.
 	 */
@@ -171,6 +176,11 @@ ENTRY(davinci_cpu_suspend)
 	bic	ip, ip, #DDR2_LPMODEN_BIT
 	str	ip, [r0, #DDR2_SDRCR_OFFSET]
 
+	/* Turn PHY on */
+	ldr	ip, [r0, #DDR2_DRPHYC1R_OFFSET]
+	bic	ip, ip, #DDR_PWRDNEN_BIT 	
+	str	ip, [r0, #DDR2_DRPHYC1R_OFFSET]
+
 	/* Restore registers and return */
 	ldmfd   sp!, {r0-r12, pc}
 
-- 
1.7.5.4


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

* [PATCH] ARM: davinci: turn off DDR PHY when entering deep sleep
@ 2012-05-10 17:52 ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2012-05-10 17:52 UTC (permalink / raw)
  To: linux-arm-kernel

Deepsleep is the most power saving state on the davinci-platform.
The DDR PHY consumes about 25mW and should be turned off in this low
power state.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 arch/arm/mach-davinci/include/mach/memory.h |    2 ++
 arch/arm/mach-davinci/sleep.S               |   10 ++++++++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-davinci/include/mach/memory.h b/arch/arm/mach-davinci/include/mach/memory.h
index 7873194..1b1b8ac 100644
--- a/arch/arm/mach-davinci/include/mach/memory.h
+++ b/arch/arm/mach-davinci/include/mach/memory.h
@@ -36,6 +36,8 @@
 #define DDR2_MCLKSTOPEN_BIT	BIT(30)
 #define DDR2_LPMODEN_BIT	BIT(31)
 
+#define DDR2_DRPHYC1R_OFFSET 	0xe4
+#define DDR_PWRDNEN_BIT 		BIT(6)
 /*
  * Increase size of DMA-consistent memory region
  */
diff --git a/arch/arm/mach-davinci/sleep.S b/arch/arm/mach-davinci/sleep.S
index 5f1e045..30713b2 100644
--- a/arch/arm/mach-davinci/sleep.S
+++ b/arch/arm/mach-davinci/sleep.S
@@ -57,6 +57,11 @@ ENTRY(davinci_cpu_suspend)
 
 	ldmia	r0, {r0-r4}
 
+	/* Turn PHY off */
+	ldr	ip, [r0, #DDR2_DRPHYC1R_OFFSET]
+	orr	ip, ip, #DDR_PWRDNEN_BIT 	
+	str	ip, [r0, #DDR2_DRPHYC1R_OFFSET]
+
 	/*
 	 * Switch DDR to self-refresh mode.
 	 */
@@ -171,6 +176,11 @@ ENTRY(davinci_cpu_suspend)
 	bic	ip, ip, #DDR2_LPMODEN_BIT
 	str	ip, [r0, #DDR2_SDRCR_OFFSET]
 
+	/* Turn PHY on */
+	ldr	ip, [r0, #DDR2_DRPHYC1R_OFFSET]
+	bic	ip, ip, #DDR_PWRDNEN_BIT 	
+	str	ip, [r0, #DDR2_DRPHYC1R_OFFSET]
+
 	/* Restore registers and return */
 	ldmfd   sp!, {r0-r12, pc}
 
-- 
1.7.5.4

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

* Re: [PATCH] ARM: davinci: turn off DDR PHY when entering deep sleep
  2012-05-10 17:52 ` Marcus Folkesson
@ 2012-05-21 17:38   ` Sekhar Nori
  -1 siblings, 0 replies; 88+ messages in thread
From: Sekhar Nori @ 2012-05-21 17:38 UTC (permalink / raw)
  To: Marcus Folkesson
  Cc: Kevin Hilman, Russell King, Nicolas Pitre, Catalin Marinas,
	linux-arm-kernel, linux-kernel

Hi Marcus,

Thanks for the patch.

On 5/10/2012 11:22 PM, Marcus Folkesson wrote:
> Deepsleep is the most power saving state on the davinci-platform.
> The DDR PHY consumes about 25mW and should be turned off in this low
> power state.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> ---
>  arch/arm/mach-davinci/include/mach/memory.h |    2 ++
>  arch/arm/mach-davinci/sleep.S               |   10 ++++++++++
>  2 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-davinci/include/mach/memory.h b/arch/arm/mach-davinci/include/mach/memory.h
> index 7873194..1b1b8ac 100644
> --- a/arch/arm/mach-davinci/include/mach/memory.h
> +++ b/arch/arm/mach-davinci/include/mach/memory.h

This is moved to arch/arm/mach-davinci/include/mach/ddr2.h in current
kernel.

> @@ -36,6 +36,8 @@
>  #define DDR2_MCLKSTOPEN_BIT	BIT(30)
>  #define DDR2_LPMODEN_BIT	BIT(31)
>  
> +#define DDR2_DRPHYC1R_OFFSET 	0xe4
> +#define DDR_PWRDNEN_BIT 		BIT(6)
>  /*
>   * Increase size of DMA-consistent memory region
>   */
> diff --git a/arch/arm/mach-davinci/sleep.S b/arch/arm/mach-davinci/sleep.S
> index 5f1e045..30713b2 100644
> --- a/arch/arm/mach-davinci/sleep.S
> +++ b/arch/arm/mach-davinci/sleep.S
> @@ -57,6 +57,11 @@ ENTRY(davinci_cpu_suspend)
>  
>  	ldmia	r0, {r0-r4}
>  
> +	/* Turn PHY off */
> +	ldr	ip, [r0, #DDR2_DRPHYC1R_OFFSET]
> +	orr	ip, ip, #DDR_PWRDNEN_BIT 	
> +	str	ip, [r0, #DDR2_DRPHYC1R_OFFSET]

Current TRM (section 14.2.13.1) specifies that this bit be set during
DDR initialization sequence itself (done in UBL or U-Boot/SPL). I am
checking with folks from the TI design team on whether it can be done
later on as part of the DeepSleep sequence.

It looks like IOPWRDN bit in VTPIO_CTL also needs to be set for this
configuration take effect. You probably did not have to do it because
the bootloader you are using already has this set?

How much testing has this patch undergone? Have you tested it across
multiple suspend-resume cycles? How much does the power consumed by DDR
PHY go down by (and which type of DDR)?

Thanks,
Sekhar

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

* [PATCH] ARM: davinci: turn off DDR PHY when entering deep sleep
@ 2012-05-21 17:38   ` Sekhar Nori
  0 siblings, 0 replies; 88+ messages in thread
From: Sekhar Nori @ 2012-05-21 17:38 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Marcus,

Thanks for the patch.

On 5/10/2012 11:22 PM, Marcus Folkesson wrote:
> Deepsleep is the most power saving state on the davinci-platform.
> The DDR PHY consumes about 25mW and should be turned off in this low
> power state.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> ---
>  arch/arm/mach-davinci/include/mach/memory.h |    2 ++
>  arch/arm/mach-davinci/sleep.S               |   10 ++++++++++
>  2 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-davinci/include/mach/memory.h b/arch/arm/mach-davinci/include/mach/memory.h
> index 7873194..1b1b8ac 100644
> --- a/arch/arm/mach-davinci/include/mach/memory.h
> +++ b/arch/arm/mach-davinci/include/mach/memory.h

This is moved to arch/arm/mach-davinci/include/mach/ddr2.h in current
kernel.

> @@ -36,6 +36,8 @@
>  #define DDR2_MCLKSTOPEN_BIT	BIT(30)
>  #define DDR2_LPMODEN_BIT	BIT(31)
>  
> +#define DDR2_DRPHYC1R_OFFSET 	0xe4
> +#define DDR_PWRDNEN_BIT 		BIT(6)
>  /*
>   * Increase size of DMA-consistent memory region
>   */
> diff --git a/arch/arm/mach-davinci/sleep.S b/arch/arm/mach-davinci/sleep.S
> index 5f1e045..30713b2 100644
> --- a/arch/arm/mach-davinci/sleep.S
> +++ b/arch/arm/mach-davinci/sleep.S
> @@ -57,6 +57,11 @@ ENTRY(davinci_cpu_suspend)
>  
>  	ldmia	r0, {r0-r4}
>  
> +	/* Turn PHY off */
> +	ldr	ip, [r0, #DDR2_DRPHYC1R_OFFSET]
> +	orr	ip, ip, #DDR_PWRDNEN_BIT 	
> +	str	ip, [r0, #DDR2_DRPHYC1R_OFFSET]

Current TRM (section 14.2.13.1) specifies that this bit be set during
DDR initialization sequence itself (done in UBL or U-Boot/SPL). I am
checking with folks from the TI design team on whether it can be done
later on as part of the DeepSleep sequence.

It looks like IOPWRDN bit in VTPIO_CTL also needs to be set for this
configuration take effect. You probably did not have to do it because
the bootloader you are using already has this set?

How much testing has this patch undergone? Have you tested it across
multiple suspend-resume cycles? How much does the power consumed by DDR
PHY go down by (and which type of DDR)?

Thanks,
Sekhar

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

* Re: [PATCH] ARM: davinci: turn off DDR PHY when entering deep sleep
  2012-05-21 17:38   ` Sekhar Nori
@ 2012-05-24 11:46     ` Marcus Folkesson
  -1 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2012-05-24 11:46 UTC (permalink / raw)
  To: Sekhar Nori
  Cc: Kevin Hilman, Russell King, Nicolas Pitre, Catalin Marinas,
	linux-arm-kernel, linux-kernel

Hi Sekhar,

2012/5/21 Sekhar Nori <nsekhar@ti.com>:
> Hi Marcus,
>
> Thanks for the patch.
>
> On 5/10/2012 11:22 PM, Marcus Folkesson wrote:
>> Deepsleep is the most power saving state on the davinci-platform.
>> The DDR PHY consumes about 25mW and should be turned off in this low
>> power state.
>>
>> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
>> ---
>>  arch/arm/mach-davinci/include/mach/memory.h |    2 ++
>>  arch/arm/mach-davinci/sleep.S               |   10 ++++++++++
>>  2 files changed, 12 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-davinci/include/mach/memory.h b/arch/arm/mach-davinci/include/mach/memory.h
>> index 7873194..1b1b8ac 100644
>> --- a/arch/arm/mach-davinci/include/mach/memory.h
>> +++ b/arch/arm/mach-davinci/include/mach/memory.h
>
> This is moved to arch/arm/mach-davinci/include/mach/ddr2.h in current
> kernel.
>
>> @@ -36,6 +36,8 @@
>>  #define DDR2_MCLKSTOPEN_BIT  BIT(30)
>>  #define DDR2_LPMODEN_BIT     BIT(31)
>>
>> +#define DDR2_DRPHYC1R_OFFSET         0xe4
>> +#define DDR_PWRDNEN_BIT              BIT(6)
>>  /*
>>   * Increase size of DMA-consistent memory region
>>   */
>> diff --git a/arch/arm/mach-davinci/sleep.S b/arch/arm/mach-davinci/sleep.S
>> index 5f1e045..30713b2 100644
>> --- a/arch/arm/mach-davinci/sleep.S
>> +++ b/arch/arm/mach-davinci/sleep.S
>> @@ -57,6 +57,11 @@ ENTRY(davinci_cpu_suspend)
>>
>>       ldmia   r0, {r0-r4}
>>
>> +     /* Turn PHY off */
>> +     ldr     ip, [r0, #DDR2_DRPHYC1R_OFFSET]
>> +     orr     ip, ip, #DDR_PWRDNEN_BIT
>> +     str     ip, [r0, #DDR2_DRPHYC1R_OFFSET]
>
> Current TRM (section 14.2.13.1) specifies that this bit be set during
> DDR initialization sequence itself (done in UBL or U-Boot/SPL). I am
> checking with folks from the TI design team on whether it can be done
> later on as part of the DeepSleep sequence.
>
> It looks like IOPWRDN bit in VTPIO_CTL also needs to be set for this
> configuration take effect. You probably did not have to do it because
> the bootloader you are using already has this set?
>
> How much testing has this patch undergone? Have you tested it across
> multiple suspend-resume cycles? How much does the power consumed by DDR
> PHY go down by (and which type of DDR)?

You are right.

I now see that it is possible to set all those bits in the bootloader
and let the PHY automatically go down in idle.
This patch is therefore unnecessary.

Thank you all for the attention!


Best regards
Marcus Folkesson

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

* [PATCH] ARM: davinci: turn off DDR PHY when entering deep sleep
@ 2012-05-24 11:46     ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2012-05-24 11:46 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Sekhar,

2012/5/21 Sekhar Nori <nsekhar@ti.com>:
> Hi Marcus,
>
> Thanks for the patch.
>
> On 5/10/2012 11:22 PM, Marcus Folkesson wrote:
>> Deepsleep is the most power saving state on the davinci-platform.
>> The DDR PHY consumes about 25mW and should be turned off in this low
>> power state.
>>
>> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
>> ---
>> ?arch/arm/mach-davinci/include/mach/memory.h | ? ?2 ++
>> ?arch/arm/mach-davinci/sleep.S ? ? ? ? ? ? ? | ? 10 ++++++++++
>> ?2 files changed, 12 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-davinci/include/mach/memory.h b/arch/arm/mach-davinci/include/mach/memory.h
>> index 7873194..1b1b8ac 100644
>> --- a/arch/arm/mach-davinci/include/mach/memory.h
>> +++ b/arch/arm/mach-davinci/include/mach/memory.h
>
> This is moved to arch/arm/mach-davinci/include/mach/ddr2.h in current
> kernel.
>
>> @@ -36,6 +36,8 @@
>> ?#define DDR2_MCLKSTOPEN_BIT ?BIT(30)
>> ?#define DDR2_LPMODEN_BIT ? ? BIT(31)
>>
>> +#define DDR2_DRPHYC1R_OFFSET ? ? ? ? 0xe4
>> +#define DDR_PWRDNEN_BIT ? ? ? ? ? ? ?BIT(6)
>> ?/*
>> ? * Increase size of DMA-consistent memory region
>> ? */
>> diff --git a/arch/arm/mach-davinci/sleep.S b/arch/arm/mach-davinci/sleep.S
>> index 5f1e045..30713b2 100644
>> --- a/arch/arm/mach-davinci/sleep.S
>> +++ b/arch/arm/mach-davinci/sleep.S
>> @@ -57,6 +57,11 @@ ENTRY(davinci_cpu_suspend)
>>
>> ? ? ? ldmia ? r0, {r0-r4}
>>
>> + ? ? /* Turn PHY off */
>> + ? ? ldr ? ? ip, [r0, #DDR2_DRPHYC1R_OFFSET]
>> + ? ? orr ? ? ip, ip, #DDR_PWRDNEN_BIT
>> + ? ? str ? ? ip, [r0, #DDR2_DRPHYC1R_OFFSET]
>
> Current TRM (section 14.2.13.1) specifies that this bit be set during
> DDR initialization sequence itself (done in UBL or U-Boot/SPL). I am
> checking with folks from the TI design team on whether it can be done
> later on as part of the DeepSleep sequence.
>
> It looks like IOPWRDN bit in VTPIO_CTL also needs to be set for this
> configuration take effect. You probably did not have to do it because
> the bootloader you are using already has this set?
>
> How much testing has this patch undergone? Have you tested it across
> multiple suspend-resume cycles? How much does the power consumed by DDR
> PHY go down by (and which type of DDR)?

You are right.

I now see that it is possible to set all those bits in the bootloader
and let the PHY automatically go down in idle.
This patch is therefore unnecessary.

Thank you all for the attention!


Best regards
Marcus Folkesson

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

* Re: [PATCH] ARM: davinci: turn off DDR PHY when entering deep sleep
  2012-05-24 11:46     ` Marcus Folkesson
@ 2012-05-24 17:41       ` Sekhar Nori
  -1 siblings, 0 replies; 88+ messages in thread
From: Sekhar Nori @ 2012-05-24 17:41 UTC (permalink / raw)
  To: Marcus Folkesson
  Cc: Kevin Hilman, Russell King, Nicolas Pitre, Catalin Marinas,
	linux-arm-kernel, linux-kernel

Hi Marcus,

On 5/24/2012 5:16 PM, Marcus Folkesson wrote:

>>> diff --git a/arch/arm/mach-davinci/sleep.S b/arch/arm/mach-davinci/sleep.S
>>> index 5f1e045..30713b2 100644
>>> --- a/arch/arm/mach-davinci/sleep.S
>>> +++ b/arch/arm/mach-davinci/sleep.S
>>> @@ -57,6 +57,11 @@ ENTRY(davinci_cpu_suspend)
>>>
>>>       ldmia   r0, {r0-r4}
>>>
>>> +     /* Turn PHY off */
>>> +     ldr     ip, [r0, #DDR2_DRPHYC1R_OFFSET]
>>> +     orr     ip, ip, #DDR_PWRDNEN_BIT
>>> +     str     ip, [r0, #DDR2_DRPHYC1R_OFFSET]
>>
>> Current TRM (section 14.2.13.1) specifies that this bit be set during
>> DDR initialization sequence itself (done in UBL or U-Boot/SPL). I am
>> checking with folks from the TI design team on whether it can be done
>> later on as part of the DeepSleep sequence.
>>
>> It looks like IOPWRDN bit in VTPIO_CTL also needs to be set for this
>> configuration take effect. You probably did not have to do it because
>> the bootloader you are using already has this set?
>>
>> How much testing has this patch undergone? Have you tested it across
>> multiple suspend-resume cycles? How much does the power consumed by DDR
>> PHY go down by (and which type of DDR)?
> 
> You are right.
> 
> I now see that it is possible to set all those bits in the bootloader
> and let the PHY automatically go down in idle.
> This patch is therefore unnecessary.

It will be great if you can check if the current U-Boot/SPL for AM18x
sets these bits as part of the DDR initialization and if not, submit a
patch to U-Boot list for that?

BTW, I am yet to hear from the designers on whether this can be done
outside of DDR initialization step. If they confirm this can be done, it
will be useful to take this patch in to minimize the bootloader dependency.

Thanks,
Sekhar

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

* [PATCH] ARM: davinci: turn off DDR PHY when entering deep sleep
@ 2012-05-24 17:41       ` Sekhar Nori
  0 siblings, 0 replies; 88+ messages in thread
From: Sekhar Nori @ 2012-05-24 17:41 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Marcus,

On 5/24/2012 5:16 PM, Marcus Folkesson wrote:

>>> diff --git a/arch/arm/mach-davinci/sleep.S b/arch/arm/mach-davinci/sleep.S
>>> index 5f1e045..30713b2 100644
>>> --- a/arch/arm/mach-davinci/sleep.S
>>> +++ b/arch/arm/mach-davinci/sleep.S
>>> @@ -57,6 +57,11 @@ ENTRY(davinci_cpu_suspend)
>>>
>>>       ldmia   r0, {r0-r4}
>>>
>>> +     /* Turn PHY off */
>>> +     ldr     ip, [r0, #DDR2_DRPHYC1R_OFFSET]
>>> +     orr     ip, ip, #DDR_PWRDNEN_BIT
>>> +     str     ip, [r0, #DDR2_DRPHYC1R_OFFSET]
>>
>> Current TRM (section 14.2.13.1) specifies that this bit be set during
>> DDR initialization sequence itself (done in UBL or U-Boot/SPL). I am
>> checking with folks from the TI design team on whether it can be done
>> later on as part of the DeepSleep sequence.
>>
>> It looks like IOPWRDN bit in VTPIO_CTL also needs to be set for this
>> configuration take effect. You probably did not have to do it because
>> the bootloader you are using already has this set?
>>
>> How much testing has this patch undergone? Have you tested it across
>> multiple suspend-resume cycles? How much does the power consumed by DDR
>> PHY go down by (and which type of DDR)?
> 
> You are right.
> 
> I now see that it is possible to set all those bits in the bootloader
> and let the PHY automatically go down in idle.
> This patch is therefore unnecessary.

It will be great if you can check if the current U-Boot/SPL for AM18x
sets these bits as part of the DDR initialization and if not, submit a
patch to U-Boot list for that?

BTW, I am yet to hear from the designers on whether this can be done
outside of DDR initialization step. If they confirm this can be done, it
will be useful to take this patch in to minimize the bootloader dependency.

Thanks,
Sekhar

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

* [PATCH 0/7] watchdog: make use of timeout-secs
@ 2018-02-09 19:27 ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Mark Rutland,
	Carlo Caione, Kevin Hilman, Matthias Brugger, Barry Song,
	Maxime Ripard, Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy,
	Sylvain Lemieux, Nicolas Ferre, Alexandre Belloni
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel, linux-mediatek

All these drivers is using watchdog_init_timeout() to set timeout.
If the timeout-parameter is set to an valid value, it will allways pick
that and not even consider if timeout-secs is set in the devicetree.

Most of the patches will just remove the initial value for
timeout-parameter.

Some of the drivers allready has documented device-tree-bindings for
timeout-secs (but will not work), add property for those which not.

I wrote a similiar (tested) patch for imx2 and simply did the same to these drivers.
These patches is *NOT* tested, so please review extra carefully.


Taken from Documentation/watchdog/watchdog-kernel-api.txt:
	The watchdog_init_timeout function allows you to initialize the timeout field
	using the module timeout parameter or by retrieving the timeout-sec property from
	the device tree (if the module timeout parameter is invalid). Best practice is
	to set the default timeout value as timeout value in the watchdog_device and
	then use this function to set the user "preferred" timeout value.


Best regards
Marcus Folkesson

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

* [PATCH 0/7] watchdog: make use of timeout-secs
@ 2018-02-09 19:27 ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Mark Rutland,
	Carlo Caione, Kevin Hilman, Matthias Brugger, Barry Song,
	Maxime Ripard, Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy,
	Sylvain Lemieux, Nicolas Ferre, Alexandre Belloni
  Cc: linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

All these drivers is using watchdog_init_timeout() to set timeout.
If the timeout-parameter is set to an valid value, it will allways pick
that and not even consider if timeout-secs is set in the devicetree.

Most of the patches will just remove the initial value for
timeout-parameter.

Some of the drivers allready has documented device-tree-bindings for
timeout-secs (but will not work), add property for those which not.

I wrote a similiar (tested) patch for imx2 and simply did the same to these drivers.
These patches is *NOT* tested, so please review extra carefully.


Taken from Documentation/watchdog/watchdog-kernel-api.txt:
	The watchdog_init_timeout function allows you to initialize the timeout field
	using the module timeout parameter or by retrieving the timeout-sec property from
	the device tree (if the module timeout parameter is invalid). Best practice is
	to set the default timeout value as timeout value in the watchdog_device and
	then use this function to set the user "preferred" timeout value.


Best regards
Marcus Folkesson

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

* [PATCH 0/7] watchdog: make use of timeout-secs
@ 2018-02-09 19:27 ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: linux-arm-kernel

All these drivers is using watchdog_init_timeout() to set timeout.
If the timeout-parameter is set to an valid value, it will allways pick
that and not even consider if timeout-secs is set in the devicetree.

Most of the patches will just remove the initial value for
timeout-parameter.

Some of the drivers allready has documented device-tree-bindings for
timeout-secs (but will not work), add property for those which not.

I wrote a similiar (tested) patch for imx2 and simply did the same to these drivers.
These patches is *NOT* tested, so please review extra carefully.


Taken from Documentation/watchdog/watchdog-kernel-api.txt:
	The watchdog_init_timeout function allows you to initialize the timeout field
	using the module timeout parameter or by retrieving the timeout-sec property from
	the device tree (if the module timeout parameter is invalid). Best practice is
	to set the default timeout value as timeout value in the watchdog_device and
	then use this function to set the user "preferred" timeout value.


Best regards
Marcus Folkesson

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

* [PATCH 0/7] watchdog: make use of timeout-secs
@ 2018-02-09 19:27 ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: linus-amlogic

All these drivers is using watchdog_init_timeout() to set timeout.
If the timeout-parameter is set to an valid value, it will allways pick
that and not even consider if timeout-secs is set in the devicetree.

Most of the patches will just remove the initial value for
timeout-parameter.

Some of the drivers allready has documented device-tree-bindings for
timeout-secs (but will not work), add property for those which not.

I wrote a similiar (tested) patch for imx2 and simply did the same to these drivers.
These patches is *NOT* tested, so please review extra carefully.


Taken from Documentation/watchdog/watchdog-kernel-api.txt:
	The watchdog_init_timeout function allows you to initialize the timeout field
	using the module timeout parameter or by retrieving the timeout-sec property from
	the device tree (if the module timeout parameter is invalid). Best practice is
	to set the default timeout value as timeout value in the watchdog_device and
	then use this function to set the user "preferred" timeout value.


Best regards
Marcus Folkesson

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

* [PATCH 1/7] watchdog: sama5d4: make use of timeout-secs provided in devicetree
  2018-02-09 19:27 ` Marcus Folkesson
  (?)
@ 2018-02-09 19:27   ` Marcus Folkesson
  -1 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Mark Rutland,
	Carlo Caione, Kevin Hilman, Matthias Brugger, Barry Song,
	Maxime Ripard, Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy,
	Sylvain Lemieux, Nicolas Ferre, Alexandre Belloni
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel, linux-mediatek, Marcus Folkesson

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

Following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt to make use of
the parameter logic.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 drivers/watchdog/sama5d4_wdt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c
index 0ae947c3d7bc..e6c679383734 100644
--- a/drivers/watchdog/sama5d4_wdt.c
+++ b/drivers/watchdog/sama5d4_wdt.c
@@ -33,7 +33,7 @@ struct sama5d4_wdt {
 	unsigned long		last_ping;
 };
 
-static int wdt_timeout = WDT_DEFAULT_TIMEOUT;
+static int wdt_timeout;
 static bool nowayout = WATCHDOG_NOWAYOUT;
 
 module_param(wdt_timeout, int, 0);
@@ -212,7 +212,7 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	wdd = &wdt->wdd;
-	wdd->timeout = wdt_timeout;
+	wdd->timeout = WDT_DEFAULT_TIMEOUT;
 	wdd->info = &sama5d4_wdt_info;
 	wdd->ops = &sama5d4_wdt_ops;
 	wdd->min_timeout = MIN_WDT_TIMEOUT;
-- 
2.15.1

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

* [PATCH 1/7] watchdog: sama5d4: make use of timeout-secs provided in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: linux-arm-kernel

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

Following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt to make use of
the parameter logic.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 drivers/watchdog/sama5d4_wdt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c
index 0ae947c3d7bc..e6c679383734 100644
--- a/drivers/watchdog/sama5d4_wdt.c
+++ b/drivers/watchdog/sama5d4_wdt.c
@@ -33,7 +33,7 @@ struct sama5d4_wdt {
 	unsigned long		last_ping;
 };
 
-static int wdt_timeout = WDT_DEFAULT_TIMEOUT;
+static int wdt_timeout;
 static bool nowayout = WATCHDOG_NOWAYOUT;
 
 module_param(wdt_timeout, int, 0);
@@ -212,7 +212,7 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	wdd = &wdt->wdd;
-	wdd->timeout = wdt_timeout;
+	wdd->timeout = WDT_DEFAULT_TIMEOUT;
 	wdd->info = &sama5d4_wdt_info;
 	wdd->ops = &sama5d4_wdt_ops;
 	wdd->min_timeout = MIN_WDT_TIMEOUT;
-- 
2.15.1

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

* [PATCH 1/7] watchdog: sama5d4: make use of timeout-secs provided in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: linus-amlogic

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

Following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt to make use of
the parameter logic.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 drivers/watchdog/sama5d4_wdt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c
index 0ae947c3d7bc..e6c679383734 100644
--- a/drivers/watchdog/sama5d4_wdt.c
+++ b/drivers/watchdog/sama5d4_wdt.c
@@ -33,7 +33,7 @@ struct sama5d4_wdt {
 	unsigned long		last_ping;
 };
 
-static int wdt_timeout = WDT_DEFAULT_TIMEOUT;
+static int wdt_timeout;
 static bool nowayout = WATCHDOG_NOWAYOUT;
 
 module_param(wdt_timeout, int, 0);
@@ -212,7 +212,7 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	wdd = &wdt->wdd;
-	wdd->timeout = wdt_timeout;
+	wdd->timeout = WDT_DEFAULT_TIMEOUT;
 	wdd->info = &sama5d4_wdt_info;
 	wdd->ops = &sama5d4_wdt_ops;
 	wdd->min_timeout = MIN_WDT_TIMEOUT;
-- 
2.15.1

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

* [PATCH 2/7] watchdog: sunxi: allow setting timeout in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Mark Rutland,
	Carlo Caione, Kevin Hilman, Matthias Brugger, Barry Song,
	Maxime Ripard, Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy,
	Sylvain Lemieux, Nicolas Ferre, Alexandre Belloni
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel, linux-mediatek, Marcus Folkesson

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

By following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt, it also
let us to set timout-sec property in devicetree.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt | 4 ++++
 drivers/watchdog/sunxi_wdt.c                             | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
index 62dd5baad70e..49900e72f6b1 100644
--- a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
@@ -6,9 +6,13 @@ Required properties:
                "allwinner,sun6i-a31-wdt"
 - reg : Specifies base physical address and size of the registers.
 
+Optional properties:
+- timeout-sec : Contains the watchdog timeout in seconds
+
 Example:
 
 wdt: watchdog@1c20c90 {
 	compatible = "allwinner,sun4i-a10-wdt";
 	reg = <0x01c20c90 0x10>;
+	timeout-sec = <10>;
 };
diff --git a/drivers/watchdog/sunxi_wdt.c b/drivers/watchdog/sunxi_wdt.c
index 9728fa32c357..55f166bec0ca 100644
--- a/drivers/watchdog/sunxi_wdt.c
+++ b/drivers/watchdog/sunxi_wdt.c
@@ -39,7 +39,7 @@
 #define DRV_VERSION		"1.0"
 
 static bool nowayout = WATCHDOG_NOWAYOUT;
-static unsigned int timeout = WDT_MAX_TIMEOUT;
+static unsigned int timeout;
 
 /*
  * This structure stores the register offsets for different variants
-- 
2.15.1

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

* [PATCH 2/7] watchdog: sunxi: allow setting timeout in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Mark Rutland,
	Carlo Caione, Kevin Hilman, Matthias Brugger, Barry Song,
	Maxime Ripard, Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy,
	Sylvain Lemieux, Nicolas Ferre, Alexandre Belloni
  Cc: linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Marcus Folkesson

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

By following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt, it also
let us to set timout-sec property in devicetree.

Signed-off-by: Marcus Folkesson <marcus.folkesson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt | 4 ++++
 drivers/watchdog/sunxi_wdt.c                             | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
index 62dd5baad70e..49900e72f6b1 100644
--- a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
@@ -6,9 +6,13 @@ Required properties:
                "allwinner,sun6i-a31-wdt"
 - reg : Specifies base physical address and size of the registers.
 
+Optional properties:
+- timeout-sec : Contains the watchdog timeout in seconds
+
 Example:
 
 wdt: watchdog@1c20c90 {
 	compatible = "allwinner,sun4i-a10-wdt";
 	reg = <0x01c20c90 0x10>;
+	timeout-sec = <10>;
 };
diff --git a/drivers/watchdog/sunxi_wdt.c b/drivers/watchdog/sunxi_wdt.c
index 9728fa32c357..55f166bec0ca 100644
--- a/drivers/watchdog/sunxi_wdt.c
+++ b/drivers/watchdog/sunxi_wdt.c
@@ -39,7 +39,7 @@
 #define DRV_VERSION		"1.0"
 
 static bool nowayout = WATCHDOG_NOWAYOUT;
-static unsigned int timeout = WDT_MAX_TIMEOUT;
+static unsigned int timeout;
 
 /*
  * This structure stores the register offsets for different variants
-- 
2.15.1

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

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

* [PATCH 2/7] watchdog: sunxi: allow setting timeout in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: linux-arm-kernel

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

By following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt, it also
let us to set timout-sec property in devicetree.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt | 4 ++++
 drivers/watchdog/sunxi_wdt.c                             | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
index 62dd5baad70e..49900e72f6b1 100644
--- a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
@@ -6,9 +6,13 @@ Required properties:
                "allwinner,sun6i-a31-wdt"
 - reg : Specifies base physical address and size of the registers.
 
+Optional properties:
+- timeout-sec : Contains the watchdog timeout in seconds
+
 Example:
 
 wdt: watchdog at 1c20c90 {
 	compatible = "allwinner,sun4i-a10-wdt";
 	reg = <0x01c20c90 0x10>;
+	timeout-sec = <10>;
 };
diff --git a/drivers/watchdog/sunxi_wdt.c b/drivers/watchdog/sunxi_wdt.c
index 9728fa32c357..55f166bec0ca 100644
--- a/drivers/watchdog/sunxi_wdt.c
+++ b/drivers/watchdog/sunxi_wdt.c
@@ -39,7 +39,7 @@
 #define DRV_VERSION		"1.0"
 
 static bool nowayout = WATCHDOG_NOWAYOUT;
-static unsigned int timeout = WDT_MAX_TIMEOUT;
+static unsigned int timeout;
 
 /*
  * This structure stores the register offsets for different variants
-- 
2.15.1

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

* [PATCH 2/7] watchdog: sunxi: allow setting timeout in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: linus-amlogic

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

By following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt, it also
let us to set timout-sec property in devicetree.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt | 4 ++++
 drivers/watchdog/sunxi_wdt.c                             | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
index 62dd5baad70e..49900e72f6b1 100644
--- a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
@@ -6,9 +6,13 @@ Required properties:
                "allwinner,sun6i-a31-wdt"
 - reg : Specifies base physical address and size of the registers.
 
+Optional properties:
+- timeout-sec : Contains the watchdog timeout in seconds
+
 Example:
 
 wdt: watchdog at 1c20c90 {
 	compatible = "allwinner,sun4i-a10-wdt";
 	reg = <0x01c20c90 0x10>;
+	timeout-sec = <10>;
 };
diff --git a/drivers/watchdog/sunxi_wdt.c b/drivers/watchdog/sunxi_wdt.c
index 9728fa32c357..55f166bec0ca 100644
--- a/drivers/watchdog/sunxi_wdt.c
+++ b/drivers/watchdog/sunxi_wdt.c
@@ -39,7 +39,7 @@
 #define DRV_VERSION		"1.0"
 
 static bool nowayout = WATCHDOG_NOWAYOUT;
-static unsigned int timeout = WDT_MAX_TIMEOUT;
+static unsigned int timeout;
 
 /*
  * This structure stores the register offsets for different variants
-- 
2.15.1

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

* [PATCH 3/7] watchdog: sirfsoc: allow setting timeout in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Mark Rutland,
	Carlo Caione, Kevin Hilman, Matthias Brugger, Barry Song,
	Maxime Ripard, Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy,
	Sylvain Lemieux, Nicolas Ferre, Alexandre Belloni
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel, linux-mediatek, Marcus Folkesson

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

By following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt, it also
let us to set timout-sec property in devicetree.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt | 4 ++++
 drivers/watchdog/sirfsoc_wdt.c                             | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt b/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
index 9cbc76c89b2b..0dce5e3100b4 100644
--- a/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
@@ -5,10 +5,14 @@ Required properties:
 - reg: Address range of tick timer/WDT register set
 - interrupts: interrupt number to the cpu
 
+Optional properties:
+- timeout-sec : Contains the watchdog timeout in seconds
+
 Example:
 
 timer@b0020000 {
 	compatible = "sirf,prima2-tick";
 	reg = <0xb0020000 0x1000>;
 	interrupts = <0>;
+	timeout-sec = <30>;
 };
diff --git a/drivers/watchdog/sirfsoc_wdt.c b/drivers/watchdog/sirfsoc_wdt.c
index 4eea351e09b0..ac0c9d2c4aee 100644
--- a/drivers/watchdog/sirfsoc_wdt.c
+++ b/drivers/watchdog/sirfsoc_wdt.c
@@ -29,7 +29,7 @@
 #define SIRFSOC_WDT_MAX_TIMEOUT		(10 * 60)	/* 10 mins */
 #define SIRFSOC_WDT_DEFAULT_TIMEOUT	30		/* 30 secs */
 
-static unsigned int timeout = SIRFSOC_WDT_DEFAULT_TIMEOUT;
+static unsigned int timeout;
 static bool nowayout = WATCHDOG_NOWAYOUT;
 
 module_param(timeout, uint, 0);
-- 
2.15.1

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

* [PATCH 3/7] watchdog: sirfsoc: allow setting timeout in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Mark Rutland,
	Carlo Caione, Kevin Hilman, Matthias Brugger, Barry Song,
	Maxime Ripard, Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy,
	Sylvain Lemieux, Nicolas Ferre, Alexandre Belloni
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Marcus Folkesson,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

By following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt, it also
let us to set timout-sec property in devicetree.

Signed-off-by: Marcus Folkesson <marcus.folkesson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt | 4 ++++
 drivers/watchdog/sirfsoc_wdt.c                             | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt b/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
index 9cbc76c89b2b..0dce5e3100b4 100644
--- a/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
@@ -5,10 +5,14 @@ Required properties:
 - reg: Address range of tick timer/WDT register set
 - interrupts: interrupt number to the cpu
 
+Optional properties:
+- timeout-sec : Contains the watchdog timeout in seconds
+
 Example:
 
 timer@b0020000 {
 	compatible = "sirf,prima2-tick";
 	reg = <0xb0020000 0x1000>;
 	interrupts = <0>;
+	timeout-sec = <30>;
 };
diff --git a/drivers/watchdog/sirfsoc_wdt.c b/drivers/watchdog/sirfsoc_wdt.c
index 4eea351e09b0..ac0c9d2c4aee 100644
--- a/drivers/watchdog/sirfsoc_wdt.c
+++ b/drivers/watchdog/sirfsoc_wdt.c
@@ -29,7 +29,7 @@
 #define SIRFSOC_WDT_MAX_TIMEOUT		(10 * 60)	/* 10 mins */
 #define SIRFSOC_WDT_DEFAULT_TIMEOUT	30		/* 30 secs */
 
-static unsigned int timeout = SIRFSOC_WDT_DEFAULT_TIMEOUT;
+static unsigned int timeout;
 static bool nowayout = WATCHDOG_NOWAYOUT;
 
 module_param(timeout, uint, 0);
-- 
2.15.1

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

* [PATCH 3/7] watchdog: sirfsoc: allow setting timeout in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: linux-arm-kernel

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

By following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt, it also
let us to set timout-sec property in devicetree.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt | 4 ++++
 drivers/watchdog/sirfsoc_wdt.c                             | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt b/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
index 9cbc76c89b2b..0dce5e3100b4 100644
--- a/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
@@ -5,10 +5,14 @@ Required properties:
 - reg: Address range of tick timer/WDT register set
 - interrupts: interrupt number to the cpu
 
+Optional properties:
+- timeout-sec : Contains the watchdog timeout in seconds
+
 Example:
 
 timer at b0020000 {
 	compatible = "sirf,prima2-tick";
 	reg = <0xb0020000 0x1000>;
 	interrupts = <0>;
+	timeout-sec = <30>;
 };
diff --git a/drivers/watchdog/sirfsoc_wdt.c b/drivers/watchdog/sirfsoc_wdt.c
index 4eea351e09b0..ac0c9d2c4aee 100644
--- a/drivers/watchdog/sirfsoc_wdt.c
+++ b/drivers/watchdog/sirfsoc_wdt.c
@@ -29,7 +29,7 @@
 #define SIRFSOC_WDT_MAX_TIMEOUT		(10 * 60)	/* 10 mins */
 #define SIRFSOC_WDT_DEFAULT_TIMEOUT	30		/* 30 secs */
 
-static unsigned int timeout = SIRFSOC_WDT_DEFAULT_TIMEOUT;
+static unsigned int timeout;
 static bool nowayout = WATCHDOG_NOWAYOUT;
 
 module_param(timeout, uint, 0);
-- 
2.15.1

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

* [PATCH 3/7] watchdog: sirfsoc: allow setting timeout in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: linus-amlogic

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

By following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt, it also
let us to set timout-sec property in devicetree.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt | 4 ++++
 drivers/watchdog/sirfsoc_wdt.c                             | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt b/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
index 9cbc76c89b2b..0dce5e3100b4 100644
--- a/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
@@ -5,10 +5,14 @@ Required properties:
 - reg: Address range of tick timer/WDT register set
 - interrupts: interrupt number to the cpu
 
+Optional properties:
+- timeout-sec : Contains the watchdog timeout in seconds
+
 Example:
 
 timer at b0020000 {
 	compatible = "sirf,prima2-tick";
 	reg = <0xb0020000 0x1000>;
 	interrupts = <0>;
+	timeout-sec = <30>;
 };
diff --git a/drivers/watchdog/sirfsoc_wdt.c b/drivers/watchdog/sirfsoc_wdt.c
index 4eea351e09b0..ac0c9d2c4aee 100644
--- a/drivers/watchdog/sirfsoc_wdt.c
+++ b/drivers/watchdog/sirfsoc_wdt.c
@@ -29,7 +29,7 @@
 #define SIRFSOC_WDT_MAX_TIMEOUT		(10 * 60)	/* 10 mins */
 #define SIRFSOC_WDT_DEFAULT_TIMEOUT	30		/* 30 secs */
 
-static unsigned int timeout = SIRFSOC_WDT_DEFAULT_TIMEOUT;
+static unsigned int timeout;
 static bool nowayout = WATCHDOG_NOWAYOUT;
 
 module_param(timeout, uint, 0);
-- 
2.15.1

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

* [PATCH 4/7] watchdog: pnx4008: make use of timeout-secs provided in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Mark Rutland,
	Carlo Caione, Kevin Hilman, Matthias Brugger, Barry Song,
	Maxime Ripard, Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy,
	Sylvain Lemieux, Nicolas Ferre, Alexandre Belloni
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel, linux-mediatek, Marcus Folkesson

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

Following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt to make use of
the parameter logic.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 drivers/watchdog/pnx4008_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
index 0529aed158a4..8e261799c84e 100644
--- a/drivers/watchdog/pnx4008_wdt.c
+++ b/drivers/watchdog/pnx4008_wdt.c
@@ -78,7 +78,7 @@
 #define WDOG_COUNTER_RATE 13000000	/*the counter clock is 13 MHz fixed */
 
 static bool nowayout = WATCHDOG_NOWAYOUT;
-static unsigned int heartbeat = DEFAULT_HEARTBEAT;
+static unsigned int heartbeat;
 
 static DEFINE_SPINLOCK(io_lock);
 static void __iomem	*wdt_base;
-- 
2.15.1

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

* [PATCH 4/7] watchdog: pnx4008: make use of timeout-secs provided in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Mark Rutland,
	Carlo Caione, Kevin Hilman, Matthias Brugger, Barry Song,
	Maxime Ripard, Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy,
	Sylvain Lemieux, Nicolas Ferre, Alexandre Belloni
  Cc: linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Marcus Folkesson

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

Following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt to make use of
the parameter logic.

Signed-off-by: Marcus Folkesson <marcus.folkesson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/watchdog/pnx4008_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
index 0529aed158a4..8e261799c84e 100644
--- a/drivers/watchdog/pnx4008_wdt.c
+++ b/drivers/watchdog/pnx4008_wdt.c
@@ -78,7 +78,7 @@
 #define WDOG_COUNTER_RATE 13000000	/*the counter clock is 13 MHz fixed */
 
 static bool nowayout = WATCHDOG_NOWAYOUT;
-static unsigned int heartbeat = DEFAULT_HEARTBEAT;
+static unsigned int heartbeat;
 
 static DEFINE_SPINLOCK(io_lock);
 static void __iomem	*wdt_base;
-- 
2.15.1

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

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

* [PATCH 4/7] watchdog: pnx4008: make use of timeout-secs provided in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: linux-arm-kernel

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

Following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt to make use of
the parameter logic.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 drivers/watchdog/pnx4008_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
index 0529aed158a4..8e261799c84e 100644
--- a/drivers/watchdog/pnx4008_wdt.c
+++ b/drivers/watchdog/pnx4008_wdt.c
@@ -78,7 +78,7 @@
 #define WDOG_COUNTER_RATE 13000000	/*the counter clock is 13 MHz fixed */
 
 static bool nowayout = WATCHDOG_NOWAYOUT;
-static unsigned int heartbeat = DEFAULT_HEARTBEAT;
+static unsigned int heartbeat;
 
 static DEFINE_SPINLOCK(io_lock);
 static void __iomem	*wdt_base;
-- 
2.15.1

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

* [PATCH 4/7] watchdog: pnx4008: make use of timeout-secs provided in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: linus-amlogic

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

Following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt to make use of
the parameter logic.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 drivers/watchdog/pnx4008_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
index 0529aed158a4..8e261799c84e 100644
--- a/drivers/watchdog/pnx4008_wdt.c
+++ b/drivers/watchdog/pnx4008_wdt.c
@@ -78,7 +78,7 @@
 #define WDOG_COUNTER_RATE 13000000	/*the counter clock is 13 MHz fixed */
 
 static bool nowayout = WATCHDOG_NOWAYOUT;
-static unsigned int heartbeat = DEFAULT_HEARTBEAT;
+static unsigned int heartbeat;
 
 static DEFINE_SPINLOCK(io_lock);
 static void __iomem	*wdt_base;
-- 
2.15.1

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

* [PATCH 5/7] watchdog: mtk: allow setting timeout in devicetree
  2018-02-09 19:27 ` Marcus Folkesson
  (?)
  (?)
@ 2018-02-09 19:27   ` Marcus Folkesson
  -1 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Mark Rutland,
	Carlo Caione, Kevin Hilman, Matthias Brugger, Barry Song,
	Maxime Ripard, Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy,
	Sylvain Lemieux, Nicolas Ferre, Alexandre Belloni
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel, linux-mediatek, Marcus Folkesson

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

By following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt, it also
let us to set timout-sec property in devicetree.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 4 ++++
 drivers/watchdog/mtk_wdt.c                             | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
index 5b38a30e608c..859dee167b91 100644
--- a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
@@ -11,9 +11,13 @@ Required properties:
 
 - reg : Specifies base physical address and size of the registers.
 
+Optional properties:
+- timeout-sec: contains the watchdog timeout in seconds.
+
 Example:
 
 wdt: watchdog@10000000 {
 	compatible = "mediatek,mt6589-wdt";
 	reg = <0x10000000 0x18>;
+	timeout-sec = <10>;
 };
diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
index 7ed417a765c7..fcdc10ec28a3 100644
--- a/drivers/watchdog/mtk_wdt.c
+++ b/drivers/watchdog/mtk_wdt.c
@@ -57,7 +57,7 @@
 #define DRV_VERSION		"1.0"
 
 static bool nowayout = WATCHDOG_NOWAYOUT;
-static unsigned int timeout = WDT_MAX_TIMEOUT;
+static unsigned int timeout;
 
 struct mtk_wdt_dev {
 	struct watchdog_device wdt_dev;
-- 
2.15.1

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

* [PATCH 5/7] watchdog: mtk: allow setting timeout in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Mark Rutland,
	Carlo Caione, Kevin Hilman, Matthias Brugger, Barry Song,
	Maxime Ripard, Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy,
	Sylvain Lemieux, Nicolas Ferre, Alexandre Belloni
  Cc: devicetree, Marcus Folkesson, linux-watchdog, linux-kernel,
	linux-mediatek, linux-amlogic, linux-arm-kernel

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

By following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt, it also
let us to set timout-sec property in devicetree.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 4 ++++
 drivers/watchdog/mtk_wdt.c                             | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
index 5b38a30e608c..859dee167b91 100644
--- a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
@@ -11,9 +11,13 @@ Required properties:
 
 - reg : Specifies base physical address and size of the registers.
 
+Optional properties:
+- timeout-sec: contains the watchdog timeout in seconds.
+
 Example:
 
 wdt: watchdog@10000000 {
 	compatible = "mediatek,mt6589-wdt";
 	reg = <0x10000000 0x18>;
+	timeout-sec = <10>;
 };
diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
index 7ed417a765c7..fcdc10ec28a3 100644
--- a/drivers/watchdog/mtk_wdt.c
+++ b/drivers/watchdog/mtk_wdt.c
@@ -57,7 +57,7 @@
 #define DRV_VERSION		"1.0"
 
 static bool nowayout = WATCHDOG_NOWAYOUT;
-static unsigned int timeout = WDT_MAX_TIMEOUT;
+static unsigned int timeout;
 
 struct mtk_wdt_dev {
 	struct watchdog_device wdt_dev;
-- 
2.15.1

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

* [PATCH 5/7] watchdog: mtk: allow setting timeout in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: linux-arm-kernel

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

By following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt, it also
let us to set timout-sec property in devicetree.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 4 ++++
 drivers/watchdog/mtk_wdt.c                             | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
index 5b38a30e608c..859dee167b91 100644
--- a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
@@ -11,9 +11,13 @@ Required properties:
 
 - reg : Specifies base physical address and size of the registers.
 
+Optional properties:
+- timeout-sec: contains the watchdog timeout in seconds.
+
 Example:
 
 wdt: watchdog at 10000000 {
 	compatible = "mediatek,mt6589-wdt";
 	reg = <0x10000000 0x18>;
+	timeout-sec = <10>;
 };
diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
index 7ed417a765c7..fcdc10ec28a3 100644
--- a/drivers/watchdog/mtk_wdt.c
+++ b/drivers/watchdog/mtk_wdt.c
@@ -57,7 +57,7 @@
 #define DRV_VERSION		"1.0"
 
 static bool nowayout = WATCHDOG_NOWAYOUT;
-static unsigned int timeout = WDT_MAX_TIMEOUT;
+static unsigned int timeout;
 
 struct mtk_wdt_dev {
 	struct watchdog_device wdt_dev;
-- 
2.15.1

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

* [PATCH 5/7] watchdog: mtk: allow setting timeout in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: linus-amlogic

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

By following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt, it also
let us to set timout-sec property in devicetree.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 4 ++++
 drivers/watchdog/mtk_wdt.c                             | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
index 5b38a30e608c..859dee167b91 100644
--- a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
@@ -11,9 +11,13 @@ Required properties:
 
 - reg : Specifies base physical address and size of the registers.
 
+Optional properties:
+- timeout-sec: contains the watchdog timeout in seconds.
+
 Example:
 
 wdt: watchdog at 10000000 {
 	compatible = "mediatek,mt6589-wdt";
 	reg = <0x10000000 0x18>;
+	timeout-sec = <10>;
 };
diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
index 7ed417a765c7..fcdc10ec28a3 100644
--- a/drivers/watchdog/mtk_wdt.c
+++ b/drivers/watchdog/mtk_wdt.c
@@ -57,7 +57,7 @@
 #define DRV_VERSION		"1.0"
 
 static bool nowayout = WATCHDOG_NOWAYOUT;
-static unsigned int timeout = WDT_MAX_TIMEOUT;
+static unsigned int timeout;
 
 struct mtk_wdt_dev {
 	struct watchdog_device wdt_dev;
-- 
2.15.1

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

* [PATCH 6/7] watchdog: meson: allow setting timeout in devicetree
  2018-02-09 19:27 ` Marcus Folkesson
  (?)
@ 2018-02-09 19:27   ` Marcus Folkesson
  -1 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Mark Rutland,
	Carlo Caione, Kevin Hilman, Matthias Brugger, Barry Song,
	Maxime Ripard, Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy,
	Sylvain Lemieux, Nicolas Ferre, Alexandre Belloni
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel, linux-mediatek, Marcus Folkesson

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

By following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt, it also
let us to set timout-sec property in devicetree.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 Documentation/devicetree/bindings/watchdog/meson-wdt.txt | 4 ++++
 drivers/watchdog/meson_wdt.c                             | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
index 8a6d84cb36c9..7588cc3971bf 100644
--- a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
@@ -9,9 +9,13 @@ Required properties:
 	"amlogic,meson8m2-wdt" and "amlogic,meson8b-wdt" on Meson8m2 SoCs
 - reg : Specifies base physical address and size of the registers.
 
+Optional properties:
+- timeout-sec: contains the watchdog timeout in seconds.
+
 Example:
 
 wdt: watchdog@c1109900 {
 	compatible = "amlogic,meson6-wdt";
 	reg = <0xc1109900 0x8>;
+	timeout-sec = <10>;
 };
diff --git a/drivers/watchdog/meson_wdt.c b/drivers/watchdog/meson_wdt.c
index 304274c67735..cd0275a6cdac 100644
--- a/drivers/watchdog/meson_wdt.c
+++ b/drivers/watchdog/meson_wdt.c
@@ -36,7 +36,7 @@
 #define MESON_SEC_TO_TC(s, c)	((s) * (c))
 
 static bool nowayout = WATCHDOG_NOWAYOUT;
-static unsigned int timeout = MESON_WDT_TIMEOUT;
+static unsigned int timeout;
 
 struct meson_wdt_data {
 	unsigned int enable;
-- 
2.15.1

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

* [PATCH 6/7] watchdog: meson: allow setting timeout in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: linux-arm-kernel

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

By following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt, it also
let us to set timout-sec property in devicetree.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 Documentation/devicetree/bindings/watchdog/meson-wdt.txt | 4 ++++
 drivers/watchdog/meson_wdt.c                             | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
index 8a6d84cb36c9..7588cc3971bf 100644
--- a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
@@ -9,9 +9,13 @@ Required properties:
 	"amlogic,meson8m2-wdt" and "amlogic,meson8b-wdt" on Meson8m2 SoCs
 - reg : Specifies base physical address and size of the registers.
 
+Optional properties:
+- timeout-sec: contains the watchdog timeout in seconds.
+
 Example:
 
 wdt: watchdog at c1109900 {
 	compatible = "amlogic,meson6-wdt";
 	reg = <0xc1109900 0x8>;
+	timeout-sec = <10>;
 };
diff --git a/drivers/watchdog/meson_wdt.c b/drivers/watchdog/meson_wdt.c
index 304274c67735..cd0275a6cdac 100644
--- a/drivers/watchdog/meson_wdt.c
+++ b/drivers/watchdog/meson_wdt.c
@@ -36,7 +36,7 @@
 #define MESON_SEC_TO_TC(s, c)	((s) * (c))
 
 static bool nowayout = WATCHDOG_NOWAYOUT;
-static unsigned int timeout = MESON_WDT_TIMEOUT;
+static unsigned int timeout;
 
 struct meson_wdt_data {
 	unsigned int enable;
-- 
2.15.1

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

* [PATCH 6/7] watchdog: meson: allow setting timeout in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: linus-amlogic

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

By following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt, it also
let us to set timout-sec property in devicetree.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 Documentation/devicetree/bindings/watchdog/meson-wdt.txt | 4 ++++
 drivers/watchdog/meson_wdt.c                             | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
index 8a6d84cb36c9..7588cc3971bf 100644
--- a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
@@ -9,9 +9,13 @@ Required properties:
 	"amlogic,meson8m2-wdt" and "amlogic,meson8b-wdt" on Meson8m2 SoCs
 - reg : Specifies base physical address and size of the registers.
 
+Optional properties:
+- timeout-sec: contains the watchdog timeout in seconds.
+
 Example:
 
 wdt: watchdog at c1109900 {
 	compatible = "amlogic,meson6-wdt";
 	reg = <0xc1109900 0x8>;
+	timeout-sec = <10>;
 };
diff --git a/drivers/watchdog/meson_wdt.c b/drivers/watchdog/meson_wdt.c
index 304274c67735..cd0275a6cdac 100644
--- a/drivers/watchdog/meson_wdt.c
+++ b/drivers/watchdog/meson_wdt.c
@@ -36,7 +36,7 @@
 #define MESON_SEC_TO_TC(s, c)	((s) * (c))
 
 static bool nowayout = WATCHDOG_NOWAYOUT;
-static unsigned int timeout = MESON_WDT_TIMEOUT;
+static unsigned int timeout;
 
 struct meson_wdt_data {
 	unsigned int enable;
-- 
2.15.1

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

* [PATCH 7/7] watchdog: coh901327: make use of timeout-secs provided in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Mark Rutland,
	Carlo Caione, Kevin Hilman, Matthias Brugger, Barry Song,
	Maxime Ripard, Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy,
	Sylvain Lemieux, Nicolas Ferre, Alexandre Belloni
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel, linux-mediatek, Marcus Folkesson

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

Following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt to make use of
the parameter logic.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 drivers/watchdog/coh901327_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/coh901327_wdt.c b/drivers/watchdog/coh901327_wdt.c
index 4410337f4f7f..437f865e5c6b 100644
--- a/drivers/watchdog/coh901327_wdt.c
+++ b/drivers/watchdog/coh901327_wdt.c
@@ -67,7 +67,7 @@
 #define U300_WDOG_IFR_WILL_BARK_IRQ_FORCE_ENABLE			0x0001U
 
 /* Default timeout in seconds = 1 minute */
-static unsigned int margin = 60;
+static unsigned int margin;
 static int irq;
 static void __iomem *virtbase;
 static struct device *parent;
-- 
2.15.1

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

* [PATCH 7/7] watchdog: coh901327: make use of timeout-secs provided in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Mark Rutland,
	Carlo Caione, Kevin Hilman, Matthias Brugger, Barry Song,
	Maxime Ripard, Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy,
	Sylvain Lemieux, Nicolas Ferre, Alexandre Belloni
  Cc: linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Marcus Folkesson

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

Following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt to make use of
the parameter logic.

Signed-off-by: Marcus Folkesson <marcus.folkesson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/watchdog/coh901327_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/coh901327_wdt.c b/drivers/watchdog/coh901327_wdt.c
index 4410337f4f7f..437f865e5c6b 100644
--- a/drivers/watchdog/coh901327_wdt.c
+++ b/drivers/watchdog/coh901327_wdt.c
@@ -67,7 +67,7 @@
 #define U300_WDOG_IFR_WILL_BARK_IRQ_FORCE_ENABLE			0x0001U
 
 /* Default timeout in seconds = 1 minute */
-static unsigned int margin = 60;
+static unsigned int margin;
 static int irq;
 static void __iomem *virtbase;
 static struct device *parent;
-- 
2.15.1

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

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

* [PATCH 7/7] watchdog: coh901327: make use of timeout-secs provided in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: linux-arm-kernel

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

Following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt to make use of
the parameter logic.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 drivers/watchdog/coh901327_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/coh901327_wdt.c b/drivers/watchdog/coh901327_wdt.c
index 4410337f4f7f..437f865e5c6b 100644
--- a/drivers/watchdog/coh901327_wdt.c
+++ b/drivers/watchdog/coh901327_wdt.c
@@ -67,7 +67,7 @@
 #define U300_WDOG_IFR_WILL_BARK_IRQ_FORCE_ENABLE			0x0001U
 
 /* Default timeout in seconds = 1 minute */
-static unsigned int margin = 60;
+static unsigned int margin;
 static int irq;
 static void __iomem *virtbase;
 static struct device *parent;
-- 
2.15.1

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

* [PATCH 7/7] watchdog: coh901327: make use of timeout-secs provided in devicetree
@ 2018-02-09 19:27   ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:27 UTC (permalink / raw)
  To: linus-amlogic

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

Following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt to make use of
the parameter logic.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 drivers/watchdog/coh901327_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/coh901327_wdt.c b/drivers/watchdog/coh901327_wdt.c
index 4410337f4f7f..437f865e5c6b 100644
--- a/drivers/watchdog/coh901327_wdt.c
+++ b/drivers/watchdog/coh901327_wdt.c
@@ -67,7 +67,7 @@
 #define U300_WDOG_IFR_WILL_BARK_IRQ_FORCE_ENABLE			0x0001U
 
 /* Default timeout in seconds = 1 minute */
-static unsigned int margin = 60;
+static unsigned int margin;
 static int irq;
 static void __iomem *virtbase;
 static struct device *parent;
-- 
2.15.1

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

* Re: [PATCH 1/7] watchdog: sama5d4: make use of timeout-secs provided in devicetree
@ 2018-02-09 19:32     ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:32 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Mark Rutland,
	Carlo Caione, Kevin Hilman, Matthias Brugger, Barry Song,
	Maxime Ripard, Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy,
	Sylvain Lemieux, Nicolas Ferre, Alexandre Belloni
  Cc: linux-watchdog, devicetree, linux-arm-kernel, linux-amlogic,
	linux-kernel, linux-mediatek

The summary email did not make it for some reason.

However.
All these drivers is using watchdog_init_timeout() to set timeout.
If the timeout-parameter is set to an valid value, it will allways pick
that and not even consider if timeout-secs is set in devicetree.

Most of the patches will just remove the initial value for
timeout-parameter.

Some of the drivers allready has documented device-tree-bindings for
timeout-secs (but will not work), add property for those which not.

I wrote a similiar (tested) patch for imx2 and simply did the same to these drivers.
These patches is *NOT* tested, so please review extra carefully.


Taken from Documentation/watchdog/watchdog-kernel-api.txt:
	The watchdog_init_timeout function allows you to initialize the timeout field
	using the module timeout parameter or by retrieving the timeout-sec property from
	the device tree (if the module timeout parameter is invalid). Best practice is
	to set the default timeout value as timeout value in the watchdog_device and
	then use this function to set the user "preferred" timeout value.


Best regards
Marcus Folkesson

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

* Re: [PATCH 1/7] watchdog: sama5d4: make use of timeout-secs provided in devicetree
@ 2018-02-09 19:32     ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:32 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Rob Herring, Mark Rutland,
	Carlo Caione, Kevin Hilman, Matthias Brugger, Barry Song,
	Maxime Ripard, Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy,
	Sylvain Lemieux, Nicolas Ferre, Alexandre Belloni
  Cc: linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

The summary email did not make it for some reason.

However.
All these drivers is using watchdog_init_timeout() to set timeout.
If the timeout-parameter is set to an valid value, it will allways pick
that and not even consider if timeout-secs is set in devicetree.

Most of the patches will just remove the initial value for
timeout-parameter.

Some of the drivers allready has documented device-tree-bindings for
timeout-secs (but will not work), add property for those which not.

I wrote a similiar (tested) patch for imx2 and simply did the same to these drivers.
These patches is *NOT* tested, so please review extra carefully.


Taken from Documentation/watchdog/watchdog-kernel-api.txt:
	The watchdog_init_timeout function allows you to initialize the timeout field
	using the module timeout parameter or by retrieving the timeout-sec property from
	the device tree (if the module timeout parameter is invalid). Best practice is
	to set the default timeout value as timeout value in the watchdog_device and
	then use this function to set the user "preferred" timeout value.


Best regards
Marcus Folkesson
--
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] 88+ messages in thread

* [PATCH 1/7] watchdog: sama5d4: make use of timeout-secs provided in devicetree
@ 2018-02-09 19:32     ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:32 UTC (permalink / raw)
  To: linux-arm-kernel

The summary email did not make it for some reason.

However.
All these drivers is using watchdog_init_timeout() to set timeout.
If the timeout-parameter is set to an valid value, it will allways pick
that and not even consider if timeout-secs is set in devicetree.

Most of the patches will just remove the initial value for
timeout-parameter.

Some of the drivers allready has documented device-tree-bindings for
timeout-secs (but will not work), add property for those which not.

I wrote a similiar (tested) patch for imx2 and simply did the same to these drivers.
These patches is *NOT* tested, so please review extra carefully.


Taken from Documentation/watchdog/watchdog-kernel-api.txt:
	The watchdog_init_timeout function allows you to initialize the timeout field
	using the module timeout parameter or by retrieving the timeout-sec property from
	the device tree (if the module timeout parameter is invalid). Best practice is
	to set the default timeout value as timeout value in the watchdog_device and
	then use this function to set the user "preferred" timeout value.


Best regards
Marcus Folkesson

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

* [PATCH 1/7] watchdog: sama5d4: make use of timeout-secs provided in devicetree
@ 2018-02-09 19:32     ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-09 19:32 UTC (permalink / raw)
  To: linus-amlogic

The summary email did not make it for some reason.

However.
All these drivers is using watchdog_init_timeout() to set timeout.
If the timeout-parameter is set to an valid value, it will allways pick
that and not even consider if timeout-secs is set in devicetree.

Most of the patches will just remove the initial value for
timeout-parameter.

Some of the drivers allready has documented device-tree-bindings for
timeout-secs (but will not work), add property for those which not.

I wrote a similiar (tested) patch for imx2 and simply did the same to these drivers.
These patches is *NOT* tested, so please review extra carefully.


Taken from Documentation/watchdog/watchdog-kernel-api.txt:
	The watchdog_init_timeout function allows you to initialize the timeout field
	using the module timeout parameter or by retrieving the timeout-sec property from
	the device tree (if the module timeout parameter is invalid). Best practice is
	to set the default timeout value as timeout value in the watchdog_device and
	then use this function to set the user "preferred" timeout value.


Best regards
Marcus Folkesson

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

* Re: [PATCH 1/7] watchdog: sama5d4: make use of timeout-secs provided in devicetree
@ 2018-02-09 22:38     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:38 UTC (permalink / raw)
  To: Marcus Folkesson
  Cc: Wim Van Sebroeck, Rob Herring, Mark Rutland, Carlo Caione,
	Kevin Hilman, Matthias Brugger, Barry Song, Maxime Ripard,
	Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy, Sylvain Lemieux,
	Nicolas Ferre, Alexandre Belloni, linux-watchdog, devicetree,
	linux-arm-kernel, linux-amlogic, linux-kernel, linux-mediatek

On Fri, Feb 09, 2018 at 08:27:18PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> Following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt to make use of
> the parameter logic.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/sama5d4_wdt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c
> index 0ae947c3d7bc..e6c679383734 100644
> --- a/drivers/watchdog/sama5d4_wdt.c
> +++ b/drivers/watchdog/sama5d4_wdt.c
> @@ -33,7 +33,7 @@ struct sama5d4_wdt {
>  	unsigned long		last_ping;
>  };
>  
> -static int wdt_timeout = WDT_DEFAULT_TIMEOUT;
> +static int wdt_timeout;
>  static bool nowayout = WATCHDOG_NOWAYOUT;
>  
>  module_param(wdt_timeout, int, 0);
> @@ -212,7 +212,7 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
>  		return -ENOMEM;
>  
>  	wdd = &wdt->wdd;
> -	wdd->timeout = wdt_timeout;
> +	wdd->timeout = WDT_DEFAULT_TIMEOUT;
>  	wdd->info = &sama5d4_wdt_info;
>  	wdd->ops = &sama5d4_wdt_ops;
>  	wdd->min_timeout = MIN_WDT_TIMEOUT;
> -- 
> 2.15.1
> 

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

* Re: [PATCH 1/7] watchdog: sama5d4: make use of timeout-secs provided in devicetree
@ 2018-02-09 22:38     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:38 UTC (permalink / raw)
  To: Marcus Folkesson
  Cc: Wim Van Sebroeck, Rob Herring, Mark Rutland, Carlo Caione,
	Kevin Hilman, Matthias Brugger, Barry Song, Maxime Ripard,
	Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy, Sylvain Lemieux,
	Nicolas Ferre, Alexandre Belloni,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Fri, Feb 09, 2018 at 08:27:18PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> Following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt to make use of
> the parameter logic.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Reviewed-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>

> ---
>  drivers/watchdog/sama5d4_wdt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c
> index 0ae947c3d7bc..e6c679383734 100644
> --- a/drivers/watchdog/sama5d4_wdt.c
> +++ b/drivers/watchdog/sama5d4_wdt.c
> @@ -33,7 +33,7 @@ struct sama5d4_wdt {
>  	unsigned long		last_ping;
>  };
>  
> -static int wdt_timeout = WDT_DEFAULT_TIMEOUT;
> +static int wdt_timeout;
>  static bool nowayout = WATCHDOG_NOWAYOUT;
>  
>  module_param(wdt_timeout, int, 0);
> @@ -212,7 +212,7 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
>  		return -ENOMEM;
>  
>  	wdd = &wdt->wdd;
> -	wdd->timeout = wdt_timeout;
> +	wdd->timeout = WDT_DEFAULT_TIMEOUT;
>  	wdd->info = &sama5d4_wdt_info;
>  	wdd->ops = &sama5d4_wdt_ops;
>  	wdd->min_timeout = MIN_WDT_TIMEOUT;
> -- 
> 2.15.1
> 
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 1/7] watchdog: sama5d4: make use of timeout-secs provided in devicetree
@ 2018-02-09 22:38     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 09, 2018 at 08:27:18PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> Following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt to make use of
> the parameter logic.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/sama5d4_wdt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c
> index 0ae947c3d7bc..e6c679383734 100644
> --- a/drivers/watchdog/sama5d4_wdt.c
> +++ b/drivers/watchdog/sama5d4_wdt.c
> @@ -33,7 +33,7 @@ struct sama5d4_wdt {
>  	unsigned long		last_ping;
>  };
>  
> -static int wdt_timeout = WDT_DEFAULT_TIMEOUT;
> +static int wdt_timeout;
>  static bool nowayout = WATCHDOG_NOWAYOUT;
>  
>  module_param(wdt_timeout, int, 0);
> @@ -212,7 +212,7 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
>  		return -ENOMEM;
>  
>  	wdd = &wdt->wdd;
> -	wdd->timeout = wdt_timeout;
> +	wdd->timeout = WDT_DEFAULT_TIMEOUT;
>  	wdd->info = &sama5d4_wdt_info;
>  	wdd->ops = &sama5d4_wdt_ops;
>  	wdd->min_timeout = MIN_WDT_TIMEOUT;
> -- 
> 2.15.1
> 

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

* [PATCH 1/7] watchdog: sama5d4: make use of timeout-secs provided in devicetree
@ 2018-02-09 22:38     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:38 UTC (permalink / raw)
  To: linus-amlogic

On Fri, Feb 09, 2018 at 08:27:18PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> Following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt to make use of
> the parameter logic.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/sama5d4_wdt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c
> index 0ae947c3d7bc..e6c679383734 100644
> --- a/drivers/watchdog/sama5d4_wdt.c
> +++ b/drivers/watchdog/sama5d4_wdt.c
> @@ -33,7 +33,7 @@ struct sama5d4_wdt {
>  	unsigned long		last_ping;
>  };
>  
> -static int wdt_timeout = WDT_DEFAULT_TIMEOUT;
> +static int wdt_timeout;
>  static bool nowayout = WATCHDOG_NOWAYOUT;
>  
>  module_param(wdt_timeout, int, 0);
> @@ -212,7 +212,7 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
>  		return -ENOMEM;
>  
>  	wdd = &wdt->wdd;
> -	wdd->timeout = wdt_timeout;
> +	wdd->timeout = WDT_DEFAULT_TIMEOUT;
>  	wdd->info = &sama5d4_wdt_info;
>  	wdd->ops = &sama5d4_wdt_ops;
>  	wdd->min_timeout = MIN_WDT_TIMEOUT;
> -- 
> 2.15.1
> 

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

* Re: [PATCH 2/7] watchdog: sunxi: allow setting timeout in devicetree
@ 2018-02-09 22:39     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:39 UTC (permalink / raw)
  To: Marcus Folkesson
  Cc: Wim Van Sebroeck, Rob Herring, Mark Rutland, Carlo Caione,
	Kevin Hilman, Matthias Brugger, Barry Song, Maxime Ripard,
	Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy, Sylvain Lemieux,
	Nicolas Ferre, Alexandre Belloni, linux-watchdog, devicetree,
	linux-arm-kernel, linux-amlogic, linux-kernel, linux-mediatek

On Fri, Feb 09, 2018 at 08:27:19PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> By following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt, it also
> let us to set timout-sec property in devicetree.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt | 4 ++++
>  drivers/watchdog/sunxi_wdt.c                             | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
> index 62dd5baad70e..49900e72f6b1 100644
> --- a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
> +++ b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
> @@ -6,9 +6,13 @@ Required properties:
>                 "allwinner,sun6i-a31-wdt"
>  - reg : Specifies base physical address and size of the registers.
>  
> +Optional properties:
> +- timeout-sec : Contains the watchdog timeout in seconds
> +
>  Example:
>  
>  wdt: watchdog@1c20c90 {
>  	compatible = "allwinner,sun4i-a10-wdt";
>  	reg = <0x01c20c90 0x10>;
> +	timeout-sec = <10>;
>  };
> diff --git a/drivers/watchdog/sunxi_wdt.c b/drivers/watchdog/sunxi_wdt.c
> index 9728fa32c357..55f166bec0ca 100644
> --- a/drivers/watchdog/sunxi_wdt.c
> +++ b/drivers/watchdog/sunxi_wdt.c
> @@ -39,7 +39,7 @@
>  #define DRV_VERSION		"1.0"
>  
>  static bool nowayout = WATCHDOG_NOWAYOUT;
> -static unsigned int timeout = WDT_MAX_TIMEOUT;
> +static unsigned int timeout;
>  
>  /*
>   * This structure stores the register offsets for different variants
> -- 
> 2.15.1
> 

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

* Re: [PATCH 2/7] watchdog: sunxi: allow setting timeout in devicetree
@ 2018-02-09 22:39     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:39 UTC (permalink / raw)
  To: Marcus Folkesson
  Cc: Wim Van Sebroeck, Rob Herring, Mark Rutland, Carlo Caione,
	Kevin Hilman, Matthias Brugger, Barry Song, Maxime Ripard,
	Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy, Sylvain Lemieux,
	Nicolas Ferre, Alexandre Belloni,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Fri, Feb 09, 2018 at 08:27:19PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> By following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt, it also
> let us to set timout-sec property in devicetree.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Reviewed-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>

> ---
>  Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt | 4 ++++
>  drivers/watchdog/sunxi_wdt.c                             | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
> index 62dd5baad70e..49900e72f6b1 100644
> --- a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
> +++ b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
> @@ -6,9 +6,13 @@ Required properties:
>                 "allwinner,sun6i-a31-wdt"
>  - reg : Specifies base physical address and size of the registers.
>  
> +Optional properties:
> +- timeout-sec : Contains the watchdog timeout in seconds
> +
>  Example:
>  
>  wdt: watchdog@1c20c90 {
>  	compatible = "allwinner,sun4i-a10-wdt";
>  	reg = <0x01c20c90 0x10>;
> +	timeout-sec = <10>;
>  };
> diff --git a/drivers/watchdog/sunxi_wdt.c b/drivers/watchdog/sunxi_wdt.c
> index 9728fa32c357..55f166bec0ca 100644
> --- a/drivers/watchdog/sunxi_wdt.c
> +++ b/drivers/watchdog/sunxi_wdt.c
> @@ -39,7 +39,7 @@
>  #define DRV_VERSION		"1.0"
>  
>  static bool nowayout = WATCHDOG_NOWAYOUT;
> -static unsigned int timeout = WDT_MAX_TIMEOUT;
> +static unsigned int timeout;
>  
>  /*
>   * This structure stores the register offsets for different variants
> -- 
> 2.15.1
> 
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 2/7] watchdog: sunxi: allow setting timeout in devicetree
@ 2018-02-09 22:39     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 09, 2018 at 08:27:19PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> By following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt, it also
> let us to set timout-sec property in devicetree.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt | 4 ++++
>  drivers/watchdog/sunxi_wdt.c                             | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
> index 62dd5baad70e..49900e72f6b1 100644
> --- a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
> +++ b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
> @@ -6,9 +6,13 @@ Required properties:
>                 "allwinner,sun6i-a31-wdt"
>  - reg : Specifies base physical address and size of the registers.
>  
> +Optional properties:
> +- timeout-sec : Contains the watchdog timeout in seconds
> +
>  Example:
>  
>  wdt: watchdog at 1c20c90 {
>  	compatible = "allwinner,sun4i-a10-wdt";
>  	reg = <0x01c20c90 0x10>;
> +	timeout-sec = <10>;
>  };
> diff --git a/drivers/watchdog/sunxi_wdt.c b/drivers/watchdog/sunxi_wdt.c
> index 9728fa32c357..55f166bec0ca 100644
> --- a/drivers/watchdog/sunxi_wdt.c
> +++ b/drivers/watchdog/sunxi_wdt.c
> @@ -39,7 +39,7 @@
>  #define DRV_VERSION		"1.0"
>  
>  static bool nowayout = WATCHDOG_NOWAYOUT;
> -static unsigned int timeout = WDT_MAX_TIMEOUT;
> +static unsigned int timeout;
>  
>  /*
>   * This structure stores the register offsets for different variants
> -- 
> 2.15.1
> 

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

* [PATCH 2/7] watchdog: sunxi: allow setting timeout in devicetree
@ 2018-02-09 22:39     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:39 UTC (permalink / raw)
  To: linus-amlogic

On Fri, Feb 09, 2018 at 08:27:19PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> By following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt, it also
> let us to set timout-sec property in devicetree.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt | 4 ++++
>  drivers/watchdog/sunxi_wdt.c                             | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
> index 62dd5baad70e..49900e72f6b1 100644
> --- a/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
> +++ b/Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt
> @@ -6,9 +6,13 @@ Required properties:
>                 "allwinner,sun6i-a31-wdt"
>  - reg : Specifies base physical address and size of the registers.
>  
> +Optional properties:
> +- timeout-sec : Contains the watchdog timeout in seconds
> +
>  Example:
>  
>  wdt: watchdog at 1c20c90 {
>  	compatible = "allwinner,sun4i-a10-wdt";
>  	reg = <0x01c20c90 0x10>;
> +	timeout-sec = <10>;
>  };
> diff --git a/drivers/watchdog/sunxi_wdt.c b/drivers/watchdog/sunxi_wdt.c
> index 9728fa32c357..55f166bec0ca 100644
> --- a/drivers/watchdog/sunxi_wdt.c
> +++ b/drivers/watchdog/sunxi_wdt.c
> @@ -39,7 +39,7 @@
>  #define DRV_VERSION		"1.0"
>  
>  static bool nowayout = WATCHDOG_NOWAYOUT;
> -static unsigned int timeout = WDT_MAX_TIMEOUT;
> +static unsigned int timeout;
>  
>  /*
>   * This structure stores the register offsets for different variants
> -- 
> 2.15.1
> 

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

* Re: [PATCH 3/7] watchdog: sirfsoc: allow setting timeout in devicetree
  2018-02-09 19:27   ` Marcus Folkesson
  (?)
@ 2018-02-09 22:40     ` Guenter Roeck
  -1 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:40 UTC (permalink / raw)
  To: Marcus Folkesson
  Cc: Wim Van Sebroeck, Rob Herring, Mark Rutland, Carlo Caione,
	Kevin Hilman, Matthias Brugger, Barry Song, Maxime Ripard,
	Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy, Sylvain Lemieux,
	Nicolas Ferre, Alexandre Belloni, linux-watchdog, devicetree,
	linux-arm-kernel, linux-amlogic, linux-kernel, linux-mediatek

On Fri, Feb 09, 2018 at 08:27:20PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> By following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt, it also
> let us to set timout-sec property in devicetree.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt | 4 ++++
>  drivers/watchdog/sirfsoc_wdt.c                             | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt b/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
> index 9cbc76c89b2b..0dce5e3100b4 100644
> --- a/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
> +++ b/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
> @@ -5,10 +5,14 @@ Required properties:
>  - reg: Address range of tick timer/WDT register set
>  - interrupts: interrupt number to the cpu
>  
> +Optional properties:
> +- timeout-sec : Contains the watchdog timeout in seconds
> +
>  Example:
>  
>  timer@b0020000 {
>  	compatible = "sirf,prima2-tick";
>  	reg = <0xb0020000 0x1000>;
>  	interrupts = <0>;
> +	timeout-sec = <30>;
>  };
> diff --git a/drivers/watchdog/sirfsoc_wdt.c b/drivers/watchdog/sirfsoc_wdt.c
> index 4eea351e09b0..ac0c9d2c4aee 100644
> --- a/drivers/watchdog/sirfsoc_wdt.c
> +++ b/drivers/watchdog/sirfsoc_wdt.c
> @@ -29,7 +29,7 @@
>  #define SIRFSOC_WDT_MAX_TIMEOUT		(10 * 60)	/* 10 mins */
>  #define SIRFSOC_WDT_DEFAULT_TIMEOUT	30		/* 30 secs */
>  
> -static unsigned int timeout = SIRFSOC_WDT_DEFAULT_TIMEOUT;
> +static unsigned int timeout;
>  static bool nowayout = WATCHDOG_NOWAYOUT;
>  
>  module_param(timeout, uint, 0);
> -- 
> 2.15.1
> 

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

* [PATCH 3/7] watchdog: sirfsoc: allow setting timeout in devicetree
@ 2018-02-09 22:40     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 09, 2018 at 08:27:20PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> By following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt, it also
> let us to set timout-sec property in devicetree.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt | 4 ++++
>  drivers/watchdog/sirfsoc_wdt.c                             | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt b/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
> index 9cbc76c89b2b..0dce5e3100b4 100644
> --- a/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
> +++ b/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
> @@ -5,10 +5,14 @@ Required properties:
>  - reg: Address range of tick timer/WDT register set
>  - interrupts: interrupt number to the cpu
>  
> +Optional properties:
> +- timeout-sec : Contains the watchdog timeout in seconds
> +
>  Example:
>  
>  timer at b0020000 {
>  	compatible = "sirf,prima2-tick";
>  	reg = <0xb0020000 0x1000>;
>  	interrupts = <0>;
> +	timeout-sec = <30>;
>  };
> diff --git a/drivers/watchdog/sirfsoc_wdt.c b/drivers/watchdog/sirfsoc_wdt.c
> index 4eea351e09b0..ac0c9d2c4aee 100644
> --- a/drivers/watchdog/sirfsoc_wdt.c
> +++ b/drivers/watchdog/sirfsoc_wdt.c
> @@ -29,7 +29,7 @@
>  #define SIRFSOC_WDT_MAX_TIMEOUT		(10 * 60)	/* 10 mins */
>  #define SIRFSOC_WDT_DEFAULT_TIMEOUT	30		/* 30 secs */
>  
> -static unsigned int timeout = SIRFSOC_WDT_DEFAULT_TIMEOUT;
> +static unsigned int timeout;
>  static bool nowayout = WATCHDOG_NOWAYOUT;
>  
>  module_param(timeout, uint, 0);
> -- 
> 2.15.1
> 

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

* [PATCH 3/7] watchdog: sirfsoc: allow setting timeout in devicetree
@ 2018-02-09 22:40     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:40 UTC (permalink / raw)
  To: linus-amlogic

On Fri, Feb 09, 2018 at 08:27:20PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> By following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt, it also
> let us to set timout-sec property in devicetree.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt | 4 ++++
>  drivers/watchdog/sirfsoc_wdt.c                             | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt b/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
> index 9cbc76c89b2b..0dce5e3100b4 100644
> --- a/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
> +++ b/Documentation/devicetree/bindings/watchdog/sirfsoc_wdt.txt
> @@ -5,10 +5,14 @@ Required properties:
>  - reg: Address range of tick timer/WDT register set
>  - interrupts: interrupt number to the cpu
>  
> +Optional properties:
> +- timeout-sec : Contains the watchdog timeout in seconds
> +
>  Example:
>  
>  timer at b0020000 {
>  	compatible = "sirf,prima2-tick";
>  	reg = <0xb0020000 0x1000>;
>  	interrupts = <0>;
> +	timeout-sec = <30>;
>  };
> diff --git a/drivers/watchdog/sirfsoc_wdt.c b/drivers/watchdog/sirfsoc_wdt.c
> index 4eea351e09b0..ac0c9d2c4aee 100644
> --- a/drivers/watchdog/sirfsoc_wdt.c
> +++ b/drivers/watchdog/sirfsoc_wdt.c
> @@ -29,7 +29,7 @@
>  #define SIRFSOC_WDT_MAX_TIMEOUT		(10 * 60)	/* 10 mins */
>  #define SIRFSOC_WDT_DEFAULT_TIMEOUT	30		/* 30 secs */
>  
> -static unsigned int timeout = SIRFSOC_WDT_DEFAULT_TIMEOUT;
> +static unsigned int timeout;
>  static bool nowayout = WATCHDOG_NOWAYOUT;
>  
>  module_param(timeout, uint, 0);
> -- 
> 2.15.1
> 

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

* Re: [PATCH 4/7] watchdog: pnx4008: make use of timeout-secs provided in devicetree
@ 2018-02-09 22:41     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:41 UTC (permalink / raw)
  To: Marcus Folkesson
  Cc: Wim Van Sebroeck, Rob Herring, Mark Rutland, Carlo Caione,
	Kevin Hilman, Matthias Brugger, Barry Song, Maxime Ripard,
	Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy, Sylvain Lemieux,
	Nicolas Ferre, Alexandre Belloni, linux-watchdog, devicetree,
	linux-arm-kernel, linux-amlogic, linux-kernel, linux-mediatek

On Fri, Feb 09, 2018 at 08:27:21PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> Following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt to make use of
> the parameter logic.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/pnx4008_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
> index 0529aed158a4..8e261799c84e 100644
> --- a/drivers/watchdog/pnx4008_wdt.c
> +++ b/drivers/watchdog/pnx4008_wdt.c
> @@ -78,7 +78,7 @@
>  #define WDOG_COUNTER_RATE 13000000	/*the counter clock is 13 MHz fixed */
>  
>  static bool nowayout = WATCHDOG_NOWAYOUT;
> -static unsigned int heartbeat = DEFAULT_HEARTBEAT;
> +static unsigned int heartbeat;
>  
>  static DEFINE_SPINLOCK(io_lock);
>  static void __iomem	*wdt_base;
> -- 
> 2.15.1
> 

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

* Re: [PATCH 4/7] watchdog: pnx4008: make use of timeout-secs provided in devicetree
@ 2018-02-09 22:41     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:41 UTC (permalink / raw)
  To: Marcus Folkesson
  Cc: Wim Van Sebroeck, Rob Herring, Mark Rutland, Carlo Caione,
	Kevin Hilman, Matthias Brugger, Barry Song, Maxime Ripard,
	Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy, Sylvain Lemieux,
	Nicolas Ferre, Alexandre Belloni,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Fri, Feb 09, 2018 at 08:27:21PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> Following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt to make use of
> the parameter logic.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Reviewed-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>

> ---
>  drivers/watchdog/pnx4008_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
> index 0529aed158a4..8e261799c84e 100644
> --- a/drivers/watchdog/pnx4008_wdt.c
> +++ b/drivers/watchdog/pnx4008_wdt.c
> @@ -78,7 +78,7 @@
>  #define WDOG_COUNTER_RATE 13000000	/*the counter clock is 13 MHz fixed */
>  
>  static bool nowayout = WATCHDOG_NOWAYOUT;
> -static unsigned int heartbeat = DEFAULT_HEARTBEAT;
> +static unsigned int heartbeat;
>  
>  static DEFINE_SPINLOCK(io_lock);
>  static void __iomem	*wdt_base;
> -- 
> 2.15.1
> 
--
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] 88+ messages in thread

* [PATCH 4/7] watchdog: pnx4008: make use of timeout-secs provided in devicetree
@ 2018-02-09 22:41     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 09, 2018 at 08:27:21PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> Following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt to make use of
> the parameter logic.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/pnx4008_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
> index 0529aed158a4..8e261799c84e 100644
> --- a/drivers/watchdog/pnx4008_wdt.c
> +++ b/drivers/watchdog/pnx4008_wdt.c
> @@ -78,7 +78,7 @@
>  #define WDOG_COUNTER_RATE 13000000	/*the counter clock is 13 MHz fixed */
>  
>  static bool nowayout = WATCHDOG_NOWAYOUT;
> -static unsigned int heartbeat = DEFAULT_HEARTBEAT;
> +static unsigned int heartbeat;
>  
>  static DEFINE_SPINLOCK(io_lock);
>  static void __iomem	*wdt_base;
> -- 
> 2.15.1
> 

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

* [PATCH 4/7] watchdog: pnx4008: make use of timeout-secs provided in devicetree
@ 2018-02-09 22:41     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:41 UTC (permalink / raw)
  To: linus-amlogic

On Fri, Feb 09, 2018 at 08:27:21PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> Following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt to make use of
> the parameter logic.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/pnx4008_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
> index 0529aed158a4..8e261799c84e 100644
> --- a/drivers/watchdog/pnx4008_wdt.c
> +++ b/drivers/watchdog/pnx4008_wdt.c
> @@ -78,7 +78,7 @@
>  #define WDOG_COUNTER_RATE 13000000	/*the counter clock is 13 MHz fixed */
>  
>  static bool nowayout = WATCHDOG_NOWAYOUT;
> -static unsigned int heartbeat = DEFAULT_HEARTBEAT;
> +static unsigned int heartbeat;
>  
>  static DEFINE_SPINLOCK(io_lock);
>  static void __iomem	*wdt_base;
> -- 
> 2.15.1
> 

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

* Re: [PATCH 4/7] watchdog: pnx4008: make use of timeout-secs provided in devicetree
@ 2018-02-09 22:43     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:43 UTC (permalink / raw)
  To: Marcus Folkesson
  Cc: Wim Van Sebroeck, Rob Herring, Mark Rutland, Carlo Caione,
	Kevin Hilman, Matthias Brugger, Barry Song, Maxime Ripard,
	Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy, Sylvain Lemieux,
	Nicolas Ferre, Alexandre Belloni, linux-watchdog, devicetree,
	linux-arm-kernel, linux-amlogic, linux-kernel, linux-mediatek

On Fri, Feb 09, 2018 at 08:27:21PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> Following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt to make use of
> the parameter logic.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/pnx4008_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
> index 0529aed158a4..8e261799c84e 100644
> --- a/drivers/watchdog/pnx4008_wdt.c
> +++ b/drivers/watchdog/pnx4008_wdt.c
> @@ -78,7 +78,7 @@
>  #define WDOG_COUNTER_RATE 13000000	/*the counter clock is 13 MHz fixed */
>  
>  static bool nowayout = WATCHDOG_NOWAYOUT;
> -static unsigned int heartbeat = DEFAULT_HEARTBEAT;
> +static unsigned int heartbeat;
>  
>  static DEFINE_SPINLOCK(io_lock);
>  static void __iomem	*wdt_base;
> -- 
> 2.15.1
> 

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

* Re: [PATCH 4/7] watchdog: pnx4008: make use of timeout-secs provided in devicetree
@ 2018-02-09 22:43     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:43 UTC (permalink / raw)
  To: Marcus Folkesson
  Cc: Wim Van Sebroeck, Rob Herring, Mark Rutland, Carlo Caione,
	Kevin Hilman, Matthias Brugger, Barry Song, Maxime Ripard,
	Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy, Sylvain Lemieux,
	Nicolas Ferre, Alexandre Belloni,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Fri, Feb 09, 2018 at 08:27:21PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> Following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt to make use of
> the parameter logic.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Reviewed-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>

> ---
>  drivers/watchdog/pnx4008_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
> index 0529aed158a4..8e261799c84e 100644
> --- a/drivers/watchdog/pnx4008_wdt.c
> +++ b/drivers/watchdog/pnx4008_wdt.c
> @@ -78,7 +78,7 @@
>  #define WDOG_COUNTER_RATE 13000000	/*the counter clock is 13 MHz fixed */
>  
>  static bool nowayout = WATCHDOG_NOWAYOUT;
> -static unsigned int heartbeat = DEFAULT_HEARTBEAT;
> +static unsigned int heartbeat;
>  
>  static DEFINE_SPINLOCK(io_lock);
>  static void __iomem	*wdt_base;
> -- 
> 2.15.1
> 
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 4/7] watchdog: pnx4008: make use of timeout-secs provided in devicetree
@ 2018-02-09 22:43     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 09, 2018 at 08:27:21PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> Following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt to make use of
> the parameter logic.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/pnx4008_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
> index 0529aed158a4..8e261799c84e 100644
> --- a/drivers/watchdog/pnx4008_wdt.c
> +++ b/drivers/watchdog/pnx4008_wdt.c
> @@ -78,7 +78,7 @@
>  #define WDOG_COUNTER_RATE 13000000	/*the counter clock is 13 MHz fixed */
>  
>  static bool nowayout = WATCHDOG_NOWAYOUT;
> -static unsigned int heartbeat = DEFAULT_HEARTBEAT;
> +static unsigned int heartbeat;
>  
>  static DEFINE_SPINLOCK(io_lock);
>  static void __iomem	*wdt_base;
> -- 
> 2.15.1
> 

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

* [PATCH 4/7] watchdog: pnx4008: make use of timeout-secs provided in devicetree
@ 2018-02-09 22:43     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:43 UTC (permalink / raw)
  To: linus-amlogic

On Fri, Feb 09, 2018 at 08:27:21PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> Following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt to make use of
> the parameter logic.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/pnx4008_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
> index 0529aed158a4..8e261799c84e 100644
> --- a/drivers/watchdog/pnx4008_wdt.c
> +++ b/drivers/watchdog/pnx4008_wdt.c
> @@ -78,7 +78,7 @@
>  #define WDOG_COUNTER_RATE 13000000	/*the counter clock is 13 MHz fixed */
>  
>  static bool nowayout = WATCHDOG_NOWAYOUT;
> -static unsigned int heartbeat = DEFAULT_HEARTBEAT;
> +static unsigned int heartbeat;
>  
>  static DEFINE_SPINLOCK(io_lock);
>  static void __iomem	*wdt_base;
> -- 
> 2.15.1
> 

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

* Re: [PATCH 5/7] watchdog: mtk: allow setting timeout in devicetree
@ 2018-02-09 22:43     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:43 UTC (permalink / raw)
  To: Marcus Folkesson
  Cc: Wim Van Sebroeck, Rob Herring, Mark Rutland, Carlo Caione,
	Kevin Hilman, Matthias Brugger, Barry Song, Maxime Ripard,
	Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy, Sylvain Lemieux,
	Nicolas Ferre, Alexandre Belloni, linux-watchdog, devicetree,
	linux-arm-kernel, linux-amlogic, linux-kernel, linux-mediatek

On Fri, Feb 09, 2018 at 08:27:22PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> By following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt, it also
> let us to set timout-sec property in devicetree.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 4 ++++
>  drivers/watchdog/mtk_wdt.c                             | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
> index 5b38a30e608c..859dee167b91 100644
> --- a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
> +++ b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
> @@ -11,9 +11,13 @@ Required properties:
>  
>  - reg : Specifies base physical address and size of the registers.
>  
> +Optional properties:
> +- timeout-sec: contains the watchdog timeout in seconds.
> +
>  Example:
>  
>  wdt: watchdog@10000000 {
>  	compatible = "mediatek,mt6589-wdt";
>  	reg = <0x10000000 0x18>;
> +	timeout-sec = <10>;
>  };
> diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
> index 7ed417a765c7..fcdc10ec28a3 100644
> --- a/drivers/watchdog/mtk_wdt.c
> +++ b/drivers/watchdog/mtk_wdt.c
> @@ -57,7 +57,7 @@
>  #define DRV_VERSION		"1.0"
>  
>  static bool nowayout = WATCHDOG_NOWAYOUT;
> -static unsigned int timeout = WDT_MAX_TIMEOUT;
> +static unsigned int timeout;
>  
>  struct mtk_wdt_dev {
>  	struct watchdog_device wdt_dev;
> -- 
> 2.15.1
> 

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

* Re: [PATCH 5/7] watchdog: mtk: allow setting timeout in devicetree
@ 2018-02-09 22:43     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:43 UTC (permalink / raw)
  To: Marcus Folkesson
  Cc: Wim Van Sebroeck, Rob Herring, Mark Rutland, Carlo Caione,
	Kevin Hilman, Matthias Brugger, Barry Song, Maxime Ripard,
	Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy, Sylvain Lemieux,
	Nicolas Ferre, Alexandre Belloni,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Fri, Feb 09, 2018 at 08:27:22PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> By following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt, it also
> let us to set timout-sec property in devicetree.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Reviewed-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>

> ---
>  Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 4 ++++
>  drivers/watchdog/mtk_wdt.c                             | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
> index 5b38a30e608c..859dee167b91 100644
> --- a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
> +++ b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
> @@ -11,9 +11,13 @@ Required properties:
>  
>  - reg : Specifies base physical address and size of the registers.
>  
> +Optional properties:
> +- timeout-sec: contains the watchdog timeout in seconds.
> +
>  Example:
>  
>  wdt: watchdog@10000000 {
>  	compatible = "mediatek,mt6589-wdt";
>  	reg = <0x10000000 0x18>;
> +	timeout-sec = <10>;
>  };
> diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
> index 7ed417a765c7..fcdc10ec28a3 100644
> --- a/drivers/watchdog/mtk_wdt.c
> +++ b/drivers/watchdog/mtk_wdt.c
> @@ -57,7 +57,7 @@
>  #define DRV_VERSION		"1.0"
>  
>  static bool nowayout = WATCHDOG_NOWAYOUT;
> -static unsigned int timeout = WDT_MAX_TIMEOUT;
> +static unsigned int timeout;
>  
>  struct mtk_wdt_dev {
>  	struct watchdog_device wdt_dev;
> -- 
> 2.15.1
> 
--
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] 88+ messages in thread

* [PATCH 5/7] watchdog: mtk: allow setting timeout in devicetree
@ 2018-02-09 22:43     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 09, 2018 at 08:27:22PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> By following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt, it also
> let us to set timout-sec property in devicetree.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 4 ++++
>  drivers/watchdog/mtk_wdt.c                             | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
> index 5b38a30e608c..859dee167b91 100644
> --- a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
> +++ b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
> @@ -11,9 +11,13 @@ Required properties:
>  
>  - reg : Specifies base physical address and size of the registers.
>  
> +Optional properties:
> +- timeout-sec: contains the watchdog timeout in seconds.
> +
>  Example:
>  
>  wdt: watchdog at 10000000 {
>  	compatible = "mediatek,mt6589-wdt";
>  	reg = <0x10000000 0x18>;
> +	timeout-sec = <10>;
>  };
> diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
> index 7ed417a765c7..fcdc10ec28a3 100644
> --- a/drivers/watchdog/mtk_wdt.c
> +++ b/drivers/watchdog/mtk_wdt.c
> @@ -57,7 +57,7 @@
>  #define DRV_VERSION		"1.0"
>  
>  static bool nowayout = WATCHDOG_NOWAYOUT;
> -static unsigned int timeout = WDT_MAX_TIMEOUT;
> +static unsigned int timeout;
>  
>  struct mtk_wdt_dev {
>  	struct watchdog_device wdt_dev;
> -- 
> 2.15.1
> 

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

* [PATCH 5/7] watchdog: mtk: allow setting timeout in devicetree
@ 2018-02-09 22:43     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:43 UTC (permalink / raw)
  To: linus-amlogic

On Fri, Feb 09, 2018 at 08:27:22PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> By following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt, it also
> let us to set timout-sec property in devicetree.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  Documentation/devicetree/bindings/watchdog/mtk-wdt.txt | 4 ++++
>  drivers/watchdog/mtk_wdt.c                             | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
> index 5b38a30e608c..859dee167b91 100644
> --- a/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
> +++ b/Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
> @@ -11,9 +11,13 @@ Required properties:
>  
>  - reg : Specifies base physical address and size of the registers.
>  
> +Optional properties:
> +- timeout-sec: contains the watchdog timeout in seconds.
> +
>  Example:
>  
>  wdt: watchdog at 10000000 {
>  	compatible = "mediatek,mt6589-wdt";
>  	reg = <0x10000000 0x18>;
> +	timeout-sec = <10>;
>  };
> diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
> index 7ed417a765c7..fcdc10ec28a3 100644
> --- a/drivers/watchdog/mtk_wdt.c
> +++ b/drivers/watchdog/mtk_wdt.c
> @@ -57,7 +57,7 @@
>  #define DRV_VERSION		"1.0"
>  
>  static bool nowayout = WATCHDOG_NOWAYOUT;
> -static unsigned int timeout = WDT_MAX_TIMEOUT;
> +static unsigned int timeout;
>  
>  struct mtk_wdt_dev {
>  	struct watchdog_device wdt_dev;
> -- 
> 2.15.1
> 

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

* Re: [PATCH 6/7] watchdog: meson: allow setting timeout in devicetree
@ 2018-02-09 22:48     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:48 UTC (permalink / raw)
  To: Marcus Folkesson
  Cc: Wim Van Sebroeck, Rob Herring, Mark Rutland, Carlo Caione,
	Kevin Hilman, Matthias Brugger, Barry Song, Maxime Ripard,
	Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy, Sylvain Lemieux,
	Nicolas Ferre, Alexandre Belloni, linux-watchdog, devicetree,
	linux-arm-kernel, linux-amlogic, linux-kernel, linux-mediatek

On Fri, Feb 09, 2018 at 08:27:23PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> By following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt, it also
> let us to set timout-sec property in devicetree.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>

Reviewed-by: Guenetr Roeck <linux@roeck-us.net>

> ---
>  Documentation/devicetree/bindings/watchdog/meson-wdt.txt | 4 ++++
>  drivers/watchdog/meson_wdt.c                             | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
> index 8a6d84cb36c9..7588cc3971bf 100644
> --- a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
> +++ b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
> @@ -9,9 +9,13 @@ Required properties:
>  	"amlogic,meson8m2-wdt" and "amlogic,meson8b-wdt" on Meson8m2 SoCs
>  - reg : Specifies base physical address and size of the registers.
>  
> +Optional properties:
> +- timeout-sec: contains the watchdog timeout in seconds.
> +
>  Example:
>  
>  wdt: watchdog@c1109900 {
>  	compatible = "amlogic,meson6-wdt";
>  	reg = <0xc1109900 0x8>;
> +	timeout-sec = <10>;
>  };
> diff --git a/drivers/watchdog/meson_wdt.c b/drivers/watchdog/meson_wdt.c
> index 304274c67735..cd0275a6cdac 100644
> --- a/drivers/watchdog/meson_wdt.c
> +++ b/drivers/watchdog/meson_wdt.c
> @@ -36,7 +36,7 @@
>  #define MESON_SEC_TO_TC(s, c)	((s) * (c))
>  
>  static bool nowayout = WATCHDOG_NOWAYOUT;
> -static unsigned int timeout = MESON_WDT_TIMEOUT;
> +static unsigned int timeout;
>  
>  struct meson_wdt_data {
>  	unsigned int enable;
> -- 
> 2.15.1
> 

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

* Re: [PATCH 6/7] watchdog: meson: allow setting timeout in devicetree
@ 2018-02-09 22:48     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:48 UTC (permalink / raw)
  To: Marcus Folkesson
  Cc: Wim Van Sebroeck, Rob Herring, Mark Rutland, Carlo Caione,
	Kevin Hilman, Matthias Brugger, Barry Song, Maxime Ripard,
	Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy, Sylvain Lemieux,
	Nicolas Ferre, Alexandre Belloni,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Fri, Feb 09, 2018 at 08:27:23PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> By following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt, it also
> let us to set timout-sec property in devicetree.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Reviewed-by: Guenetr Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>

> ---
>  Documentation/devicetree/bindings/watchdog/meson-wdt.txt | 4 ++++
>  drivers/watchdog/meson_wdt.c                             | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
> index 8a6d84cb36c9..7588cc3971bf 100644
> --- a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
> +++ b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
> @@ -9,9 +9,13 @@ Required properties:
>  	"amlogic,meson8m2-wdt" and "amlogic,meson8b-wdt" on Meson8m2 SoCs
>  - reg : Specifies base physical address and size of the registers.
>  
> +Optional properties:
> +- timeout-sec: contains the watchdog timeout in seconds.
> +
>  Example:
>  
>  wdt: watchdog@c1109900 {
>  	compatible = "amlogic,meson6-wdt";
>  	reg = <0xc1109900 0x8>;
> +	timeout-sec = <10>;
>  };
> diff --git a/drivers/watchdog/meson_wdt.c b/drivers/watchdog/meson_wdt.c
> index 304274c67735..cd0275a6cdac 100644
> --- a/drivers/watchdog/meson_wdt.c
> +++ b/drivers/watchdog/meson_wdt.c
> @@ -36,7 +36,7 @@
>  #define MESON_SEC_TO_TC(s, c)	((s) * (c))
>  
>  static bool nowayout = WATCHDOG_NOWAYOUT;
> -static unsigned int timeout = MESON_WDT_TIMEOUT;
> +static unsigned int timeout;
>  
>  struct meson_wdt_data {
>  	unsigned int enable;
> -- 
> 2.15.1
> 
--
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] 88+ messages in thread

* [PATCH 6/7] watchdog: meson: allow setting timeout in devicetree
@ 2018-02-09 22:48     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 09, 2018 at 08:27:23PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> By following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt, it also
> let us to set timout-sec property in devicetree.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>

Reviewed-by: Guenetr Roeck <linux@roeck-us.net>

> ---
>  Documentation/devicetree/bindings/watchdog/meson-wdt.txt | 4 ++++
>  drivers/watchdog/meson_wdt.c                             | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
> index 8a6d84cb36c9..7588cc3971bf 100644
> --- a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
> +++ b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
> @@ -9,9 +9,13 @@ Required properties:
>  	"amlogic,meson8m2-wdt" and "amlogic,meson8b-wdt" on Meson8m2 SoCs
>  - reg : Specifies base physical address and size of the registers.
>  
> +Optional properties:
> +- timeout-sec: contains the watchdog timeout in seconds.
> +
>  Example:
>  
>  wdt: watchdog at c1109900 {
>  	compatible = "amlogic,meson6-wdt";
>  	reg = <0xc1109900 0x8>;
> +	timeout-sec = <10>;
>  };
> diff --git a/drivers/watchdog/meson_wdt.c b/drivers/watchdog/meson_wdt.c
> index 304274c67735..cd0275a6cdac 100644
> --- a/drivers/watchdog/meson_wdt.c
> +++ b/drivers/watchdog/meson_wdt.c
> @@ -36,7 +36,7 @@
>  #define MESON_SEC_TO_TC(s, c)	((s) * (c))
>  
>  static bool nowayout = WATCHDOG_NOWAYOUT;
> -static unsigned int timeout = MESON_WDT_TIMEOUT;
> +static unsigned int timeout;
>  
>  struct meson_wdt_data {
>  	unsigned int enable;
> -- 
> 2.15.1
> 

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

* [PATCH 6/7] watchdog: meson: allow setting timeout in devicetree
@ 2018-02-09 22:48     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:48 UTC (permalink / raw)
  To: linus-amlogic

On Fri, Feb 09, 2018 at 08:27:23PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> By following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt, it also
> let us to set timout-sec property in devicetree.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>

Reviewed-by: Guenetr Roeck <linux@roeck-us.net>

> ---
>  Documentation/devicetree/bindings/watchdog/meson-wdt.txt | 4 ++++
>  drivers/watchdog/meson_wdt.c                             | 2 +-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
> index 8a6d84cb36c9..7588cc3971bf 100644
> --- a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
> +++ b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
> @@ -9,9 +9,13 @@ Required properties:
>  	"amlogic,meson8m2-wdt" and "amlogic,meson8b-wdt" on Meson8m2 SoCs
>  - reg : Specifies base physical address and size of the registers.
>  
> +Optional properties:
> +- timeout-sec: contains the watchdog timeout in seconds.
> +
>  Example:
>  
>  wdt: watchdog at c1109900 {
>  	compatible = "amlogic,meson6-wdt";
>  	reg = <0xc1109900 0x8>;
> +	timeout-sec = <10>;
>  };
> diff --git a/drivers/watchdog/meson_wdt.c b/drivers/watchdog/meson_wdt.c
> index 304274c67735..cd0275a6cdac 100644
> --- a/drivers/watchdog/meson_wdt.c
> +++ b/drivers/watchdog/meson_wdt.c
> @@ -36,7 +36,7 @@
>  #define MESON_SEC_TO_TC(s, c)	((s) * (c))
>  
>  static bool nowayout = WATCHDOG_NOWAYOUT;
> -static unsigned int timeout = MESON_WDT_TIMEOUT;
> +static unsigned int timeout;
>  
>  struct meson_wdt_data {
>  	unsigned int enable;
> -- 
> 2.15.1
> 

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

* Re: [PATCH 7/7] watchdog: coh901327: make use of timeout-secs provided in devicetree
@ 2018-02-09 22:52     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:52 UTC (permalink / raw)
  To: Marcus Folkesson
  Cc: Wim Van Sebroeck, Rob Herring, Mark Rutland, Carlo Caione,
	Kevin Hilman, Matthias Brugger, Barry Song, Maxime Ripard,
	Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy, Sylvain Lemieux,
	Nicolas Ferre, Alexandre Belloni, linux-watchdog, devicetree,
	linux-arm-kernel, linux-amlogic, linux-kernel, linux-mediatek

On Fri, Feb 09, 2018 at 08:27:24PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> Following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt to make use of
> the parameter logic.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> ---
>  drivers/watchdog/coh901327_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/coh901327_wdt.c b/drivers/watchdog/coh901327_wdt.c
> index 4410337f4f7f..437f865e5c6b 100644
> --- a/drivers/watchdog/coh901327_wdt.c
> +++ b/drivers/watchdog/coh901327_wdt.c
> @@ -67,7 +67,7 @@
>  #define U300_WDOG_IFR_WILL_BARK_IRQ_FORCE_ENABLE			0x0001U
>  
>  /* Default timeout in seconds = 1 minute */
> -static unsigned int margin = 60;
> +static unsigned int margin;
>  static int irq;
>  static void __iomem *virtbase;
>  static struct device *parent;

I would suggest to initialize .timeout in 'static struct watchdog_device
coh901327_wdt', and drop the error check when calling watchdog_init_timeout().

Guenter

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

* Re: [PATCH 7/7] watchdog: coh901327: make use of timeout-secs provided in devicetree
@ 2018-02-09 22:52     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:52 UTC (permalink / raw)
  To: Marcus Folkesson
  Cc: Wim Van Sebroeck, Rob Herring, Mark Rutland, Carlo Caione,
	Kevin Hilman, Matthias Brugger, Barry Song, Maxime Ripard,
	Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy, Sylvain Lemieux,
	Nicolas Ferre, Alexandre Belloni,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Fri, Feb 09, 2018 at 08:27:24PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> Following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt to make use of
> the parameter logic.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  drivers/watchdog/coh901327_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/coh901327_wdt.c b/drivers/watchdog/coh901327_wdt.c
> index 4410337f4f7f..437f865e5c6b 100644
> --- a/drivers/watchdog/coh901327_wdt.c
> +++ b/drivers/watchdog/coh901327_wdt.c
> @@ -67,7 +67,7 @@
>  #define U300_WDOG_IFR_WILL_BARK_IRQ_FORCE_ENABLE			0x0001U
>  
>  /* Default timeout in seconds = 1 minute */
> -static unsigned int margin = 60;
> +static unsigned int margin;
>  static int irq;
>  static void __iomem *virtbase;
>  static struct device *parent;

I would suggest to initialize .timeout in 'static struct watchdog_device
coh901327_wdt', and drop the error check when calling watchdog_init_timeout().

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

* [PATCH 7/7] watchdog: coh901327: make use of timeout-secs provided in devicetree
@ 2018-02-09 22:52     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 09, 2018 at 08:27:24PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> Following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt to make use of
> the parameter logic.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> ---
>  drivers/watchdog/coh901327_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/coh901327_wdt.c b/drivers/watchdog/coh901327_wdt.c
> index 4410337f4f7f..437f865e5c6b 100644
> --- a/drivers/watchdog/coh901327_wdt.c
> +++ b/drivers/watchdog/coh901327_wdt.c
> @@ -67,7 +67,7 @@
>  #define U300_WDOG_IFR_WILL_BARK_IRQ_FORCE_ENABLE			0x0001U
>  
>  /* Default timeout in seconds = 1 minute */
> -static unsigned int margin = 60;
> +static unsigned int margin;
>  static int irq;
>  static void __iomem *virtbase;
>  static struct device *parent;

I would suggest to initialize .timeout in 'static struct watchdog_device
coh901327_wdt', and drop the error check when calling watchdog_init_timeout().

Guenter

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

* [PATCH 7/7] watchdog: coh901327: make use of timeout-secs provided in devicetree
@ 2018-02-09 22:52     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-09 22:52 UTC (permalink / raw)
  To: linus-amlogic

On Fri, Feb 09, 2018 at 08:27:24PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> Following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt to make use of
> the parameter logic.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> ---
>  drivers/watchdog/coh901327_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/coh901327_wdt.c b/drivers/watchdog/coh901327_wdt.c
> index 4410337f4f7f..437f865e5c6b 100644
> --- a/drivers/watchdog/coh901327_wdt.c
> +++ b/drivers/watchdog/coh901327_wdt.c
> @@ -67,7 +67,7 @@
>  #define U300_WDOG_IFR_WILL_BARK_IRQ_FORCE_ENABLE			0x0001U
>  
>  /* Default timeout in seconds = 1 minute */
> -static unsigned int margin = 60;
> +static unsigned int margin;
>  static int irq;
>  static void __iomem *virtbase;
>  static struct device *parent;

I would suggest to initialize .timeout in 'static struct watchdog_device
coh901327_wdt', and drop the error check when calling watchdog_init_timeout().

Guenter

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

* Re: [PATCH 6/7] watchdog: meson: allow setting timeout in devicetree
  2018-02-09 22:48     ` Guenter Roeck
  (?)
@ 2018-02-09 23:19       ` Alexandre Belloni
  -1 siblings, 0 replies; 88+ messages in thread
From: Alexandre Belloni @ 2018-02-09 23:19 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Marcus Folkesson, Wim Van Sebroeck, Rob Herring, Mark Rutland,
	Carlo Caione, Kevin Hilman, Matthias Brugger, Barry Song,
	Maxime Ripard, Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy,
	Sylvain Lemieux, Nicolas Ferre, linux-watchdog, devicetree,
	linux-arm-kernel, linux-amlogic, linux-kernel, linux-mediatek

Hi Guenter,

On 09/02/2018 at 14:48:49 -0800, Guenter Roeck wrote:
> On Fri, Feb 09, 2018 at 08:27:23PM +0100, Marcus Folkesson wrote:
> > watchdog_init_timeout() will allways pick timeout_param since it
> > defaults to a valid timeout.
> > 
> > By following best practice described in
> > Documentation/watchdog/watchdog-kernel-api.txt, it also
> > let us to set timout-sec property in devicetree.
> > 
> > Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> 
> Reviewed-by: Guenetr Roeck <linux@roeck-us.net>
                  ^
A small typo in your name


> > ---
> >  Documentation/devicetree/bindings/watchdog/meson-wdt.txt | 4 ++++
> >  drivers/watchdog/meson_wdt.c                             | 2 +-
> >  2 files changed, 5 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
> > index 8a6d84cb36c9..7588cc3971bf 100644
> > --- a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
> > +++ b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
> > @@ -9,9 +9,13 @@ Required properties:
> >  	"amlogic,meson8m2-wdt" and "amlogic,meson8b-wdt" on Meson8m2 SoCs
> >  - reg : Specifies base physical address and size of the registers.
> >  
> > +Optional properties:
> > +- timeout-sec: contains the watchdog timeout in seconds.
> > +
> >  Example:
> >  
> >  wdt: watchdog@c1109900 {
> >  	compatible = "amlogic,meson6-wdt";
> >  	reg = <0xc1109900 0x8>;
> > +	timeout-sec = <10>;
> >  };
> > diff --git a/drivers/watchdog/meson_wdt.c b/drivers/watchdog/meson_wdt.c
> > index 304274c67735..cd0275a6cdac 100644
> > --- a/drivers/watchdog/meson_wdt.c
> > +++ b/drivers/watchdog/meson_wdt.c
> > @@ -36,7 +36,7 @@
> >  #define MESON_SEC_TO_TC(s, c)	((s) * (c))
> >  
> >  static bool nowayout = WATCHDOG_NOWAYOUT;
> > -static unsigned int timeout = MESON_WDT_TIMEOUT;
> > +static unsigned int timeout;
> >  
> >  struct meson_wdt_data {
> >  	unsigned int enable;
> > -- 
> > 2.15.1
> > 

-- 
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com

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

* [PATCH 6/7] watchdog: meson: allow setting timeout in devicetree
@ 2018-02-09 23:19       ` Alexandre Belloni
  0 siblings, 0 replies; 88+ messages in thread
From: Alexandre Belloni @ 2018-02-09 23:19 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Guenter,

On 09/02/2018 at 14:48:49 -0800, Guenter Roeck wrote:
> On Fri, Feb 09, 2018 at 08:27:23PM +0100, Marcus Folkesson wrote:
> > watchdog_init_timeout() will allways pick timeout_param since it
> > defaults to a valid timeout.
> > 
> > By following best practice described in
> > Documentation/watchdog/watchdog-kernel-api.txt, it also
> > let us to set timout-sec property in devicetree.
> > 
> > Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> 
> Reviewed-by: Guenetr Roeck <linux@roeck-us.net>
                  ^
A small typo in your name


> > ---
> >  Documentation/devicetree/bindings/watchdog/meson-wdt.txt | 4 ++++
> >  drivers/watchdog/meson_wdt.c                             | 2 +-
> >  2 files changed, 5 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
> > index 8a6d84cb36c9..7588cc3971bf 100644
> > --- a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
> > +++ b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
> > @@ -9,9 +9,13 @@ Required properties:
> >  	"amlogic,meson8m2-wdt" and "amlogic,meson8b-wdt" on Meson8m2 SoCs
> >  - reg : Specifies base physical address and size of the registers.
> >  
> > +Optional properties:
> > +- timeout-sec: contains the watchdog timeout in seconds.
> > +
> >  Example:
> >  
> >  wdt: watchdog at c1109900 {
> >  	compatible = "amlogic,meson6-wdt";
> >  	reg = <0xc1109900 0x8>;
> > +	timeout-sec = <10>;
> >  };
> > diff --git a/drivers/watchdog/meson_wdt.c b/drivers/watchdog/meson_wdt.c
> > index 304274c67735..cd0275a6cdac 100644
> > --- a/drivers/watchdog/meson_wdt.c
> > +++ b/drivers/watchdog/meson_wdt.c
> > @@ -36,7 +36,7 @@
> >  #define MESON_SEC_TO_TC(s, c)	((s) * (c))
> >  
> >  static bool nowayout = WATCHDOG_NOWAYOUT;
> > -static unsigned int timeout = MESON_WDT_TIMEOUT;
> > +static unsigned int timeout;
> >  
> >  struct meson_wdt_data {
> >  	unsigned int enable;
> > -- 
> > 2.15.1
> > 

-- 
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com

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

* [PATCH 6/7] watchdog: meson: allow setting timeout in devicetree
@ 2018-02-09 23:19       ` Alexandre Belloni
  0 siblings, 0 replies; 88+ messages in thread
From: Alexandre Belloni @ 2018-02-09 23:19 UTC (permalink / raw)
  To: linus-amlogic

Hi Guenter,

On 09/02/2018 at 14:48:49 -0800, Guenter Roeck wrote:
> On Fri, Feb 09, 2018 at 08:27:23PM +0100, Marcus Folkesson wrote:
> > watchdog_init_timeout() will allways pick timeout_param since it
> > defaults to a valid timeout.
> > 
> > By following best practice described in
> > Documentation/watchdog/watchdog-kernel-api.txt, it also
> > let us to set timout-sec property in devicetree.
> > 
> > Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> 
> Reviewed-by: Guenetr Roeck <linux@roeck-us.net>
                  ^
A small typo in your name


> > ---
> >  Documentation/devicetree/bindings/watchdog/meson-wdt.txt | 4 ++++
> >  drivers/watchdog/meson_wdt.c                             | 2 +-
> >  2 files changed, 5 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
> > index 8a6d84cb36c9..7588cc3971bf 100644
> > --- a/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
> > +++ b/Documentation/devicetree/bindings/watchdog/meson-wdt.txt
> > @@ -9,9 +9,13 @@ Required properties:
> >  	"amlogic,meson8m2-wdt" and "amlogic,meson8b-wdt" on Meson8m2 SoCs
> >  - reg : Specifies base physical address and size of the registers.
> >  
> > +Optional properties:
> > +- timeout-sec: contains the watchdog timeout in seconds.
> > +
> >  Example:
> >  
> >  wdt: watchdog at c1109900 {
> >  	compatible = "amlogic,meson6-wdt";
> >  	reg = <0xc1109900 0x8>;
> > +	timeout-sec = <10>;
> >  };
> > diff --git a/drivers/watchdog/meson_wdt.c b/drivers/watchdog/meson_wdt.c
> > index 304274c67735..cd0275a6cdac 100644
> > --- a/drivers/watchdog/meson_wdt.c
> > +++ b/drivers/watchdog/meson_wdt.c
> > @@ -36,7 +36,7 @@
> >  #define MESON_SEC_TO_TC(s, c)	((s) * (c))
> >  
> >  static bool nowayout = WATCHDOG_NOWAYOUT;
> > -static unsigned int timeout = MESON_WDT_TIMEOUT;
> > +static unsigned int timeout;
> >  
> >  struct meson_wdt_data {
> >  	unsigned int enable;
> > -- 
> > 2.15.1
> > 

-- 
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com

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

* Re: [PATCH 6/7] watchdog: meson: allow setting timeout in devicetree
@ 2018-02-10  0:04         ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-10  0:04 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Marcus Folkesson, Wim Van Sebroeck, Rob Herring, Mark Rutland,
	Carlo Caione, Kevin Hilman, Matthias Brugger, Barry Song,
	Maxime Ripard, Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy,
	Sylvain Lemieux, Nicolas Ferre, linux-watchdog, devicetree,
	linux-arm-kernel, linux-amlogic, linux-kernel, linux-mediatek

On Sat, Feb 10, 2018 at 12:19:10AM +0100, Alexandre Belloni wrote:
> Hi Guenter,
> 
> On 09/02/2018 at 14:48:49 -0800, Guenter Roeck wrote:
> > On Fri, Feb 09, 2018 at 08:27:23PM +0100, Marcus Folkesson wrote:
> > > watchdog_init_timeout() will allways pick timeout_param since it
> > > defaults to a valid timeout.
> > > 
> > > By following best practice described in
> > > Documentation/watchdog/watchdog-kernel-api.txt, it also
> > > let us to set timout-sec property in devicetree.
> > > 
> > > Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> > 
> > Reviewed-by: Guenetr Roeck <linux@roeck-us.net>
>                   ^
> A small typo in your name
> 

Mr. Fat Fingers At Work :-)

Guenter

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

* Re: [PATCH 6/7] watchdog: meson: allow setting timeout in devicetree
@ 2018-02-10  0:04         ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-10  0:04 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Marcus Folkesson, Wim Van Sebroeck, Rob Herring, Mark Rutland,
	Carlo Caione, Kevin Hilman, Matthias Brugger, Barry Song,
	Maxime Ripard, Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy,
	Sylvain Lemieux, Nicolas Ferre,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Sat, Feb 10, 2018 at 12:19:10AM +0100, Alexandre Belloni wrote:
> Hi Guenter,
> 
> On 09/02/2018 at 14:48:49 -0800, Guenter Roeck wrote:
> > On Fri, Feb 09, 2018 at 08:27:23PM +0100, Marcus Folkesson wrote:
> > > watchdog_init_timeout() will allways pick timeout_param since it
> > > defaults to a valid timeout.
> > > 
> > > By following best practice described in
> > > Documentation/watchdog/watchdog-kernel-api.txt, it also
> > > let us to set timout-sec property in devicetree.
> > > 
> > > Signed-off-by: Marcus Folkesson <marcus.folkesson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > 
> > Reviewed-by: Guenetr Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
>                   ^
> A small typo in your name
> 

Mr. Fat Fingers At Work :-)

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

* [PATCH 6/7] watchdog: meson: allow setting timeout in devicetree
@ 2018-02-10  0:04         ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-10  0:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Feb 10, 2018 at 12:19:10AM +0100, Alexandre Belloni wrote:
> Hi Guenter,
> 
> On 09/02/2018 at 14:48:49 -0800, Guenter Roeck wrote:
> > On Fri, Feb 09, 2018 at 08:27:23PM +0100, Marcus Folkesson wrote:
> > > watchdog_init_timeout() will allways pick timeout_param since it
> > > defaults to a valid timeout.
> > > 
> > > By following best practice described in
> > > Documentation/watchdog/watchdog-kernel-api.txt, it also
> > > let us to set timout-sec property in devicetree.
> > > 
> > > Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> > 
> > Reviewed-by: Guenetr Roeck <linux@roeck-us.net>
>                   ^
> A small typo in your name
> 

Mr. Fat Fingers At Work :-)

Guenter

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

* [PATCH 6/7] watchdog: meson: allow setting timeout in devicetree
@ 2018-02-10  0:04         ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-10  0:04 UTC (permalink / raw)
  To: linus-amlogic

On Sat, Feb 10, 2018 at 12:19:10AM +0100, Alexandre Belloni wrote:
> Hi Guenter,
> 
> On 09/02/2018 at 14:48:49 -0800, Guenter Roeck wrote:
> > On Fri, Feb 09, 2018 at 08:27:23PM +0100, Marcus Folkesson wrote:
> > > watchdog_init_timeout() will allways pick timeout_param since it
> > > defaults to a valid timeout.
> > > 
> > > By following best practice described in
> > > Documentation/watchdog/watchdog-kernel-api.txt, it also
> > > let us to set timout-sec property in devicetree.
> > > 
> > > Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> > 
> > Reviewed-by: Guenetr Roeck <linux@roeck-us.net>
>                   ^
> A small typo in your name
> 

Mr. Fat Fingers At Work :-)

Guenter

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

* Re: [PATCH 7/7] watchdog: coh901327: make use of timeout-secs provided in devicetree
@ 2018-02-10  8:54       ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-10  8:54 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Wim Van Sebroeck, Rob Herring, Mark Rutland, Carlo Caione,
	Kevin Hilman, Matthias Brugger, Barry Song, Maxime Ripard,
	Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy, Sylvain Lemieux,
	Nicolas Ferre, Alexandre Belloni, linux-watchdog, devicetree,
	linux-arm-kernel, linux-amlogic, linux-kernel, linux-mediatek

[-- Attachment #1: Type: text/plain, Size: 1340 bytes --]

Hi,

On Fri, Feb 09, 2018 at 02:52:00PM -0800, Guenter Roeck wrote:
> On Fri, Feb 09, 2018 at 08:27:24PM +0100, Marcus Folkesson wrote:
> > watchdog_init_timeout() will allways pick timeout_param since it
> > defaults to a valid timeout.
> > 
> > Following best practice described in
> > Documentation/watchdog/watchdog-kernel-api.txt to make use of
> > the parameter logic.
> > 
> > Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> > ---
> >  drivers/watchdog/coh901327_wdt.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/watchdog/coh901327_wdt.c b/drivers/watchdog/coh901327_wdt.c
> > index 4410337f4f7f..437f865e5c6b 100644
> > --- a/drivers/watchdog/coh901327_wdt.c
> > +++ b/drivers/watchdog/coh901327_wdt.c
> > @@ -67,7 +67,7 @@
> >  #define U300_WDOG_IFR_WILL_BARK_IRQ_FORCE_ENABLE			0x0001U
> >  
> >  /* Default timeout in seconds = 1 minute */
> > -static unsigned int margin = 60;
> > +static unsigned int margin;
> >  static int irq;
> >  static void __iomem *virtbase;
> >  static struct device *parent;
> 
> I would suggest to initialize .timeout in 'static struct watchdog_device
> coh901327_wdt', and drop the error check when calling watchdog_init_timeout().

Will do, thank you.

> 
> Guenter


Best regards
Marcus Folkesson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 7/7] watchdog: coh901327: make use of timeout-secs provided in devicetree
@ 2018-02-10  8:54       ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-10  8:54 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Wim Van Sebroeck, Rob Herring, Mark Rutland, Carlo Caione,
	Kevin Hilman, Matthias Brugger, Barry Song, Maxime Ripard,
	Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy, Sylvain Lemieux,
	Nicolas Ferre, Alexandre Belloni,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

[-- Attachment #1: Type: text/plain, Size: 1370 bytes --]

Hi,

On Fri, Feb 09, 2018 at 02:52:00PM -0800, Guenter Roeck wrote:
> On Fri, Feb 09, 2018 at 08:27:24PM +0100, Marcus Folkesson wrote:
> > watchdog_init_timeout() will allways pick timeout_param since it
> > defaults to a valid timeout.
> > 
> > Following best practice described in
> > Documentation/watchdog/watchdog-kernel-api.txt to make use of
> > the parameter logic.
> > 
> > Signed-off-by: Marcus Folkesson <marcus.folkesson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > ---
> >  drivers/watchdog/coh901327_wdt.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/watchdog/coh901327_wdt.c b/drivers/watchdog/coh901327_wdt.c
> > index 4410337f4f7f..437f865e5c6b 100644
> > --- a/drivers/watchdog/coh901327_wdt.c
> > +++ b/drivers/watchdog/coh901327_wdt.c
> > @@ -67,7 +67,7 @@
> >  #define U300_WDOG_IFR_WILL_BARK_IRQ_FORCE_ENABLE			0x0001U
> >  
> >  /* Default timeout in seconds = 1 minute */
> > -static unsigned int margin = 60;
> > +static unsigned int margin;
> >  static int irq;
> >  static void __iomem *virtbase;
> >  static struct device *parent;
> 
> I would suggest to initialize .timeout in 'static struct watchdog_device
> coh901327_wdt', and drop the error check when calling watchdog_init_timeout().

Will do, thank you.

> 
> Guenter


Best regards
Marcus Folkesson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [PATCH 7/7] watchdog: coh901327: make use of timeout-secs provided in devicetree
@ 2018-02-10  8:54       ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-10  8:54 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Fri, Feb 09, 2018 at 02:52:00PM -0800, Guenter Roeck wrote:
> On Fri, Feb 09, 2018 at 08:27:24PM +0100, Marcus Folkesson wrote:
> > watchdog_init_timeout() will allways pick timeout_param since it
> > defaults to a valid timeout.
> > 
> > Following best practice described in
> > Documentation/watchdog/watchdog-kernel-api.txt to make use of
> > the parameter logic.
> > 
> > Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> > ---
> >  drivers/watchdog/coh901327_wdt.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/watchdog/coh901327_wdt.c b/drivers/watchdog/coh901327_wdt.c
> > index 4410337f4f7f..437f865e5c6b 100644
> > --- a/drivers/watchdog/coh901327_wdt.c
> > +++ b/drivers/watchdog/coh901327_wdt.c
> > @@ -67,7 +67,7 @@
> >  #define U300_WDOG_IFR_WILL_BARK_IRQ_FORCE_ENABLE			0x0001U
> >  
> >  /* Default timeout in seconds = 1 minute */
> > -static unsigned int margin = 60;
> > +static unsigned int margin;
> >  static int irq;
> >  static void __iomem *virtbase;
> >  static struct device *parent;
> 
> I would suggest to initialize .timeout in 'static struct watchdog_device
> coh901327_wdt', and drop the error check when calling watchdog_init_timeout().

Will do, thank you.

> 
> Guenter


Best regards
Marcus Folkesson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180210/13b40f3d/attachment.sig>

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

* [PATCH 7/7] watchdog: coh901327: make use of timeout-secs provided in devicetree
@ 2018-02-10  8:54       ` Marcus Folkesson
  0 siblings, 0 replies; 88+ messages in thread
From: Marcus Folkesson @ 2018-02-10  8:54 UTC (permalink / raw)
  To: linus-amlogic

Hi,

On Fri, Feb 09, 2018 at 02:52:00PM -0800, Guenter Roeck wrote:
> On Fri, Feb 09, 2018 at 08:27:24PM +0100, Marcus Folkesson wrote:
> > watchdog_init_timeout() will allways pick timeout_param since it
> > defaults to a valid timeout.
> > 
> > Following best practice described in
> > Documentation/watchdog/watchdog-kernel-api.txt to make use of
> > the parameter logic.
> > 
> > Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> > ---
> >  drivers/watchdog/coh901327_wdt.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/watchdog/coh901327_wdt.c b/drivers/watchdog/coh901327_wdt.c
> > index 4410337f4f7f..437f865e5c6b 100644
> > --- a/drivers/watchdog/coh901327_wdt.c
> > +++ b/drivers/watchdog/coh901327_wdt.c
> > @@ -67,7 +67,7 @@
> >  #define U300_WDOG_IFR_WILL_BARK_IRQ_FORCE_ENABLE			0x0001U
> >  
> >  /* Default timeout in seconds = 1 minute */
> > -static unsigned int margin = 60;
> > +static unsigned int margin;
> >  static int irq;
> >  static void __iomem *virtbase;
> >  static struct device *parent;
> 
> I would suggest to initialize .timeout in 'static struct watchdog_device
> coh901327_wdt', and drop the error check when calling watchdog_init_timeout().

Will do, thank you.

> 
> Guenter


Best regards
Marcus Folkesson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20180210/13b40f3d/attachment.sig>

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

* Re: [1/7] watchdog: sama5d4: make use of timeout-secs provided in devicetree
@ 2018-02-11 17:38     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-11 17:38 UTC (permalink / raw)
  To: Marcus Folkesson
  Cc: Wim Van Sebroeck, Rob Herring, Mark Rutland, Carlo Caione,
	Kevin Hilman, Matthias Brugger, Barry Song, Maxime Ripard,
	Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy, Sylvain Lemieux,
	Nicolas Ferre, Alexandre Belloni, linux-watchdog, devicetree,
	linux-arm-kernel, linux-amlogic, linux-kernel, linux-mediatek

On Fri, Feb 09, 2018 at 08:27:18PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> Following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt to make use of
> the parameter logic.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>

Unfortunately I'll have to withdraw the Reviewed-by:. wdt_timeout is used at
the end of the probe function to display the selected timeout. This will have
to be changed to display the actual timeout.

Guenter

> ---
>  drivers/watchdog/sama5d4_wdt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c
> index 0ae947c3d7bc..e6c679383734 100644
> --- a/drivers/watchdog/sama5d4_wdt.c
> +++ b/drivers/watchdog/sama5d4_wdt.c
> @@ -33,7 +33,7 @@ struct sama5d4_wdt {
>  	unsigned long		last_ping;
>  };
>  
> -static int wdt_timeout = WDT_DEFAULT_TIMEOUT;
> +static int wdt_timeout;
>  static bool nowayout = WATCHDOG_NOWAYOUT;
>  
>  module_param(wdt_timeout, int, 0);
> @@ -212,7 +212,7 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
>  		return -ENOMEM;
>  
>  	wdd = &wdt->wdd;
> -	wdd->timeout = wdt_timeout;
> +	wdd->timeout = WDT_DEFAULT_TIMEOUT;
>  	wdd->info = &sama5d4_wdt_info;
>  	wdd->ops = &sama5d4_wdt_ops;
>  	wdd->min_timeout = MIN_WDT_TIMEOUT;

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

* Re: [1/7] watchdog: sama5d4: make use of timeout-secs provided in devicetree
@ 2018-02-11 17:38     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-11 17:38 UTC (permalink / raw)
  To: Marcus Folkesson
  Cc: Wim Van Sebroeck, Rob Herring, Mark Rutland, Carlo Caione,
	Kevin Hilman, Matthias Brugger, Barry Song, Maxime Ripard,
	Chen-Yu Tsai, Linus Walleij, Vladimir Zapolskiy, Sylvain Lemieux,
	Nicolas Ferre, Alexandre Belloni,
	linux-watchdog-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Fri, Feb 09, 2018 at 08:27:18PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> Following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt to make use of
> the parameter logic.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Reviewed-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>

Unfortunately I'll have to withdraw the Reviewed-by:. wdt_timeout is used at
the end of the probe function to display the selected timeout. This will have
to be changed to display the actual timeout.

Guenter

> ---
>  drivers/watchdog/sama5d4_wdt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c
> index 0ae947c3d7bc..e6c679383734 100644
> --- a/drivers/watchdog/sama5d4_wdt.c
> +++ b/drivers/watchdog/sama5d4_wdt.c
> @@ -33,7 +33,7 @@ struct sama5d4_wdt {
>  	unsigned long		last_ping;
>  };
>  
> -static int wdt_timeout = WDT_DEFAULT_TIMEOUT;
> +static int wdt_timeout;
>  static bool nowayout = WATCHDOG_NOWAYOUT;
>  
>  module_param(wdt_timeout, int, 0);
> @@ -212,7 +212,7 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
>  		return -ENOMEM;
>  
>  	wdd = &wdt->wdd;
> -	wdd->timeout = wdt_timeout;
> +	wdd->timeout = WDT_DEFAULT_TIMEOUT;
>  	wdd->info = &sama5d4_wdt_info;
>  	wdd->ops = &sama5d4_wdt_ops;
>  	wdd->min_timeout = MIN_WDT_TIMEOUT;
--
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] 88+ messages in thread

* [1/7] watchdog: sama5d4: make use of timeout-secs provided in devicetree
@ 2018-02-11 17:38     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-11 17:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 09, 2018 at 08:27:18PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> Following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt to make use of
> the parameter logic.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>

Unfortunately I'll have to withdraw the Reviewed-by:. wdt_timeout is used at
the end of the probe function to display the selected timeout. This will have
to be changed to display the actual timeout.

Guenter

> ---
>  drivers/watchdog/sama5d4_wdt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c
> index 0ae947c3d7bc..e6c679383734 100644
> --- a/drivers/watchdog/sama5d4_wdt.c
> +++ b/drivers/watchdog/sama5d4_wdt.c
> @@ -33,7 +33,7 @@ struct sama5d4_wdt {
>  	unsigned long		last_ping;
>  };
>  
> -static int wdt_timeout = WDT_DEFAULT_TIMEOUT;
> +static int wdt_timeout;
>  static bool nowayout = WATCHDOG_NOWAYOUT;
>  
>  module_param(wdt_timeout, int, 0);
> @@ -212,7 +212,7 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
>  		return -ENOMEM;
>  
>  	wdd = &wdt->wdd;
> -	wdd->timeout = wdt_timeout;
> +	wdd->timeout = WDT_DEFAULT_TIMEOUT;
>  	wdd->info = &sama5d4_wdt_info;
>  	wdd->ops = &sama5d4_wdt_ops;
>  	wdd->min_timeout = MIN_WDT_TIMEOUT;

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

* [1/7] watchdog: sama5d4: make use of timeout-secs provided in devicetree
@ 2018-02-11 17:38     ` Guenter Roeck
  0 siblings, 0 replies; 88+ messages in thread
From: Guenter Roeck @ 2018-02-11 17:38 UTC (permalink / raw)
  To: linus-amlogic

On Fri, Feb 09, 2018 at 08:27:18PM +0100, Marcus Folkesson wrote:
> watchdog_init_timeout() will allways pick timeout_param since it
> defaults to a valid timeout.
> 
> Following best practice described in
> Documentation/watchdog/watchdog-kernel-api.txt to make use of
> the parameter logic.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>

Unfortunately I'll have to withdraw the Reviewed-by:. wdt_timeout is used at
the end of the probe function to display the selected timeout. This will have
to be changed to display the actual timeout.

Guenter

> ---
>  drivers/watchdog/sama5d4_wdt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c
> index 0ae947c3d7bc..e6c679383734 100644
> --- a/drivers/watchdog/sama5d4_wdt.c
> +++ b/drivers/watchdog/sama5d4_wdt.c
> @@ -33,7 +33,7 @@ struct sama5d4_wdt {
>  	unsigned long		last_ping;
>  };
>  
> -static int wdt_timeout = WDT_DEFAULT_TIMEOUT;
> +static int wdt_timeout;
>  static bool nowayout = WATCHDOG_NOWAYOUT;
>  
>  module_param(wdt_timeout, int, 0);
> @@ -212,7 +212,7 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
>  		return -ENOMEM;
>  
>  	wdd = &wdt->wdd;
> -	wdd->timeout = wdt_timeout;
> +	wdd->timeout = WDT_DEFAULT_TIMEOUT;
>  	wdd->info = &sama5d4_wdt_info;
>  	wdd->ops = &sama5d4_wdt_ops;
>  	wdd->min_timeout = MIN_WDT_TIMEOUT;

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

end of thread, other threads:[~2018-02-11 17:38 UTC | newest]

Thread overview: 88+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-09 19:27 [PATCH 0/7] watchdog: make use of timeout-secs Marcus Folkesson
2018-02-09 19:27 ` Marcus Folkesson
2018-02-09 19:27 ` Marcus Folkesson
2018-02-09 19:27 ` Marcus Folkesson
2018-02-09 19:27 ` [PATCH 1/7] watchdog: sama5d4: make use of timeout-secs provided in devicetree Marcus Folkesson
2018-02-09 19:27   ` Marcus Folkesson
2018-02-09 19:27   ` Marcus Folkesson
2018-02-09 19:32   ` Marcus Folkesson
2018-02-09 19:32     ` Marcus Folkesson
2018-02-09 19:32     ` Marcus Folkesson
2018-02-09 19:32     ` Marcus Folkesson
2018-02-09 22:38   ` Guenter Roeck
2018-02-09 22:38     ` Guenter Roeck
2018-02-09 22:38     ` Guenter Roeck
2018-02-09 22:38     ` Guenter Roeck
2018-02-11 17:38   ` [1/7] " Guenter Roeck
2018-02-11 17:38     ` Guenter Roeck
2018-02-11 17:38     ` Guenter Roeck
2018-02-11 17:38     ` Guenter Roeck
2018-02-09 19:27 ` [PATCH 2/7] watchdog: sunxi: allow setting timeout " Marcus Folkesson
2018-02-09 19:27   ` Marcus Folkesson
2018-02-09 19:27   ` Marcus Folkesson
2018-02-09 19:27   ` Marcus Folkesson
2018-02-09 22:39   ` Guenter Roeck
2018-02-09 22:39     ` Guenter Roeck
2018-02-09 22:39     ` Guenter Roeck
2018-02-09 22:39     ` Guenter Roeck
2018-02-09 19:27 ` [PATCH 3/7] watchdog: sirfsoc: " Marcus Folkesson
2018-02-09 19:27   ` Marcus Folkesson
2018-02-09 19:27   ` Marcus Folkesson
2018-02-09 19:27   ` Marcus Folkesson
2018-02-09 22:40   ` Guenter Roeck
2018-02-09 22:40     ` Guenter Roeck
2018-02-09 22:40     ` Guenter Roeck
2018-02-09 19:27 ` [PATCH 4/7] watchdog: pnx4008: make use of timeout-secs provided " Marcus Folkesson
2018-02-09 19:27   ` Marcus Folkesson
2018-02-09 19:27   ` Marcus Folkesson
2018-02-09 19:27   ` Marcus Folkesson
2018-02-09 22:41   ` Guenter Roeck
2018-02-09 22:41     ` Guenter Roeck
2018-02-09 22:41     ` Guenter Roeck
2018-02-09 22:41     ` Guenter Roeck
2018-02-09 22:43   ` Guenter Roeck
2018-02-09 22:43     ` Guenter Roeck
2018-02-09 22:43     ` Guenter Roeck
2018-02-09 22:43     ` Guenter Roeck
2018-02-09 19:27 ` [PATCH 5/7] watchdog: mtk: allow setting timeout " Marcus Folkesson
2018-02-09 19:27   ` Marcus Folkesson
2018-02-09 19:27   ` Marcus Folkesson
2018-02-09 19:27   ` Marcus Folkesson
2018-02-09 22:43   ` Guenter Roeck
2018-02-09 22:43     ` Guenter Roeck
2018-02-09 22:43     ` Guenter Roeck
2018-02-09 22:43     ` Guenter Roeck
2018-02-09 19:27 ` [PATCH 6/7] watchdog: meson: " Marcus Folkesson
2018-02-09 19:27   ` Marcus Folkesson
2018-02-09 19:27   ` Marcus Folkesson
2018-02-09 22:48   ` Guenter Roeck
2018-02-09 22:48     ` Guenter Roeck
2018-02-09 22:48     ` Guenter Roeck
2018-02-09 22:48     ` Guenter Roeck
2018-02-09 23:19     ` Alexandre Belloni
2018-02-09 23:19       ` Alexandre Belloni
2018-02-09 23:19       ` Alexandre Belloni
2018-02-10  0:04       ` Guenter Roeck
2018-02-10  0:04         ` Guenter Roeck
2018-02-10  0:04         ` Guenter Roeck
2018-02-10  0:04         ` Guenter Roeck
2018-02-09 19:27 ` [PATCH 7/7] watchdog: coh901327: make use of timeout-secs provided " Marcus Folkesson
2018-02-09 19:27   ` Marcus Folkesson
2018-02-09 19:27   ` Marcus Folkesson
2018-02-09 19:27   ` Marcus Folkesson
2018-02-09 22:52   ` Guenter Roeck
2018-02-09 22:52     ` Guenter Roeck
2018-02-09 22:52     ` Guenter Roeck
2018-02-09 22:52     ` Guenter Roeck
2018-02-10  8:54     ` Marcus Folkesson
2018-02-10  8:54       ` Marcus Folkesson
2018-02-10  8:54       ` Marcus Folkesson
2018-02-10  8:54       ` Marcus Folkesson
  -- strict thread matches above, loose matches on Subject: below --
2012-05-10 17:52 [PATCH] ARM: davinci: turn off DDR PHY when entering deep sleep Marcus Folkesson
2012-05-10 17:52 ` Marcus Folkesson
2012-05-21 17:38 ` Sekhar Nori
2012-05-21 17:38   ` Sekhar Nori
2012-05-24 11:46   ` Marcus Folkesson
2012-05-24 11:46     ` Marcus Folkesson
2012-05-24 17:41     ` Sekhar Nori
2012-05-24 17:41       ` Sekhar Nori

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.