From patchwork Mon Feb 14 07:21:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Rakity X-Patchwork-Id: 554261 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 p1E7KJAv020011 for ; Mon, 14 Feb 2011 07:23:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751904Ab1BNHXY (ORCPT ); Mon, 14 Feb 2011 02:23:24 -0500 Received: from na3sys009aog109.obsmtp.com ([74.125.149.201]:36800 "EHLO na3sys009aog109.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751367Ab1BNHXY convert rfc822-to-8bit (ORCPT ); Mon, 14 Feb 2011 02:23:24 -0500 Received: from source ([65.219.4.129]) (using TLSv1) by na3sys009aob109.postini.com ([74.125.148.12]) with SMTP ID DSNKTVjYa53myWGLkolilzi5obJDw9TxgWUm@postini.com; Sun, 13 Feb 2011 23:23:23 PST Received: from SC-vEXCH3.marvell.com ([10.93.76.133]) by SC-OWA01.marvell.com ([10.93.76.21]) with mapi; Sun, 13 Feb 2011 23:20:06 -0800 From: Philip Rakity To: "linux-mmc@vger.kernel.org" CC: Mark Brown Date: Sun, 13 Feb 2011 23:21:05 -0800 Subject: [PATCH] sdhci: add ops to force delay in operations due to silicon issues Thread-Topic: [PATCH] sdhci: add ops to force delay in operations due to silicon issues Thread-Index: AcvMF77Wv/q/dwmAS6ub+9i84+8MlQ== 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 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:23:27 +0000 (UTC) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 8bd3e37..fb084c4 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -925,6 +925,14 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) mdelay(1); } + /* + * we cannot talk to controller for 8 bus cycles according to sdio spec + * at lowest speed this is 100,000 HZ per cycle or 800,000 cycles + * which is quite a LONG TIME on a fast cpu -- so delay if needed + */ + if (host->ops->platform_specific_delay) + host->ops->platform_specific_delay(host); + mod_timer(&host->timer, jiffies + 10 * HZ); host->cmd = cmd; diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index abb1170..d2fe13b 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -245,6 +245,7 @@ struct sdhci_ops { unsigned int (*get_f_max_clock)(struct sdhci_host *host); unsigned int (*set_signaling_voltage)(struct sdhci_host *host, unsigned int ddr); + void (*platform_specific_delay)(struct sdhci_host *host); }; #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS