From patchwork Wed Jan 30 04:26:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Warren X-Patchwork-Id: 2065271 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 426A0DF264 for ; Wed, 30 Jan 2013 04:26:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753048Ab3A3E0n (ORCPT ); Tue, 29 Jan 2013 23:26:43 -0500 Received: from avon.wwwdotorg.org ([70.85.31.133]:50138 "EHLO avon.wwwdotorg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753405Ab3A3E0a (ORCPT ); Tue, 29 Jan 2013 23:26:30 -0500 Received: from severn.wwwdotorg.org (unknown [192.168.65.5]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by avon.wwwdotorg.org (Postfix) with ESMTPS id DB91163F9; Tue, 29 Jan 2013 21:28:48 -0700 (MST) Received: from dart.wwwdotorg.org (c-98-245-170-70.hsd1.co.comcast.net [98.245.170.70]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by severn.wwwdotorg.org (Postfix) with ESMTPSA id 3FF39E4107; Tue, 29 Jan 2013 21:26:29 -0700 (MST) From: Stephen Warren To: Chris Ball Cc: linux-mmc@vger.kernel.org, Lars-Peter Clausen , linux-rpi-kernel@lists.infradead.org, Stephen Warren Subject: [PATCH] mmc: bcm2835: set SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK Date: Tue, 29 Jan 2013 21:26:21 -0700 Message-Id: <1359519981-23358-1-git-send-email-swarren@wwwdotorg.org> X-Mailer: git-send-email 1.7.10.4 X-NVConfidentiality: public X-Virus-Scanned: clamav-milter 0.96.5 at avon.wwwdotorg.org X-Virus-Status: Clean Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK does basically the same as implementing struct sdhci_ops .get_timeout_clock, so simply set that quirk and remove the custom code to simplify the driver. Reported-by: Lars-Peter Clausen Signed-off-by: Stephen Warren --- drivers/mmc/host/sdhci-bcm2835.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/mmc/host/sdhci-bcm2835.c b/drivers/mmc/host/sdhci-bcm2835.c index 453825f..21fc735 100644 --- a/drivers/mmc/host/sdhci-bcm2835.c +++ b/drivers/mmc/host/sdhci-bcm2835.c @@ -133,14 +133,6 @@ unsigned int bcm2835_sdhci_get_min_clock(struct sdhci_host *host) return MIN_FREQ; } -unsigned int bcm2835_sdhci_get_timeout_clock(struct sdhci_host *host) -{ - struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); - struct bcm2835_sdhci *bcm2835_host = pltfm_host->priv; - - return clk_get_rate(bcm2835_host->clk); -} - static struct sdhci_ops bcm2835_sdhci_ops = { .write_l = bcm2835_sdhci_writel, .write_w = bcm2835_sdhci_writew, @@ -150,11 +142,11 @@ static struct sdhci_ops bcm2835_sdhci_ops = { .read_b = bcm2835_sdhci_readb, .get_max_clock = bcm2835_sdhci_get_max_clock, .get_min_clock = bcm2835_sdhci_get_min_clock, - .get_timeout_clock = bcm2835_sdhci_get_timeout_clock, }; static struct sdhci_pltfm_data bcm2835_sdhci_pdata = { - .quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION, + .quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION | + SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK, .ops = &bcm2835_sdhci_ops, };