linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] mmc: renesas_sdhi: prepare for recent HS400 updates
@ 2019-12-03 20:05 Wolfram Sang
  2019-12-03 20:05 ` [PATCH 1/5] mmc: renesas_sdhi: keep sorting for quirk entries Wolfram Sang
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Wolfram Sang @ 2019-12-03 20:05 UTC (permalink / raw)
  To: linux-mmc; +Cc: linux-renesas-soc, Yoshihiro Shimoda, Wolfram Sang

Due to recent datasheet updates and other internal documents, HS400
support for SDHI needs some refactoring. These patches are the
prerequisites for that. The first four patches only refactor code, the
last one does a minor update already.

This series has been tested on Renesas Salvator-XS with R-Car M3-N and
H3 ES2.0 with tests I was able to carry out locally here.

I will send more advanced patches on top of this series as RFC later.

A branch with all the patches applied can be found here:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/sdhi/new_manual_calib

Wolfram Sang (5):
  mmc: renesas_sdhi: keep sorting for quirk entries
  mmc: renesas_sdhi: make warning more precise
  mmc: renesas_sdhi: make quirks info accessible outside probe()
  mmc: renesas_sdhi: remove 4taps as a TMIO flag
  mmc: renesas_sdhi: use recent tap values for HS400

 drivers/mmc/host/renesas_sdhi.h               | 10 ++++++--
 drivers/mmc/host/renesas_sdhi_core.c          | 23 ++++++++-----------
 drivers/mmc/host/renesas_sdhi_internal_dmac.c |  2 +-
 include/linux/mfd/tmio.h                      |  3 ---
 4 files changed, 19 insertions(+), 19 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 1/5] mmc: renesas_sdhi: keep sorting for quirk entries
  2019-12-03 20:05 [PATCH 0/5] mmc: renesas_sdhi: prepare for recent HS400 updates Wolfram Sang
@ 2019-12-03 20:05 ` Wolfram Sang
  2019-12-04  9:26   ` Geert Uytterhoeven
  2019-12-05 12:13   ` Yoshihiro Shimoda
  2019-12-03 20:05 ` [PATCH 2/5] mmc: renesas_sdhi: make warning more precise Wolfram Sang
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 18+ messages in thread
From: Wolfram Sang @ 2019-12-03 20:05 UTC (permalink / raw)
  To: linux-mmc; +Cc: linux-renesas-soc, Yoshihiro Shimoda, Wolfram Sang

The two devices next to each other are super similar, but still, let's
keep the alphanumeric sorting for easier additions later.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/mmc/host/renesas_sdhi_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index 234551a68739..9950e33560b9 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -627,10 +627,10 @@ static const struct renesas_sdhi_quirks sdhi_quirks_nohs400 = {
 };
 
 static const struct soc_device_attribute sdhi_quirks_match[]  = {
+	{ .soc_id = "r8a774a1", .revision = "ES1.[012]", .data = &sdhi_quirks_4tap_nohs400 },
 	{ .soc_id = "r8a7795", .revision = "ES1.*", .data = &sdhi_quirks_4tap_nohs400 },
 	{ .soc_id = "r8a7795", .revision = "ES2.0", .data = &sdhi_quirks_4tap },
 	{ .soc_id = "r8a7796", .revision = "ES1.[012]", .data = &sdhi_quirks_4tap_nohs400 },
-	{ .soc_id = "r8a774a1", .revision = "ES1.[012]", .data = &sdhi_quirks_4tap_nohs400 },
 	{ .soc_id = "r8a77980", .data = &sdhi_quirks_nohs400 },
 	{ /* Sentinel. */ },
 };
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 2/5] mmc: renesas_sdhi: make warning more precise
  2019-12-03 20:05 [PATCH 0/5] mmc: renesas_sdhi: prepare for recent HS400 updates Wolfram Sang
  2019-12-03 20:05 ` [PATCH 1/5] mmc: renesas_sdhi: keep sorting for quirk entries Wolfram Sang
