diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2009-05-18 20:56:56 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2009-05-18 20:56:56 +0000 |
commit | 807811208caa9eb7591740893007484530493d42 (patch) | |
tree | 156c25ac9b37d9c4da1247c8628d12d0656d622d /target | |
parent | c07078a6f4c691a531a96da6a30bd620262638f4 (diff) | |
download | master-187ad058-807811208caa9eb7591740893007484530493d42.tar.gz master-187ad058-807811208caa9eb7591740893007484530493d42.tar.bz2 master-187ad058-807811208caa9eb7591740893007484530493d42.zip |
[gemini] disable the watchdog if the bootloader left it enabled
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15920 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/gemini/patches/004-gemini-disable-watchdog-in-probe.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/target/linux/gemini/patches/004-gemini-disable-watchdog-in-probe.patch b/target/linux/gemini/patches/004-gemini-disable-watchdog-in-probe.patch new file mode 100644 index 0000000000..d1f5c340da --- /dev/null +++ b/target/linux/gemini/patches/004-gemini-disable-watchdog-in-probe.patch @@ -0,0 +1,24 @@ +--- a/drivers/watchdog/gemini_wdt.c ++++ b/drivers/watchdog/gemini_wdt.c +@@ -224,6 +224,7 @@ static int __init gemini_wdt_probe(struc + struct resource *res; + void __iomem *base; + struct gemini_wdt_struct *gemini_wdt; ++ unsigned int reg; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!res) { +@@ -267,6 +268,13 @@ static int __init gemini_wdt_probe(struc + + gemini_wdt_miscdev.parent = &pdev->dev; + ++ reg = __raw_readw(gemini_wdt->base + GEMINI_WDCR); ++ if (reg & WDCR_ENABLE) { ++ /* Watchdog was enabled by the bootloader, disable it. */ ++ reg &= ~(WDCR_ENABLE); ++ __raw_writel(reg, gemini_wdt->base + GEMINI_WDCR); ++ } ++ + ret = misc_register(&gemini_wdt_miscdev); + if (ret) + goto fail2; |