All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] mmc: renesas_sdhi: Trivial fixes
@ 2022-06-24 18:14 Lad Prabhakar
  2022-06-24 18:14 ` [PATCH v3 1/2] mmc: renesas_sdhi: Get the reset handle early in the probe Lad Prabhakar
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Lad Prabhakar @ 2022-06-24 18:14 UTC (permalink / raw)
  To: Wolfram Sang, Ulf Hansson, Philipp Zabel, Yoshihiro Shimoda,
	Geert Uytterhoeven, Pavel Machek, linux-mmc, linux-renesas-soc
  Cc: linux-kernel, Prabhakar, Biju Das, Lad Prabhakar

Hi All,

This patch series adds trivial fixes to renesas mmc driver.

v2->v3
* Fixed Review comments pointed by Wolfram.
* Included RB tags from Geert.

v1->v2
* Fixed review comments pointed by Geert and Wolfram.

v1: https://patchwork.kernel.org/project/linux-renesas-soc/cover/
20220404172322.32578-1-prabhakar.mahadev-lad.rj@bp.renesas.com/

Cheers,
Prabhakar

Lad Prabhakar (2):
  mmc: renesas_sdhi: Get the reset handle early in the probe
  mmc: renesas_sdhi: Fix typo's

 drivers/mmc/host/renesas_sdhi_core.c          | 8 ++++----
 drivers/mmc/host/renesas_sdhi_internal_dmac.c | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

-- 
2.17.1


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

* [PATCH v3 1/2] mmc: renesas_sdhi: Get the reset handle early in the probe
  2022-06-24 18:14 [PATCH v3 0/2] mmc: renesas_sdhi: Trivial fixes Lad Prabhakar
@ 2022-06-24 18:14 ` Lad Prabhakar
  2022-06-25  8:15   ` Wolfram Sang
  2022-06-24 18:14 ` [PATCH v3 2/2] mmc: renesas_sdhi: Fix typo's Lad Prabhakar
  2022-07-12 11:08 ` [PATCH v3 0/2] mmc: renesas_sdhi: Trivial fixes Ulf Hansson
  2 siblings, 1 reply; 6+ messages in thread
From: Lad Prabhakar @ 2022-06-24 18:14 UTC (permalink / raw)
  To: Wolfram Sang, Ulf Hansson, Philipp Zabel, Yoshihiro Shimoda,
	Geert Uytterhoeven, Pavel Machek, linux-mmc, linux-renesas-soc
  Cc: linux-kernel, Prabhakar, Biju Das, Lad Prabhakar

In case of devm_reset_control_get_optional_exclusive() failure we returned
directly instead of jumping to the error path to roll back initialization.

This patch moves devm_reset_control_get_optional_exclusive() early in the
probe so that we have the reset handle prior to initialization of the
hardware.

Fixes: b4d86f37eacb7 ("mmc: renesas_sdhi: do hard reset if possible")
Reported-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/mmc/host/renesas_sdhi_core.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index 4404ca1f98d8..0d258b6e1a43 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -938,6 +938,10 @@ int renesas_sdhi_probe(struct platform_device *pdev,
 	if (IS_ERR(priv->clk_cd))
 		return dev_err_probe(&pdev->dev, PTR_ERR(priv->clk_cd), "cannot get cd clock");
 
+	priv->rstc = devm_reset_control_get_optional_exclusive(&pdev->dev, NULL);
+	if (IS_ERR(priv->rstc))
+		return PTR_ERR(priv->rstc);
+
 	priv->pinctrl = devm_pinctrl_get(&pdev->dev);
 	if (!IS_ERR(priv->pinctrl)) {
 		priv->pins_default = pinctrl_lookup_state(priv->pinctrl,
@@ -1030,10 +1034,6 @@ int renesas_sdhi_probe(struct platform_device *pdev,
 	if (ret)
 		goto efree;
 
-	priv->rstc = devm_reset_control_get_optional_exclusive(&pdev->dev, NULL);
-	if (IS_ERR(priv->rstc))
-		return PTR_ERR(priv->rstc);
-
 	ver = sd_ctrl_read16(host, CTL_VERSION);
 	/* GEN2_SDR104 is first known SDHI to use 32bit block count */
 	if (ver < SDHI_VER_GEN2_SDR104 && mmc_data->max_blk_count > U16_MAX)
-- 
2.17.1


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

* [PATCH v3 2/2] mmc: renesas_sdhi: Fix typo's
  2022-06-24 18:14 [PATCH v3 0/2] mmc: renesas_sdhi: Trivial fixes Lad Prabhakar
  2022-06-24 18:14 ` [PATCH v3 1/2] mmc: renesas_sdhi: Get the reset handle early in the probe Lad Prabhakar
@ 2022-06-24 18:14 ` Lad Prabhakar
  2022-06-25  8:16   ` Wolfram Sang
  2022-07-12 11:08 ` [PATCH v3 0/2] mmc: renesas_sdhi: Trivial fixes Ulf Hansson
  2 siblings, 1 reply; 6+ messages in thread
From: Lad Prabhakar @ 2022-06-24 18:14 UTC (permalink / raw)
  To: Wolfram Sang, Ulf Hansson, Philipp Zabel, Yoshihiro Shimoda,
	Geert Uytterhoeven, Pavel Machek, linux-mmc, linux-renesas-soc
  Cc: linux-kernel, Prabhakar, Biju Das, Lad Prabhakar

Fix typo's,
* difference -> different
* alignment -> aligned

While at it updated the comment to make it clear that Renesas SDHI DMAC
needs buffers to be 128-byte aligned.

Reported-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/mmc/host/renesas_sdhi_internal_dmac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
index 3084b15ae2cb..890aa7832baf 100644
--- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
@@ -321,7 +321,7 @@ renesas_sdhi_internal_dmac_dataend_dma(struct tmio_mmc_host *host)
 }
 
 /*
- * renesas_sdhi_internal_dmac_map() will be called with two difference
+ * renesas_sdhi_internal_dmac_map() will be called with two different
  * sg pointers in two mmc_data by .pre_req(), but tmio host can have a single
  * sg_ptr only. So, renesas_sdhi_internal_dmac_{un}map() should use a sg
  * pointer in a mmc_data instead of host->sg_ptr.
@@ -355,7 +355,7 @@ renesas_sdhi_internal_dmac_map(struct tmio_mmc_host *host,
 
 	data->host_cookie = cookie;
 
-	/* This DMAC cannot handle if buffer is not 128-bytes alignment */
+	/* This DMAC needs buffers to be 128-byte aligned */
 	if (!IS_ALIGNED(sg_dma_address(data->sg), 128)) {
 		renesas_sdhi_internal_dmac_unmap(host, data, cookie);
 		return false;
-- 
2.17.1


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

* Re: [PATCH v3 1/2] mmc: renesas_sdhi: Get the reset handle early in the probe
  2022-06-24 18:14 ` [PATCH v3 1/2] mmc: renesas_sdhi: Get the reset handle early in the probe Lad Prabhakar
@ 2022-06-25  8:15   ` Wolfram Sang
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2022-06-25  8:15 UTC (permalink / raw)
  To: Lad Prabhakar
  Cc: Ulf Hansson, Philipp Zabel, Yoshihiro Shimoda,
	Geert Uytterhoeven, Pavel Machek, linux-mmc, linux-renesas-soc,
	linux-kernel, Prabhakar, Biju Das

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

On Fri, Jun 24, 2022 at 07:14:37PM +0100, Lad Prabhakar wrote:
> In case of devm_reset_control_get_optional_exclusive() failure we returned
> directly instead of jumping to the error path to roll back initialization.
> 
> This patch moves devm_reset_control_get_optional_exclusive() early in the
> probe so that we have the reset handle prior to initialization of the
> hardware.
> 
> Fixes: b4d86f37eacb7 ("mmc: renesas_sdhi: do hard reset if possible")
> Reported-by: Pavel Machek <pavel@denx.de>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

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


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

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

* Re: [PATCH v3 2/2] mmc: renesas_sdhi: Fix typo's
  2022-06-24 18:14 ` [PATCH v3 2/2] mmc: renesas_sdhi: Fix typo's Lad Prabhakar
