2017-09-08 18:36:15

by Mathieu Malaterre

[permalink] [raw]
Subject: [PATCH 1/3] MIPS: Ci20: Enable watchdog driver

Update the Ci20's defconfig to enable the JZ4740's watchdog driver.

Signed-off-by: Mathieu Malaterre <[email protected]>
---
arch/mips/configs/ci20_defconfig | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/mips/configs/ci20_defconfig b/arch/mips/configs/ci20_defconfig
index b42cfa7865f9..459b21e6278d 100644
--- a/arch/mips/configs/ci20_defconfig
+++ b/arch/mips/configs/ci20_defconfig
@@ -92,6 +92,8 @@ CONFIG_I2C=y
CONFIG_I2C_JZ4780=y
CONFIG_GPIO_SYSFS=y
# CONFIG_HWMON is not set
+CONFIG_WATCHDOG=y
+CONFIG_JZ4740_WDT=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_DEBUG=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
--
2.11.0


2017-09-08 18:36:21

by Mathieu Malaterre

[permalink] [raw]
Subject: [PATCH 2/3] watchdog: jz4780: Allow selection of jz4740-wdt driver

This driver works for jz4740 & jz4780

Suggested-by: Maarten ter Huurne <[email protected]>
Signed-off-by: Mathieu Malaterre <[email protected]>
---
drivers/watchdog/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index c722cbfdc7e6..ca200d1f310a 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -1460,7 +1460,7 @@ config INDYDOG

config JZ4740_WDT
tristate "Ingenic jz4740 SoC hardware watchdog"
- depends on MACH_JZ4740
+ depends on MACH_JZ4740 || MACH_JZ4780
select WATCHDOG_CORE
help
Hardware driver for the built-in watchdog timer on Ingenic jz4740 SoCs.
--
2.11.0

2017-09-08 18:36:46

by Mathieu Malaterre

[permalink] [raw]
Subject: [PATCH 3/3] MIPS: jz4780: DTS: Probe the jz4740-watchdog driver from devicetree

The jz4740-watchdog driver supports both jz4740 & jz4780.

Signed-off-by: Mathieu Malaterre <[email protected]>
---
arch/mips/boot/dts/ingenic/jz4780.dtsi | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi b/arch/mips/boot/dts/ingenic/jz4780.dtsi
index 4853ef67b3ab..33d7f49186d6 100644
--- a/arch/mips/boot/dts/ingenic/jz4780.dtsi
+++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi
@@ -207,6 +207,11 @@
status = "disabled";
};

+ watchdog: jz4780-watchdog@10002000 {
+ compatible = "ingenic,jz4740-watchdog";
+ reg = <0x10002000 0x100>;
+ };
+
nemc: nemc@13410000 {
compatible = "ingenic,jz4780-nemc";
reg = <0x13410000 0x10000>;
--
2.11.0

2017-09-09 01:32:39

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH 2/3] watchdog: jz4780: Allow selection of jz4740-wdt driver

On 09/08/2017 11:35 AM, Mathieu Malaterre wrote:
> This driver works for jz4740 & jz4780
>
> Suggested-by: Maarten ter Huurne <[email protected]>
> Signed-off-by: Mathieu Malaterre <[email protected]>

Reviewed-by: Guenter Roeck <[email protected]>

> ---
> drivers/watchdog/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index c722cbfdc7e6..ca200d1f310a 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -1460,7 +1460,7 @@ config INDYDOG
>
> config JZ4740_WDT
> tristate "Ingenic jz4740 SoC hardware watchdog"
> - depends on MACH_JZ4740
> + depends on MACH_JZ4740 || MACH_JZ4780
> select WATCHDOG_CORE
> help
> Hardware driver for the built-in watchdog timer on Ingenic jz4740 SoCs.
>

2017-09-15 19:18:07

by Mathieu Malaterre

[permalink] [raw]
Subject: [PATCH v2 1/5] MIPS: Ci20: Enable watchdog driver

Update the Ci20's defconfig to enable the JZ4740's watchdog driver.

Signed-off-by: Mathieu Malaterre <[email protected]>
---
Changes in v2:
* none

