From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from vsp-unauthed02.binero.net ([195.74.38.227]:64731 "EHLO vsp-unauthed02.binero.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726955AbeJPJ1j (ORCPT ); Tue, 16 Oct 2018 05:27:39 -0400 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= To: Wolfram Sang , Ulf Hansson , linux-mmc@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, =?UTF-8?q?Niklas=20S=C3=B6derlund?= Subject: [PATCH v2 1/3] mmc: tmio: enable module clock before resetting when resuming Date: Tue, 16 Oct 2018 03:38:30 +0200 Message-Id: <20181016013832.2385-2-niklas.soderlund@ragnatech.se> In-Reply-To: <20181016013832.2385-1-niklas.soderlund@ragnatech.se> References: <20181016013832.2385-1-niklas.soderlund@ragnatech.se> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-renesas-soc-owner@vger.kernel.org List-ID: From: Niklas Söderlund On runtime power management resume, the host clock needs to be enabled before calling tmio_mmc_reset. If the mmc device has a power domain entry, the host clock is enabled via genpd_runtime_resume, running before tmio_mmc_host_runtime_resume. If the mmc device has no power domain entry, however, genpd_runtime_resume is not called. This patch changes tmio_mmc_host_runtime_resume to enable the host clock before calling tmio_mmc_reset. Based on work from Masaharu Hayakawa. Signed-off-by: Niklas Söderlund --- drivers/mmc/host/tmio_mmc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c index f05c3a622f090cd6..71d3b380760d425f 100644 --- a/drivers/mmc/host/tmio_mmc_core.c +++ b/drivers/mmc/host/tmio_mmc_core.c @@ -1330,8 +1330,8 @@ int tmio_mmc_host_runtime_resume(struct device *dev) { struct tmio_mmc_host *host = dev_get_drvdata(dev); - tmio_mmc_reset(host); tmio_mmc_clk_enable(host); + tmio_mmc_reset(host); if (host->clk_cache) host->set_clock(host, host->clk_cache); -- 2.19.1