From: Sasha Levin Date: Mon, 1 Jul 2024 13:16:34 +0000 (-0400) Subject: Fixes for 5.10 X-Git-Tag: v4.19.317~98 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=50cf31ef8c235ef932fd8ed1b746d31a8426e352;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 5.10 Signed-off-by: Sasha Levin --- diff --git a/queue-5.10/counter-ti-eqep-enable-clock-at-probe.patch b/queue-5.10/counter-ti-eqep-enable-clock-at-probe.patch new file mode 100644 index 00000000000..ebeed8ddc20 --- /dev/null +++ b/queue-5.10/counter-ti-eqep-enable-clock-at-probe.patch @@ -0,0 +1,59 @@ +From 31082bd502218aad7f8d6b4b091a599f0f8b7530 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 21 Jun 2024 17:22:40 -0500 +Subject: counter: ti-eqep: enable clock at probe + +From: David Lechner + +[ Upstream commit 0cf81c73e4c6a4861128a8f27861176ec312af4e ] + +The TI eQEP clock is both a functional and interface clock. Since it is +required for the device to function, we should be enabling it at probe. + +Up to now, we've just been lucky that the clock was enabled by something +else on the system already. + +Fixes: f213729f6796 ("counter: new TI eQEP driver") +Reviewed-by: Judith Mendez +Signed-off-by: David Lechner +Link: https://lore.kernel.org/r/20240621-ti-eqep-enable-clock-v2-1-edd3421b54d4@baylibre.com +Signed-off-by: William Breathitt Gray +Signed-off-by: Sasha Levin +--- + drivers/counter/ti-eqep.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/drivers/counter/ti-eqep.c b/drivers/counter/ti-eqep.c +index 65df9ef5b5bc0..6343998819296 100644 +--- a/drivers/counter/ti-eqep.c ++++ b/drivers/counter/ti-eqep.c +@@ -6,6 +6,7 @@ + */ + + #include ++#include + #include + #include + #include +@@ -349,6 +350,7 @@ static int ti_eqep_probe(struct platform_device *pdev) + struct device *dev = &pdev->dev; + struct ti_eqep_cnt *priv; + void __iomem *base; ++ struct clk *clk; + int err; + + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); +@@ -388,6 +390,10 @@ static int ti_eqep_probe(struct platform_device *pdev) + pm_runtime_enable(dev); + pm_runtime_get_sync(dev); + ++ clk = devm_clk_get_enabled(dev, NULL); ++ if (IS_ERR(clk)) ++ return dev_err_probe(dev, PTR_ERR(clk), "failed to enable clock\n"); ++ + err = counter_register(&priv->counter); + if (err < 0) { + pm_runtime_put_sync(dev); +-- +2.43.0 + diff --git a/queue-5.10/series b/queue-5.10/series index c1a21958abc..16767785e72 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -297,3 +297,4 @@ ocfs2-fix-dio-failure-due-to-insufficient-transaction-credits.patch mmc-sdhci-pci-convert-pcibios_-return-codes-to-errnos.patch mmc-sdhci-do-not-invert-write-protect-twice.patch mmc-sdhci-do-not-lock-spinlock-around-mmc_gpio_get_ro.patch +counter-ti-eqep-enable-clock-at-probe.patch