Skip to contentSkip to conversation

ftwdt010_wdt: move header to include/faraday and enhance

PATCH New Macpaul Lin 2 participants 2 messages Apr 12, 2011 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ftwdt010_wdt: move header to include/faraday and enhance

1. Move header to include/faraday
2. Fix include path in ftwdt010_wdt.c
3. Fix function prototype and declaration to
- ftwdt010_wdt_settimeout
- ftwdt010_wdt_reset
- ftwdt010_wdt_disable
4. Add "#if definde (CONFIG_HW_WATCHDOG)" let user have flexibilty to choose which better to his product.

---
Note:
- This patch is the diff of ftwdt010_wdt between the code in current

    master (v4) and the latest patch (v6, /patch/88164/).
 drivers/watchdog/ftwdt010_wdt.c |   12 +++--
 drivers/watchdog/ftwdt010_wdt.h |  103 -------------------------------------
 include/faraday/ftwdt010_wdt.h  |  106 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 113 insertions(+), 108 deletions(-)
 delete mode 100644 drivers/watchdog/ftwdt010_wdt.h
 create mode 100644 include/faraday/ftwdt010_wdt.h
drivers/watchdog/ftwdt010_wdt.c +7 -5
index 6e0617b..c9cb53e 100644
@@ -29,13 +29,13 @@
 #include <common.h>
 #include <watchdog.h>
 #include <asm/io.h>
-#include "ftwdt010_wdt.h"
+#include <faraday/ftwdt010_wdt.h>
 
 /*
  * Set the watchdog time interval.
  * Counter is 32 bit.
  */
-static int ftwdt010_wdt_settimeout(unsigned int timeout)
+int ftwdt010_wdt_settimeout(unsigned int timeout)
 {
 	unsigned int reg;
 
@@ -61,7 +61,7 @@ static int ftwdt010_wdt_settimeout(unsigned int timeout)
 	return 0;
 }
 
-void ftwdt010_wdt_reset()
+void ftwdt010_wdt_reset(void)
 {
 	struct ftwdt010_wdt *wd = (struct ftwdt010_wdt *)CONFIG_FTWDT010_BASE;
 
@@ -75,7 +75,7 @@ void ftwdt010_wdt_reset()
 	writel((FTWDT010_WDCR_RST | FTWDT010_WDCR_ENABLE), &wd->wdcr);
 }
 
-void ftwdt010_wdt_disable()
+void ftwdt010_wdt_disable(void)
 {
 	struct ftwdt010_wdt *wd = (struct ftwdt010_wdt *)CONFIG_FTWDT010_BASE;
 
@@ -90,7 +90,8 @@ void ftwdt010_wdt_disable()
 	writel(0, &wd->wdcr);
 }
 
-void hw_watchdog_reset()
+#if defined(CONFIG_HW_WATCHDOG)
+void hw_watchdog_reset(void)
 {
 	ftwdt010_wdt_reset();
 }
@@ -100,3 +101,4 @@ void hw_watchdog_init(void)
 	/* set timer in ms */
 	ftwdt010_wdt_settimeout(CONFIG_FTWDT010_HW_TIMEOUT * 1000);
 }
+#endif
drivers/watchdog/ftwdt010_wdt.h deleted +0 -103

103 lines not on this page · raw message

include/faraday/ftwdt010_wdt.h new file +106 -0

106 lines not on this page · raw message

Signature · 1 line
1.7.3.5
#1 lore raw

PATCH 1/1 ftwdt010_wdt: move header to include/faraday and enhance

Dear Macpaul Lin,

Quoted 14 lines · In message <[email protected]> you wrote:

1. Move header to include/faraday
2. Fix include path in ftwdt010_wdt.c
3. Fix function prototype and declaration to
- ftwdt010_wdt_settimeout
- ftwdt010_wdt_reset
- ftwdt010_wdt_disable
4. Add "#if definde (CONFIG_HW_WATCHDOG)" let user have flexibilty to choose which better to his product.

---
Note:
- This patch is the diff of ftwdt010_wdt between the code in current

Quoted 8 lines
    master (v4) and the latest patch (v6, /patch/88164/).
 drivers/watchdog/ftwdt010_wdt.c |   12 +++--
 drivers/watchdog/ftwdt010_wdt.h |  103 -------------------------------------
 include/faraday/ftwdt010_wdt.h  |  106 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 113 insertions(+), 108 deletions(-)
 delete mode 100644 drivers/watchdog/ftwdt010_wdt.h
 create mode 100644 include/faraday/ftwdt010_wdt.h

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"In Christianity neither morality nor religion come into contact with
reality at any point."                          - Friedrich Nietzsche