We're no longer updating This wiki!!

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
en:c1_watchdog_timer [2015/10/30 19:20]
moon.linux [Watchdog demon configuration files]
en:c1_watchdog_timer [2015/11/03 12:46]
moon.linux [Test Watchdog module]
Line 11: Line 11:
 Watchdog driver aml_wdt is configurable for Odroid C1/C1+. Watchdog driver aml_wdt is configurable for Odroid C1/C1+.
 </​WRAP>​ </​WRAP>​
 +
 +**Kernel Changes Need to make this working.**
 +
 +You probably need to recompile the kernel with this changes.
 +
 +<​code>​
 +diff --git a/​drivers/​amlogic/​watchdog/​aml_wdt.c b/​drivers/​amlogic/​watchdog/​aml_wdt.c
 +index e7b34b5..4ac15df 100644
 +--- a/​drivers/​amlogic/​watchdog/​aml_wdt.c
 ++++ b/​drivers/​amlogic/​watchdog/​aml_wdt.c
 +@@ -102,7 +102,7 @@ static void boot_moniter_work(struct work_struct *work)
 + }
 +
 + ​static const struct watchdog_info aml_wdt_info = {
 +-       ​.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,​
 ++       ​.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE,​
 +        .identity = "aml Watchdog",​
 + };
 +
 +diff --git a/​include/​linux/​amlogic/​aml_wdt.h b/​include/​linux/​amlogic/​aml_wdt.h
 +index 08c12ab..e1f7c4a 100644
 +--- a/​include/​linux/​amlogic/​aml_wdt.h
 ++++ b/​include/​linux/​amlogic/​aml_wdt.h
 +@@ -44,19 +44,19 @@ struct aml_wdt_dev {
 + #​define AML_WDT_ENABLED (aml_read_reg32(P_WATCHDOG_TC)&​(1 << WATCHDOG_ENABLE_BIT))
 + ​static inline void disable_watchdog(void)
 + {
 +-       ​printk(KERN_INFO "** disable watchdog\n"​);​
 ++       ​pr_emerg("​** disable watchdog\n"​);​
 +        aml_write_reg32(P_WATCHDOG_RESET,​ 0);
 +        aml_clr_reg32_mask(P_WATCHDOG_TC,​(1 << WATCHDOG_ENABLE_BIT));​
 + }
 + ​static inline void enable_watchdog(unsigned int timeout)
 + {
 +-       ​printk(KERN_INFO "** enable watchdog\n"​);​
 ++       ​pr_emerg("​** enable watchdog\n"​);​
 +        aml_write_reg32(P_WATCHDOG_RESET,​ 0);
 +        aml_write_reg32(P_WATCHDOG_TC,​ 1 << WATCHDOG_ENABLE_BIT |(timeout|WATCHDOG_COUNT_MASK));​
 + }
 + ​static inline void reset_watchdog(void)
 + {
 +-       ​printk(KERN_DEBUG"​** reset watchdog\n"​);​
 ++       ​pr_info("​** reset watchdog\n"​);​
 +        aml_write_reg32(P_WATCHDOG_RESET,​ 0);
 + }
 + #​ifdef CONFIG_AML_WDT
 +</​code>​
  
 You should be able to see /​dev/​watchdog and /​dev/​watchdog0 device files being created. You should be able to see /​dev/​watchdog and /​dev/​watchdog0 device files being created.
en/c1_watchdog_timer.txt ยท Last modified: 2015/11/24 12:00 by moon.linux
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0