@@ -181,6 +181,7 @@ static int npcm_wdt_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct npcm_wdt *wdt;
+ u32 priority;
int irq;
int ret;
@@ -196,6 +197,11 @@ static int npcm_wdt_probe(struct platform_device *pdev)
if (irq < 0)
return irq;
+ if (of_property_read_u32(pdev->dev.of_node, "nuvoton,restart-priority", &priority))
+ watchdog_set_restart_priority(&wdt->wdd, 128);
+ else
+ watchdog_set_restart_priority(&wdt->wdd, priority);
+
wdt->wdd.info = &npcm_wdt_info;
wdt->wdd.ops = &npcm_wdt_ops;
wdt->wdd.min_timeout = 1;
Add NPCM watchdog restart priority support. The default restart priority is 128. Signed-off-by: Tomer Maimon <tmaimon77@gmail.com> --- drivers/watchdog/npcm_wdt.c | 6 ++++++ 1 file changed, 6 insertions(+)