Samsung watchdog driver updates
Subsystems (2)
two updates for samsung watchdog driver, one bugfix and one kconfig.
please apply for this merge window.
PATCH 1/2 s3c2410_wdt - Add extra option to include watchdog for Samsung SoCs
From: Banajit Goswami <[email protected]>
This patch adds HAVE_S3C2410_WATCHDOG to control inclusion of watchdog driver for Samsung SoCs. This option will help to include the driver only for the necessary machines and not for all for any given arch.
--- drivers/watchdog/Kconfig | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-)
drivers/watchdog/Kconfig +10 -4
@@ -145,13 +145,19 @@ config KS8695_WATCHDOG Watchdog timer embedded into KS8695 processor. This will reboot your system when the timeout is reached. +config HAVE_S3C2410_WATCHDOG + bool + help + This will include watchdog timer support for Samsung SoCs. If + you want to include watchdog support for any machine, kindly + select this in the respective mach-XXXX/Kconfig file. + config S3C2410_WATCHDOG tristate "S3C2410 Watchdog" - depends on ARCH_S3C2410 + depends on ARCH_S3C2410 || HAVE_S3C2410_WATCHDOG help - Watchdog timer block in the Samsung S3C2410 chips. This will - reboot the system when the timer expires with the watchdog - enabled. + Watchdog timer block in the Samsung SoCs. This will reboot + the system when the timer expires with the watchdog enabled. The driver is limited by the speed of the system's PCLK signal, so with reasonably fast systems (PCLK around 50-66MHz)
Signature · 1 line
1.6.3.3
PATCH 1/2 s3c2410_wdt - Add extra option to include watchdog for Samsung SoCs
Hello.
Quoted 10 lines · Ben Dooks
From: Banajit Goswami <[email protected]>
This patch adds
HAVE_S3C2410_WATCHDOGto control inclusion of watchdog driver for Samsung SoCs. This option will help to include the driver only for the necessary machines and not for all for any given arch.Signed-off-by Banajit Goswami <[email protected]>Signed-off-by Kukjin Kim <[email protected]>Acked-by Ben Dooks <[email protected]>Signed-off-by Ben Dooks <[email protected]>
[...]
Quoted 5 lines
drivers/watchdog/Kconfig +0
-0
drivers/watchdog/Kconfig config KS8695_WATCHDOG · line 153
Quoted 9 lines
drivers/watchdog/Kconfig +6
-0@@ -145,13 +145,19 @@ config KS8695_WATCHDOG Watchdog timer embedded into KS8695 processor. This will reboot your system when the timeout is reached. +config HAVE_S3C2410_WATCHDOG + bool + help + This will include watchdog timer support for Samsung SoCs. If + you want to include watchdog support for any machine, kindly + select this in the respective mach-XXXX/Kconfig file.
What use is the help text for a hidden option?
WBR, Sergei
PATCH 1/2 s3c2410_wdt - Add extra option to include watchdog for Samsung SoCs
Quoted 8 lines · Sergei Shtylyov
drivers/watchdog/Kconfig config KS8695_WATCHDOG · line 153
Quoted 6 lines
+config
HAVE_S3C2410_WATCHDOGdrivers/watchdog/Kconfig +5
-0+ bool + help + This will include watchdog timer support for Samsung SoCs. If + you want to include watchdog support for any machine, kindly + select this in the respective mach-XXXX/Kconfig file.What use is the help text for a hidden option?
Documentation to describe what the hidden option does - it tells those who modify Kconfig files what the intention of the option is.
PATCH 2/2 s3c2410_wdt - Fix on handling of the request_mem_region fail
In reply to Ben DooksFrom: Banajit Goswami <[email protected]>
If the request for wdt_mem region fails, this patch modifies the driver such that, it does not try to release the wdt_mem region on exit.
--- drivers/watchdog/s3c2410_wdt.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/watchdog/s3c2410_wdt.c +1 -2
@@ -426,8 +426,7 @@ static int __devinit s3c2410wdt_probe(struct platform_device *pdev) wdt_mem =request_mem_region (res->start, size, pdev->name);if (wdt_mem ==NULL ) {dev_err (dev,"failed to get memory region\n" ); - ret = -ENOENT ; - goto err_req; +return -EBUSY ; } wdt_base =ioremap (res->start, size);
Signature · 1 line
1.6.3.3
Hi Ben,
Quoted 3 lines
two updates for samsung watchdog driver, one bugfix and one kconfig.
please apply for this merge window.
I added them to the linux-2.6-watchdog tree so that they can be included in this merge window.
I also created a fix for the removal of the driver (the misc_deregister needs to happen first so that userspace access is removed before removing the rest of the driver).
Can you test and give feedback?
Thanks,
Wim.
commit c41e5d25f3d82d1b048f8dc156f057d0deba093a
Author: Wim Van Sebroeck <[email protected]> Date: Fri May 21 08:11:42 2010 +0000
watchdog: s3c2410_wdt - Fix removing of platform device
When removing the watchdog platform device, we need to disable the access to userspace first. It makes no sense to remove the drivers clock, irq's, ... and then disable usersapce access.
the order of removal has also been changed so that it is the reverse of probing (this way the clock is also disabled sooner).
drivers/watchdog/s3c2410_wdt.c +9 -8
@@ -532,21 +532,22 @@ static int __devinit s3c2410wdt_probe(struct platform_device *pdev) static int __devexit s3c2410wdt_remove(struct platform_device *dev) { -s3c2410wdt_cpufreq_deregister (); - -release_resource (wdt_mem); -kfree (wdt_mem); - wdt_mem =NULL ; +misc_deregister (&s3c2410wdt_miscdev); -free_irq (wdt_irq->start, dev); - wdt_irq =NULL ; +s3c2410wdt_cpufreq_deregister ();clk_disable (wdt_clock);clk_put (wdt_clock); wdt_clock =NULL ; +free_irq (wdt_irq->start, dev); + wdt_irq =NULL ; +iounmap (wdt_base); -misc_deregister (&s3c2410wdt_miscdev); + +release_resource (wdt_mem); +kfree (wdt_mem); + wdt_mem =NULL ;return 0 ; }