From patchwork Sun Sep 26 00:44:39 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Rakity X-Patchwork-Id: 209452 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 o8Q0hmcn032144 for ; Sun, 26 Sep 2010 00:44:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754524Ab0IZAom (ORCPT ); Sat, 25 Sep 2010 20:44:42 -0400 Received: from na3sys009aog106.obsmtp.com ([74.125.149.77]:35553 "HELO na3sys009aog106.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754013Ab0IZAom convert rfc822-to-8bit (ORCPT ); Sat, 25 Sep 2010 20:44:42 -0400 Received: from source ([65.219.4.129]) (using TLSv1) by na3sys009aob106.postini.com ([74.125.148.12]) with SMTP ID DSNKTJ6Xeb3oB6euhRF87gTnRIEISdRl8EOf@postini.com; Sat, 25 Sep 2010 17:44:42 PDT Received: from SC-vEXCH3.marvell.com ([10.93.76.133]) by SC-OWA01.marvell.com ([10.93.76.21]) with mapi; Sat, 25 Sep 2010 17:44:41 -0700 From: Philip Rakity To: "linux-mmc@vger.kernel.org" Date: Sat, 25 Sep 2010 17:44:39 -0700 Subject: [PATCH] sdhci: seperate out reset so if platform specific helper exists it is called Thread-Topic: [PATCH] sdhci: seperate out reset so if platform specific helper exists it is called Thread-Index: ActdFAEKaxTESaiRTyaK74WnuDcz1w== Message-ID: <06FF83D7-6C8A-47FE-934B-E1F21E7AB915@marvell.com> References: In-Reply-To: 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.3 (demeter1.kernel.org [140.211.167.41]); Sun, 26 Sep 2010 00:44:43 +0000 (UTC) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 17f1554..451fad3 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -138,7 +138,7 @@ static void sdhci_disable_card_detection(struct sdhci_host *host) sdhci_set_card_detection(host, false); } -static void sdhci_reset(struct sdhci_host *host, u8 mask) +void sdhci_reset_helper(struct sdhci_host *host, u8 mask) { unsigned long timeout; u32 uninitialized_var(ier); @@ -176,6 +176,14 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask) sdhci_clear_set_irqs(host, SDHCI_INT_ALL_MASK, ier); } +static void sdhci_reset(struct sdhci_host *host, u8 mask) +{ + if (host->ops->sdhci_reset) + return host->ops->sdhci_reset(host, mask); + else + return sdhci_reset_helper(host, mask); +} + static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios); static void sdhci_init(struct sdhci_host *host, int soft) diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index a41ad8c..f8c18cd 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -323,6 +323,7 @@ struct sdhci_ops { unsigned int (*get_max_clock)(struct sdhci_host *host); unsigned int (*get_min_clock)(struct sdhci_host *host); unsigned int (*get_timeout_clock)(struct sdhci_host *host); + void (*sdhci_reset)(struct sdhci_host *host, u8 mask); int (*get_ro)(struct mmc_host *mmc); };