@ 2022-06-25  8:16   ` Wolfram Sang
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2022-06-25  8:16 UTC (permalink / raw)
  To: Lad Prabhakar
  Cc: Ulf Hansson, Philipp Zabel, Yoshihiro Shimoda,
	Geert Uytterhoeven, Pavel Machek, linux-mmc, linux-renesas-soc,
	linux-kernel, Prabhakar, Biju Das

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

On Fri, Jun 24, 2022 at 07:14:38PM +0100, Lad Prabhakar wrote:
> Fix typo's,
> * difference -> different
> * alignment -> aligned
> 
> While at it updated the comment to make it clear that Renesas SDHI DMAC
> needs buffers to be 128-byte aligned.
> 
> Reported-by: Pavel Machek <pavel@denx.de>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

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

Thank you!


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

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

* Re: [PATCH v3 0/2] mmc: renesas_sdhi: Trivial fixes
  2022-06-24 18:14 [PATCH v3 0/2] mmc: renesas_sdhi: Trivial fixes Lad Prabhakar
  2022-06-24 18:14 ` [PATCH v3 1/2] mmc: renesas_sdhi: Get the reset handle early in the probe Lad Prabhakar
  2022-06-24 18:14 ` [PATCH v3 2/2] mmc: renesas_sdhi: Fix typo's Lad Prabhakar
@ 2022-07-12 11:08 ` Ulf Hansson
  2 siblings, 0 replies; 6+ messages in thread
From: Ulf Hansson @ 2022-07-12 11:08 UTC (permalink / raw)
  To: Lad Prabhakar
  Cc: Wolfram Sang, Philipp Zabel, Yoshihiro Shimoda,
	Geert Uytterhoeven, Pavel Machek, linux-mmc, linux-renesas-soc,
	linux-kernel, Prabhakar, Biju Das

On Fri, 24 Jun 2022 at 20:14, Lad Prabhakar
<prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
>
> Hi All,
>
> This patch series adds trivial fixes to renesas mmc driver.
>
> v2->v3
> * Fixed Review comments pointed by Wolfram.
> * Included RB tags from Geert.
>
> v1->v2
> * Fixed review comments pointed by Geert and Wolfram.
>
> v1: https://patchwork.kernel.org/project/linux-renesas-soc/cover/
> 20220404172322.32578-1-prabhakar.mahadev-lad.rj@bp.renesas.com/
>
> Cheers,
> Prabhakar
>
> Lad Prabhakar (2):
>   mmc: renesas_sdhi: Get the reset handle early in the probe
>   mmc: renesas_sdhi: Fix typo's
>
>  drivers/mmc/host/renesas_sdhi_core.c          | 8 ++++----
>  drivers/mmc/host/renesas_sdhi_internal_dmac.c | 4 ++--
>  2 files changed, 6 insertions(+), 6 deletions(-)
>

Applied for next, thanks!

Kind regards
Uffe

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

end of thread, other threads:[~2022-07-12 11:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-24 18:14 [PATCH v3 0/2] mmc: renesas_sdhi: Trivial fixes Lad Prabhakar
2022-06-24 18:14 ` [PATCH v3 1/2] mmc: renesas_sdhi: Get the reset handle early in the probe Lad Prabhakar
2022-06-25  8:15   ` Wolfram Sang
2022-06-24 18:14 ` [PATCH v3 2/2] mmc: renesas_sdhi: Fix typo's Lad Prabhakar
2022-06-25  8:16   ` Wolfram Sang
2022-07-12 11:08 ` [PATCH v3 0/2] mmc: renesas_sdhi: Trivial fixes Ulf Hansson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.