devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 09/11] watchdog/at91sam9_wdt: add support to device tree
       [not found] <1352877369-19740-1-git-send-email-wenyou.yang@atmel.com>
@ 2012-11-14  7:16 ` Wenyou Yang
  2012-11-16 13:56   ` Nicolas Ferre
  2012-11-14  7:16 ` [PATCH 11/11] ARM: dts: add the watchdog nodes for atmel SoC Wenyou Yang
  1 sibling, 1 reply; 3+ messages in thread
From: Wenyou Yang @ 2012-11-14  7:16 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: wim, linux-watchdog, linux-kernel, nicolas.ferre, plagnioj,
	wenyou.yang, JM.Lin, grant.likely, rob.herring,
	devicetree-discuss

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Cc: grant.likely@secretlab.ca
Cc: rob.herring@calxeda.com
Cc: devicetree-discuss@lists.ozlabs.org
---
 drivers/watchdog/at91sam9_wdt.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
index e7ce9ea..cba5c5d 100644
--- a/drivers/watchdog/at91sam9_wdt.c
+++ b/drivers/watchdog/at91sam9_wdt.c
@@ -32,6 +32,7 @@
 #include <linux/jiffies.h>
 #include <linux/timer.h>
 #include <linux/bitops.h>
+#include <linux/of.h>
 
 #include "at91sam9_wdt.h"
 
@@ -251,12 +252,21 @@ static int __exit at91wdt_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_OF
+static const struct of_device_id at91wdt_match[] = {
+	{ .compatible = "atmel,at91sam-wdt" },
+	{},
+};
+MODULE_DEVICE_TABLE(of, at91wdt_match);
+#endif
+
 static struct platform_driver at91wdt_driver = {
 	.probe		= at91wdt_probe,
 	.remove		= __exit_p(at91wdt_remove),
 	.driver		= {
 		.name	= "at91_wdt",
 		.owner	= THIS_MODULE,
+		.of_match_table	= of_match_ptr(at91wdt_match),
 	},
 };
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 11/11] ARM: dts: add the watchdog nodes for atmel SoC
       [not found] <1352877369-19740-1-git-send-email-wenyou.yang@atmel.com>
  2012-11-14  7:16 ` [PATCH 09/11] watchdog/at91sam9_wdt: add support to device tree Wenyou Yang