arch/mips/configs/ci20_defconfig | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/mips/configs/ci20_defconfig b/arch/mips/configs/ci20_defconfig
index 19a8ebd1d374..ed8d3d2f63cf 100644
--- a/arch/mips/configs/ci20_defconfig
+++ b/arch/mips/configs/ci20_defconfig
@@ -100,6 +100,8 @@ CONFIG_I2C_JZ4780=y
CONFIG_GPIO_SYSFS=y
CONFIG_GPIO_INGENIC=y
# CONFIG_HWMON is not set
+CONFIG_WATCHDOG=y
+CONFIG_JZ4740_WDT=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_DEBUG=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
--
2.11.0

2017-09-15 19:18:27

by Mathieu Malaterre

[permalink] [raw]
Subject: [PATCH v2 2/5] watchdog: jz4780: Allow selection of jz4740-wdt driver

This driver works for jz4740 & jz4780

Suggested-by: Maarten ter Huurne <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Signed-off-by: Mathieu Malaterre <[email protected]>
---
Changes in v2:
* none

drivers/watchdog/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index c722cbfdc7e6..ca200d1f310a 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -1460,7 +1460,7 @@ config INDYDOG

config JZ4740_WDT
tristate "Ingenic jz4740 SoC hardware watchdog"
- depends on MACH_JZ4740
+ depends on MACH_JZ4740 || MACH_JZ4780
select WATCHDOG_CORE
help
Hardware driver for the built-in watchdog timer on Ingenic jz4740 SoCs.
--
2.11.0

2017-09-15 19:18:55

by Mathieu Malaterre

[permalink] [raw]
Subject: [PATCH v2 3/5] MIPS: jz4780: DTS: Probe the jz4740-watchdog driver from devicetree

The jz4740-watchdog driver supports both jz4740 & jz4780.

Signed-off-by: Mathieu Malaterre <[email protected]>
---
Changes in v2:
* make the node name generic (Paul Cercueil)

arch/mips/boot/dts/ingenic/jz4780.dtsi | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi b/arch/mips/boot/dts/ingenic/jz4780.dtsi
index 20e37d2d6008..76055bbc823a 100644
--- a/arch/mips/boot/dts/ingenic/jz4780.dtsi
+++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi
@@ -263,6 +263,11 @@
status = "disabled";
};

+ watchdog: watchdog@10002000 {
+ compatible = "ingenic,jz4780-watchdog";
+ reg = <0x10002000 0x100>;
+ };
+
nemc: nemc@13410000 {
compatible = "ingenic,jz4780-nemc";
reg = <0x13410000 0x10000>;
--
2.11.0

Subject: Re: [PATCH v2 3/5] MIPS: jz4780: DTS: Probe the jz4740-watchdog driver from devicetree

Hi Mathieu,

On 16 September 2017 at 00:48, Mathieu Malaterre <[email protected]> wrote:
> The jz4740-watchdog driver supports both jz4740 & jz4780.
>
> Signed-off-by: Mathieu Malaterre <[email protected]>
> ---
> Changes in v2:
> * make the node name generic (Paul Cercueil)
>
> arch/mips/boot/dts/ingenic/jz4780.dtsi | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi b/arch/mips/boot/dts/ingenic/jz4780.dtsi
> index 20e37d2d6008..76055bbc823a 100644
> --- a/arch/mips/boot/dts/ingenic/jz4780.dtsi
> +++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi
> @@ -263,6 +263,11 @@
> status = "disabled";
> };
>
> + watchdog: watchdog@10002000 {
> + compatible = "ingenic,jz4780-watchdog";

In drivers/watchdog/jz4740_wdt.c the compatible is declared as
"ingenic,jz4740-watchdog" while your change says
"ingenic,jz4780-watchdog". Can you modify that?

> + reg = <0x10002000 0x100>;
> + };
> +

The structures jz4740_wdt_device and jz4740_wdt_resources can be
removed form arch/mips/jz4740/platform.c as watchdog is declared in
device tree. For JZ4740 platform watchdog is not used so the variables
can be removed.

Do you mind adding watchdog entry to JZ4740 device tree? Currently
watchdog is not enabled for JZ4740 platform.

