Skip to content

Commit b42d781

Browse files
Pohsun Sudlezcano
authored andcommitted
clocksource/drivers/timer-tegra186: Fix watchdog self-pinging
This change removes watchdog self-pinging behavior. The timer irq handler is triggered due to the 1st expiration, the handler disables and enables watchdog but also implicitly clears the expiration count so the count can only be 0 or 1. Since this watchdog supports opened, configured, or pinged by systemd, We remove this behavior or the watchdog may not bark when systemd crashes since the 5th expiration never comes. Signed-off-by: Pohsun Su <[email protected]> Signed-off-by: Robert Lin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
1 parent 28c842c commit b42d781

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

drivers/clocksource/timer-tegra186.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,6 @@ static void tegra186_wdt_enable(struct tegra186_wdt *wdt)
174174
value &= ~WDTCR_PERIOD_MASK;
175175
value |= WDTCR_PERIOD(1);
176176

177-
/* enable local interrupt for WDT petting */
178-
value |= WDTCR_LOCAL_INT_ENABLE;
179-
180177
/* enable local FIQ and remote interrupt for debug dump */
181178
if (0)
182179
value |= WDTCR_REMOTE_INT_ENABLE |
@@ -427,23 +424,10 @@ static int tegra186_timer_usec_init(struct tegra186_timer *tegra)
427424
return clocksource_register_hz(&tegra->usec, USEC_PER_SEC);
428425
}
429426

430-
static irqreturn_t tegra186_timer_irq(int irq, void *data)
431-
{
432-
struct tegra186_timer *tegra = data;
433-
434-
if (watchdog_active(&tegra->wdt->base)) {
435-
tegra186_wdt_disable(tegra->wdt);
436-
tegra186_wdt_enable(tegra->wdt);
437-
}
438-
439-
return IRQ_HANDLED;
440-
}
441-
442427
static int tegra186_timer_probe(struct platform_device *pdev)
443428
{
444429
struct device *dev = &pdev->dev;
445430
struct tegra186_timer *tegra;
446-
unsigned int irq;
447431
int err;
448432

449433
tegra = devm_kzalloc(dev, sizeof(*tegra), GFP_KERNEL);
@@ -462,8 +446,6 @@ static int tegra186_timer_probe(struct platform_device *pdev)
462446
if (err < 0)
463447
return err;
464448

465-
irq = err;
466-
467449
/* create a watchdog using a preconfigured timer */
468450
tegra->wdt = tegra186_wdt_create(tegra, 0);
469451
if (IS_ERR(tegra->wdt)) {
@@ -490,17 +472,8 @@ static int tegra186_timer_probe(struct platform_device *pdev)
490472
goto unregister_osc;
491473
}
492474

493-
err = devm_request_irq(dev, irq, tegra186_timer_irq, 0,
494-
"tegra186-timer", tegra);
495-
if (err < 0) {
496-
dev_err(dev, "failed to request IRQ#%u: %d\n", irq, err);
497-
goto unregister_usec;
498-
}
499-
500475
return 0;
501476

502-
unregister_usec:
503-
clocksource_unregister(&tegra->usec);
504477
unregister_osc:
505478
clocksource_unregister(&tegra->osc);
506479
unregister_tsc:

0 commit comments

Comments
 (0)