From patchwork Sat Apr 23 01:01:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 1168 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:49:48 -0000 Delivered-To: patches@linaro.org Received: by 10.224.80.148 with SMTP id t20cs36567qak; Fri, 22 Apr 2011 18:02:00 -0700 (PDT) Received: by 10.236.176.166 with SMTP id b26mr1648132yhm.142.1303520519791; Fri, 22 Apr 2011 18:01:59 -0700 (PDT) Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152]) by mx.google.com with ESMTPS id h4si7888716yhm.250.2011.04.22.18.01.58 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 22 Apr 2011 18:01:58 -0700 (PDT) Received-SPF: pass (google.com: domain of jstultz@us.ibm.com designates 32.97.110.152 as permitted sender) client-ip=32.97.110.152; Authentication-Results: mx.google.com; spf=pass (google.com: domain of jstultz@us.ibm.com designates 32.97.110.152 as permitted sender) smtp.mail=jstultz@us.ibm.com Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by e34.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p3N0ng8N000678; Fri, 22 Apr 2011 18:49:42 -0600 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p3N11rq7096596; Fri, 22 Apr 2011 19:01:54 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p3N11QwO030956; Fri, 22 Apr 2011 19:01:26 -0600 Received: from kernel.beaverton.ibm.com (kernel.beaverton.ibm.com [9.47.67.96]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p3N11Qd2030949; Fri, 22 Apr 2011 19:01:26 -0600 Received: by kernel.beaverton.ibm.com (Postfix, from userid 1056) id A288D1E7511; Fri, 22 Apr 2011 18:01:52 -0700 (PDT) From: John Stultz To: linux-mmc@vger.kernel.org Cc: Todd Poynor , Chris Ball , Arnd Bergmann , Dima Zavin , John Stultz Subject: [PATCH 3/6] sdhci: Always pass clock request value zero to set_clock host op Date: Fri, 22 Apr 2011 18:01:39 -0700 Message-Id: <1303520502-32171-4-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.7.3.2.146.gca209 In-Reply-To: <1303520502-32171-1-git-send-email-john.stultz@linaro.org> References: <1303520502-32171-1-git-send-email-john.stultz@linaro.org> From: Todd Poynor To allow the set_clock host op to disable the SDCLK source when not needed, always call the host op when the requested clock speed is zero. Do this even if host->clock already equals zero, because the SDHCI driver may set that value (without calling the host op) to force an update at the next (non-zero-speed) call. CC: Chris Ball CC: Arnd Bergmann CC: Dima Zavin Change-Id: If99230d76138679b5767f77cb925f15408ae518e Signed-off-by: Todd Poynor Signed-off-by: John Stultz --- drivers/mmc/host/sdhci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 9e15f41..3820adf 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -992,7 +992,7 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock) u16 clk; unsigned long timeout; - if (clock == host->clock) + if (clock && clock == host->clock) return; if (host->ops->set_clock) {