Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ccf844af authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "soc: qcom: watchdog_v2: update last_pet variable during resume"

parents 7869aeda ea69590a
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -123,6 +123,8 @@ static int msm_watchdog_suspend(struct device *dev)
		return 0;
	__raw_writel(1, wdog_dd->base + WDT0_RST);
	if (wdog_dd->wakeup_irq_enable) {
		/* Make sure register write is complete before proceeding */
		mb();
		wdog_dd->last_pet = sched_clock();
		return 0;
	}
@@ -137,8 +139,15 @@ static int msm_watchdog_resume(struct device *dev)
{
	struct msm_watchdog_data *wdog_dd =
			(struct msm_watchdog_data *)dev_get_drvdata(dev);
	if (!enable || wdog_dd->wakeup_irq_enable)
	if (!enable)
		return 0;
	if (wdog_dd->wakeup_irq_enable) {
		__raw_writel(1, wdog_dd->base + WDT0_RST);
		/* Make sure register write is complete before proceeding */
		mb();
		wdog_dd->last_pet = sched_clock();
		return 0;
	}
	__raw_writel(1, wdog_dd->base + WDT0_EN);
	__raw_writel(1, wdog_dd->base + WDT0_RST);
	mb();