linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: renesas_sdhi: increase suspend/resume latency limit
@ 2021-05-14 15:53 Ulrich Hecht
  2021-05-19 14:25 ` Wolfram Sang
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Ulrich Hecht @ 2021-05-14 15:53 UTC (permalink / raw)
  To: linux-renesas-soc, linux-mmc; +Cc: wsa, ulf.hansson, Ulrich Hecht

The TMIO core sets a very low latency limit (100 us), but when using R-Car
SDHI hosts with SD cards, I have observed typical latencies of around 20-30
ms. This prevents runtime PM from working properly, and the devices remain
on continuously.

This patch sets the default latency limit to 100 ms to avoid that.

Signed-off-by: Ulrich Hecht <uli+renesas@fpond.eu>
---
 drivers/mmc/host/renesas_sdhi_core.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index 635bf31a6735..4f41616cc6bb 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -32,6 +32,7 @@
 #include <linux/pinctrl/pinctrl-state.h>
 #include <linux/platform_device.h>
 #include <linux/pm_domain.h>
+#include <linux/pm_qos.h>
 #include <linux/regulator/consumer.h>
 #include <linux/reset.h>
 #include <linux/sh_dma.h>
@@ -1147,6 +1148,9 @@ int renesas_sdhi_probe(struct platform_device *pdev,
 		host->ops.hs400_complete = renesas_sdhi_hs400_complete;
 	}
 
+	/* keep tmio_mmc_host_probe() from setting latency limit too low */
+	dev_pm_qos_expose_latency_limit(&pdev->dev, 100000);
+
 	ret = tmio_mmc_host_probe(host);
 	if (ret < 0)
 		goto edisclk;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-08-04 16:20 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-14 15:53 [PATCH] mmc: renesas_sdhi: increase suspend/resume latency limit Ulrich Hecht
2021-05-19 14:25 ` Wolfram Sang
2021-06-02 15:40   ` Ulrich Hecht
2021-06-18  8:17     ` Wolfram Sang
2021-06-18 10:40       ` Wolfram Sang
2021-06-30  4:44 ` Wolfram Sang
2021-07-30 15:28 ` Wolfram Sang
2021-08-02  5:34   ` Yoshihiro Shimoda
2021-08-02 11:18     ` Ulrich Hecht
2021-08-03 11:16       ` Yoshihiro Shimoda
2021-08-04  5:29         ` Yoshihiro Shimoda
2021-08-04 16:17           ` Ulrich Hecht
2021-08-02 12:53     ` Wolfram Sang
2021-08-03 11:16       ` Yoshihiro Shimoda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).