From patchwork Fri Jan 21 19:35:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Rakity X-Patchwork-Id: 496271 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0LJZR68009354 for ; Fri, 21 Jan 2011 19:35:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754892Ab1AUTf0 (ORCPT ); Fri, 21 Jan 2011 14:35:26 -0500 Received: from na3sys009aog116.obsmtp.com ([74.125.149.240]:53015 "HELO na3sys009aog116.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754891Ab1AUTfZ convert rfc822-to-8bit (ORCPT ); Fri, 21 Jan 2011 14:35:25 -0500 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 21 Jan 2011 19:35:28 +0000 (UTC) X-Greylist: delayed 799 seconds by postgrey-1.27 at vger.kernel.org; Fri, 21 Jan 2011 14:35:25 EST Received: from source ([65.219.4.129]) (using TLSv1) by na3sys009aob116.postini.com ([74.125.148.12]) with SMTP ID DSNKTTnf/U2xuOh8r9xVZslpbqRgx99vcMJq@postini.com; Fri, 21 Jan 2011 11:35:25 PST Received: from SC-vEXCH3.marvell.com ([10.93.76.133]) by SC-OWA01.marvell.com ([10.93.76.21]) with mapi; Fri, 21 Jan 2011 11:35:24 -0800 From: Philip Rakity To: "linux-mmc@vger.kernel.org" CC: Mark Brown Date: Fri, 21 Jan 2011 11:35:24 -0800 Subject: [PATCH] sdhci: support hardware clock gating in the SD layer Thread-Topic: [PATCH] sdhci: support hardware clock gating in the SD layer Thread-Index: Acu5ollPiVhTuS6xSWyZdQV1cZeMvg== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 92be22d..611322c 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1235,6 +1235,12 @@ static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) if (host->ops->platform_send_init_74_clocks) host->ops->platform_send_init_74_clocks(host, ios->power_mode); +#ifdef CONFIG_MMC_CLKGATE + if ((mmc->caps & MMC_CAP_HW_CLOCK_GATING) + && host->ops->platform_hw_clk_gate) + host->ops->platform_hw_clk_gate(host); +#endif + /* * If your platform has 8-bit width support but is not a v3 controller, * or if it requires special setup code, you should implement that in diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 580a8ff..8e271df 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -246,6 +246,7 @@ struct sdhci_ops { void (*platform_specific_delay)(struct sdhci_host *host); unsigned int (*set_signaling_voltage)(struct sdhci_host *host, unsigned int ddr); + void (*platform_hw_clk_gate)(struct sdhci_host *host); }; #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS