OMAP3:WDT:Enable clk in probe, trigger timer reload
PATCH 1/1 OMAP3:WDT:Enable clk in probe, trigger timer reload
This patch contains two bugfixes:
1)In omap_wdt_probe() the watchdog is reset and disabled. This requires register access and the clks needs to be enabled temporarily
2)In omap_wdt_open() the timer register needs to be reloaded to trigger a new timer value (the default of 60s)
--- drivers/watchdog/omap_wdt.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) mode change 100644 => 100755 drivers/watchdog/omap_wdt.c
drivers/watchdog/omap_wdt.c +7 -0
@@ -159,6 +159,7 @@ static int omap_wdt_open(struct inode *inode, struct file *file) file->private_data = (void *) wdev;omap_wdt_set_timeout (wdev); +omap_wdt_ping (wdev);/* trigger loading of new timeout value */ omap_wdt_enable (wdev);return nonseekable_open (inode, file);
@@ -313,6 +314,9 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev)platform_set_drvdata (pdev, wdev); +clk_enable (wdev->ick); +clk_enable (wdev->fck); +omap_wdt_disable (wdev);omap_wdt_adjust_timeout (timer_margin);
@@ -332,6 +336,9 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev)/* autogate OCP interface clock */ __raw_writel (0x01 , wdev->base +OMAP_WATCHDOG_SYS_CONFIG ); +clk_disable (wdev->ick); +clk_disable (wdev->fck); + omap_wdt_dev = pdev;return 0 ;
Signature · 1 line
1.5.4.3
Quoted 9 lines · Ulrik Bech Hald
This patch contains two bugfixes:
1)In
omap_wdt_probe()the watchdog is reset and disabled. This requires register access and the clks needs to be enabled temporarily2)In
omap_wdt_open()the timer register needs to be reloaded to trigger a new timer value (the default of 60s)Signed-off-by Ulrik Bech Hald <[email protected]>
Can you change the subject slightly to something like:
watchdog: OMAP fixes: enable clock in probe, trigger timer reload
Also add which OMAP platforms you have tested on since this affects OMAP2, OMAP3 and presuably OMAP4.
After that, you can add
And sent to watchdog maintiner, and CC linux-omap, here's excerpt from MAINTAINERS:
WATCHDOG DEVICE DRIVERS
P: Wim Van Sebroeck
M: [email protected]
T: git git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
S: Maintained
F: Documentation/watchdog/
F: drivers/watchdog/
F: include/linux/watchdog.h
Quoted 46 lines
--- drivers/watchdog/omap_wdt.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) mode change 100644 => 100755 drivers/watchdog/omap_wdt.cdrivers/watchdog/omap_wdt.c +7
-0@@ -159,6 +159,7 @@ static int omap_wdt_open(struct inode *inode, struct file *file) file->private_data = (void *) wdev;omap_wdt_set_timeout (wdev); +omap_wdt_ping (wdev);/* trigger loading of new timeout value */ omap_wdt_enable (wdev);return nonseekable_open (inode, file);@@ -313,6 +314,9 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev)platform_set_drvdata (pdev, wdev); +clk_enable (wdev->ick); +clk_enable (wdev->fck); +omap_wdt_disable (wdev);omap_wdt_adjust_timeout (timer_margin);@@ -332,6 +336,9 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev)/* autogate OCP interface clock */ __raw_writel (0x01 , wdev->base +OMAP_WATCHDOG_SYS_CONFIG ); +clk_disable (wdev->ick); +clk_disable (wdev->fck); + omap_wdt_dev = pdev;return 0 ;Signature · 6 lines
1.5.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 10 lines · Kevin Hilman
Quoted 8 lines · Ulrik Bech Hald
This patch contains two bugfixes:
1)In
omap_wdt_probe()the watchdog is reset and disabled. This requires register access and the clks needs to be enabled temporarily2)In
omap_wdt_open()the timer register needs to be reloaded to trigger a new timer value (the default of 60s)
Quoted 8 lines
Quoted 1 line
Signed-off-by Ulrik Bech Hald <[email protected]>Can you change the subject slightly to something like:
watchdog: OMAP fixes: enable clock in probe, trigger timer reload
Also add which OMAP platforms you have tested on since this affects OMAP2, OMAP3 and presuably OMAP4.
Tested on OMAP3 (OMAP3503, Gumstix Overo).
Quoted 58 lines
After that, you can add
Reviewed-by Kevin Hilman <[email protected]>And sent to watchdog maintiner, and CC linux-omap, here's excerpt from
MAINTAINERS:WATCHDOG DEVICE DRIVERS
P: Wim Van Sebroeck
M: [email protected]
T: gitgit://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
S: Maintained
F: Documentation/watchdog/
F: drivers/watchdog/
F: include/linux/watchdog.hQuoted 42 lines
---
drivers/watchdog/omap_wdt.c | 7 +++++++1 files changed, 7 insertions(+), 0 deletions(-)mode change 100644 => 100755
drivers/watchdog/omap_wdt.cdrivers/watchdog/omap_wdt.c +7
-1@@ -159,6 +159,7 @@ static int omap_wdt_open(struct inode *inode, struct file *file) file->private_data = (void *) wdev; omap_wdt_set_timeout(wdev); + omap_wdt_ping(wdev); /* trigger loading of new timeout value */ omap_wdt_enable(wdev); return nonseekable_open(inode, file);@@ -313,6 +314,9 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev) platform_set_drvdata(pdev, wdev); + clk_enable(wdev->ick); + clk_enable(wdev->fck); + omap_wdt_disable(wdev); omap_wdt_adjust_timeout(timer_margin);@@ -332,6 +336,9 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev) /* autogate OCP interface clock */ __raw_writel(0x01, wdev->base + OMAP_WATCHDOG_SYS_CONFIG); + clk_disable(wdev->ick); + clk_disable(wdev->fck); + omap_wdt_dev = pdev; return 0; --1.5.4.3
Quoted 9 lines
Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 38 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Hugo Vincent
Sent: Saturday, June 13, 2009 9:28 AM
To: Kevin Hilman
Cc: Hald, Ulrik Bech; [email protected]
Subject: Re: [PATCH 1/1] OMAP3:WDT:Enable clk in probe, trigger timer reloadQuoted 6 lines · Kevin Hilman
Quoted 4 lines · Ulrik Bech Hald
This patch contains two bugfixes:
1)In
omap_wdt_probe()the watchdog is reset and disabled. This requires register access and the clks needs to be enabledtemporarily
Quoted 4 lines
Quoted 4 lines
2)In
omap_wdt_open()the timer register needs to be reloaded to trigger a new timer value (the default of 60s)Quoted 8 lines
Quoted 1 line
Signed-off-by Ulrik Bech Hald <[email protected]>Can you change the subject slightly to something like:
watchdog: OMAP fixes: enable clock in probe, trigger timer reload
Also add which OMAP platforms you have tested on since this affects OMAP2, OMAP3 and presuably OMAP4.
Tested on OMAP3 (OMAP3503, Gumstix Overo).
Quoted 5 lines
After that, you can add
Reviewed-by Kevin Hilman <[email protected]>And sent to watchdog maintiner, and CC linux-omap, here's
Quoted 8 lines
excerpt from
Quoted 6 lines
MAINTAINERS:WATCHDOG DEVICE DRIVERS
P: Wim Van Sebroeck
M: [email protected]
T: git
git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-wa
tchdog.git
Quoted 5 lines
Quoted 5 lines
S: Maintained
F: Documentation/watchdog/
F: drivers/watchdog/
F: include/linux/watchdog.h
Quoted 10 lines
Quoted 6 lines
Review
Quoted 6 lines
---
drivers/watchdog/omap_wdt.c | 7 +++++++1 files changed, 7 insertions(+), 0 deletions(-)mode change 100644 => 100755
drivers/watchdog/omap_wdt.c(quoted diff) +0
-0
b/drivers/watchdog/omap_wdt.cQuoted 2 lines
Quoted 2 lines
old mode 100644
new mode 100755
This change is also unnecessary.
Can be avoided in the follow-up submission.
~sanjeev
Quoted 49 lines
Quoted 4 lines
drivers/watchdog/omap_wdt.c static int omap_wdt_open(struct inode
Quoted 4 lines
index f271385..3ed571a
drivers/watchdog/omap_wdt.c +0
-0@@ -159,6 +159,7 @@ static int omap_wdt_open(struct inode*inode, struct file *file)
Quoted 4 lines
drivers/watchdog/omap_wdt.c static int omap_wdt_open(struct inode *inode, struct file *file)
Quoted 4 lines
drivers/watchdog/omap_wdt.c +1
-0file->private_data = (void *) wdev; omap_wdt_set_timeout(wdev); + omap_wdt_ping(wdev); /* trigger loading of newtimeout value */
Quoted 4 lines
drivers/watchdog/omap_wdt.c static int __devinit
Quoted 4 lines
drivers/watchdog/omap_wdt.c +0
-0omap_wdt_enable(wdev); return nonseekable_open(inode, file);@@ -313,6 +314,9 @@ static int __devinit
omap_wdt_probe(struct platform_device *pdev)Quoted 10 lines
drivers/watchdog/omap_wdt.c static int __devinit
Quoted 10 lines
drivers/watchdog/omap_wdt.c +3
-0platform_set_drvdata(pdev, wdev); + clk_enable(wdev->ick); + clk_enable(wdev->fck); + omap_wdt_disable(wdev); omap_wdt_adjust_timeout(timer_margin);@@ -332,6 +336,9 @@ static int __devinit
omap_wdt_probe(struct platform_device *pdev)Quoted 8 lines
Quoted 8 lines
drivers/watchdog/omap_wdt.c +3
-0/* autogate OCP interface clock */ __raw_writel(0x01, wdev->base + OMAP_WATCHDOG_SYS_CONFIG); + clk_disable(wdev->ick); + clk_disable(wdev->fck); + omap_wdt_dev = pdev;Quoted 6 lines
Quoted 6 lines
drivers/watchdog/omap_wdt.c +0
-1return 0; --1.5.4.3
--
To unsubscribe from this list: send the line "unsubscribelinux-omap" in
Quoted 4 lines
Quoted 2 lines
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribelinux-omap" in
Quoted 3 lines
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 68 lines
-----Original Message-----
From: Premi, Sanjeev
Sent: Tuesday, June 16, 2009 8:01 AM
To: Hugo Vincent; Kevin Hilman
Cc: Hald, Ulrik Bech; [email protected]
Subject: RE: [PATCH 1/1] OMAP3:WDT:Enable clk in probe, trigger timer reloadQuoted 38 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Hugo Vincent
Sent: Saturday, June 13, 2009 9:28 AM
To: Kevin Hilman
Cc: Hald, Ulrik Bech; [email protected]
Subject: Re: [PATCH 1/1] OMAP3:WDT:Enable clk in probe, trigger timer reloadQuoted 6 lines · Kevin Hilman
Quoted 4 lines · Ulrik Bech Hald
This patch contains two bugfixes:
1)In
omap_wdt_probe()the watchdog is reset and disabled. This requires register access and the clks needs to be enabledtemporarily
Quoted 4 lines
Quoted 4 lines
2)In
omap_wdt_open()the timer register needs to be reloaded to trigger a new timer value (the default of 60s)Quoted 8 lines
Quoted 1 line
Signed-off-by Ulrik Bech Hald <[email protected]>Can you change the subject slightly to something like:
watchdog: OMAP fixes: enable clock in probe, trigger timer reload
Also add which OMAP platforms you have tested on since this affects OMAP2, OMAP3 and presuably OMAP4.
Tested on OMAP3 (OMAP3503, Gumstix Overo).
Quoted 5 lines
After that, you can add
Reviewed-by Kevin Hilman <[email protected]>And sent to watchdog maintiner, and CC linux-omap, here's
Quoted 8 lines
excerpt from
Quoted 6 lines
MAINTAINERS:WATCHDOG DEVICE DRIVERS
P: Wim Van Sebroeck
M: [email protected]
T: git
git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
Quoted 12 lines
Quoted 11 lines
S: Maintained
F: Documentation/watchdog/
F: drivers/watchdog/
F: include/linux/watchdog.hReview
Quoted 6 lines
---
drivers/watchdog/omap_wdt.c | 7 +++++++1 files changed, 7 insertions(+), 0 deletions(-)mode change 100644 => 100755
drivers/watchdog/omap_wdt.c(quoted diff) +0
-0
b/drivers/watchdog/omap_wdt.c
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
old mode 100644
new mode 100755This change is also unnecessary.
Can be avoided in the follow-up submission.~sanjeev
Thanks for pointing it out Sanjeev. I am submitting a version 3 with the correction now.
/Ulrik
Quoted 50 lines
Quoted 50 lines
Quoted 5 lines
drivers/watchdog/omap_wdt.c static int omap_wdt_open(struct inode
Quoted 5 lines
index f271385..3ed571a
drivers/watchdog/omap_wdt.c +0
-0@@ -159,6 +159,7 @@ static int omap_wdt_open(struct inode*inode, struct file *file)
Quoted 4 lines
drivers/watchdog/omap_wdt.c static int omap_wdt_open(struct inode *inode, struct file *file)
Quoted 4 lines
drivers/watchdog/omap_wdt.c +1
-0file->private_data = (void *) wdev; omap_wdt_set_timeout(wdev); + omap_wdt_ping(wdev); /* trigger loading of newtimeout value */
Quoted 4 lines
drivers/watchdog/omap_wdt.c static int __devinit
Quoted 4 lines
drivers/watchdog/omap_wdt.c +0
-0omap_wdt_enable(wdev); return nonseekable_open(inode, file);@@ -313,6 +314,9 @@ static int __devinit
omap_wdt_probe(struct platform_device *pdev)Quoted 10 lines
drivers/watchdog/omap_wdt.c static int __devinit
Quoted 10 lines
drivers/watchdog/omap_wdt.c +3
-0platform_set_drvdata(pdev, wdev); + clk_enable(wdev->ick); + clk_enable(wdev->fck); + omap_wdt_disable(wdev); omap_wdt_adjust_timeout(timer_margin);@@ -332,6 +336,9 @@ static int __devinit
omap_wdt_probe(struct platform_device *pdev)Quoted 8 lines
Quoted 8 lines
drivers/watchdog/omap_wdt.c +3
-0/* autogate OCP interface clock */ __raw_writel(0x01, wdev->base + OMAP_WATCHDOG_SYS_CONFIG); + clk_disable(wdev->ick); + clk_disable(wdev->fck); + omap_wdt_dev = pdev;Quoted 6 lines
Quoted 6 lines
drivers/watchdog/omap_wdt.c +0
-1return 0; --1.5.4.3
--
To unsubscribe from this list: send the line "unsubscribelinux-omap" in
Quoted 4 lines
Quoted 2 lines
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribelinux-omap" in
Quoted 3 lines
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines
Quoted 7 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html