* [PATCH] watchdog: dw: Enable OF support for DW watchdog timer.
@ 2013-07-09 23:09 dinguyen
2013-07-10 10:33 ` Pavel Machek
2013-07-10 10:41 ` Jamie Iles
0 siblings, 2 replies; 4+ messages in thread
From: dinguyen @ 2013-07-09 23:09 UTC (permalink / raw)
To: linux-watchdog, devicetree-discuss
Cc: dinh.linux, Dinh Nguyen, Jamie Iles, Viresh Kumar, Grant Likely,
Rob Herring, Wim Van Sebroeck, Pavel Machek
From: Dinh Nguyen <dinguyen@altera.com>
Add device tree support to the DW watchdog timer.
Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
Cc: Jamie Iles <jamie@jamieiles.com>
Cc: Viresh Kumar <viresh.kumar@st.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Pavel Machek <pavel@denx.de>
---
.../devicetree/bindings/watchdog/dw_wdt.txt | 16 ++++++++++++++++
drivers/watchdog/dw_wdt.c | 7 +++++++
2 files changed, 23 insertions(+)
create mode 100644 Documentation/devicetree/bindings/watchdog/dw_wdt.txt
diff --git a/Documentation/devicetree/bindings/watchdog/dw_wdt.txt b/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
new file mode 100644
index 0000000..29e150b
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/dw_wdt.txt
@@ -0,0 +1,16 @@
+Synopsys Designware Watchdog Timer
+
+Required Properties:
+
+- Compatiblity : "snps,dw-wdt"
+- reg : Base address of the watchdog timer register.
+
+Example:
+
+ watchdog0: wd@ffd02000 {
+ compatible = "snps,dw-wdt";
+ reg = <0xffd02000 0x1000>;
+ interrupts = <0 171 4>;
+ clocks = <&per_base_clk>;
+ status = "okay";
+ };
diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
index 2037669..f7eec38 100644
--- a/drivers/watchdog/dw_wdt.c
+++ b/drivers/watchdog/dw_wdt.c
@@ -343,12 +343,19 @@ static int dw_wdt_drv_remove(struct platform_device *pdev)
return 0;
}
+static const struct of_device_id dw_wdt_of_match[] = {
+ { .compatible = "snps,dw-wdt", },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, dw_wdt_of_match);
+
static struct platform_driver dw_wdt_driver = {
.probe = dw_wdt_drv_probe,
.remove = dw_wdt_drv_remove,
.driver = {
.name = "dw_wdt",
.owner = THIS_MODULE,
+ .of_match_table = dw_wdt_of_match,
#ifdef CONFIG_PM
.pm = &dw_wdt_pm_ops,
#endif /* CONFIG_PM */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] watchdog: dw: Enable OF support for DW watchdog timer.
2013-07-09 23:09 [PATCH] watchdog: dw: Enable OF support for DW watchdog timer dinguyen
@ 2013-07-10 10:33 ` Pavel Machek
2013-07-10 10:41 ` Jamie Iles
1 sibling, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2013-07-10 10:33 UTC (permalink / raw)
To: dinguyen
Cc: linux-watchdog, devicetree-discuss, dinh.linux, Jamie Iles,
Viresh Kumar, Grant Likely, Rob Herring, Wim Van Sebroeck
On Tue 2013-07-09 18:09:37, dinguyen@altera.com wrote:
> From: Dinh Nguyen <dinguyen@altera.com>
>
> Add device tree support to the DW watchdog timer.
>
> Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
> Cc: Jamie Iles <jamie@jamieiles.com>
> Cc: Viresh Kumar <viresh.kumar@st.com>
> Cc: Grant Likely <grant.likely@linaro.org>
> Cc: Rob Herring <rob.herring@calxeda.com>
> Cc: Wim Van Sebroeck <wim@iguana.be>
> Cc: Pavel Machek <pavel@denx.de>
Nice!
Reviewed-by: Pavel Machek <pavel@denx.de>
Thanks,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] watchdog: dw: Enable OF support for DW watchdog timer.
2013-07-09 23:09 [PATCH] watchdog: dw: Enable OF support for DW watchdog timer dinguyen
2013-07-10 10:33 ` Pavel Machek
@ 2013-07-10 10:41 ` Jamie Iles
2013-07-10 14:55 ` Dinh Nguyen
1 sibling, 1 reply; 4+ messages in thread
From: Jamie Iles @ 2013-07-10 10:41 UTC (permalink / raw)
To: dinguyen
Cc: linux-watchdog, devicetree-discuss, dinh.linux, Jamie Iles,
Viresh Kumar, Grant Likely, Rob Herring, Wim Van Sebroeck,
Pavel Machek
Hi Dinh,
On Tue, Jul 09, 2013 at 06:09:37PM -0500, dinguyen@altera.com wrote:
> From: Dinh Nguyen <dinguyen@altera.com>
>
> Add device tree support to the DW watchdog timer.
>
> Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
> Cc: Jamie Iles <jamie@jamieiles.com>
> Cc: Viresh Kumar <viresh.kumar@st.com>
> Cc: Grant Likely <grant.likely@linaro.org>
> Cc: Rob Herring <rob.herring@calxeda.com>
> Cc: Wim Van Sebroeck <wim@iguana.be>
> Cc: Pavel Machek <pavel@denx.de>
> ---
> .../devicetree/bindings/watchdog/dw_wdt.txt | 16 ++++++++++++++++
> drivers/watchdog/dw_wdt.c | 7 +++++++
> 2 files changed, 23 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/watchdog/dw_wdt.txt
>
> diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
> index 2037669..f7eec38 100644
> --- a/drivers/watchdog/dw_wdt.c
> +++ b/drivers/watchdog/dw_wdt.c
> @@ -343,12 +343,19 @@ static int dw_wdt_drv_remove(struct platform_device *pdev)
> return 0;
> }
>
> +static const struct of_device_id dw_wdt_of_match[] = {
> + { .compatible = "snps,dw-wdt", },
> + { /* sentinel */ }
> +};
> +MODULE_DEVICE_TABLE(of, dw_wdt_of_match);
> +
> static struct platform_driver dw_wdt_driver = {
> .probe = dw_wdt_drv_probe,
> .remove = dw_wdt_drv_remove,
> .driver = {
> .name = "dw_wdt",
> .owner = THIS_MODULE,
> + .of_match_table = dw_wdt_of_match,
I think we want:
.of_match_table = of_match_ptr(dw_wdt_of_match),
as the module doesn't have an OF dependency.
Otherwise looks good to me.
Acked-by: Jamie Iles <jamie@jamieiles.com>
Thanks,
Jamie
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] watchdog: dw: Enable OF support for DW watchdog timer.
2013-07-10 10:41 ` Jamie Iles
@ 2013-07-10 14:55 ` Dinh Nguyen
0 siblings, 0 replies; 4+ messages in thread
From: Dinh Nguyen @ 2013-07-10 14:55 UTC (permalink / raw)
To: Jamie Iles
Cc: linux-watchdog, devicetree-discuss, dinh.linux, Viresh Kumar,
Grant Likely, Rob Herring, Wim Van Sebroeck, Pavel Machek
On Wed, 2013-07-10 at 11:41 +0100, Jamie Iles wrote:
> Hi Dinh,
>
> On Tue, Jul 09, 2013 at 06:09:37PM -0500, dinguyen@altera.com wrote:
> > From: Dinh Nguyen <dinguyen@altera.com>
> >
> > Add device tree support to the DW watchdog timer.
> >
> > Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
> > Cc: Jamie Iles <jamie@jamieiles.com>
> > Cc: Viresh Kumar <viresh.kumar@st.com>
> > Cc: Grant Likely <grant.likely@linaro.org>
> > Cc: Rob Herring <rob.herring@calxeda.com>
> > Cc: Wim Van Sebroeck <wim@iguana.be>
> > Cc: Pavel Machek <pavel@denx.de>
> > ---
> > .../devicetree/bindings/watchdog/dw_wdt.txt | 16 ++++++++++++++++
> > drivers/watchdog/dw_wdt.c | 7 +++++++
> > 2 files changed, 23 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/watchdog/dw_wdt.txt
> >
> > diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
> > index 2037669..f7eec38 100644
> > --- a/drivers/watchdog/dw_wdt.c
> > +++ b/drivers/watchdog/dw_wdt.c
> > @@ -343,12 +343,19 @@ static int dw_wdt_drv_remove(struct platform_device *pdev)
> > return 0;
> > }
> >
> > +static const struct of_device_id dw_wdt_of_match[] = {
> > + { .compatible = "snps,dw-wdt", },
> > + { /* sentinel */ }
> > +};
> > +MODULE_DEVICE_TABLE(of, dw_wdt_of_match);
> > +
> > static struct platform_driver dw_wdt_driver = {
> > .probe = dw_wdt_drv_probe,
> > .remove = dw_wdt_drv_remove,
> > .driver = {
> > .name = "dw_wdt",
> > .owner = THIS_MODULE,
> > + .of_match_table = dw_wdt_of_match,
>
> I think we want:
>
> .of_match_table = of_match_ptr(dw_wdt_of_match),
>
> as the module doesn't have an OF dependency.
Thanks Jamie, I'll send a v2 with your Ack and comment.
Dinh
>
> Otherwise looks good to me.
>
> Acked-by: Jamie Iles <jamie@jamieiles.com>
>
> Thanks,
>
> Jamie
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-07-10 14:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-09 23:09 [PATCH] watchdog: dw: Enable OF support for DW watchdog timer dinguyen
2013-07-10 10:33 ` Pavel Machek
2013-07-10 10:41 ` Jamie Iles
2013-07-10 14:55 ` Dinh Nguyen
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).