From patchwork Mon Aug 25 03:02:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 4772351 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 56D08C0338 for ; Mon, 25 Aug 2014 03:02:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 80B7E20121 for ; Mon, 25 Aug 2014 03:02:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B782E20114 for ; Mon, 25 Aug 2014 03:02:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753941AbaHYDCm (ORCPT ); Sun, 24 Aug 2014 23:02:42 -0400 Received: from mail-pd0-f169.google.com ([209.85.192.169]:38919 "EHLO mail-pd0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753826AbaHYDCl (ORCPT ); Sun, 24 Aug 2014 23:02:41 -0400 Received: by mail-pd0-f169.google.com with SMTP id y10so19445415pdj.28 for ; Sun, 24 Aug 2014 20:02:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:from:subject:user-agent:mime-version:to:cc :in-reply-to:references:content-type; bh=igdg9djpJOHQ7zO76J2KjLePR2Tqk4GztCN+rAORRC4=; b=OCAM/Kc9PdC2AG2ay3x6FCElsFXrUjJncDDKmen4PAWtxZt61IGUCJrIpPNfjc+5sD 1DBrb+hMBET1PQnj7mHdeIpps1I5+39HOVE9D38qp5oasVZp14V4+24W5swr0B6KGYq3 AIlRVTM84w23/OMRy7YfKen6vwRf75B8MRL2kYChc4KzudH8pugcAb2haL4dc3yfBh+S 0dlFcozHqn8LTixS/u6UE6L8OM/zdrk1l2FZOtVzJt1MYd3sak7tzFegQfQHulgF37wF nVPPVRDw0KxfON65i6OMjsMQOSk+rjzAsGIQo4Ue7DjP7elx3ZG42KMm84bKMlN6O+o4 MdAQ== X-Received: by 10.70.88.39 with SMTP id bd7mr21973878pdb.68.1408935761173; Sun, 24 Aug 2014 20:02:41 -0700 (PDT) Received: from remon.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id j10sm49824831pdo.67.2014.08.24.20.02.39 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 24 Aug 2014 20:02:40 -0700 (PDT) Date: Sun, 24 Aug 2014 20:02:40 -0700 (PDT) Message-ID: <87zjets241.wl%kuninori.morimoto.gx@gmail.com> From: Kuninori Morimoto Subject: [PATCH 8/9 v3] mmc: tmio: ensure that the clock has been stopped before set_clock User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") To: Simon , Chris Ball , Ulf Hansson Cc: Ian Molton , Morimoto , Magnus , Linux-SH , linux-mmc@vger.kernel.org In-Reply-To: <87bnr9tgwj.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> <87bnr9tgwj.wl%kuninori.morimoto.gx@gmail.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- v2 -> v3 - no change 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 */