jz4740_wdt.c (85f6df1492ff8b620cf601a1509520d2b89858dd) | jz4740_wdt.c (0197c1c49ef1ff386b2ebb6d3b0fc85a8e174b5c) |
---|---|
1/* 2 * Copyright (C) 2010, Paul Cercueil <paul@crapouillou.net> 3 * JZ4740 Watchdog driver 4 * 5 * This program is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License as published by the 7 * Free Software Foundation; either version 2 of the License, or (at your 8 * option) any later version. --- 95 unchanged lines hidden (view full) --- 104 105 writew((u16)timeout_value, drvdata->base + JZ_REG_WDT_TIMER_DATA); 106 writew(0x0, drvdata->base + JZ_REG_WDT_TIMER_COUNTER); 107 writew(clock_div | JZ_WDT_CLOCK_RTC, 108 drvdata->base + JZ_REG_WDT_TIMER_CONTROL); 109 110 writeb(0x1, drvdata->base + JZ_REG_WDT_COUNTER_ENABLE); 111 | 1/* 2 * Copyright (C) 2010, Paul Cercueil <paul@crapouillou.net> 3 * JZ4740 Watchdog driver 4 * 5 * This program is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License as published by the 7 * Free Software Foundation; either version 2 of the License, or (at your 8 * option) any later version. --- 95 unchanged lines hidden (view full) --- 104 105 writew((u16)timeout_value, drvdata->base + JZ_REG_WDT_TIMER_DATA); 106 writew(0x0, drvdata->base + JZ_REG_WDT_TIMER_COUNTER); 107 writew(clock_div | JZ_WDT_CLOCK_RTC, 108 drvdata->base + JZ_REG_WDT_TIMER_CONTROL); 109 110 writeb(0x1, drvdata->base + JZ_REG_WDT_COUNTER_ENABLE); 111 |
112 wdt_dev->timeout = new_timeout; |
|
112 return 0; 113} 114 115static int jz4740_wdt_start(struct watchdog_device *wdt_dev) 116{ 117 jz4740_timer_enable_watchdog(); 118 jz4740_wdt_set_timeout(wdt_dev, wdt_dev->timeout); 119 --- 106 unchanged lines hidden --- | 113 return 0; 114} 115 116static int jz4740_wdt_start(struct watchdog_device *wdt_dev) 117{ 118 jz4740_timer_enable_watchdog(); 119 jz4740_wdt_set_timeout(wdt_dev, wdt_dev->timeout); 120 --- 106 unchanged lines hidden --- |