From patchwork Wed Aug 3 15:35:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 1031852 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p73FaVd0008586 for ; Wed, 3 Aug 2011 15:36:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753205Ab1HCPgn (ORCPT ); Wed, 3 Aug 2011 11:36:43 -0400 Received: from mga02.intel.com ([134.134.136.20]:17967 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753021Ab1HCPgm (ORCPT ); Wed, 3 Aug 2011 11:36:42 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 03 Aug 2011 08:36:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.67,310,1309762800"; d="scan'208";a="35037090" Received: from unknown (HELO smile) ([10.255.18.1]) by orsmga001.jf.intel.com with ESMTP; 03 Aug 2011 08:36:41 -0700 Received: from andy by smile with local (Exim 4.76) (envelope-from ) id 1QodUh-0001QE-Ub; Wed, 03 Aug 2011 18:36:27 +0300 From: Andy Shevchenko To: linux-mmc@vger.kernel.org, Chris Ball Cc: Andy Shevchenko Subject: [PATCH 1/4] Revert "mmc: sdhci: Fix SDHCI_QUIRK_TIMEOUT_USES_SDCLK" Date: Wed, 3 Aug 2011 18:35:58 +0300 Message-Id: X-Mailer: git-send-email 1.7.5.4 In-Reply-To: References: In-Reply-To: References: 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 (demeter2.kernel.org [140.211.167.43]); Wed, 03 Aug 2011 15:36:43 +0000 (UTC) This reverts commit 4b01681c77642c62a833187066c35e71e59caaf5. --- drivers/mmc/host/sdhci.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 51c3b3f..aef7982 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -633,9 +633,6 @@ static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd) target_timeout = data->timeout_ns / 1000 + data->timeout_clks / host->clock; - if (host->quirks & SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK) - host->timeout_clk = host->clock / 1000; - /* * Figure out needed cycles. * We do this in steps in order to fit inside a 32 bit int. @@ -646,7 +643,6 @@ static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd) * => * (1) / (2) > 2^6 */ - BUG_ON(!host->timeout_clk); count = 0; current_timeout = (1 << 13) * 1000 / host->timeout_clk; while (current_timeout < target_timeout) { @@ -2475,6 +2471,9 @@ int sdhci_add_host(struct sdhci_host *host) if (caps[0] & SDHCI_TIMEOUT_CLK_UNIT) host->timeout_clk *= 1000; + if (host->quirks & SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK) + host->timeout_clk = host->clock / 1000; + /* * In case of Host Controller v3.00, find out whether clock * multiplier is supported.