From patchwork Fri Aug 22 08:41:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 4762311 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 21F39C0338 for ; Fri, 22 Aug 2014 08:41:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 59EEA2013A for ; Fri, 22 Aug 2014 08:41:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 52E5C20122 for ; Fri, 22 Aug 2014 08:41:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755326AbaHVIlN (ORCPT ); Fri, 22 Aug 2014 04:41:13 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:49498 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755212AbaHVIlM (ORCPT ); Fri, 22 Aug 2014 04:41:12 -0400 Received: by mail-pa0-f42.google.com with SMTP id lf10so16290484pab.1 for ; Fri, 22 Aug 2014 01:41:12 -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:to:cc:in-reply-to :references:mime-version:content-type; bh=GcghQL+bCBe5m7qdikbfl5dFQ3TyYBu6JJdOyxa7yUo=; b=xJym79EmbtEl3sIVPuNp0VTLp0KKxR6LvrNePNWGlwNi6t3O2SkjxUdnX+gOZKPR1X 8V2b7MX/iXtaF/XF9HV3HiqhYYgcZeKQ5AI5gZagxbUleNrkh7dySOjIt02yrtVkYv2h Yy/UPt9z2/m/B0fzBeagF/UXqR6YiFrAkPQqXJpjkjdfS36Ks5YPNHT0h7tZmAO/C9cA nPpi8DtsZBI4RmdtWqFZRJ4NflROKk9JjCQSYck1+dSweK/yUxXJY0qn/Mwv48qOv2Sy HHtE+ewm1L5kIoEt3hgrQBruy25XNLMrsAHZe1zDty5IxKefY+W2kHeXNSIefHpOjlcL DtIQ== X-Received: by 10.66.182.10 with SMTP id ea10mr4503448pac.123.1408696872033; Fri, 22 Aug 2014 01:41:12 -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 cv2sm27903975pbc.34.2014.08.22.01.41.10 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 22 Aug 2014 01:41:11 -0700 (PDT) Date: Fri, 22 Aug 2014 01:41:11 -0700 (PDT) Message-ID: <87siko6hne.wl%kuninori.morimoto.gx@gmail.com> From: Kuninori Morimoto Subject: [PATCH 09/10 v2 resend] mmc: tmio: ensure that the clock has been stopped before set_clock User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 To: Simon , Chris Ball Cc: Ian Molton , Morimoto , Magnus , Linux-SH , linux-mmc@vger.kernel.org In-Reply-To: <8761hk7wgy.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") Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 --- 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 */