From patchwork Wed Dec 22 07:10:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Rakity X-Patchwork-Id: 426221 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 oBM7Do0W022655 for ; Wed, 22 Dec 2010 07:13:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752609Ab0LVHNf (ORCPT ); Wed, 22 Dec 2010 02:13:35 -0500 Received: from na3sys009aog106.obsmtp.com ([74.125.149.77]:50085 "HELO na3sys009aog106.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752601Ab0LVHNe (ORCPT ); Wed, 22 Dec 2010 02:13:34 -0500 Received: from source ([65.219.4.129]) (using TLSv1) by na3sys009aob106.postini.com ([74.125.148.12]) with SMTP ID DSNKTRGlHJXLWsTYHbHRNAhUn8yBvqhWj+Xs@postini.com; Tue, 21 Dec 2010 23:13:34 PST Received: from SC-vEXCH3.marvell.com ([10.93.76.133]) by SC-OWA01.marvell.com ([10.93.76.21]) with mapi; Tue, 21 Dec 2010 23:11:01 -0800 From: Philip Rakity To: "linux-mmc@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" CC: Mark Brown Date: Tue, 21 Dec 2010 23:10:59 -0800 Subject: [PATCH 20/23] Alternative mmc structure to support pxa168, pxa910, mmp2 family SD Thread-Topic: [PATCH 20/23] Alternative mmc structure to support pxa168, pxa910, mmp2 family SD Thread-Index: Acuhp2MT33y76na3RV2OxEnQiVxjsQ== Message-ID: <744F5B54-A687-4BF0-9F41-A7DE470CB48B@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Wed, 22 Dec 2010 07:13:50 +0000 (UTC) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index ff9d5f0..dcfbe83 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1203,6 +1203,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 84292e0..cbd63e2 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -241,6 +241,7 @@ struct sdhci_ops { void (*platform_reset_exit)(struct sdhci_host *host, u8 mask); unsigned int (*get_f_max_clock)(struct sdhci_host *host); void (*platform_specific_delay)(struct sdhci_host *host); + void (*platform_hw_clk_gate)(struct sdhci_host *host); }; #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS