File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 21
21
#define WDTSET 0x04
22
22
#define WDTTIM 0x08
23
23
#define WDTINT 0x0C
24
+ #define PECR 0x10
25
+ #define PEEN 0x14
24
26
#define WDTCNT_WDTEN BIT(0)
25
27
#define WDTINT_INTDISP BIT(0)
28
+ #define PEEN_FORCE BIT(0)
26
29
27
30
#define WDT_DEFAULT_TIMEOUT 60U
28
31
@@ -117,17 +120,14 @@ static int rzg2l_wdt_restart(struct watchdog_device *wdev,
117
120
{
118
121
struct rzg2l_wdt_priv * priv = watchdog_get_drvdata (wdev );
119
122
120
- /* Reset the module before we modify any register */
121
- reset_control_reset (priv -> rstc );
122
-
123
123
clk_prepare_enable (priv -> pclk );
124
124
clk_prepare_enable (priv -> osc_clk );
125
125
126
- /* smallest counter value to reboot soon */
127
- rzg2l_wdt_write (priv , WDTSET_COUNTER_VAL ( 1 ), WDTSET );
126
+ /* Generate Reset (WDTRSTB) Signal on parity error */
127
+ rzg2l_wdt_write (priv , 0 , PECR );
128
128
129
- /* Enable watchdog timer */
130
- rzg2l_wdt_write (priv , WDTCNT_WDTEN , WDTCNT );
129
+ /* Force parity error */
130
+ rzg2l_wdt_write (priv , PEEN_FORCE , PEEN );
131
131
132
132
return 0 ;
133
133
}
You can’t perform that action at this time.
0 commit comments