@ 2012-11-14  7:16 ` Wenyou Yang
  1 sibling, 0 replies; 3+ messages in thread
From: Wenyou Yang @ 2012-11-14  7:16 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: wim, linux-watchdog, linux-kernel, nicolas.ferre, plagnioj,
	wenyou.yang, JM.Lin, grant.likely, rob.herring, rob, linux,
	devicetree-discuss, linux-doc

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Cc: grant.likely@secretlab.ca
Cc: rob.herring@calxeda.com
Cc: rob@landley.net
Cc: linux@arm.linux.org.uk
Cc: devicetree-discuss@lists.ozlabs.org
Cc: linux-doc@vger.kernel.org
---
 .../devicetree/bindings/watchdog/atmel-wdt.txt     |   14 ++++++++++++++
 arch/arm/boot/dts/at91sam9260.dtsi                 |    6 ++++++
 arch/arm/boot/dts/at91sam9263.dtsi                 |    6 ++++++
 arch/arm/boot/dts/at91sam9263ek.dts                |    4 ++++
 arch/arm/boot/dts/at91sam9g20ek_common.dtsi        |    4 ++++
 arch/arm/boot/dts/at91sam9g25ek.dts                |    4 ++++
 arch/arm/boot/dts/at91sam9g45.dtsi                 |    5 +++++
 arch/arm/boot/dts/at91sam9m10g45ek.dts             |    4 ++++
 arch/arm/boot/dts/at91sam9n12.dtsi                 |    6 ++++++
 arch/arm/boot/dts/at91sam9n12ek.dts                |    4 ++++
 arch/arm/boot/dts/at91sam9x5.dtsi                  |    6 ++++++
 11 files changed, 63 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..5d09b87
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/atmel-wdt.txt
@@ -0,0 +1,14 @@
+* Atmel's Watchdog Timer Controller
+
+Required properties:
+- compatible : should be "atmel,at91sam-wdt"
+- reg : base physical address of the controller and length of memory mapped
+	region.
+
+Example:
+
+	watchdog@fffffd40 {
+		compatible = "atmel,at91sam-wdt";
+		reg = <0xfffffd40 0x10>;
+		status = "okay";
+	};
diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi
index d410581..81687a3 100644
--- a/arch/arm/boot/dts/at91sam9260.dtsi
+++ b/arch/arm/boot/dts/at91sam9260.dtsi
@@ -86,6 +86,12 @@
 				interrupts = <1 4 7>;
 			};
 
+			watchdog@fffffd40 {
+				compatible = "atmel,at91sam-wdt";
+				reg = <0xfffffd40 0x10>;
+				status = "disabled";
+			};
+
 			tcb0: timer@fffa0000 {
 				compatible = "atmel,at91rm9200-tcb";
 				reg = <0xfffa0000 0x100>;
diff --git a/arch/arm/boot/dts/at91sam9263.dtsi b/arch/arm/boot/dts/at91sam9263.dtsi
index 3e6e5c1..a25826b 100644
--- a/arch/arm/boot/dts/at91sam9263.dtsi
+++ b/arch/arm/boot/dts/at91sam9263.dtsi
@@ -73,6 +73,12 @@
 				interrupts = <1 4 7>;
 			};
 
+			watchdog@fffffd40 {
+				compatible = "atmel,at91sam-wdt";
+				reg = <0xfffffd40 0x10>;
+				status = "disabled";
+			};
+
 			tcb0: timer@fff7c000 {
 				compatible = "atmel,at91rm9200-tcb";
 				reg = <0xfff7c000 0x100>;
diff --git a/arch/arm/boot/dts/at91sam9263ek.dts b/arch/arm/boot/dts/at91sam9263ek.dts
index f86ac4b..bc947ea 100644
--- a/arch/arm/boot/dts/at91sam9263ek.dts
+++ b/arch/arm/boot/dts/at91sam9263ek.dts
@@ -50,6 +50,10 @@
 				atmel,vbus-gpio = <&pioA 25 0>;
 				status = "okay";
 			};
+
+			watchdog@fffffd40 {
+				status = "okay";
+			};
 		};
 
 		nand0: nand@40000000 {
diff --git a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
index e6391a4..e5797b7 100644
--- a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
+++ b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
@@ -51,6 +51,10 @@
 				atmel,vbus-gpio = <&pioC 5 0>;
 				status = "okay";
 			};
+
+			watchdog@fffffd40 {
+				status = "okay";
+			};
 		};
 
 		nand0: nand@40000000 {
diff --git a/arch/arm/boot/dts/at91sam9g25ek.dts b/arch/arm/boot/dts/at91sam9g25ek.dts
index 877c08f..2f03edc 100644
--- a/arch/arm/boot/dts/at91sam9g25ek.dts
+++ b/arch/arm/boot/dts/at91sam9g25ek.dts
@@ -44,6 +44,10 @@
 			i2c2: i2c@f8018000 {
 				status = "okay";
 			};
+
+			watchdog@fffffe40 {
+				status = "okay";
+			};
 		};
 
 		usb0: ohci@00600000 {
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
index 3add030..c6c2c09 100644
--- a/arch/arm/boot/dts/at91sam9g45.dtsi
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -84,6 +84,11 @@
 				interrupts = <1 4 7>;
 			};
 
+			watchdog@fffffd40 {
+				compatible = "atmel,at91sam-wdt";
+				reg = <0xfffffd40 0x10>;
+				status = "disabled";
+			};
 
 			shdwc@fffffd10 {
 				compatible = "atmel,at91sam9rl-shdwc";
diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts
index 15e1dd4..371ab40 100644
--- a/arch/arm/boot/dts/at91sam9m10g45ek.dts
+++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts
@@ -54,6 +54,10 @@
 			i2c1: i2c@fff88000 {
 				status = "okay";
 			};
+
+			watchdog@fffffd40 {
+				status = "okay";
+			};
 		};
 
 		nand0: nand@40000000 {
diff --git a/arch/arm/boot/dts/at91sam9n12.dtsi b/arch/arm/boot/dts/at91sam9n12.dtsi
index 82508d6..e5e6363 100644
--- a/arch/arm/boot/dts/at91sam9n12.dtsi
+++ b/arch/arm/boot/dts/at91sam9n12.dtsi
@@ -79,6 +79,12 @@
 				interrupts = <1 4 7>;
 			};
 
+			watchdog@fffffe40 {
+				compatible = "atmel,at91sam-wdt";
+				reg = <0xfffffe40 0x10>;
+				status = "disabled";
+			};
+
 			shdwc@fffffe10 {
 				compatible = "atmel,at91sam9x5-shdwc";
 				reg = <0xfffffe10 0x10>;
diff --git a/arch/arm/boot/dts/at91sam9n12ek.dts b/arch/arm/boot/dts/at91sam9n12ek.dts
index 912b2c2..abeda7a 100644
--- a/arch/arm/boot/dts/at91sam9n12ek.dts
+++ b/arch/arm/boot/dts/at91sam9n12ek.dts
@@ -45,6 +45,10 @@
 			i2c1: i2c@f8014000 {
 				status = "okay";
 			};
+
+			watchdog@fffffe40 {
+				status = "okay";
+			};
 		};
 
 		nand0: nand@40000000 {
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
index 03fc136..485f171 100644
--- a/arch/arm/boot/dts/at91sam9x5.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5.dtsi
@@ -87,6 +87,12 @@
 				interrupts = <1 4 7>;
 			};
 
+			watchdog@fffffe40 {
+				compatible = "atmel,at91sam-wdt";
+				reg = <0xfffffe40 0x10>;
+				status = "disabled";
+			};
+
 			tcb0: timer@f8008000 {
 				compatible = "atmel,at91sam9x5-tcb";
 				reg = <0xf8008000 0x100>;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 09/11] watchdog/at91sam9_wdt: add support to device tree
  2012-11-14  7:16 ` [PATCH 09/11] watchdog/at91sam9_wdt: add support to device tree Wenyou Yang
