Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1405086 > unrolled thread

[PATCH v5 5/5] mmc: sdhci-of-arasan: implement enhanced strobe callback

Started byShawn Lin <shawn.lin@rock-chips.com>
First post2016-05-23 06:20 +0200
Last post2016-05-24 04:00 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v5 5/5] mmc: sdhci-of-arasan: implement enhanced strobe callback Shawn Lin <shawn.lin@rock-chips.com> - 2016-05-23 06:20 +0200
    Re: [PATCH v5 5/5] mmc: sdhci-of-arasan: implement enhanced strobe callback Doug Anderson <dianders@chromium.org> - 2016-05-23 23:10 +0200
      Re: [PATCH v5 5/5] mmc: sdhci-of-arasan: implement enhanced strobe  callback Shawn Lin <shawn.lin@rock-chips.com> - 2016-05-24 04:00 +0200

#1405086 — [PATCH v5 5/5] mmc: sdhci-of-arasan: implement enhanced strobe callback

FromShawn Lin <shawn.lin@rock-chips.com>
Date2016-05-23 06:20 +0200
Subject[PATCH v5 5/5] mmc: sdhci-of-arasan: implement enhanced strobe callback
Message-ID<rBPvr-19U-7@gated-at.bofh.it>
Currently sdhci-arasan 5.1 can support enhanced strobe function,
and we now limit it just for "arasan,sdhci-5.1". Add
mmc-hs400-enhanced-strobe in DT to enable the function if we're
sure our controller can support it.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 drivers/mmc/host/sdhci-of-arasan.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index b6f4c1d..533e2bc 100644
--- a/drivers/mmc/host/sdhci-of-arasan.c
+++ b/drivers/mmc/host/sdhci-of-arasan.c
@@ -25,7 +25,9 @@
 #include "sdhci-pltfm.h"
 
 #define SDHCI_ARASAN_CLK_CTRL_OFFSET	0x2c
+#define SDHCI_ARASAN_VENDOR_REGISTER	0x78
 
+#define VENDOR_ENHANCED_STROBE		BIT(0)
 #define CLK_CTRL_TIMEOUT_SHIFT		16
 #define CLK_CTRL_TIMEOUT_MASK		(0xf << CLK_CTRL_TIMEOUT_SHIFT)
 #define CLK_CTRL_TIMEOUT_MIN_EXP	13
@@ -79,6 +81,21 @@ static void sdhci_arasan_set_clock(struct sdhci_host *host, unsigned int clock)
 	}
 }
 
+static void sdhci_arasan_hs400_enhanced_strobe(struct mmc_host *mmc,
+					struct mmc_ios *ios)
+{
+	u32 vendor;
+	struct sdhci_host *host = mmc_priv(mmc);
+
+	vendor = readl(host->ioaddr + SDHCI_ARASAN_VENDOR_REGISTER);
+	if (ios->enhanced_strobe)
+		vendor |= VENDOR_ENHANCED_STROBE;
+	else
+		vendor &= ~VENDOR_ENHANCED_STROBE;
+
+	writel(vendor, host->ioaddr + SDHCI_ARASAN_VENDOR_REGISTER);
+}
+
 static struct sdhci_ops sdhci_arasan_ops = {
 	.set_clock = sdhci_arasan_set_clock,
 	.get_max_clock = sdhci_pltfm_clk_get_max_clock,
@@ -245,6 +262,9 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
 			dev_err(&pdev->dev, "phy_power_on err.\n");
 			goto err_phy_power;
 		}
+
+		host->mmc_host_ops.hs400_enhanced_strobe =
+					sdhci_arasan_hs400_enhanced_strobe;
 	}
 
 	ret = sdhci_add_host(host);
-- 
2.3.7

[toc] | [next] | [standalone]


#1405637

FromDoug Anderson <dianders@chromium.org>
Date2016-05-23 23:10 +0200
Message-ID<rC5gR-2zt-9@gated-at.bofh.it>
In reply to#1405086
Shawn,

On Sun, May 22, 2016 at 9:14 PM, Shawn Lin <shawn.lin@rock-chips.com> wrote:
> Currently sdhci-arasan 5.1 can support enhanced strobe function,
> and we now limit it just for "arasan,sdhci-5.1". Add
> mmc-hs400-enhanced-strobe in DT to enable the function if we're
> sure our controller can support it.
>
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> Reviewed-by: Doug Anderson <dianders@chromium.org>
> ---
>
> Changes in v5: None
> Changes in v4: None

Again, minor, but you did have changes...

> Changes in v3: None
> Changes in v2: None
>
>  drivers/mmc/host/sdhci-of-arasan.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)

I've tested this patch and it appears to work (not that I've hooked a
scope up, but since it's not doing tuning I think it would be pretty
obvious if it didn't work).

Tested-by: Douglas Anderson <dianders@chromium.org>

[toc] | [prev] | [next] | [standalone]


#1405772 — Re: [PATCH v5 5/5] mmc: sdhci-of-arasan: implement enhanced strobe callback

FromShawn Lin <shawn.lin@rock-chips.com>
Date2016-05-24 04:00 +0200
SubjectRe: [PATCH v5 5/5] mmc: sdhci-of-arasan: implement enhanced strobe callback
Message-ID<rC9Nw-54N-7@gated-at.bofh.it>
In reply to#1405637
在 2016/5/24 5:00, Doug Anderson 写道:
> Shawn,
>
> On Sun, May 22, 2016 at 9:14 PM, Shawn Lin <shawn.lin@rock-chips.com> wrote:
>> Currently sdhci-arasan 5.1 can support enhanced strobe function,
>> and we now limit it just for "arasan,sdhci-5.1". Add
>> mmc-hs400-enhanced-strobe in DT to enable the function if we're
>> sure our controller can support it.
>>
>> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
>> Acked-by: Adrian Hunter <adrian.hunter@intel.com>
>> Reviewed-by: Doug Anderson <dianders@chromium.org>
>> ---
>>
>> Changes in v5: None
>> Changes in v4: None
>
> Again, minor, but you did have changes...

yes, it did. I moved all the change-log into the
cover-letter but it seems better to keep them seperately
for each patch. I will do it for the next version if
needed. Thanks.

>
>> Changes in v3: None
>> Changes in v2: None
>>
>>  drivers/mmc/host/sdhci-of-arasan.c | 20 ++++++++++++++++++++
>>  1 file changed, 20 insertions(+)
>
> I've tested this patch and it appears to work (not that I've hooked a
> scope up, but since it's not doing tuning I think it would be pretty
> obvious if it didn't work).
>
> Tested-by: Douglas Anderson <dianders@chromium.org>
>
>
>


-- 
Best Regards
Shawn Lin

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web