@ 2019-12-03 20:05 ` Wolfram Sang
  2019-12-04  9:27   ` Geert Uytterhoeven
  2019-12-05 12:13   ` Yoshihiro Shimoda
  2019-12-03 20:05 ` [PATCH 3/5] mmc: renesas_sdhi: make quirks info accessible outside probe() Wolfram Sang
                   ` (3 subsequent siblings)
  5 siblings, 2 replies; 18+ messages in thread
From: Wolfram Sang @ 2019-12-03 20:05 UTC (permalink / raw)
  To: linux-mmc; +Cc: linux-renesas-soc, Yoshihiro Shimoda, Wolfram Sang

The warning is not solely used for SDR104 anymore, but for all which
require tuning.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/mmc/host/renesas_sdhi_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index 9950e33560b9..4094526c3dfd 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -813,7 +813,7 @@ int renesas_sdhi_probe(struct platform_device *pdev,
 		}
 
 		if (!hit)
-			dev_warn(&host->pdev->dev, "Unknown clock rate for SDR104\n");
+			dev_warn(&host->pdev->dev, "Unknown clock rate for tuning\n");
 
 		host->init_tuning = renesas_sdhi_init_tuning;
 		host->prepare_tuning = renesas_sdhi_prepare_tuning;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 3/5] mmc: renesas_sdhi: make quirks info accessible outside probe()
  2019-12-03 20:05 [PATCH 0/5] mmc: renesas_sdhi: prepare for recent HS400 updates Wolfram Sang
  2019-12-03 20:05 ` [PATCH 1/5] mmc: renesas_sdhi: keep sorting for quirk entries Wolfram Sang
  2019-12-03 20:05 ` [PATCH 2/5] mmc: renesas_sdhi: make warning more precise Wolfram Sang
@ 2019-12-03 20:05 ` Wolfram Sang
  2019-12-04  9:28   ` Geert Uytterhoeven
  2019-12-05 12:14   ` Yoshihiro Shimoda
  2019-12-03 20:05 ` [PATCH 4/5] mmc: renesas_sdhi: remove 4taps as a TMIO flag Wolfram Sang
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 18+ messages in thread
From: Wolfram Sang @ 2019-12-03 20:05 UTC (permalink / raw)
  To: linux-mmc; +Cc: linux-renesas-soc, Yoshihiro Shimoda, Wolfram Sang

We will need that for a later patch.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/mmc/host/renesas_sdhi.h      | 6 ++++++
 drivers/mmc/host/renesas_sdhi_core.c | 6 +-----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/host/renesas_sdhi.h b/drivers/mmc/host/renesas_sdhi.h
index c0504aa90857..88d05a617d43 100644
--- a/drivers/mmc/host/renesas_sdhi.h
+++ b/drivers/mmc/host/renesas_sdhi.h
@@ -33,6 +33,11 @@ struct renesas_sdhi_of_data {
 	unsigned short max_segs;
 };
 
+struct renesas_sdhi_quirks {
+	bool hs400_disabled;
+	bool hs400_4taps;
+};
+
 struct tmio_mmc_dma {
 	enum dma_slave_buswidth dma_buswidth;
 	bool (*filter)(struct dma_chan *chan, void *arg);
@@ -46,6 +51,7 @@ struct renesas_sdhi {
 	struct clk *clk_cd;
 	struct tmio_mmc_data mmc_data;
 	struct tmio_mmc_dma dma_priv;
+	const struct renesas_sdhi_quirks *quirks;
 	struct pinctrl *pinctrl;
 	struct pinctrl_state *pins_default, *pins_uhs;
 	void __iomem *scc_ctl;
diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index 4094526c3dfd..2c743429e1e3 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -46,11 +46,6 @@
 #define SDHI_VER_GEN3_SD	0xcc10
 #define SDHI_VER_GEN3_SDMMC	0xcd10
 
-struct renesas_sdhi_quirks {
-	bool hs400_disabled;
-	bool hs400_4taps;
-};
-
 static void renesas_sdhi_sdbuf_width(struct tmio_mmc_host *host, int width)
 {
 	u32 val;
@@ -665,6 +660,7 @@ int renesas_sdhi_probe(struct platform_device *pdev,
 	if (!priv)
 		return -ENOMEM;
 
+	priv->quirks = quirks;
 	mmc_data = &priv->mmc_data;
 	dma_priv = &priv->dma_priv;
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 4/5] mmc: renesas_sdhi: remove 4taps as a TMIO flag
  2019-12-03 20:05 [PATCH 0/5] mmc: renesas_sdhi: prepare for recent HS400 updates Wolfram Sang
                   ` (2 preceding siblings ...)
  2019-12-03 20:05 ` [PATCH 3/5] mmc: renesas_sdhi: make quirks info accessible outside probe() Wolfram Sang
@ 2019-12-03 20:05 ` Wolfram Sang
  2019-12-04  9:29   ` Geert Uytterhoeven
                     ` (2 more replies)
  2019-12-03 20:05 ` [PATCH/RFT 5/5] mmc: renesas_sdhi: use recent tap values for HS400 Wolfram Sang
  2019-12-10 13:09 ` [PATCH 0/5] mmc: renesas_sdhi: prepare for recent HS400 updates Ulf Hansson
  5 siblings, 3 replies; 18+ messages in thread