> nemc: nemc@13410000 {
> compatible = "ingenic,jz4780-nemc";
> reg = <0x13410000 0x10000>;
> --
> 2.11.0
>

Regards,
PrasannaKumar

2017-09-26 13:26:49

by Mathieu Malaterre

[permalink] [raw]
Subject: Re: [PATCH v2 3/5] MIPS: jz4780: DTS: Probe the jz4740-watchdog driver from devicetree

Hi PrasannaKumar !

On Tue, Sep 26, 2017 at 3:17 PM, PrasannaKumar Muralidharan
<[email protected]> wrote:
> Hi Mathieu,
>
> On 16 September 2017 at 00:48, Mathieu Malaterre <[email protected]> wrote:
>> The jz4740-watchdog driver supports both jz4740 & jz4780.
>>
>> Signed-off-by: Mathieu Malaterre <[email protected]>
>> ---
>> Changes in v2:
>> * make the node name generic (Paul Cercueil)
>>
>> arch/mips/boot/dts/ingenic/jz4780.dtsi | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi b/arch/mips/boot/dts/ingenic/jz4780.dtsi
>> index 20e37d2d6008..76055bbc823a 100644
>> --- a/arch/mips/boot/dts/ingenic/jz4780.dtsi
>> +++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi
>> @@ -263,6 +263,11 @@
>> status = "disabled";
>> };
>>
>> + watchdog: watchdog@10002000 {
>> + compatible = "ingenic,jz4780-watchdog";
>
> In drivers/watchdog/jz4740_wdt.c the compatible is declared as
> "ingenic,jz4740-watchdog" while your change says
> "ingenic,jz4780-watchdog". Can you modify that?

Well in the full changeset, you'll find: [PATCH v2 4/5] watchdog:
jz4740: Add support for the watchdog in jz4780 SoC

https://lkml.org/lkml/2017/9/15/451

There has been some misunderstanding. I still believe I need a new
compatible string, even if currently the code is 100% identical.

>> + reg = <0x10002000 0x100>;
>> + };
>> +
>
> The structures jz4740_wdt_device and jz4740_wdt_resources can be
> removed form arch/mips/jz4740/platform.c as watchdog is declared in
> device tree. For JZ4740 platform watchdog is not used so the variables
> can be removed.
>
> Do you mind adding watchdog entry to JZ4740 device tree? Currently
> watchdog is not enabled for JZ4740 platform.


Will do once this series has been accepted. Thanks for the review !

>> nemc: nemc@13410000 {
>> compatible = "ingenic,jz4780-nemc";
>> reg = <0x13410000 0x10000>;
>> --
>> 2.11.0
>>
>
> Regards,
> PrasannaKumar

Subject: Re: [PATCH v2 3/5] MIPS: jz4780: DTS: Probe the jz4740-watchdog driver from devicetree

On 26 September 2017 at 18:56, Mathieu Malaterre <[email protected]> wrote:
> Hi PrasannaKumar !
>
> On Tue, Sep 26, 2017 at 3:17 PM, PrasannaKumar Muralidharan
> <[email protected]> wrote:
>> Hi Mathieu,
>>
>> On 16 September 2017 at 00:48, Mathieu Malaterre <[email protected]> wrote:
>>> The jz4740-watchdog driver supports both jz4740 & jz4780.
>>>
>>> Signed-off-by: Mathieu Malaterre <[email protected]>
>>> ---
>>> Changes in v2:
>>> * make the node name generic (Paul Cercueil)
>>>
>>> arch/mips/boot/dts/ingenic/jz4780.dtsi | 5 +++++
>>> 1 file changed, 5 insertions(+)
>>>
>>> diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi b/arch/mips/boot/dts/ingenic/jz4780.dtsi
>>> index 20e37d2d6008..76055bbc823a 100644
>>> --- a/arch/mips/boot/dts/ingenic/jz4780.dtsi
>>> +++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi
>>> @@ -263,6 +263,11 @@
>>> status = "disabled";
>>> };
>>>
>>> + watchdog: watchdog@10002000 {
>>> + compatible = "ingenic,jz4780-watchdog";
>>
>> In drivers/watchdog/jz4740_wdt.c the compatible is declared as
>> "ingenic,jz4740-watchdog" while your change says
>> "ingenic,jz4780-watchdog". Can you modify that?
>
> Well in the full changeset, you'll find: [PATCH v2 4/5] watchdog:
> jz4740: Add support for the watchdog in jz4780 SoC
>
> https://lkml.org/lkml/2017/9/15/451
>
> There has been some misunderstanding. I still believe I need a new
> compatible string, even if currently the code is 100% identical.

I missed that. Ignore this comment.

>
>>> + reg = <0x10002000 0x100>;
>>> + };
>>> +
>>
>> The structures jz4740_wdt_device and jz4740_wdt_resources can be
>> removed form arch/mips/jz4740/platform.c as watchdog is declared in
>> device tree. For JZ4740 platform watchdog is not used so the variables
>> can be removed.
>>
>> Do you mind adding watchdog entry to JZ4740 device tree? Currently
>> watchdog is not enabled for JZ4740 platform.
>
>
> Will do once this series has been accepted. Thanks for the review !