@ 2012-11-16 13:56   ` Nicolas Ferre
  0 siblings, 0 replies; 3+ messages in thread
From: Nicolas Ferre @ 2012-11-16 13:56 UTC (permalink / raw)
  To: Wenyou Yang, Fabio Porcedda
  Cc: linux-arm-kernel, linux-watchdog, JM.Lin, linux-kernel,
	rob.herring, grant.likely, wim, plagnioj, devicetree-discuss

On 11/14/2012 08:16 AM, Wenyou Yang :
> Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>

No. The work has already been done by Fabio Porcedda and he managed to
sustain the discussion and reach a consensus at his v9 patch series: so
please take into account his work and build yours on top of his patch
series.

Best regards,

> Cc: grant.likely@secretlab.ca
> Cc: rob.herring@calxeda.com
> Cc: devicetree-discuss@lists.ozlabs.org
> ---
>  drivers/watchdog/at91sam9_wdt.c |   10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
> index e7ce9ea..cba5c5d 100644
> --- a/drivers/watchdog/at91sam9_wdt.c
> +++ b/drivers/watchdog/at91sam9_wdt.c
> @@ -32,6 +32,7 @@
>  #include <linux/jiffies.h>
>  #include <linux/timer.h>
>  #include <linux/bitops.h>
> +#include <linux/of.h>
>  
>  #include "at91sam9_wdt.h"
>  
> @@ -251,12 +252,21 @@ static int __exit at91wdt_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +#ifdef CONFIG_OF
> +static const struct of_device_id at91wdt_match[] = {
> +	{ .compatible = "atmel,at91sam-wdt" },
> +	{},
> +};
> +MODULE_DEVICE_TABLE(of, at91wdt_match);
> +#endif
> +
>  static struct platform_driver at91wdt_driver = {
>  	.probe		= at91wdt_probe,
>  	.remove		= __exit_p(at91wdt_remove),
>  	.driver		= {
>  		.name	= "at91_wdt",
>  		.owner	= THIS_MODULE,
> +		.of_match_table	= of_match_ptr(at91wdt_match),
>  	},
>  };
>  
> 


-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-16 13:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1352877369-19740-1-git-send-email-wenyou.yang@atmel.com>
2012-11-14  7:16 ` [PATCH 09/11] watchdog/at91sam9_wdt: add support to device tree Wenyou Yang
2012-11-16 13:56   ` Nicolas Ferre
2012-11-14  7:16 ` [PATCH 11/11] ARM: dts: add the watchdog nodes for atmel SoC Wenyou Yang

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).