From: Wolfram Sang @ 2019-12-03 20:05 UTC (permalink / raw)
  To: linux-mmc; +Cc: linux-renesas-soc, Yoshihiro Shimoda, Wolfram Sang

Now that the quirks structure is accesible, we can remove the TMIO flag
for HS400 using only 4 taps. This is Renesas specific anyhow.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/mmc/host/renesas_sdhi_core.c | 8 +++-----
 include/linux/mfd/tmio.h             | 3 ---
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index 2c743429e1e3..8ee6298d5a51 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -350,7 +350,7 @@ static void renesas_sdhi_hs400_complete(struct tmio_mmc_host *host)
 		       0x4 << SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_SHIFT);
 
 
-	if (host->pdata->flags & TMIO_MMC_HAVE_4TAP_HS400)
+	if (priv->quirks && priv->quirks->hs400_4taps)
 		sd_scc_write32(host, priv, SH_MOBILE_SDHI_SCC_TAPSET,
 			       host->tap_set / 2);
 
@@ -488,7 +488,8 @@ static int renesas_sdhi_select_tuning(struct tmio_mmc_host *host)
 static bool renesas_sdhi_check_scc_error(struct tmio_mmc_host *host)
 {
 	struct renesas_sdhi *priv = host_to_priv(host);
-	bool use_4tap = host->pdata->flags & TMIO_MMC_HAVE_4TAP_HS400;
+	bool use_4tap = priv->quirks && priv->quirks->hs400_4taps;
+
 
 	/*
 	 * Skip checking SCC errors when running on 4 taps in HS400 mode as
@@ -720,9 +721,6 @@ int renesas_sdhi_probe(struct platform_device *pdev,
 	if (quirks && quirks->hs400_disabled)
 		host->mmc->caps2 &= ~(MMC_CAP2_HS400 | MMC_CAP2_HS400_ES);
 
-	if (quirks && quirks->hs400_4taps)
-		mmc_data->flags |= TMIO_MMC_HAVE_4TAP_HS400;
-
 	/* For some SoC, we disable internal WP. GPIO may override this */
 	if (mmc_can_gpio_ro(host->mmc))
 		mmc_data->capabilities2 &= ~MMC_CAP2_NO_WRITE_PROTECT;
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
index 739b7bf37eaa..8ba042430d8e 100644
--- a/include/linux/mfd/tmio.h
+++ b/include/linux/mfd/tmio.h
@@ -79,9 +79,6 @@
 /* Some controllers have a CBSY bit */
 #define TMIO_MMC_HAVE_CBSY		BIT(11)
 
-/* Some controllers that support HS400 use 4 taps while others use 8. */
-#define TMIO_MMC_HAVE_4TAP_HS400	BIT(13)
-
 int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base);
 int tmio_core_mmc_resume(void __iomem *cnf, int shift, unsigned long base);
 void tmio_core_mmc_pwr(void __iomem *cnf, int shift, int state);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH/RFT 5/5] mmc: renesas_sdhi: use recent tap values for HS400
  2019-12-03 20:05 [PATCH 0/5] mmc: renesas_sdhi: prepare for recent HS400 updates Wolfram Sang
                   ` (3 preceding siblings ...)
  2019-12-03 20:05 ` [PATCH 4/5] mmc: renesas_sdhi: remove 4taps as a TMIO flag Wolfram Sang
