From patchwork Mon Feb 14 07:11:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Rakity X-Patchwork-Id: 554191 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 p1E7GCCw017441 for ; Mon, 14 Feb 2011 07:16:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751392Ab1BNHQK (ORCPT ); Mon, 14 Feb 2011 02:16:10 -0500 Received: from na3sys009aog109.obsmtp.com ([74.125.149.201]:58340 "EHLO na3sys009aog109.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751358Ab1BNHQK convert rfc822-to-8bit (ORCPT ); Mon, 14 Feb 2011 02:16:10 -0500 Received: from source ([65.219.4.130]) (using TLSv1) by na3sys009aob109.postini.com ([74.125.148.12]) with SMTP ID DSNKTVjWuQ3NfVW4B7RdVgzXZ0+EASpacEnb@postini.com; Sun, 13 Feb 2011 23:16:10 PST Received: from SC-vEXCH3.marvell.com ([10.93.76.133]) by sc-owa02.marvell.com ([10.93.76.22]) with mapi; Sun, 13 Feb 2011 23:11:05 -0800 From: Philip Rakity To: "linux-mmc@vger.kernel.org" CC: Mark Brown Date: Sun, 13 Feb 2011 23:11:03 -0800 Subject: [PATCH 2/2] sdhci: sdhci-pxa.c add host->ops to configure f_max Thread-Topic: [PATCH 2/2] sdhci: sdhci-pxa.c add host->ops to configure f_max Thread-Index: AcvMFlemoDNurbttTcmKIUeVjWz3rg== Message-ID: <7B48DA54-6A2E-4736-90AA-F8D8D9C0BA02@marvell.com> 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 14 Feb 2011 07:16:22 +0000 (UTC) diff --git a/drivers/mmc/host/sdhci-pxa.c b/drivers/mmc/host/sdhci-pxa.c index 0e64d66..3d01f94 100644 --- a/drivers/mmc/host/sdhci-pxa.c +++ b/drivers/mmc/host/sdhci-pxa.c @@ -94,8 +94,16 @@ static void platform_reset_exit(struct sdhci_host *host, u8 mask) } } +static unsigned int get_f_max_clock(struct sdhci_host *host) +{ + struct sdhci_pxa *pxa = sdhci_priv(host); + + return pxa->pdata->max_speed; +} + static struct sdhci_ops sdhci_pxa_ops = { .platform_reset_exit = platform_reset_exit, + .get_f_max_clock = NULL, }; /*****************************************************************************\ @@ -184,15 +192,17 @@ static int __devinit sdhci_pxa_probe(struct platform_device *pdev) /* do not rely on u-boot to enable the clocks */ enable_clock(host); + if (pxa->pdata->max_speed) + sdhci_pxa_ops.get_f_max_clock = get_f_max_clock; + else + sdhci_pxa_ops.get_f_max_clock = NULL; + ret = sdhci_add_host(host); if (ret) { dev_err(&pdev->dev, "failed to add host\n"); goto out; } - if (pxa->pdata->max_speed) - host->mmc->f_max = pxa->pdata->max_speed; - platform_set_drvdata(pdev, host); return 0;