ARM: meson: watchdog driver
Subsystems (4)
v3 cover ARM: meson: watchdog driver
This patchset adds support for the watchdog found on Amlogic MesonX SoCs. The watchdog is used also to reboot the device.
DTSI and multi_v7_defconfig are updated and proper documentation is added.
No documentation is provided by Amlogic, the code is reverse-engineered by the code available at http://openlinux.amlogic.com:8000/download/
This patchset depends on:
[1] [PATCH 0/6] ARM: meson: initial support for MesonX SoCs
[2] [PATCH 0/2] ARM: meson: add clocksource support
Changes since v2:
* changed compatible to "amlogic,meson6-wdt"
* removed useless code
* code refactored
Changes since v1:
* added restart handler support
[1] http://www.spinics.net/lists/arm-kernel/msg362521.html
[2] http://www.spinics.net/lists/arm-kernel/msg362483.html
Carlo Caione (4):
ARM: docs: add documentation binding for meson watchdog
ARM: meson: add watchdog driver
ARM: DTS: meson: update DTSI to add watchdog node
ARM: defconfig: update multi_v7_defconfig
.../devicetree/bindings/watchdog/meson6-wdt.txt | 13 ++ arch/arm/boot/dts/meson.dtsi | 5 + arch/arm/configs/multi_v7_defconfig | 1 + drivers/watchdog/Kconfig | 10 + drivers/watchdog/Makefile | 1 + drivers/watchdog/meson_wdt.c | 235 +++++++++++++++++++++ 6 files changed, 265 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/meson6-wdt.txt create mode 100644 drivers/watchdog/meson_wdt.c
Signature · 1 line
1.9.1
PATCH v3 1/4 ARM: docs: add documentation binding for meson watchdog
--- Documentation/devicetree/bindings/watchdog/meson6-wdt.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/meson6-wdt.txt
Documentation/devicetree/bindings/watchdog/meson6-wdt.txt new file +13 -0
@@ -0,0 +1,13 @@ +Meson SoCs Watchdog timer + +Required properties: + +- compatible : should be "amlogic,meson6-wdt" +- reg : Specifies base physical address and size of the registers. + +Example: + +wdt: watchdog at c1109900 { + compatible = "amlogic,meson6-wdt"; + reg = <0xc1109900 0x8>; +};
Signature · 1 line
1.9.1
Guenter Roeck
maintainerPATCH v3 1/4 ARM: docs: add documentation binding for meson watchdog
Quoted 12 lines · Carlo Caione
Signed-off-by Carlo Caione <[email protected]>--- Documentation/devicetree/bindings/watchdog/meson6-wdt.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+)create mode 100644
Documentation/devicetree/bindings/watchdog/meson6-wdt.txtDocumentation/devicetree/bindings/watchdog/meson6-wdt.txt new file +0
-0
Documentation/devicetree/bindings/watchdog/meson6-wdt.txt line 7
Quoted 7 lines
Documentation/devicetree/bindings/watchdog/meson6-wdt.txt new file +7
-0@@ -0,0 +1,13 @@ +Meson SoCs Watchdog timer + +Required properties: + +- compatible : should be "amlogic,meson6-wdt" +- reg : Specifies base physical address and size of the registers. +
The 'amlogic' vendor prefix is undefined.
It will have to be added to Documentation/devicetree/bindings/vendor-prefixes.txt.
Guenter
PATCH v3 1/4 ARM: docs: add documentation binding for meson watchdog
Quoted 21 lines · Guenter Roeck
Quoted 20 lines · Carlo Caione
Signed-off-by Carlo Caione <[email protected]>--- Documentation/devicetree/bindings/watchdog/meson6-wdt.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+)create mode 100644
Documentation/devicetree/bindings/watchdog/meson6-wdt.txtDocumentation/devicetree/bindings/watchdog/meson6-wdt.txt new file +4
-0@@ -0,0 +1,13 @@ +Meson SoCs Watchdog timer + +Required properties: +
Quoted 8 lines
Documentation/devicetree/bindings/watchdog/meson6-wdt.txt line 7
Quoted 3 lines
Documentation/devicetree/bindings/watchdog/meson6-wdt.txt new file +3
-0+- compatible : should be "amlogic,meson6-wdt" +- reg : Specifies base physical address and size of the registers. +The 'amlogic' vendor prefix is undefined.
It will have to be added toDocumentation/devicetree/bindings/vendor-prefixes.txt.
As stated in the cover, this patchset depends on
http://www.spinics.net/lists/arm-kernel/msg362521.html where the vendor-prefixes.txt is updated.
Probably I should ping it.
Signature · 1 line
Carlo Caione
Guenter Roeck
maintainerPATCH v3 1/4 ARM: docs: add documentation binding for meson watchdog
Quoted 31 lines · Carlo Caione
Quoted 21 lines · Guenter Roeck
Quoted 20 lines · Carlo Caione
Signed-off-by Carlo Caione <[email protected]>--- Documentation/devicetree/bindings/watchdog/meson6-wdt.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+)create mode 100644
Documentation/devicetree/bindings/watchdog/meson6-wdt.txtDocumentation/devicetree/bindings/watchdog/meson6-wdt.txt new file +4
-0@@ -0,0 +1,13 @@ +Meson SoCs Watchdog timer + +Required properties: +Quoted 8 lines
Documentation/devicetree/bindings/watchdog/meson6-wdt.txt line 7
Quoted 3 lines
Documentation/devicetree/bindings/watchdog/meson6-wdt.txt new file +3
-0+- compatible : should be "amlogic,meson6-wdt" +- reg : Specifies base physical address and size of the registers. +The 'amlogic' vendor prefix is undefined.
It will have to be added toDocumentation/devicetree/bindings/vendor-prefixes.txt.
Quoted 5 lines
As stated in the cover, this patchset depends on
http://www.spinics.net/lists/arm-kernel/msg362521.html where the vendor-prefixes.txt is updated.
Probably I should ping it.
Ah, sorry, I missed that.
Thanks,
Guenter
PATCH v3 2/4 ARM: meson: add watchdog driver
In reply to Carlo CaioneThis patch adds the watchdog driver for the Amlogic Meson SoCs used also to reboot the device.
--- drivers/watchdog/Kconfig | 10 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/meson_wdt.c | 235 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 246 insertions(+) create mode 100644 drivers/watchdog/meson_wdt.c
drivers/watchdog/Kconfig +10 -0
@@ -443,6 +443,16 @@ config TEGRA_WATCHDOG To compile this driver as a module, choose M here: the module will be called tegra_wdt. +config MESON_WATCHDOG + tristate "Amlogic Meson SoCs watchdog support" + depends on ARCH_MESON + select WATCHDOG_CORE + help + Say Y here to include support for the watchdog timer + in Amlogic Meson SoCs. + To compile this driver as a module, choose M here: the + module will be called meson_wdt. + # AVR32 Architecture config AT32AP700X_WDT
drivers/watchdog/Makefile +1 -0
@@ -59,6 +59,7 @@ obj-$(CONFIG_MOXART_WDT) += moxart_wdt.o obj-$(CONFIG_SIRFSOC_WATCHDOG) += sirfsoc_wdt.o obj-$(CONFIG_BCM_KONA_WDT) += bcm_kona_wdt.o obj-$(CONFIG_TEGRA_WATCHDOG) += tegra_wdt.o +obj-$(CONFIG_MESON_WATCHDOG) += meson_wdt.o # AVR32 Architecture obj-$(CONFIG_AT32AP700X_WDT) += at32ap700x_wdt.o
drivers/watchdog/meson_wdt.c new file +235 -0
235 lines not on this page · raw message
Signature · 1 line
1.9.1
Guenter Roeck
maintainerPATCH v3 2/4 ARM: meson: add watchdog driver
Quoted 5 lines · Carlo Caione
This patch adds the watchdog driver for the Amlogic Meson SoCs used also to reboot the device.
Signed-off-by Carlo Caione <[email protected]>---
[ ... ]
drivers/watchdog/meson_wdt.c line 232
Quoted 4 lines
drivers/watchdog/meson_wdt.c new file +4
-0+module_param (nowayout, bool,0 ); +MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started " + "(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); +
Checkpatch says:
WARNING: quoted string split across lines
#295: FILE: drivers/watchdog/meson_wdt.c:231:
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started "
+ "(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
Please fix.
Thanks,
Guenter
PATCH v3 2/4 ARM: meson: add watchdog driver
Quoted 20 lines · Guenter Roeck
Quoted 6 lines · Carlo Caione
This patch adds the watchdog driver for the Amlogic Meson SoCs used also to reboot the device.
Signed-off-by Carlo Caione <[email protected]>---
[ ... ]
drivers/watchdog/meson_wdt.c line 232
Quoted 5 lines
drivers/watchdog/meson_wdt.c new file +4
-0+module_param (nowayout, bool,0 ); +MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started " + "(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); +Checkpatch says:
WARNING: quoted string split across lines
#295: FILE:drivers/watchdog/meson_wdt.c:231:
drivers/watchdog/meson_wdt.c line 231
Quoted 2 lines
drivers/watchdog/meson_wdt.c new file +2
-0+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started " + "(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
Thought that it was "somehow tolerated" :)
But since I'm wrong I'll submit a v4.
Thanks,
Signature · 1 line
Carlo Caione
Guenter Roeck
maintainerPATCH v3 2/4 ARM: meson: add watchdog driver
Quoted 19 lines · Carlo Caione
Quoted 18 lines · Guenter Roeck
Quoted 6 lines · Carlo Caione
This patch adds the watchdog driver for the Amlogic Meson SoCs used also to reboot the device.
Signed-off-by Carlo Caione <[email protected]>---
[ ... ]
drivers/watchdog/meson_wdt.c line 232
Quoted 5 lines
drivers/watchdog/meson_wdt.c new file +4
-0+module_param (nowayout, bool,0 ); +MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started " + "(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); +Checkpatch says:
Quoted 6 lines
drivers/watchdog/meson_wdt.c line 231
Quoted 4 lines
WARNING: quoted string split across lines
#295: FILE:drivers/watchdog/meson_wdt.c:231:drivers/watchdog/meson_wdt.c new file +2
-0+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started " + "(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");Thought that it was "somehow tolerated" :)
Not me, at least not in this case.
Quoted 2 lines
But since I'm wrong I'll submit a v4.
MODULE_PARAM_DESC(nowayout,
"Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
is a really simple way of ensuring that you meet both the 80-column limit and avoid the warning. The idea should not be to try to get away with as many checkpatch warnings as possible ;-).
Guenter
PATCH v3 3/4 ARM: DTS: meson: update DTSI to add watchdog node
In reply to Carlo Caione--- arch/arm/boot/dts/meson.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/boot/dts/meson.dtsi +5 -0
@@ -70,6 +70,11 @@ #size-cells = <1>; ranges; + wdt: watchdog at c1109900 { + compatible = "amlogic,meson6-wdt"; + reg = <0xc1109900 0x8>; + }; + uart_AO: serial at c81004c0 { compatible = "amlogic,meson-uart"; reg = <0xc81004c0 0x14>;
Signature · 1 line
1.9.1
PATCH v3 4/4 ARM: defconfig: update multi_v7_defconfig
In reply to Carlo CaioneUpdate the multi_v7_defconfig enabling the watchdog driver for Meson SoCs.
--- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/configs/multi_v7_defconfig +1 -0
@@ -242,6 +242,7 @@ CONFIG_ST_THERMAL_MEMMAP=y CONFIG_WATCHDOG=y CONFIG_ORION_WATCHDOG=y CONFIG_SUNXI_WATCHDOG=y +CONFIG_MESON_WATCHDOG=y CONFIG_MFD_AS3722=y CONFIG_MFD_BCM590XX=y CONFIG_MFD_CROS_EC=y
Signature · 1 line
1.9.1
Guenter Roeck
maintainerv3 cover ARM: meson: watchdog driver
In reply to Carlo CaioneQuoted 36 lines · Carlo Caione
This patchset adds support for the watchdog found on Amlogic MesonX SoCs. The watchdog is used also to reboot the device.
DTSI and
multi_v7_defconfigare updated and proper documentation is added.No documentation is provided by Amlogic, the code is reverse-engineered by the code available at http://openlinux.amlogic.com:8000/download/
This patchset depends on:
[1] [PATCH 0/6] ARM: meson: initial support for MesonX SoCs
[2] [PATCH 0/2] ARM: meson: add clocksource supportChanges since v2:
* changed compatible to "amlogic,meson6-wdt"
* removed useless code
* code refactoredChanges since v1:
* added restart handler support[1] http://www.spinics.net/lists/arm-kernel/msg362521.html
[2] http://www.spinics.net/lists/arm-kernel/msg362483.htmlCarlo Caione (4):
ARM: docs: add documentation binding for meson watchdog
ARM: meson: add watchdog driver
ARM: DTS: meson: update DTSI to add watchdog node
ARM: defconfig: updatemulti_v7_defconfig.../devicetree/bindings/watchdog/meson6-wdt.txt | 13 ++ arch/arm/boot/dts/meson.dtsi | 5 + arch/arm/configs/multi_v7_defconfig | 1 + drivers/watchdog/Kconfig | 10 + drivers/watchdog/Makefile | 1 + drivers/watchdog/meson_wdt.c | 235 +++++++++++++++++++++ 6 files changed, 265 insertions(+)
Quoted 3 lines
create mode 100644
Documentation/devicetree/bindings/watchdog/meson6-wdt.txtcreate mode 100644drivers/watchdog/meson_wdt.c
For the series: