-From f2ae990e49d53c8e70651adab9bb1a6360a8db8d Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
+From 164805157f3c6834670afbaff563353c773131f1 Mon Sep 17 00:00:00 2001
+From: Tony Lindgren <tony@atomide.com>
Date: Mon, 17 Aug 2020 12:24:28 +0300
Subject: clocksource/drivers/timer-ti-dm: Do reset before enable
From: Tony Lindgren <tony@atomide.com>
-[ Upstream commit 164805157f3c6834670afbaff563353c773131f1 ]
+commit 164805157f3c6834670afbaff563353c773131f1 upstream.
Commit 6cfcd5563b4f ("clocksource/drivers/timer-ti-dm: Fix suspend and
resume for am3 and am4") exposed a new issue for type2 dual mode timers
dmtimer_systimer_disable() to do this without adding forward declarations.
Fixes: 6cfcd5563b4f ("clocksource/drivers/timer-ti-dm: Fix suspend and resume for am3 and am4")
-Reported-by: H. Nikolaus Schaller" <hns@goldelico.com>
+Reported-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200817092428.6176-1-tony@atomide.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
---
- drivers/clocksource/timer-ti-dm-systimer.c | 44 +++++++++++-----------
+ drivers/clocksource/timer-ti-dm-systimer.c | 44 +++++++++++++++--------------
1 file changed, 23 insertions(+), 21 deletions(-)
-diff --git a/drivers/clocksource/timer-ti-dm-systimer.c b/drivers/clocksource/timer-ti-dm-systimer.c
-index f6fd1c1cc527f..33b3e8aa2cc50 100644
--- a/drivers/clocksource/timer-ti-dm-systimer.c
+++ b/drivers/clocksource/timer-ti-dm-systimer.c
-@@ -69,12 +69,33 @@ static bool dmtimer_systimer_revision1(struct dmtimer_systimer *t)
+@@ -69,12 +69,33 @@ static bool dmtimer_systimer_revision1(s
return !(tidr >> 16);
}
writel_relaxed(BIT(1) | BIT(2), t->base + t->ifctrl);
ret = readl_poll_timeout_atomic(syss, l, l & BIT(0), 100,
DMTIMER_RESET_WAIT);
-@@ -88,6 +109,7 @@ static int __init dmtimer_systimer_type2_reset(struct dmtimer_systimer *t)
+@@ -88,6 +109,7 @@ static int __init dmtimer_systimer_type2
void __iomem *sysc = t->base + t->sysc;
u32 l;
l = readl_relaxed(sysc);
l |= BIT(0);
writel_relaxed(l, sysc);
-@@ -336,26 +358,6 @@ static int __init dmtimer_systimer_init_clock(struct dmtimer_systimer *t,
+@@ -336,26 +358,6 @@ static int __init dmtimer_systimer_init_
return 0;
}
static int __init dmtimer_systimer_setup(struct device_node *np,
struct dmtimer_systimer *t)
{
-@@ -409,8 +411,8 @@ static int __init dmtimer_systimer_setup(struct device_node *np,
+@@ -409,8 +411,8 @@ static int __init dmtimer_systimer_setup
t->wakeup = regbase + _OMAP_TIMER_WAKEUP_EN_OFFSET;
t->ifctrl = regbase + _OMAP_TIMER_IF_CTRL_OFFSET;
pr_debug("dmtimer rev %08x sysc %08x\n", readl_relaxed(t->base),
readl_relaxed(t->base + t->sysc));
---
-2.25.1
-
ieee802154-fix-one-possible-memleak-in-ca8210_dev_co.patch
ieee802154-adf7242-check-status-of-adf7242_read_reg.patch
clocksource-drivers-h8300_timer8-fix-wrong-return-va.patch
-clocksource-drivers-timer-ti-dm-do-reset-before-enab.patch
mwifiex-increase-aes-key-storage-size-to-256-bits.patch
batman-adv-bla-fix-type-misuse-for-backbone_gw-hash-.patch
libbpf-fix-build-failure-from-uninitialized-variable.patch
io_uring-ensure-open-openat2-name-is-cleaned-on-cancelation.patch
kvm-arm64-assume-write-fault-on-s1ptw-permission-fault-on-instruction-fetch.patch
dm-fix-bio-splitting-and-its-bio-completion-order-for-regular-io.patch
+clocksource-drivers-timer-ti-dm-do-reset-before-enable.patch