omap3 and omap4: add device tree support for wdt
Subsystems (5)
v2 cover omap3 and omap4: add device tree support for wdt
From: Xiao Jiang <[email protected]>
Changes compared to previous version:
- created document for omap wdt
- some modifications per the comments from Benoit and Jon
This series is based on latest Linus'tree, and also can be applied to dt branch of linux-omap tree. Tested with omap4430 blaze board and am37xx board.
Xiao Jiang (3):
arm/dts: add wdt node for omap3 and omap4
OMAP: avoid build wdt platform device if with dt support
watchdog: omap_wdt: add device tree support
.../devicetree/bindings/watchdog/omap-wdt.txt | 14 ++++++++++++++ arch/arm/boot/dts/omap3.dtsi | 5 +++++ arch/arm/boot/dts/omap4.dtsi | 5 +++++ arch/arm/mach-omap2/devices.c | 2 +- drivers/watchdog/omap_wdt.c | 7 +++++++ 5 files changed, 32 insertions(+), 1 deletions(-) create mode 100644 Documentation/devicetree/bindings/watchdog/omap-wdt.txt
Signature · 1 line
1.7.3
PATCH v2 1/3 arm/dts: add wdt node for omap3 and omap4
From: Xiao Jiang <[email protected]>
Add wdt node to support dt.
--- .../devicetree/bindings/watchdog/omap-wdt.txt | 14 ++++++++++++++ arch/arm/boot/dts/omap3.dtsi | 5 +++++ arch/arm/boot/dts/omap4.dtsi | 5 +++++ 3 files changed, 24 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/watchdog/omap-wdt.txt
Documentation/devicetree/bindings/watchdog/omap-wdt.txt new file +14 -0
@@ -0,0 +1,14 @@ +TI Watchdog Timer (WDT) Controller for OMAP + +Required properties: +compatible: +- "ti,omap3-wdt" for OMAP3 +- "ti,omap4-wdt" for OMAP4 +- ti,hwmods: Name of the hwmod associated to the WDT + +Examples: + +wdt2: wdt@4a314000 { + compatible = "ti,omap4-wdt", "ti,omap3-wdt"; + ti,hwmods = "wd_timer2"; +};
arch/arm/boot/dts/omap3.dtsi +5 -0
@@ -215,5 +215,10 @@ compatible = "ti,omap3-hsmmc"; ti,hwmods = "mmc3"; }; + + wdt2: wdt@48314000 { + compatible = "ti,omap3-wdt"; + ti,hwmods = "wd_timer2"; + }; }; };
arch/arm/boot/dts/omap4.dtsi +5 -0
@@ -272,5 +272,10 @@ ti,hwmods = "mmc5"; ti,needs-special-reset; }; + + wdt2: wdt@4a314000 { + compatible = "ti,omap4-wdt", "ti,omap3-wdt"; + ti,hwmods = "wd_timer2"; + }; }; };
Signature · 1 line
1.7.3
PATCH v3 2/3 OMAP: avoid build wdt platform device if with dt support
In reply to [email protected]From: Xiao Jiang <[email protected]>
If provided dt support, then skip add wdt platform device as usual.
--- arch/arm/mach-omap2/devices.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/devices.c +1 -1
@@ -772,7 +772,7 @@ static int __init omap_init_wdt(void)char *oh_name ="wd_timer2" ;char *dev_name ="omap_wdt" ; -if (!cpu_class_is_omap2 ()) +if (!cpu_class_is_omap2 () ||of_have_populated_dt ())return 0 ; oh =omap_hwmod_lookup (oh_name);
Signature · 1 line
1.7.3
PATCH v2 3/3 watchdog: omap_wdt: add device tree support
In reply to [email protected]From: Xiao Jiang <[email protected]>
Add device table for omap_wdt to support dt.
--- drivers/watchdog/omap_wdt.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
drivers/watchdog/omap_wdt.c +7 -0
@@ -430,6 +430,12 @@ static int omap_wdt_resume(struct platform_device *pdev)#define omap_wdt_resume NULL#endif +static const struct of_device_id omap_wdt_of_match[] = { + { .compatible ="ti,omap3-wdt" , }, + {}, +}; +MODULE_DEVICE_TABLE (of, omap_wdt_of_match); +static struct platform_driver omap_wdt_driver = { .probe = omap_wdt_probe, .remove =__devexit_p (omap_wdt_remove),
@@ -439,6 +445,7 @@ static struct platform_driver omap_wdt_driver = { .driver = { .owner = THIS_MODULE, .name = "omap_wdt", + .of_match_table = omap_wdt_of_match, }, };
Signature · 1 line
1.7.3
Tony Lindgren
maintainerRe: [PATCHv2 3/3] watchdog: omap_wdt: add device tree support
Hi Wim,
Quoted 3 lines · * jgq516 at gmail.com <[email protected]> [120531 20:56]:
From: Xiao Jiang <[email protected]>
Add device table for
omap_wdtto support dt.
Care to ack this patch in the series?
Regards,
Tony
Quoted 34 lines
Signed-off-by Xiao Jiang <[email protected]>--- drivers/watchdog/omap_wdt.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)drivers/watchdog/omap_wdt.c +7
-0@@ -430,6 +430,12 @@ static int omap_wdt_resume(struct platform_device *pdev)#define omap_wdt_resume NULL#endif +static const struct of_device_id omap_wdt_of_match[] = { + { .compatible ="ti,omap3-wdt" , }, + {}, +}; +MODULE_DEVICE_TABLE (of, omap_wdt_of_match); +static struct platform_driver omap_wdt_driver = { .probe = omap_wdt_probe, .remove =__devexit_p (omap_wdt_remove),@@ -439,6 +445,7 @@ static struct platform_driver omap_wdt_driver = { .driver = { .owner = THIS_MODULE, .name = "omap_wdt", + .of_match_table = omap_wdt_of_match, }, };Signature · 1 line
1.7.3
Wim Van Sebroeck
Acked-byRe: [PATCHv2 3/3] watchdog: omap_wdt: add device tree support
Hi Tony,
Quoted 8 lines
Hi Wim,
Quoted 3 lines · * [email protected]…
From: Xiao Jiang <[email protected]>
Add device table for
omap_wdtto support dt.Care to ack this patch in the series?
Yep.
Kind regards,
Wim.
Tony Lindgren
maintainerRe: [PATCHv2 3/3] watchdog: omap_wdt: add device tree support
Quoted 5 lines · Wim Van Sebroeck
Hi Tony,
Quoted 3 lines
Hi Wim,
* jgq516 at gmail.com <[email protected]> [120531 20:56]:
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
From: Xiao Jiang <[email protected]>
Add device table for
omap_wdtto support dt.Care to ack this patch in the series?
Yep.
Acked-by Wim Van Sebroeck <[email protected]>
Thanks, I'll apply all three into omap devel-dt branch.
Regards,
Tony
Quoted 14 lines · On 05/31/2012 11:44 PM, jgq516 at gmail.com wrote:
From: Xiao Jiang <[email protected]>
Changes compared to previous version:
- created document for omap wdt
- some modifications per the comments from Benoit and JonThis series is based on latest Linus'tree, and also can be applied to dt branch of linux-omap tree. Tested with omap4430 blaze board and am37xx board.
Xiao Jiang (3):
arm/dts: add wdt node for omap3 and omap4
OMAP: avoid build wdt platform device if with dt support
watchdog:omap_wdt: add device tree support
Quoted 7 lines
.../devicetree/bindings/watchdog/omap-wdt.txt | 14 ++++++++++++++ arch/arm/boot/dts/omap3.dtsi | 5 +++++ arch/arm/boot/dts/omap4.dtsi | 5 +++++ arch/arm/mach-omap2/devices.c | 2 +- drivers/watchdog/omap_wdt.c | 7 +++++++ 5 files changed, 32 insertions(+), 1 deletions(-) create mode 100644 Documentation/devicetree/bindings/watchdog/omap-wdt.txt
Thanks! Looks good to me.
Cheers
Jon