From: Andrew Lunn <andrew@lunn.ch>
To: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>, Wim Van Sebroeck <wim@iguana.be>,
linux-watchdog@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Nicolas Ferre <nicolas.ferre@atmel.com>,
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>,
Andrew Victor <linux@maxim.org.za>,
Jason Cooper <jason@lakedaemon.net>,
devicetree-discuss@lists.ozlabs.org
Subject: Re: [PATCH v6 3/5] watchdog: at91sam9_wdt: add device tree support
Date: Mon, 1 Oct 2012 14:56:43 +0200 [thread overview]
Message-ID: <20121001125643.GF11837@lunn.ch> (raw)
In-Reply-To: <CAHkwnC_u+bMX7REU5G3u=cm3VGmOUn+AShruw+ERkPJWtZpxUg@mail.gmail.com>
On Mon, Oct 01, 2012 at 02:48:01PM +0200, Fabio Porcedda wrote:
> On Mon, Oct 1, 2012 at 2:45 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> > On Mon, Oct 01, 2012 at 02:24:39PM +0200, Fabio Porcedda wrote:
> >> Tested on an at91sam9260 board (evk-pro3)
> >>
> >> Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
> >> ---
> >> .../devicetree/bindings/watchdog/atmel-wdt.txt | 19 +++++++++++++++++++
> >> drivers/watchdog/at91sam9_wdt.c | 21 +++++++++++++++++++++
> >> 2 files changed, 40 insertions(+)
> >> create mode 100644 Documentation/devicetree/bindings/watchdog/atmel-wdt.txt
> >>
> >> diff --git a/Documentation/devicetree/bindings/watchdog/atmel-wdt.txt b/Documentation/devicetree/bindings/watchdog/atmel-wdt.txt
> >> new file mode 100644
> >> index 0000000..65c1755
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/watchdog/atmel-wdt.txt
> >> @@ -0,0 +1,19 @@
> >> +* Atmel Watchdog Timers
> >> +
> >> +** at91sam9-wdt
> >> +
> >> +Required properties:
> >> +- compatible: must be "atmel,at91sam9260-wdt".
> >> +- reg: physical base address of the controller and length of memory mapped
> >> + region.
> >> +
> >> +Optional properties:
> >> +- timeout: contains the watchdog timeout in seconds.
> >> +
> >> +Example:
> >> +
> >> + watchdog@fffffd40 {
> >> + compatible = "atmel,at91sam9260-wdt";
> >> + reg = <0xfffffd40 0x10>;
> >> + timeout = <10>;
> >> + };
> >> diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
> >> index 05e1be8..c9e6bfa 100644
> >> --- a/drivers/watchdog/at91sam9_wdt.c
> >> +++ b/drivers/watchdog/at91sam9_wdt.c
> >> @@ -32,6 +32,7 @@
> >> #include <linux/timer.h>
> >> #include <linux/bitops.h>
> >> #include <linux/uaccess.h>
> >> +#include <linux/of.h>
> >>
> >> #include "at91sam9_wdt.h"
> >>
> >> @@ -254,6 +255,14 @@ static struct miscdevice at91wdt_miscdev = {
> >> .fops = &at91wdt_fops,
> >> };
> >>
> >> +static inline void __init at91wdt_probe_dt(struct device_node *node)
> >> +{
> >> + if (!node)
> >> + return;
> >> +
> >> + of_property_read_u32(node, "timeout", &heartbeat);
> >> +}
> >> +
> >
> > In patch #1 you add a function to do this, and then you don't make use
> > of it here ?
> >
> > Or am i missing something?
>
> I'm using it on the patch #2 for the orion_wdt driver.
> Do you think it's better to join the #1 and the #2 patch?
It makes little sense doing this here, because you are going to have
to clean this up sometime very soon and use the helper, unless there
is a very good reason not to use the helper.
Andrew
WARNING: multiple messages have this Message-ID (diff)
From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 3/5] watchdog: at91sam9_wdt: add device tree support
Date: Mon, 1 Oct 2012 14:56:43 +0200 [thread overview]
Message-ID: <20121001125643.GF11837@lunn.ch> (raw)
In-Reply-To: <CAHkwnC_u+bMX7REU5G3u=cm3VGmOUn+AShruw+ERkPJWtZpxUg@mail.gmail.com>
On Mon, Oct 01, 2012 at 02:48:01PM +0200, Fabio Porcedda wrote:
> On Mon, Oct 1, 2012 at 2:45 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> > On Mon, Oct 01, 2012 at 02:24:39PM +0200, Fabio Porcedda wrote:
> >> Tested on an at91sam9260 board (evk-pro3)
> >>
> >> Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
> >> ---
> >> .../devicetree/bindings/watchdog/atmel-wdt.txt | 19 +++++++++++++++++++
> >> drivers/watchdog/at91sam9_wdt.c | 21 +++++++++++++++++++++
> >> 2 files changed, 40 insertions(+)
> >> create mode 100644 Documentation/devicetree/bindings/watchdog/atmel-wdt.txt
> >>
> >> diff --git a/Documentation/devicetree/bindings/watchdog/atmel-wdt.txt b/Documentation/devicetree/bindings/watchdog/atmel-wdt.txt
> >> new file mode 100644
> >> index 0000000..65c1755
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/watchdog/atmel-wdt.txt
> >> @@ -0,0 +1,19 @@
> >> +* Atmel Watchdog Timers
> >> +
> >> +** at91sam9-wdt
> >> +
> >> +Required properties:
> >> +- compatible: must be "atmel,at91sam9260-wdt".
> >> +- reg: physical base address of the controller and length of memory mapped
> >> + region.
> >> +
> >> +Optional properties:
> >> +- timeout: contains the watchdog timeout in seconds.
> >> +
> >> +Example:
> >> +
> >> + watchdog at fffffd40 {
> >> + compatible = "atmel,at91sam9260-wdt";
> >> + reg = <0xfffffd40 0x10>;
> >> + timeout = <10>;
> >> + };
> >> diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
> >> index 05e1be8..c9e6bfa 100644
> >> --- a/drivers/watchdog/at91sam9_wdt.c
> >> +++ b/drivers/watchdog/at91sam9_wdt.c
> >> @@ -32,6 +32,7 @@
> >> #include <linux/timer.h>
> >> #include <linux/bitops.h>
> >> #include <linux/uaccess.h>
> >> +#include <linux/of.h>
> >>
> >> #include "at91sam9_wdt.h"
> >>
> >> @@ -254,6 +255,14 @@ static struct miscdevice at91wdt_miscdev = {
> >> .fops = &at91wdt_fops,
> >> };
> >>
> >> +static inline void __init at91wdt_probe_dt(struct device_node *node)
> >> +{
> >> + if (!node)
> >> + return;
> >> +
> >> + of_property_read_u32(node, "timeout", &heartbeat);
> >> +}
> >> +
> >
> > In patch #1 you add a function to do this, and then you don't make use
> > of it here ?
> >
> > Or am i missing something?
>
> I'm using it on the patch #2 for the orion_wdt driver.
> Do you think it's better to join the #1 and the #2 patch?
It makes little sense doing this here, because you are going to have
to clean this up sometime very soon and use the helper, unless there
is a very good reason not to use the helper.
Andrew
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
To: Fabio Porcedda <fabio.porcedda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>,
linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
Wim Van Sebroeck <wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org>,
Andrew Victor <linux-PelNFVqkFnVyf+4FbqDuWQ@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>
Subject: Re: [PATCH v6 3/5] watchdog: at91sam9_wdt: add device tree support
Date: Mon, 1 Oct 2012 14:56:43 +0200 [thread overview]
Message-ID: <20121001125643.GF11837@lunn.ch> (raw)
In-Reply-To: <CAHkwnC_u+bMX7REU5G3u=cm3VGmOUn+AShruw+ERkPJWtZpxUg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Mon, Oct 01, 2012 at 02:48:01PM +0200, Fabio Porcedda wrote:
> On Mon, Oct 1, 2012 at 2:45 PM, Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org> wrote:
> > On Mon, Oct 01, 2012 at 02:24:39PM +0200, Fabio Porcedda wrote:
> >> Tested on an at91sam9260 board (evk-pro3)
> >>
> >> Signed-off-by: Fabio Porcedda <fabio.porcedda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >> ---
> >> .../devicetree/bindings/watchdog/atmel-wdt.txt | 19 +++++++++++++++++++
> >> drivers/watchdog/at91sam9_wdt.c | 21 +++++++++++++++++++++
> >> 2 files changed, 40 insertions(+)
> >> create mode 100644 Documentation/devicetree/bindings/watchdog/atmel-wdt.txt
> >>
> >> diff --git a/Documentation/devicetree/bindings/watchdog/atmel-wdt.txt b/Documentation/devicetree/bindings/watchdog/atmel-wdt.txt
> >> new file mode 100644
> >> index 0000000..65c1755
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/watchdog/atmel-wdt.txt
> >> @@ -0,0 +1,19 @@
> >> +* Atmel Watchdog Timers
> >> +
> >> +** at91sam9-wdt
> >> +
> >> +Required properties:
> >> +- compatible: must be "atmel,at91sam9260-wdt".
> >> +- reg: physical base address of the controller and length of memory mapped
> >> + region.
> >> +
> >> +Optional properties:
> >> +- timeout: contains the watchdog timeout in seconds.
> >> +
> >> +Example:
> >> +
> >> + watchdog@fffffd40 {
> >> + compatible = "atmel,at91sam9260-wdt";
> >> + reg = <0xfffffd40 0x10>;
> >> + timeout = <10>;
> >> + };
> >> diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
> >> index 05e1be8..c9e6bfa 100644
> >> --- a/drivers/watchdog/at91sam9_wdt.c
> >> +++ b/drivers/watchdog/at91sam9_wdt.c
> >> @@ -32,6 +32,7 @@
> >> #include <linux/timer.h>
> >> #include <linux/bitops.h>
> >> #include <linux/uaccess.h>
> >> +#include <linux/of.h>
> >>
> >> #include "at91sam9_wdt.h"
> >>
> >> @@ -254,6 +255,14 @@ static struct miscdevice at91wdt_miscdev = {
> >> .fops = &at91wdt_fops,
> >> };
> >>
> >> +static inline void __init at91wdt_probe_dt(struct device_node *node)
> >> +{
> >> + if (!node)
> >> + return;
> >> +
> >> + of_property_read_u32(node, "timeout", &heartbeat);
> >> +}
> >> +
> >
> > In patch #1 you add a function to do this, and then you don't make use
> > of it here ?
> >
> > Or am i missing something?
>
> I'm using it on the patch #2 for the orion_wdt driver.
> Do you think it's better to join the #1 and the #2 patch?
It makes little sense doing this here, because you are going to have
to clean this up sometime very soon and use the helper, unless there
is a very good reason not to use the helper.
Andrew
next prev parent reply other threads:[~2012-10-01 12:56 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-01 12:24 [PATCH v6 0/5] watchdog: orion_wdt & at91sam9_wdt: improve dt support Fabio Porcedda
2012-10-01 12:24 ` Fabio Porcedda
2012-10-01 12:24 ` Fabio Porcedda
2012-10-01 12:24 ` [PATCH v6 1/5] watchdog: core: dt: add support for the timeout device tree property Fabio Porcedda
2012-10-01 12:24 ` Fabio Porcedda
2012-10-01 12:24 ` Fabio Porcedda
2012-10-01 12:24 ` [PATCH v6 2/5] watchdog: orion_wdt: dt: add the timeout property binding Fabio Porcedda
2012-10-01 12:24 ` Fabio Porcedda
2012-10-01 12:24 ` Fabio Porcedda
2012-10-01 12:24 ` [PATCH v6 3/5] watchdog: at91sam9_wdt: add device tree support Fabio Porcedda
2012-10-01 12:24 ` Fabio Porcedda
2012-10-01 12:24 ` Fabio Porcedda
2012-10-01 12:45 ` Andrew Lunn
2012-10-01 12:45 ` Andrew Lunn
2012-10-01 12:45 ` Andrew Lunn
2012-10-01 12:48 ` Fabio Porcedda
2012-10-01 12:48 ` Fabio Porcedda
2012-10-01 12:48 ` Fabio Porcedda
2012-10-01 12:54 ` Fabio Porcedda
2012-10-01 12:54 ` Fabio Porcedda
2012-10-01 12:54 ` Fabio Porcedda
2012-10-01 13:06 ` Andrew Lunn
2012-10-01 13:06 ` Andrew Lunn
2012-10-01 13:06 ` Andrew Lunn
2012-10-02 15:04 ` Fabio Porcedda
2012-10-02 15:04 ` Fabio Porcedda
2012-10-02 15:04 ` Fabio Porcedda
2012-10-02 19:00 ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-02 19:00 ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-02 19:00 ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-03 16:32 ` Fabio Porcedda
2012-10-03 16:32 ` Fabio Porcedda
2012-10-03 16:32 ` Fabio Porcedda
2012-10-03 17:47 ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-03 17:47 ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-03 17:47 ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-02 19:59 ` Andrew Lunn
2012-10-02 19:59 ` Andrew Lunn
2012-10-02 19:59 ` Andrew Lunn
2012-10-03 16:32 ` Fabio Porcedda
2012-10-03 16:32 ` Fabio Porcedda
2012-10-03 16:32 ` Fabio Porcedda
2012-10-01 12:56 ` Andrew Lunn [this message]
2012-10-01 12:56 ` Andrew Lunn
2012-10-01 12:56 ` Andrew Lunn
2012-10-01 12:24 ` [PATCH v6 4/5] ARM: at91/dts: add at91sam9_wdt driver to at91sam926x, at91sam9g45 Fabio Porcedda
2012-10-01 12:24 ` Fabio Porcedda
2012-10-01 12:24 ` Fabio Porcedda
2012-10-01 12:24 ` [PATCH v6 5/5] ARM: at91/dts: evk-pro3: enable watchdog Fabio Porcedda
2012-10-01 12:24 ` Fabio Porcedda
2012-10-01 12:24 ` Fabio Porcedda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121001125643.GF11837@lunn.ch \
--to=andrew@lunn.ch \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=fabio.porcedda@gmail.com \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@maxim.org.za \
--cc=nicolas.ferre@atmel.com \
--cc=plagnioj@jcrosoft.com \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.