@ 2019-12-03 20:05 ` Wolfram Sang
  2019-12-05 12:45   ` Yoshihiro Shimoda
  2019-12-10 13:09 ` [PATCH 0/5] mmc: renesas_sdhi: prepare for recent HS400 updates Ulf Hansson
  5 siblings, 1 reply; 18+ messages in thread
From: Wolfram Sang @ 2019-12-03 20:05 UTC (permalink / raw)
  To: linux-mmc; +Cc: linux-renesas-soc, Yoshihiro Shimoda, Wolfram Sang

New datasheets require different and new values for HS400 with 4taps or
8taps.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

This patch needs an ack from the BSP team and/or Shimoda-san. The BSP
code uses this only for M3-W ES1.3 which is not supported yet upstream.
However, H3 ES2.0 (which we do support) needs the same fix IMO because
it is also using 4taps with HS400. But that needs confirmation as I
can't recreate the error case here.

 drivers/mmc/host/renesas_sdhi.h               | 4 ++--
 drivers/mmc/host/renesas_sdhi_core.c          | 5 ++++-
 drivers/mmc/host/renesas_sdhi_internal_dmac.c | 2 +-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/renesas_sdhi.h b/drivers/mmc/host/renesas_sdhi.h
index 88d05a617d43..f524251d5113 100644
--- a/drivers/mmc/host/renesas_sdhi.h
+++ b/drivers/mmc/host/renesas_sdhi.h
@@ -14,8 +14,8 @@
 
 struct renesas_sdhi_scc {
 	unsigned long clk_rate;	/* clock rate for SDR104 */
-	u32 tap;		/* sampling clock position for SDR104 */
-	u32 tap_hs400;		/* sampling clock position for HS400 */
+	u32 tap;		/* sampling clock position for SDR104/HS400 (8 TAP) */
+	u32 tap_hs400_4tap;	/* sampling clock position for HS400 (4 TAP) */
 };
 
 struct renesas_sdhi_of_data {
diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index 8ee6298d5a51..282c133defd6 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -794,13 +794,16 @@ int renesas_sdhi_probe(struct platform_device *pdev,
 	     host->mmc->caps2 & (MMC_CAP2_HS200_1_8V_SDR |
 				 MMC_CAP2_HS400_1_8V))) {
 		const struct renesas_sdhi_scc *taps = of_data->taps;
+		bool use_4tap = priv->quirks && priv->quirks->hs400_4taps;
 		bool hit = false;
 
 		for (i = 0; i < of_data->taps_num; i++) {
 			if (taps[i].clk_rate == 0 ||
 			    taps[i].clk_rate == host->mmc->f_max) {
 				priv->scc_tappos = taps->tap;
-				priv->scc_tappos_hs400 = taps->tap_hs400;
+				priv->scc_tappos_hs400 = use_4tap ?
+							 taps->tap_hs400_4tap :
+							 taps->tap;
 				hit = true;
 				break;
 			}
diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
index 18839a10594c..68fb39a74b8b 100644
--- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
@@ -82,7 +82,7 @@ static struct renesas_sdhi_scc rcar_gen3_scc_taps[] = {
 	{
 		.clk_rate = 0,
 		.tap = 0x00000300,
-		.tap_hs400 = 0x00000704,
+		.tap_hs400_4tap = 0x00000100,
 	},
 };
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/5] mmc: renesas_sdhi: keep sorting for quirk entries
  2019-12-03 20:05 ` [PATCH 1/5] mmc: renesas_sdhi: keep sorting for quirk entries Wolfram Sang
@ 2019-12-04  9:26   ` Geert Uytterhoeven
  2019-12-05 12:13   ` Yoshihiro Shimoda
  1 sibling, 0 replies; 18+ messages in thread
From: Geert Uytterhoeven @ 2019-12-04  9:26 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Linux MMC List, Linux-Renesas, Yoshihiro Shimoda

On Tue, Dec 3, 2019 at 9:05 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> The two devices next to each other are super similar, but still, let's
> keep the alphanumeric sorting for easier additions later.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/5] mmc: renesas_sdhi: make warning more precise
  2019-12-03 20:05 ` [PATCH 2/5] mmc: renesas_sdhi: make warning more precise Wolfram Sang
@ 2019-12-04  9:27   ` Geert Uytterhoeven
  2019-12-05 12:13   ` Yoshihiro Shimoda
  1 sibling, 0 replies; 18+ messages in thread
From: Geert Uytterhoeven @ 2019-12-04  9:27 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Linux MMC List, Linux-Renesas, Yoshihiro Shimoda

On Tue, Dec 3, 2019 at 9:05 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> The warning is not solely used for SDR104 anymore, but for all which
> require tuning.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/5] mmc: renesas_sdhi: make quirks info accessible outside probe()
  2019-12-03 20:05 ` [PATCH 3/5] mmc: renesas_sdhi: make quirks info accessible outside probe() Wolfram Sang
