mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-25 00:30:37 +02:00
c4b57b4f21
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15920 3c298f89-4303-0410-b956-a3cf2f4a3e73
25 lines
716 B
Diff
25 lines
716 B
Diff
--- 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;
|