From patchwork Wed Dec 22 07:08:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Rakity X-Patchwork-Id: 426121 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 oBM7BtZY021642 for ; Wed, 22 Dec 2010 07:12:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752076Ab0LVHMh (ORCPT ); Wed, 22 Dec 2010 02:12:37 -0500 Received: from na3sys009aog111.obsmtp.com ([74.125.149.205]:42459 "HELO na3sys009aog111.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751962Ab0LVHMg (ORCPT ); Wed, 22 Dec 2010 02:12:36 -0500 Received: from source ([65.219.4.129]) (using TLSv1) by na3sys009aob111.postini.com ([74.125.148.12]) with SMTP ID DSNKTRGk3idErWTrzVTBJxA6+LFLz4/DSAFZ@postini.com; Tue, 21 Dec 2010 23:12:36 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:08:58 -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:08:57 -0800 Subject: [PATCH 9/23] Alternative mmc structure to support pxa168, pxa910, mmp2 family SD Thread-Topic: [PATCH 9/23] Alternative mmc structure to support pxa168, pxa910, mmp2 family SD Thread-Index: Acuhpxn+okfSfr1aR6OUgdNDglYnFw== Message-ID: <80760F77-40FC-43E6-A8A0-CB1814D8A191@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:12:37 +0000 (UTC) diff --git a/drivers/mmc/host/sdhci-pxa.c b/drivers/mmc/host/sdhci-pxa.c index 0afc763..4c2a252 100644 --- a/drivers/mmc/host/sdhci-pxa.c +++ b/drivers/mmc/host/sdhci-pxa.c @@ -53,7 +53,15 @@ static void enable_clock(struct sdhci_host *host) } } +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 = { + .get_f_max_clock = NULL, }; /*****************************************************************************\ @@ -131,15 +139,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;