@ 2019-12-04  9:28   ` Geert Uytterhoeven
  2019-12-05 12:14   ` Yoshihiro Shimoda
  1 sibling, 0 replies; 18+ messages in thread
From: Geert Uytterhoeven @ 2019-12-04  9:28 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Linux MMC List, Linux-Renesas, Yoshihiro Shimoda

On Tue, Dec 3, 2019 at 9:06 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> We will need that for a later patch.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 4/5] mmc: renesas_sdhi: remove 4taps as a TMIO flag
  2019-12-03 20:05 ` [PATCH 4/5] mmc: renesas_sdhi: remove 4taps as a TMIO flag Wolfram Sang
@ 2019-12-04  9:29   ` Geert Uytterhoeven
  2019-12-04  9:47   ` Sergei Shtylyov
  2019-12-05 12:16   ` Yoshihiro Shimoda
  2 siblings, 0 replies; 18+ messages in thread
From: Geert Uytterhoeven @ 2019-12-04  9:29 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Linux MMC List, Linux-Renesas, Yoshihiro Shimoda

On Tue, Dec 3, 2019 at 9:06 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Now that the quirks structure is accesible, we can remove the TMIO flag
> for HS400 using only 4 taps. This is Renesas specific anyhow.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 4/5] mmc: renesas_sdhi: remove 4taps as a TMIO flag
  2019-12-03 20:05 ` [PATCH 4/5] mmc: renesas_sdhi: remove 4taps as a TMIO flag Wolfram Sang
  2019-12-04  9:29   ` Geert Uytterhoeven
@ 2019-12-04  9:47   ` Sergei Shtylyov
  2019-12-05 12:16   ` Yoshihiro Shimoda
  2 siblings, 0 replies; 18+ messages in thread
From: Sergei Shtylyov @ 2019-12-04  9:47 UTC (permalink / raw)
  To: Wolfram Sang, linux-mmc; +Cc: linux-renesas-soc, Yoshihiro Shimoda

Hello!

On 03.12.2019 23:05, Wolfram Sang wrote:

> Now that the quirks structure is accesible, we can remove the TMIO flag

    Accessible?