Reviewed-by: PrasannaKumar Muralidharan <[email protected]>

>
>>> nemc: nemc@13410000 {
>>> compatible = "ingenic,jz4780-nemc";
>>> reg = <0x13410000 0x10000>;
>>> --
>>> 2.11.0
>>>
>>
>> Regards,
>> PrasannaKumar

2017-11-09 16:58:01

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH 2/3] watchdog: jz4780: Allow selection of jz4740-wdt driver

On Thu, Nov 09, 2017 at 04:43:43PM +0000, James Hogan wrote:
> On Thu, Nov 09, 2017 at 08:01:47AM -0800, Guenter Roeck wrote:
> > On Thu, Nov 09, 2017 at 07:47:19AM +0000, James Hogan wrote:
> > > Hi Wim,
> > >
> > > On Fri, Sep 08, 2017 at 08:35:54PM +0200, Mathieu Malaterre wrote:
> > > > This driver works for jz4740 & jz4780
> > > >
> > > > Suggested-by: Maarten ter Huurne <[email protected]>
> > > > Signed-off-by: Mathieu Malaterre <[email protected]>
> > >
> > > I just noticed that though Ralf applied the other two patches in this
> > > series (defconfig + dt), he hadn't applied this patch.
> > >
> > > Please can we have an ack from a watchdog maintainer so this can get
> > > into 4.15 via the MIPS tree? It could alternatively go via the watchdog
> > > tree if you prefer.
> > >
> >
> > FWIW, according to my logs I did send out a Reviewed-by: some time ago,
> > which normally means that I expect it to go through the watchdog tree.
> > I wasn't aware that you wanted the patch to go through the mips tree.
> > Sorry if I missed that earlier. For the record,
> >
> > Acked-by: Guenter Roeck <[email protected]>
> >
> > since I don't care one way or another.
>
> Okay thanks, I wasn't sure and don't much mind which way it goes.
>
> >
> > I assume you want me to drop this and the related patches from my own
> > watchdpog-next tree to prevent it from showing up in Wim's tree (if
> > it isn't already there). Is that correct ?
>
> I haven't seen this patch in linux-next, or I wouldn't have mentioned
> it. If its already in some staging tree for 4.15 that I've missed then
> it may as well stay there, otherwise I'll just take it through the MIPS
> tree with your ack.
>
Looks like none of the patches I reviewed since the last release cycle
made it into watchdog-next, meaning they might all miss the next release.
Guess Wim is busy. Nothing I can do there.

Guenter

From 1583607689098939619@xxx Thu Nov 09 16:46:20 +0000 2017
X-GM-THRID: 1577997630712813651
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread

2017-11-09 16:46:20

by James Hogan

[permalink] [raw]
Subject: Re: [PATCH 2/3] watchdog: jz4780: Allow selection of jz4740-wdt driver

On Thu, Nov 09, 2017 at 08:01:47AM -0800, Guenter Roeck wrote:
> On Thu, Nov 09, 2017 at 07:47:19AM +0000, James Hogan wrote:
> > Hi Wim,
> >
> > On Fri, Sep 08, 2017 at 08:35:54PM +0200, Mathieu Malaterre wrote:
> > > This driver works for jz4740 & jz4780
> > >
> > > Suggested-by: Maarten ter Huurne <[email protected]>
> > > Signed-off-by: Mathieu Malaterre <[email protected]>
> >
> > I just noticed that though Ralf applied the other two patches in this
> > series (defconfig + dt), he hadn't applied this patch.
> >
> > Please can we have an ack from a watchdog maintainer so this can get
> > into 4.15 via the MIPS tree? It could alternatively go via the watchdog
> > tree if you prefer.
> >
>
> FWIW, according to my logs I did send out a Reviewed-by: some time ago,
> which normally means that I expect it to go through the watchdog tree.
> I wasn't aware that you wanted the patch to go through the mips tree.
> Sorry if I missed that earlier. For the record,
>
> Acked-by: Guenter Roeck <[email protected]>
>
> since I don't care one way or another.

