linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lucas Stach <dev@lynxeye.de>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Stephen Warren <swarren@wwwdotorg.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Alexandre Courbot <gnurou@gmail.com>,
	linux-mmc@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: [PATCH v2 2/5] mmc: tegra: disable SPI_MODE_CLKEN
Date: Tue, 22 Dec 2015 19:41:01 +0100	[thread overview]
Message-ID: <1450809664-11360-3-git-send-email-dev@lynxeye.de> (raw)
In-Reply-To: <1450809664-11360-1-git-send-email-dev@lynxeye.de>

The Tegra30 and up TRM states that this bit should always be
programmed to 0 by driver software.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 drivers/mmc/host/sdhci-tegra.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index f11db83..20ce81b 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -28,6 +28,10 @@
 #include "sdhci-pltfm.h"
 
 /* Tegra SDHOST controller vendor register definitions */
+#define SDHCI_TEGRA_VENDOR_CLOCK_CTRL			0x100
+#define SDHCI_CLOCK_CTRL_PADPIPE_CLKEN_OVERRIDE		BIT(3)
+#define SDHCI_CLOCK_CTRL_SPI_MODE_CLKEN_OVERRIDE	BIT(2)
+
 #define SDHCI_TEGRA_VENDOR_MISC_CTRL		0x120
 #define SDHCI_MISC_CTRL_ENABLE_SDR104		0x8
 #define SDHCI_MISC_CTRL_ENABLE_SDR50		0x10
@@ -125,7 +129,7 @@ static void tegra_sdhci_reset(struct sdhci_host *host, u8 mask)
 	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
 	struct sdhci_tegra *tegra_host = pltfm_host->priv;
 	const struct sdhci_tegra_soc_data *soc_data = tegra_host->soc_data;
-	u32 misc_ctrl;
+	u32 misc_ctrl, clk_ctrl;
 
 	sdhci_reset(host, mask);
 
@@ -145,6 +149,10 @@ static void tegra_sdhci_reset(struct sdhci_host *host, u8 mask)
 		misc_ctrl &= ~SDHCI_MISC_CTRL_ENABLE_SDR104;
 	sdhci_writew(host, misc_ctrl, SDHCI_TEGRA_VENDOR_MISC_CTRL);
 
+	clk_ctrl = sdhci_readl(host, SDHCI_TEGRA_VENDOR_CLOCK_CTRL);
+	clk_ctrl &= ~SDHCI_CLOCK_CTRL_SPI_MODE_CLKEN_OVERRIDE;
+	sdhci_writel(host, clk_ctrl, SDHCI_TEGRA_VENDOR_CLOCK_CTRL);
+
 	tegra_host->ddr_signaling = false;
 }
 
-- 
2.5.0


  reply	other threads:[~2015-12-22 18:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-22 18:40 [PATCH v2 0/5] Tegra SDHCI UHS-I support Lucas Stach
2015-12-22 18:41 ` Lucas Stach [this message]
2015-12-22 18:41 ` [PATCH v2 3/5] mmc: tegra: implement UHS tuning Lucas Stach
2016-03-29 16:37   ` Jon Hunter
     [not found]     ` <56FAAF59.8080501-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-03-29 17:12       ` Jon Hunter
2015-12-22 18:41 ` [PATCH v2 4/5] mmc: tegra: enable UHS-I modes Lucas Stach
2015-12-28 13:18 ` [PATCH v2 0/5] Tegra SDHCI UHS-I support Ulf Hansson
     [not found] ` <1450809664-11360-1-git-send-email-dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org>
2015-12-22 18:41   ` [PATCH v2 1/5] mmc: tegra: implement module external clock change Lucas Stach
2015-12-22 18:41   ` [PATCH v2 5/5] mmc: tegra: use correct accessor for misc ctrl register Lucas Stach
2016-02-17 13:19   ` [PATCH v2 0/5] Tegra SDHCI UHS-I support Jon Hunter
2016-02-17 13:55     ` Jon Hunter
2016-02-17 19:52     ` Lucas Stach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1450809664-11360-3-git-send-email-dev@lynxeye.de \
    --to=dev@lynxeye.de \
    --cc=gnurou@gmail.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=swarren@wwwdotorg.org \
    --cc=thierry.reding@gmail.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).