> for HS400 using only 4 taps. This is Renesas specific anyhow.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>   drivers/mmc/host/renesas_sdhi_core.c | 8 +++-----
>   include/linux/mfd/tmio.h             | 3 ---
>   2 files changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> index 2c743429e1e3..8ee6298d5a51 100644
> --- a/drivers/mmc/host/renesas_sdhi_core.c
> +++ b/drivers/mmc/host/renesas_sdhi_core.c
[...]
> @@ -488,7 +488,8 @@ static int renesas_sdhi_select_tuning(struct tmio_mmc_host *host)
>   static bool renesas_sdhi_check_scc_error(struct tmio_mmc_host *host)
>   {
>   	struct renesas_sdhi *priv = host_to_priv(host);
> -	bool use_4tap = host->pdata->flags & TMIO_MMC_HAVE_4TAP_HS400;
> +	bool use_4tap = priv->quirks && priv->quirks->hs400_4taps;
> +

    Extra empty line?

>   
>   	/*
>   	 * Skip checking SCC errors when running on 4 taps in HS400 mode as
[...]

MBR, Sergei

^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [PATCH 1/5] mmc: renesas_sdhi: keep sorting for quirk entries
  2019-12-03 20:05 ` [PATCH 1/5] mmc: renesas_sdhi: keep sorting for quirk entries Wolfram Sang
  2019-12-04  9:26   ` Geert Uytterhoeven
@ 2019-12-05 12:13   ` Yoshihiro Shimoda
  1 sibling, 0 replies; 18+ messages in thread
From: Yoshihiro Shimoda @ 2019-12-05 12:13 UTC (permalink / raw)
  To: Wolfram Sang, linux-mmc; +Cc: linux-renesas-soc

Hi Wolfram-san,

> From: Wolfram Sang, Sent: Wednesday, December 4, 2019 5:05 AM
> 
> The two devices next to each other are super similar, but still, let's
> keep the alphanumeric sorting for easier additions later.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Thank you for the patch!

Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

Best regards,
Yoshihiro Shimoda


^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [PATCH 2/5] mmc: renesas_sdhi: make warning more precise
  2019-12-03 20:05 ` [PATCH 2/5] mmc: renesas_sdhi: make warning more precise Wolfram Sang
  2019-12-04  9:27   ` Geert Uytterhoeven
@ 2019-12-05 12:13   ` Yoshihiro Shimoda
  1 sibling, 0 replies; 18+ messages in thread
From: Yoshihiro Shimoda @ 2019-12-05 12:13 UTC (permalink / raw)
  To: Wolfram Sang, linux-mmc; +Cc: linux-renesas-soc

Hi Wolfram-san,

> From: Wolfram Sang, Sent: Wednesday, December 4, 2019 5:05 AM
> 
> The warning is not solely used for SDR104 anymore, but for all which
> require tuning.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Thank you for the patch!

Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

Best regards,
Yoshihiro Shimoda


^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [PATCH 3/5] mmc: renesas_sdhi: make quirks info accessible outside probe()
  2019-12-03 20:05 ` [PATCH 3/5] mmc: renesas_sdhi: make quirks info accessible outside probe() Wolfram Sang
  2019-12-04  9:28   ` Geert Uytterhoeven
@ 2019-12-05 12:14   ` Yoshihiro Shimoda
  1 sibling, 0 replies; 18+ messages in thread
From: Yoshihiro Shimoda @ 2019-12-05 12:14 UTC (permalink / raw)
  To: Wolfram Sang, linux-mmc; +Cc: linux-renesas-soc

Hi Wolfram-san,

> From: Wolfram Sang, Sent: Wednesday, December 4, 2019 5:05 AM
> 
> We will need that for a later patch.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Thank you for the patch!

Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

Best regards,
Yoshihiro Shimoda


^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [PATCH 4/5] mmc: renesas_sdhi: remove 4taps as a TMIO flag
  2019-12-03 20:05 ` [PATCH 4/5] mmc: renesas_sdhi: remove 4taps as a TMIO flag Wolfram Sang
  2019-12-04  9:29   ` Geert Uytterhoeven
  2019-12-04  9:47   ` Sergei Shtylyov
@ 2019-12-05 12:16   ` Yoshihiro Shimoda
  2 siblings, 0 replies; 18+ messages in thread
From: Yoshihiro Shimoda @ 2019-12-05 12:16 UTC (permalink / raw)
  To: Wolfram Sang, linux-mmc; +Cc: linux-renesas-soc

Hi Wolfram-san,

> From: Wolfram Sang, Sent: Wednesday, December 4, 2019 5:05 AM
> 
> Now that the quirks structure is accesible, we can remove the TMIO flag
> for HS400 using only 4 taps. This is Renesas specific anyhow.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Thank you for the patch!
After fixed minor things which Sergei-san mentioned,

Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

Best regards,
Yoshihiro Shimoda


^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [PATCH/RFT 5/5] mmc: renesas_sdhi: use recent tap values for HS400
  2019-12-03 20:05 ` [PATCH/RFT 5/5] mmc: renesas_sdhi: use recent tap values for HS400 Wolfram Sang
@ 2019-12-05 12:45   ` Yoshihiro Shimoda
  0 siblings, 0 replies; 18+ messages in thread
From: Yoshihiro Shimoda @ 2019-12-05 12:45 UTC (permalink / raw)
  To: Wolfram Sang, linux-mmc; +Cc: linux-renesas-soc

Hi Wolfram-san,

> From: Wolfram Sang, Sent: Wednesday, December 4, 2019 5:05 AM
> 
> New datasheets require different and new values for HS400 with 4taps or
> 8taps.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> 
> This patch needs an ack from the BSP team and/or Shimoda-san. The BSP
> code uses this only for M3-W ES1.3 which is not supported yet upstream.
> However, H3 ES2.0 (which we do support) needs the same fix IMO because
> it is also using 4taps with HS400. But that needs confirmation as I
> can't recreate the error case here.

Thank you for the patch! I also couldn't reproduce the error case, but
I confirmed the register value was fixed on H3 ES2.0 (as 0x00000100)
and H3 ES3.0 (as 0x00000300).

So,

Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

Best regards,
Yoshihiro Shimoda


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/5] mmc: renesas_sdhi: prepare for recent HS400 updates
  2019-12-03 20:05 [PATCH 0/5] mmc: renesas_sdhi: prepare for recent HS400 updates Wolfram Sang
                   ` (4 preceding siblings ...)
  2019-12-03 20:05 ` [PATCH/RFT 5/5] mmc: renesas_sdhi: use recent tap values for HS400 Wolfram Sang
@ 2019-12-10 13:09 ` Ulf Hansson
  2019-12-10 22:21   ` Wolfram Sang
  5 siblings, 1 reply; 18+ messages in thread
From: Ulf Hansson @ 2019-12-10 13:09 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-mmc, Linux-Renesas, Yoshihiro Shimoda

On Tue, 3 Dec 2019 at 21:05, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
> Due to recent datasheet updates and other internal documents, HS400
> support for SDHI needs some refactoring. These patches are the
> prerequisites for that. The first four patches only refactor code, the
> last one does a minor update already.
>
> This series has been tested on Renesas Salvator-XS with R-Car M3-N and
> H3 ES2.0 with tests I was able to carry out locally here.
>
> I will send more advanced patches on top of this series as RFC later.
>
> A branch with all the patches applied can be found here:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/sdhi/new_manual_calib
>
> Wolfram Sang (5):
>   mmc: renesas_sdhi: keep sorting for quirk entries
>   mmc: renesas_sdhi: make warning more precise
>   mmc: renesas_sdhi: make quirks info accessible outside probe()
>   mmc: renesas_sdhi: remove 4taps as a TMIO flag
>   mmc: renesas_sdhi: use recent tap values for HS400
>
>  drivers/mmc/host/renesas_sdhi.h               | 10 ++++++--
>  drivers/mmc/host/renesas_sdhi_core.c          | 23 ++++++++-----------
>  drivers/mmc/host/renesas_sdhi_internal_dmac.c |  2 +-
>  include/linux/mfd/tmio.h                      |  3 ---
>  4 files changed, 19 insertions(+), 19 deletions(-)
>
> --
> 2.20.1
>

Applied for next and by fixing up the comments for patch 4, thanks!

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/5] mmc: renesas_sdhi: prepare for recent HS400 updates
  2019-12-10 13:09 ` [PATCH 0/5] mmc: renesas_sdhi: prepare for recent HS400 updates Ulf Hansson
@ 2019-12-10 22:21   ` Wolfram Sang
  0 siblings, 0 replies; 18+ messages in thread
From: Wolfram Sang @ 2019-12-10 22:21 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: Wolfram Sang, linux-mmc, Linux-Renesas, Yoshihiro Shimoda

[-- Attachment #1: Type: text/plain, Size: 103 bytes --]


> Applied for next and by fixing up the comments for patch 4, thanks!

Thanks for fixing it up, Ulf!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-12-10 22:21 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-03 20:05 [PATCH 0/5] mmc: renesas_sdhi: prepare for recent HS400 updates Wolfram Sang
2019-12-03 20:05 ` [PATCH 1/5] mmc: renesas_sdhi: keep sorting for quirk entries Wolfram Sang
2019-12-04  9:26   ` Geert Uytterhoeven
2019-12-05 12:13   ` Yoshihiro Shimoda
2019-12-03 20:05 ` [PATCH 2/5] mmc: renesas_sdhi: make warning more precise Wolfram Sang
2019-12-04  9:27   ` Geert Uytterhoeven
2019-12-05 12:13   ` Yoshihiro Shimoda
2019-12-03 20:05 ` [PATCH 3/5] mmc: renesas_sdhi: make quirks info accessible outside probe() Wolfram Sang
2019-12-04  9:28   ` Geert Uytterhoeven
2019-12-05 12:14   ` Yoshihiro Shimoda
2019-12-03 20:05 ` [PATCH 4/5] mmc: renesas_sdhi: remove 4taps as a TMIO flag Wolfram Sang
2019-12-04  9:29   ` Geert Uytterhoeven
2019-12-04  9:47   ` Sergei Shtylyov
2019-12-05 12:16   ` Yoshihiro Shimoda
2019-12-03 20:05 ` [PATCH/RFT 5/5] mmc: renesas_sdhi: use recent tap values for HS400 Wolfram Sang
2019-12-05 12:45   ` Yoshihiro Shimoda
2019-12-10 13:09 ` [PATCH 0/5] mmc: renesas_sdhi: prepare for recent HS400 updates Ulf Hansson
2019-12-10 22:21   ` Wolfram Sang

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).