@@ -55,14 +55,14 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
55
55
56
56
struct imx_wdt_hw_feature {
57
57
bool prescaler_enable ;
58
+ bool post_rcs_wait ;
58
59
u32 wdog_clock_rate ;
59
60
};
60
61
61
62
struct imx7ulp_wdt_device {
62
63
struct watchdog_device wdd ;
63
64
void __iomem * base ;
64
65
struct clk * clk ;
65
- bool post_rcs_wait ;
66
66
bool ext_reset ;
67
67
const struct imx_wdt_hw_feature * hw ;
68
68
};
@@ -95,7 +95,7 @@ static int imx7ulp_wdt_wait_rcs(struct imx7ulp_wdt_device *wdt)
95
95
ret = - ETIMEDOUT ;
96
96
97
97
/* Wait 2.5 clocks after RCS done */
98
- if (wdt -> post_rcs_wait )
98
+ if (wdt -> hw -> post_rcs_wait )
99
99
usleep_range (wait_min , wait_min + 2000 );
100
100
101
101
return ret ;
@@ -334,15 +334,6 @@ static int imx7ulp_wdt_probe(struct platform_device *pdev)
334
334
/* The WDOG may need to do external reset through dedicated pin */
335
335
imx7ulp_wdt -> ext_reset = of_property_read_bool (dev -> of_node , "fsl,ext-reset-output" );
336
336
337
- imx7ulp_wdt -> post_rcs_wait = true;
338
- if (of_device_is_compatible (dev -> of_node ,
339
- "fsl,imx8ulp-wdt" )) {
340
- dev_info (dev , "imx8ulp wdt probe\n" );
341
- imx7ulp_wdt -> post_rcs_wait = false;
342
- } else {
343
- dev_info (dev , "imx7ulp wdt probe\n" );
344
- }
345
-
346
337
wdog = & imx7ulp_wdt -> wdd ;
347
338
wdog -> info = & imx7ulp_wdt_info ;
348
339
wdog -> ops = & imx7ulp_wdt_ops ;
@@ -403,6 +394,12 @@ static const struct dev_pm_ops imx7ulp_wdt_pm_ops = {
403
394
static const struct imx_wdt_hw_feature imx7ulp_wdt_hw = {
404
395
.prescaler_enable = false,
405
396
.wdog_clock_rate = 1000 ,
397
+ .post_rcs_wait = true,
398
+ };
399
+
400
+ static const struct imx_wdt_hw_feature imx8ulp_wdt_hw = {
401
+ .prescaler_enable = false,
402
+ .wdog_clock_rate = 1000 ,
406
403
};
407
404
408
405
static const struct imx_wdt_hw_feature imx93_wdt_hw = {
@@ -411,8 +408,8 @@ static const struct imx_wdt_hw_feature imx93_wdt_hw = {
411
408
};
412
409
413
410
static const struct of_device_id imx7ulp_wdt_dt_ids [] = {
414
- { .compatible = "fsl,imx8ulp-wdt" , .data = & imx7ulp_wdt_hw , },
415
411
{ .compatible = "fsl,imx7ulp-wdt" , .data = & imx7ulp_wdt_hw , },
412
+ { .compatible = "fsl,imx8ulp-wdt" , .data = & imx8ulp_wdt_hw , },
416
413
{ .compatible = "fsl,imx93-wdt" , .data = & imx93_wdt_hw , },
417
414
{ /* sentinel */ }
418
415
};
0 commit comments