Driver for the watchdog timer on all Freescale IMX processors.
Subsystems (2)
PATCH 1/1 Driver for the watchdog timer on all Freescale IMX processors.
---
Changes since the last version from Darius:
* removed all #ifdef CONFIG_ARCH_* and handle the differences at runtime
* simplified house-keeping of the timeout value and fixed the conversion into the corresponding register value
* removed a superfluous static platform-device
* removed debug output and comments with (IMHO) little information
* cleaned up #includes
* fixed some typos & removed unnecessary tabs & added kernel coding style
* probably something else...
drivers/watchdog/Kconfig | 12 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/imx_wdt.c | 342 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 355 insertions(+), 0 deletions(-) create mode 100644 drivers/watchdog/imx_wdt.c
drivers/watchdog/Kconfig +12 -0
@@ -73,6 +73,18 @@ config WM8350_WATCHDOG # ARM Architecture +config IMX_WDT + tristate "IMX Watchdog" + depends on ARCH_MXC + help + This is the driver for the hardware watchdog + on the Freescale IMX processors. + If you have one of these processors and wish to have + watchdog support enabled, say Y, otherwise say N. + + To compile this driver as a module, choose M here: the + module will be called imx_wdt. + config AT91RM9200_WATCHDOG tristate "AT91RM9200 watchdog" depends on ARCH_AT91RM9200
drivers/watchdog/Makefile +1 -0
@@ -46,6 +46,7 @@ obj-$(CONFIG_COH901327_WATCHDOG) += coh901327_wdt.o obj-$(CONFIG_STMP3XXX_WATCHDOG) += stmp3xxx_wdt.o obj-$(CONFIG_NUC900_WATCHDOG) += nuc900_wdt.o obj-$(CONFIG_ADX_WATCHDOG) += adx_wdt.o +obj-$(CONFIG_IMX_WDT) += imx_wdt.o # AVR32 Architecture obj-$(CONFIG_AT32AP700X_WDT) += at32ap700x_wdt.o
drivers/watchdog/imx_wdt.c new file +342 -0
342 lines not on this page · raw message
Signature · 1 line
1.6.3.3
Sascha Hauer
maintainerPATCH 1/1 Driver for the watchdog timer on all Freescale IMX processors.
Quoted 24 lines · Wolfram Sang
Signed-off-by Darius Augulis <[email protected]>Signed-off-by Wolfram Sang <[email protected]>Cc Sascha Hauer <[email protected]>Cc Wim Van Sebroeck <[email protected]>---
Changes since the last version from Darius:
* removed all #ifdef CONFIG_ARCH_* and handle the differences at runtime
* simplified house-keeping of the timeout value and fixed the conversion into the corresponding register value
* removed a superfluous static platform-device
* removed debug output and comments with (IMHO) little information
* cleaned up #includes
* fixed some typos & removed unnecessary tabs & added kernel coding style
* probably something else...drivers/watchdog/Kconfig | 12 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/imx_wdt.c | 342 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 355 insertions(+), 0 deletions(-) create mode 100644 drivers/watchdog/imx_wdt.cdrivers/watchdog/Kconfig +0
-0
[snip]
drivers/watchdog/Kconfig
Quoted 9 lines
drivers/watchdog/Kconfig +9
-0+ + base = ioremap(res->start, res_size); + if (!base) { + dev_err(&pdev->dev, "ioremap failed\n"); + ret = -EIO; + goto fail0; + } + + imx_wdt.clk = clk_get(&pdev->dev, "wdog_clk");
^^^^^^^^^^
should be NULL.
Sascha
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
PATCH v2 1/1 Driver for the watchdog timer on all Freescale IMX processors.
---
Changes since my V1:
* Use NULL instead of string in clk_get
Changes since the last version from Darius:
* removed all #ifdef CONFIG_ARCH_* and handle the differences at runtime
* simplified house-keeping of the timeout value and fixed the conversion into the corresponding register value
* removed a superfluous static platform-device
* removed debug output and comments with (IMHO) little information
* cleaned up #includes
* fixed some typos & removed unnecessary tabs & added kernel coding style
* probably something else...
drivers/watchdog/Kconfig | 12 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/imx_wdt.c | 342 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 355 insertions(+), 0 deletions(-) create mode 100644 drivers/watchdog/imx_wdt.c
drivers/watchdog/Kconfig +12 -0
@@ -73,6 +73,18 @@ config WM8350_WATCHDOG # ARM Architecture +config IMX_WDT + tristate "IMX Watchdog" + depends on ARCH_MXC + help + This is the driver for the hardware watchdog + on the Freescale IMX processors. + If you have one of these processors and wish to have + watchdog support enabled, say Y, otherwise say N. + + To compile this driver as a module, choose M here: the + module will be called imx_wdt. + config AT91RM9200_WATCHDOG tristate "AT91RM9200 watchdog" depends on ARCH_AT91RM9200
drivers/watchdog/Makefile +1 -0
@@ -46,6 +46,7 @@ obj-$(CONFIG_COH901327_WATCHDOG) += coh901327_wdt.o obj-$(CONFIG_STMP3XXX_WATCHDOG) += stmp3xxx_wdt.o obj-$(CONFIG_NUC900_WATCHDOG) += nuc900_wdt.o obj-$(CONFIG_ADX_WATCHDOG) += adx_wdt.o +obj-$(CONFIG_IMX_WDT) += imx_wdt.o # AVR32 Architecture obj-$(CONFIG_AT32AP700X_WDT) += at32ap700x_wdt.o
drivers/watchdog/imx_wdt.c new file +342 -0
342 lines not on this page · raw message
Signature · 1 line
1.6.3.3
PATCH v2 1/1 Driver for the watchdog timer on all Freescale IMX processors.
Hi All,
Quoted 6 lines
Changes since my V1:
* Use NULL instead of string in
clk_getChanges since the last version from Darius:
Quoted 8 lines
* removed all #ifdef CONFIG_ARCH_* and handle the differences at runtime
* simplified house-keeping of the timeout value and fixed the conversion into the corresponding register value
* removed a superfluous static platform-device
* removed debug output and comments with (IMHO) little information
* cleaned up #includes
* fixed some typos & removed unnecessary tabs & added kernel coding style
* probably something else...
Some general feedback first:
* The MX2 and MX3 series have a watchdog device that cannot be stopped once started. Since we use /dev/watchdog to start and stop the hardware, we normally introduce a timer to keep the watchdog alive when /dev/watchdog is closed. This is missing in this driver.
(See drivers/watchdog/at91sam9_wdt.c as an example).
* The MX1 platform is 32 bit instead of 16 bit and can be stopped and started. Maybe it would make sense to split this in 2 drivers (one for MX1 and one for the others).
Kind regards,
Wim.
PATCH v2 1/1 Driver for the watchdog timer on all Freescale IMX processors.
Hello Wim,
Quoted 6 lines
Some general feedback first:
* The MX2 and MX3 series have a watchdog device that cannot be stopped once started. Since we use/dev/watchdogto start and stop the hardware, we normally introduce a timer to keep the watchdog alive when/dev/watchdogis closed. This is missing in this driver.
(Seedrivers/watchdog/at91sam9_wdt.cas an example).
Will do. Thanks for the pointer!
Quoted 3 lines
* The MX1 platform is 32 bit instead of 16 bit and can be stopped and started. Maybe it would make sense to split this in 2 drivers (one for MX1 and one for the others).
Hmm, originally I'd prefer to keep the two sticked together. But as we seem to need a seperate timer now for MX2/3, it might probably pay off to seperate them. I will have a look.
Regards,
Wolfram
Signature · 9 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20091215/df7ad9a1/attachment.sig>