From patchwork Wed Aug 9 20:36:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 799956 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rere.qmqm.pl header.i=@rere.qmqm.pl header.b="qfPypo5Y"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xSNVd2mttz9t2M for ; Thu, 10 Aug 2017 06:42:17 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753413AbdHIUmM (ORCPT ); Wed, 9 Aug 2017 16:42:12 -0400 Received: from 78-11-180-123.static.ip.netia.com.pl ([78.11.180.123]:60660 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752156AbdHIUmI (ORCPT ); Wed, 9 Aug 2017 16:42:08 -0400 X-Greylist: delayed 363 seconds by postgrey-1.27 at vger.kernel.org; Wed, 09 Aug 2017 16:42:08 EDT Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 3xSNMT1BM9z3q; Wed, 9 Aug 2017 22:36:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1502310965; bh=eDR7d8nJ2mwg1vtGKlrcEV5tgtZ85CUqYy8HS1+JboI=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=qfPypo5YgdauwBgnPy6z9LL1mMDg8x3lS7Gw88Kla+4tM82gYSudgnWHD2967uQvO A2eXJCvbbnS7M8xr1pqpbEtOIrVMNUx/qETGPMRy1LNTjCyenId/C51HsV5NT0NV7w 6hUryYEOxSBiT4aY/DQD+bBGotDWcHlsf98+pfuFb5H6sjR5/zvbhWNnZiR8TCJGZE mxFhJDdq7N6qyKY4BjQqa8lC67l9s2n7XiQ90ZDCOckOHJVSW+pHk1Uu5gdmNojLfI aE44lp+xecsWUq+OiGI7pCc0VHNm7FqbjifMqoFWGmQOP1nbBQ8JkuEpVH9RwTMTOM VyMvOtfdIaJUQ== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.99.2 at rere Date: Wed, 09 Aug 2017 22:36:05 +0200 Message-Id: <3debee26f13754f08d36bc3647a83979708a67fa.1502310654.git.mirq-linux@rere.qmqm.pl> In-Reply-To: References: From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Subject: [PATCH 2/4] mmc/sdhci-tegra: use generic sdhci_set_bus_width() MIME-Version: 1.0 To: Adrian Hunter , Ulf Hansson , Thierry Reding , Jonathan Hunter , Ben Dooks , Jaehoon Chung Cc: linux-mmc@vger.kernel.org, linux-tegra@vger.kernel.org Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org Signed-off-by: Michał Mirosław Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-tegra.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index 7f93079c7a3a..9a589b6a53dd 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -190,25 +190,6 @@ static void tegra_sdhci_reset(struct sdhci_host *host, u8 mask) tegra_host->ddr_signaling = false; } -static void tegra_sdhci_set_bus_width(struct sdhci_host *host, int bus_width) -{ - u32 ctrl; - - ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL); - if ((host->mmc->caps & MMC_CAP_8_BIT_DATA) && - (bus_width == MMC_BUS_WIDTH_8)) { - ctrl &= ~SDHCI_CTRL_4BITBUS; - ctrl |= SDHCI_CTRL_8BITBUS; - } else { - ctrl &= ~SDHCI_CTRL_8BITBUS; - if (bus_width == MMC_BUS_WIDTH_4) - ctrl |= SDHCI_CTRL_4BITBUS; - else - ctrl &= ~SDHCI_CTRL_4BITBUS; - } - sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL); -} - static void tegra_sdhci_pad_autocalib(struct sdhci_host *host) { u32 val; @@ -323,7 +304,7 @@ static const struct sdhci_ops tegra_sdhci_ops = { .read_w = tegra_sdhci_readw, .write_l = tegra_sdhci_writel, .set_clock = tegra_sdhci_set_clock, - .set_bus_width = tegra_sdhci_set_bus_width, + .set_bus_width = sdhci_set_bus_width, .reset = tegra_sdhci_reset, .platform_execute_tuning = tegra_sdhci_execute_tuning, .set_uhs_signaling = tegra_sdhci_set_uhs_signaling, @@ -371,7 +352,7 @@ static const struct sdhci_ops tegra114_sdhci_ops = { .write_w = tegra_sdhci_writew, .write_l = tegra_sdhci_writel, .set_clock = tegra_sdhci_set_clock, - .set_bus_width = tegra_sdhci_set_bus_width, + .set_bus_width = sdhci_set_bus_width, .reset = tegra_sdhci_reset, .platform_execute_tuning = tegra_sdhci_execute_tuning, .set_uhs_signaling = tegra_sdhci_set_uhs_signaling,