* [PATCH v3 0/4] ARM: meson: watchdog driver
@ 2014-09-19 20:36 Carlo Caione
2014-09-19 20:36 ` [PATCH v3 1/4] ARM: docs: add documentation binding for meson watchdog Carlo Caione
` (4 more replies)
0 siblings, 5 replies; 12+ messages in thread
From: Carlo Caione @ 2014-09-19 20:36 UTC (permalink / raw)
To: linux-arm-kernel
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
--
1.9.1
^ permalink raw reply [flat|nested] 12+ messages in thread* [PATCH v3 1/4] ARM: docs: add documentation binding for meson watchdog 2014-09-19 20:36 [PATCH v3 0/4] ARM: meson: watchdog driver Carlo Caione @ 2014-09-19 20:36 ` Carlo Caione 2014-09-20 15:28 ` Guenter Roeck 2014-09-19 20:36 ` [PATCH v3 2/4] ARM: meson: add watchdog driver Carlo Caione ` (3 subsequent siblings) 4 siblings, 1 reply; 12+ messages in thread From: Carlo Caione @ 2014-09-19 20:36 UTC (permalink / raw) To: linux-arm-kernel Signed-off-by: Carlo Caione <carlo@caione.org> --- Documentation/devicetree/bindings/watchdog/meson6-wdt.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/meson6-wdt.txt diff --git a/Documentation/devicetree/bindings/watchdog/meson6-wdt.txt b/Documentation/devicetree/bindings/watchdog/meson6-wdt.txt new file mode 100644 index 0000000..9200fc2 --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/meson6-wdt.txt @@ -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>; +}; -- 1.9.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 1/4] ARM: docs: add documentation binding for meson watchdog 2014-09-19 20:36 ` [PATCH v3 1/4] ARM: docs: add documentation binding for meson watchdog Carlo Caione @ 2014-09-20 15:28 ` Guenter Roeck 2014-09-20 16:08 ` Carlo Caione 0 siblings, 1 reply; 12+ messages in thread From: Guenter Roeck @ 2014-09-20 15:28 UTC (permalink / raw) To: linux-arm-kernel On 09/19/2014 01:36 PM, Carlo Caione wrote: > Signed-off-by: Carlo Caione <carlo@caione.org> > --- > Documentation/devicetree/bindings/watchdog/meson6-wdt.txt | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > create mode 100644 Documentation/devicetree/bindings/watchdog/meson6-wdt.txt > > diff --git a/Documentation/devicetree/bindings/watchdog/meson6-wdt.txt b/Documentation/devicetree/bindings/watchdog/meson6-wdt.txt > new file mode 100644 > index 0000000..9200fc2 > --- /dev/null > +++ b/Documentation/devicetree/bindings/watchdog/meson6-wdt.txt > @@ -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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 1/4] ARM: docs: add documentation binding for meson watchdog 2014-09-20 15:28 ` Guenter Roeck @ 2014-09-20 16:08 ` Carlo Caione 2014-09-20 16:10 ` Guenter Roeck 0 siblings, 1 reply; 12+ messages in thread From: Carlo Caione @ 2014-09-20 16:08 UTC (permalink / raw) To: linux-arm-kernel On Sat, Sep 20, 2014 at 5:28 PM, Guenter Roeck <linux@roeck-us.net> wrote: > On 09/19/2014 01:36 PM, Carlo Caione wrote: >> >> Signed-off-by: Carlo Caione <carlo@caione.org> >> --- >> Documentation/devicetree/bindings/watchdog/meson6-wdt.txt | 13 >> +++++++++++++ >> 1 file changed, 13 insertions(+) >> create mode 100644 >> Documentation/devicetree/bindings/watchdog/meson6-wdt.txt >> >> diff --git a/Documentation/devicetree/bindings/watchdog/meson6-wdt.txt >> b/Documentation/devicetree/bindings/watchdog/meson6-wdt.txt >> new file mode 100644 >> index 0000000..9200fc2 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/watchdog/meson6-wdt.txt >> @@ -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. 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. -- Carlo Caione ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 1/4] ARM: docs: add documentation binding for meson watchdog 2014-09-20 16:08 ` Carlo Caione @ 2014-09-20 16:10 ` Guenter Roeck 0 siblings, 0 replies; 12+ messages in thread From: Guenter Roeck @ 2014-09-20 16:10 UTC (permalink / raw) To: linux-arm-kernel On 09/20/2014 09:08 AM, Carlo Caione wrote: > On Sat, Sep 20, 2014 at 5:28 PM, Guenter Roeck <linux@roeck-us.net> wrote: >> On 09/19/2014 01:36 PM, Carlo Caione wrote: >>> >>> Signed-off-by: Carlo Caione <carlo@caione.org> >>> --- >>> Documentation/devicetree/bindings/watchdog/meson6-wdt.txt | 13 >>> +++++++++++++ >>> 1 file changed, 13 insertions(+) >>> create mode 100644 >>> Documentation/devicetree/bindings/watchdog/meson6-wdt.txt >>> >>> diff --git a/Documentation/devicetree/bindings/watchdog/meson6-wdt.txt >>> b/Documentation/devicetree/bindings/watchdog/meson6-wdt.txt >>> new file mode 100644 >>> index 0000000..9200fc2 >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/watchdog/meson6-wdt.txt >>> @@ -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. > > 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 2/4] ARM: meson: add watchdog driver 2014-09-19 20:36 [PATCH v3 0/4] ARM: meson: watchdog driver Carlo Caione 2014-09-19 20:36 ` [PATCH v3 1/4] ARM: docs: add documentation binding for meson watchdog Carlo Caione @ 2014-09-19 20:36 ` Carlo Caione 2014-09-20 15:30 ` Guenter Roeck 2014-09-19 20:36 ` [PATCH v3 3/4] ARM: DTS: meson: update DTSI to add watchdog node Carlo Caione ` (2 subsequent siblings) 4 siblings, 1 reply; 12+ messages in thread From: Carlo Caione @ 2014-09-19 20:36 UTC (permalink / raw) To: linux-arm-kernel This patch adds the watchdog driver for the Amlogic Meson SoCs used also to reboot the device. Signed-off-by: Carlo Caione <carlo@caione.org> --- 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 diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index f57312f..836cb00 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -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 diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile index 468c320..e7a9259 100644 --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile @@ -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 diff --git a/drivers/watchdog/meson_wdt.c b/drivers/watchdog/meson_wdt.c new file mode 100644 index 0000000..db16017 --- /dev/null +++ b/drivers/watchdog/meson_wdt.c @@ -0,0 +1,235 @@ +/* + * Meson Watchdog Driver + * + * Copyright (c) 2014 Carlo Caione + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#include <linux/clk.h> +#include <linux/delay.h> +#include <linux/err.h> +#include <linux/init.h> +#include <linux/io.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/moduleparam.h> +#include <linux/notifier.h> +#include <linux/of.h> +#include <linux/platform_device.h> +#include <linux/reboot.h> +#include <linux/types.h> +#include <linux/watchdog.h> + +#define DRV_NAME "meson_wdt" + +#define MESON_WDT_TC 0x00 +#define MESON_WDT_TC_EN BIT(22) +#define MESON_WDT_TC_TM_MASK 0x3fffff +#define MESON_WDT_DC_RESET (3 << 24) + +#define MESON_WDT_RESET 0x04 + +#define MESON_WDT_TIMEOUT 30 +#define MESON_WDT_MIN_TIMEOUT 1 +#define MESON_WDT_MAX_TIMEOUT (MESON_WDT_TC_TM_MASK / 100000) + +#define MESON_SEC_TO_TC(s) ((s) * 100000) + +static bool nowayout = WATCHDOG_NOWAYOUT; +static unsigned int timeout = MESON_WDT_TIMEOUT; + +struct meson_wdt_dev { + struct watchdog_device wdt_dev; + void __iomem *wdt_base; + struct notifier_block restart_handler; +}; + +static int meson_restart_handle(struct notifier_block *this, unsigned long mode, + void *cmd) +{ + u32 tc_reboot = MESON_WDT_DC_RESET | MESON_WDT_TC_EN | 100; + struct meson_wdt_dev *meson_wdt = container_of(this, + struct meson_wdt_dev, + restart_handler); + + while (1) { + writel(tc_reboot, meson_wdt->wdt_base + MESON_WDT_TC); + mdelay(5); + } + + return NOTIFY_DONE; +} + +static int meson_wdt_ping(struct watchdog_device *wdt_dev) +{ + struct meson_wdt_dev *meson_wdt = watchdog_get_drvdata(wdt_dev); + + writel(0, meson_wdt->wdt_base + MESON_WDT_RESET); + + return 0; +} + +static void meson_wdt_change_timeout(struct watchdog_device *wdt_dev, + unsigned int timeout) +{ + struct meson_wdt_dev *meson_wdt = watchdog_get_drvdata(wdt_dev); + u32 reg; + + reg = readl(meson_wdt->wdt_base + MESON_WDT_TC); + reg &= ~MESON_WDT_TC_TM_MASK; + reg |= MESON_SEC_TO_TC(timeout); + writel(reg, meson_wdt->wdt_base + MESON_WDT_TC); +} + +static int meson_wdt_set_timeout(struct watchdog_device *wdt_dev, + unsigned int timeout) +{ + wdt_dev->timeout = timeout; + + meson_wdt_change_timeout(wdt_dev, timeout); + meson_wdt_ping(wdt_dev); + + return 0; +} + +static int meson_wdt_stop(struct watchdog_device *wdt_dev) +{ + struct meson_wdt_dev *meson_wdt = watchdog_get_drvdata(wdt_dev); + u32 reg; + + reg = readl(meson_wdt->wdt_base + MESON_WDT_TC); + reg &= ~MESON_WDT_TC_EN; + writel(reg, meson_wdt->wdt_base + MESON_WDT_TC); + + return 0; +} + +static int meson_wdt_start(struct watchdog_device *wdt_dev) +{ + struct meson_wdt_dev *meson_wdt = watchdog_get_drvdata(wdt_dev); + u32 reg; + + meson_wdt_change_timeout(wdt_dev, meson_wdt->wdt_dev.timeout); + meson_wdt_ping(wdt_dev); + + reg = readl(meson_wdt->wdt_base + MESON_WDT_TC); + reg |= MESON_WDT_TC_EN; + writel(reg, meson_wdt->wdt_base + MESON_WDT_TC); + + return 0; +} + +static const struct watchdog_info meson_wdt_info = { + .identity = DRV_NAME, + .options = WDIOF_SETTIMEOUT | + WDIOF_KEEPALIVEPING | + WDIOF_MAGICCLOSE, +}; + +static const struct watchdog_ops meson_wdt_ops = { + .owner = THIS_MODULE, + .start = meson_wdt_start, + .stop = meson_wdt_stop, + .ping = meson_wdt_ping, + .set_timeout = meson_wdt_set_timeout, +}; + +static int meson_wdt_probe(struct platform_device *pdev) +{ + struct resource *res; + struct meson_wdt_dev *meson_wdt; + int err; + + meson_wdt = devm_kzalloc(&pdev->dev, sizeof(*meson_wdt), GFP_KERNEL); + if (!meson_wdt) + return -ENOMEM; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + meson_wdt->wdt_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(meson_wdt->wdt_base)) + return PTR_ERR(meson_wdt->wdt_base); + + meson_wdt->wdt_dev.parent = &pdev->dev; + meson_wdt->wdt_dev.info = &meson_wdt_info; + meson_wdt->wdt_dev.ops = &meson_wdt_ops; + meson_wdt->wdt_dev.timeout = MESON_WDT_TIMEOUT; + meson_wdt->wdt_dev.max_timeout = MESON_WDT_MAX_TIMEOUT; + meson_wdt->wdt_dev.min_timeout = MESON_WDT_MIN_TIMEOUT; + + watchdog_set_drvdata(&meson_wdt->wdt_dev, meson_wdt); + + watchdog_init_timeout(&meson_wdt->wdt_dev, timeout, &pdev->dev); + watchdog_set_nowayout(&meson_wdt->wdt_dev, nowayout); + + meson_wdt_stop(&meson_wdt->wdt_dev); + + err = watchdog_register_device(&meson_wdt->wdt_dev); + if (err) + return err; + + platform_set_drvdata(pdev, meson_wdt); + + meson_wdt->restart_handler.notifier_call = meson_restart_handle; + meson_wdt->restart_handler.priority = 128; + err = register_restart_handler(&meson_wdt->restart_handler); + if (err) + dev_err(&pdev->dev, + "cannot register restart handler (err=%d)\n", err); + + dev_info(&pdev->dev, "Watchdog enabled (timeout=%d sec, nowayout=%d)", + meson_wdt->wdt_dev.timeout, nowayout); + + return 0; +} + +static int meson_wdt_remove(struct platform_device *pdev) +{ + struct meson_wdt_dev *meson_wdt = platform_get_drvdata(pdev); + + unregister_restart_handler(&meson_wdt->restart_handler); + + watchdog_unregister_device(&meson_wdt->wdt_dev); + + return 0; +} + +static void meson_wdt_shutdown(struct platform_device *pdev) +{ + struct meson_wdt_dev *meson_wdt = platform_get_drvdata(pdev); + + meson_wdt_stop(&meson_wdt->wdt_dev); +} + +static const struct of_device_id meson_wdt_dt_ids[] = { + { .compatible = "amlogic,meson6-wdt" }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, meson_wdt_dt_ids); + +static struct platform_driver meson_wdt_driver = { + .probe = meson_wdt_probe, + .remove = meson_wdt_remove, + .shutdown = meson_wdt_shutdown, + .driver = { + .owner = THIS_MODULE, + .name = DRV_NAME, + .of_match_table = meson_wdt_dt_ids, + }, +}; + +module_platform_driver(meson_wdt_driver); + +module_param(timeout, uint, 0); +MODULE_PARM_DESC(timeout, "Watchdog heartbeat in seconds"); + +module_param(nowayout, bool, 0); +MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started " + "(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Carlo Caione <carlo@caione.org>"); +MODULE_DESCRIPTION("Meson Watchdog Timer Driver"); -- 1.9.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 2/4] ARM: meson: add watchdog driver 2014-09-19 20:36 ` [PATCH v3 2/4] ARM: meson: add watchdog driver Carlo Caione @ 2014-09-20 15:30 ` Guenter Roeck 2014-09-20 16:15 ` Carlo Caione 0 siblings, 1 reply; 12+ messages in thread From: Guenter Roeck @ 2014-09-20 15:30 UTC (permalink / raw) To: linux-arm-kernel On 09/19/2014 01:36 PM, Carlo Caione wrote: > This patch adds the watchdog driver for the Amlogic Meson SoCs used also > to reboot the device. > > Signed-off-by: Carlo Caione <carlo@caione.org> > --- [ ... ] > +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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 2/4] ARM: meson: add watchdog driver 2014-09-20 15:30 ` Guenter Roeck @ 2014-09-20 16:15 ` Carlo Caione 2014-09-20 16:29 ` Guenter Roeck 0 siblings, 1 reply; 12+ messages in thread From: Carlo Caione @ 2014-09-20 16:15 UTC (permalink / raw) To: linux-arm-kernel On Sat, Sep 20, 2014 at 5:30 PM, Guenter Roeck <linux@roeck-us.net> wrote: > On 09/19/2014 01:36 PM, Carlo Caione wrote: >> >> This patch adds the watchdog driver for the Amlogic Meson SoCs used also >> to reboot the device. >> >> Signed-off-by: Carlo Caione <carlo@caione.org> >> --- > > [ ... ] >> >> +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) ")"); Thought that it was "somehow tolerated" :) But since I'm wrong I'll submit a v4. Thanks, -- Carlo Caione ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 2/4] ARM: meson: add watchdog driver 2014-09-20 16:15 ` Carlo Caione @ 2014-09-20 16:29 ` Guenter Roeck 0 siblings, 0 replies; 12+ messages in thread From: Guenter Roeck @ 2014-09-20 16:29 UTC (permalink / raw) To: linux-arm-kernel On 09/20/2014 09:15 AM, Carlo Caione wrote: > On Sat, Sep 20, 2014 at 5:30 PM, Guenter Roeck <linux@roeck-us.net> wrote: >> On 09/19/2014 01:36 PM, Carlo Caione wrote: >>> >>> This patch adds the watchdog driver for the Amlogic Meson SoCs used also >>> to reboot the device. >>> >>> Signed-off-by: Carlo Caione <carlo@caione.org> >>> --- >> >> [ ... ] >>> >>> +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) ")"); > > Thought that it was "somehow tolerated" :) Not me, at least not in this case. > 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 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 3/4] ARM: DTS: meson: update DTSI to add watchdog node 2014-09-19 20:36 [PATCH v3 0/4] ARM: meson: watchdog driver Carlo Caione 2014-09-19 20:36 ` [PATCH v3 1/4] ARM: docs: add documentation binding for meson watchdog Carlo Caione 2014-09-19 20:36 ` [PATCH v3 2/4] ARM: meson: add watchdog driver Carlo Caione @ 2014-09-19 20:36 ` Carlo Caione 2014-09-19 20:36 ` [PATCH v3 4/4] ARM: defconfig: update multi_v7_defconfig Carlo Caione 2014-09-20 2:50 ` [PATCH v3 0/4] ARM: meson: watchdog driver Guenter Roeck 4 siblings, 0 replies; 12+ messages in thread From: Carlo Caione @ 2014-09-19 20:36 UTC (permalink / raw) To: linux-arm-kernel Signed-off-by: Carlo Caione <carlo@caione.org> --- arch/arm/boot/dts/meson.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/meson.dtsi b/arch/arm/boot/dts/meson.dtsi index 55feb14..e6539ea 100644 --- a/arch/arm/boot/dts/meson.dtsi +++ b/arch/arm/boot/dts/meson.dtsi @@ -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>; -- 1.9.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 4/4] ARM: defconfig: update multi_v7_defconfig 2014-09-19 20:36 [PATCH v3 0/4] ARM: meson: watchdog driver Carlo Caione ` (2 preceding siblings ...) 2014-09-19 20:36 ` [PATCH v3 3/4] ARM: DTS: meson: update DTSI to add watchdog node Carlo Caione @ 2014-09-19 20:36 ` Carlo Caione 2014-09-20 2:50 ` [PATCH v3 0/4] ARM: meson: watchdog driver Guenter Roeck 4 siblings, 0 replies; 12+ messages in thread From: Carlo Caione @ 2014-09-19 20:36 UTC (permalink / raw) To: linux-arm-kernel Update the multi_v7_defconfig enabling the watchdog driver for Meson SoCs. Signed-off-by: Carlo Caione <carlo@caione.org> --- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 5b44796..560e6a9 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -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 -- 1.9.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 0/4] ARM: meson: watchdog driver 2014-09-19 20:36 [PATCH v3 0/4] ARM: meson: watchdog driver Carlo Caione ` (3 preceding siblings ...) 2014-09-19 20:36 ` [PATCH v3 4/4] ARM: defconfig: update multi_v7_defconfig Carlo Caione @ 2014-09-20 2:50 ` Guenter Roeck 4 siblings, 0 replies; 12+ messages in thread From: Guenter Roeck @ 2014-09-20 2:50 UTC (permalink / raw) To: linux-arm-kernel On 09/19/2014 01:36 PM, Carlo Caione wrote: > 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 > For the series: Reviewed-by: Guenter Roeck <linux@roeck-us.net> ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2014-09-20 16:29 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-09-19 20:36 [PATCH v3 0/4] ARM: meson: watchdog driver Carlo Caione 2014-09-19 20:36 ` [PATCH v3 1/4] ARM: docs: add documentation binding for meson watchdog Carlo Caione 2014-09-20 15:28 ` Guenter Roeck 2014-09-20 16:08 ` Carlo Caione 2014-09-20 16:10 ` Guenter Roeck 2014-09-19 20:36 ` [PATCH v3 2/4] ARM: meson: add watchdog driver Carlo Caione 2014-09-20 15:30 ` Guenter Roeck 2014-09-20 16:15 ` Carlo Caione 2014-09-20 16:29 ` Guenter Roeck 2014-09-19 20:36 ` [PATCH v3 3/4] ARM: DTS: meson: update DTSI to add watchdog node Carlo Caione 2014-09-19 20:36 ` [PATCH v3 4/4] ARM: defconfig: update multi_v7_defconfig Carlo Caione 2014-09-20 2:50 ` [PATCH v3 0/4] ARM: meson: watchdog driver Guenter Roeck
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).