Okay thanks, I wasn't sure and don't much mind which way it goes.

>
> I assume you want me to drop this and the related patches from my own
> watchdpog-next tree to prevent it from showing up in Wim's tree (if
> it isn't already there). Is that correct ?

I haven't seen this patch in linux-next, or I wouldn't have mentioned
it. If its already in some staging tree for 4.15 that I've missed then
it may as well stay there, otherwise I'll just take it through the MIPS
tree with your ack.

Cheers
James


Attachments:
(No filename) (1.58 kB)
signature.asc (849.00 B)
Digital signature
Download all attachments

2017-11-09 16:04:27

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH 2/3] watchdog: jz4780: Allow selection of jz4740-wdt driver

On Thu, Nov 09, 2017 at 07:47:19AM +0000, James Hogan wrote:
> Hi Wim,
>
> On Fri, Sep 08, 2017 at 08:35:54PM +0200, Mathieu Malaterre wrote:
> > This driver works for jz4740 & jz4780
> >
> > Suggested-by: Maarten ter Huurne <[email protected]>
> > Signed-off-by: Mathieu Malaterre <[email protected]>
>
> I just noticed that though Ralf applied the other two patches in this
> series (defconfig + dt), he hadn't applied this patch.
>
> Please can we have an ack from a watchdog maintainer so this can get
> into 4.15 via the MIPS tree? It could alternatively go via the watchdog
> tree if you prefer.
>

FWIW, according to my logs I did send out a Reviewed-by: some time ago,
which normally means that I expect it to go through the watchdog tree.
I wasn't aware that you wanted the patch to go through the mips tree.
Sorry if I missed that earlier. For the record,

Acked-by: Guenter Roeck <[email protected]>

since I don't care one way or another.

I assume you want me to drop this and the related patches from my own
watchdpog-next tree to prevent it from showing up in Wim's tree (if
it isn't already there). Is that correct ?

Guenter

> Thanks
> James
>
> > ---
> > drivers/watchdog/Kconfig | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> > index c722cbfdc7e6..ca200d1f310a 100644
> > --- a/drivers/watchdog/Kconfig
> > +++ b/drivers/watchdog/Kconfig
> > @@ -1460,7 +1460,7 @@ config INDYDOG
> >
> > config JZ4740_WDT
> > tristate "Ingenic jz4740 SoC hardware watchdog"
> > - depends on MACH_JZ4740
> > + depends on MACH_JZ4740 || MACH_JZ4780
> > select WATCHDOG_CORE
> > help
> > Hardware driver for the built-in watchdog timer on Ingenic jz4740 SoCs.
> > --
> > 2.11.0
> >
> >



From 1583573909300135184@xxx Thu Nov 09 07:49:25 +0000 2017
X-GM-THRID: 1577997630712813651
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread

2017-11-09 07:49:25

by James Hogan

[permalink] [raw]
Subject: Re: [PATCH 2/3] watchdog: jz4780: Allow selection of jz4740-wdt driver

Hi Wim,

On Fri, Sep 08, 2017 at 08:35:54PM +0200, Mathieu Malaterre wrote:
> This driver works for jz4740 & jz4780
>
> Suggested-by: Maarten ter Huurne <[email protected]>
> Signed-off-by: Mathieu Malaterre <[email protected]>

I just noticed that though Ralf applied the other two patches in this
series (defconfig + dt), he hadn't applied this patch.

Please can we have an ack from a watchdog maintainer so this can get
into 4.15 via the MIPS tree? It could alternatively go via the watchdog
tree if you prefer.

Thanks
James

> ---
> drivers/watchdog/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index c722cbfdc7e6..ca200d1f310a 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -1460,7 +1460,7 @@ config INDYDOG
>
> config JZ4740_WDT
> tristate "Ingenic jz4740 SoC hardware watchdog"
> - depends on MACH_JZ4740
> + depends on MACH_JZ4740 || MACH_JZ4780
> select WATCHDOG_CORE
> help
> Hardware driver for the built-in watchdog timer on Ingenic jz4740 SoCs.
> --
> 2.11.0
>
>


Attachments:
(No filename) (1.13 kB)
signature.asc (849.00 B)
Digital signature
Download all attachments