From: Kuninori Morimoto Subject: [PATCH 09/10 v2 resend] mmc: tmio: ensure that the clock has been stopped before set_clock Date: Fri, 22 Aug 2014 01:41:11 -0700 (PDT) Message-ID: <87siko6hne.wl%kuninori.morimoto.gx@gmail.com> References: <87simtenpi.wl%kuninori.morimoto.gx@renesas.com> <87pphxe2q0.wl%kuninori.morimoto.gx@renesas.com> <53AD638C.5060907@renesas.com> <87egxehsec.wl%kuninori.morimoto.gx@gmail.com> <8761hk7wgy.wl%kuninori.morimoto.gx@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <8761hk7wgy.wl%kuninori.morimoto.gx@gmail.com> Sender: linux-sh-owner@vger.kernel.org To: Simon , Chris Ball Cc: Ian Molton , Morimoto , Magnus , Linux-SH , linux-mmc@vger.kernel.org List-Id: linux-mmc@vger.kernel.org From: Kuninori Morimoto This patch ensures that the clock has been stopped before it calls tmio_mmc_set_clock(). The clock settings might be failed without this patch Tested-by: Nguyen Xuan Nui Tested-by: Hiep Cao Minh Signed-off-by: Kuninori Morimoto --- drivers/mmc/host/tmio_mmc_pio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index da3c74d..1c5a631 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c @@ -895,6 +895,7 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) } if (host->power == TMIO_MMC_OFF_STOP) tmio_mmc_reset(host); + tmio_mmc_clk_stop(host); tmio_mmc_set_clock(host, ios->clock); if (host->power == TMIO_MMC_OFF_STOP) /* power up SD card and the bus */ -- 1.7.9.5