* [PATCH v2 0/2] mmc: renesas_sdhi: Trivial fixes
@ 2022-06-22 17:36 Lad Prabhakar
2022-06-22 17:36 ` [PATCH v2 1/2] mmc: renesas_sdhi: Get the reset handle early in the probe Lad Prabhakar
2022-06-22 17:36 ` [PATCH v2 2/2] mmc: renesas_sdhi: Fix typo's Lad Prabhakar
0 siblings, 2 replies; 8+ messages in thread
From: Lad Prabhakar @ 2022-06-22 17:36 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.
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] 8+ messages in thread
* [PATCH v2 1/2] mmc: renesas_sdhi: Get the reset handle early in the probe
2022-06-22 17:36 [PATCH v2 0/2] mmc: renesas_sdhi: Trivial fixes Lad Prabhakar
@ 2022-06-22 17:36 ` Lad Prabhakar
2022-06-22 18:14 ` Geert Uytterhoeven
2022-06-22 17:36 ` [PATCH v2 2/2] mmc: renesas_sdhi: Fix typo's Lad Prabhakar
1 sibling, 1 reply; 8+ messages in thread
From: Lad Prabhakar @ 2022-06-22 17:36 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>
---
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] 8+ messages in thread
* [PATCH v2 2/2] mmc: renesas_sdhi: Fix typo's
2022-06-22 17:36 [PATCH v2 0/2] mmc: renesas_sdhi: Trivial fixes Lad Prabhakar
2022-06-22 17:36 ` [PATCH v2 1/2] mmc: renesas_sdhi: Get the reset handle early in the probe Lad Prabhakar
@ 2022-06-22 17:36 ` Lad Prabhakar
2022-06-22 18:11 ` Geert Uytterhoeven
1 sibling, 1 reply; 8+ messages in thread
From: Lad Prabhakar @ 2022-06-22 17:36 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 replaced 128-bytes -> 128 byte.
Reported-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
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..4eb65b3c36bb 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 cannot handle if buffer is not 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] 8+ messages in thread
* Re: [PATCH v2 2/2] mmc: renesas_sdhi: Fix typo's
2022-06-22 17:36 ` [PATCH v2 2/2] mmc: renesas_sdhi: Fix typo's Lad Prabhakar
@ 2022-06-22 18:11 ` Geert Uytterhoeven
2022-06-22 18:21 ` Lad, Prabhakar
0 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2022-06-22 18:11 UTC (permalink / raw)
To: Lad Prabhakar
Cc: Wolfram Sang, Ulf Hansson, Philipp Zabel, Yoshihiro Shimoda,
Geert Uytterhoeven, Pavel Machek, Linux MMC List, Linux-Renesas,
Linux Kernel Mailing List, Prabhakar, Biju Das
Hi Prabhakar,
On Wed, Jun 22, 2022 at 7:36 PM Lad Prabhakar
<prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
> Fix typo's,
> * difference -> different
> * alignment -> aligned
>
> While at it replaced 128-bytes -> 128 byte.
>
> Reported-by: Pavel Machek <pavel@denx.de>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Thanks for your patch!
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> @@ -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 cannot handle if buffer is not 128 byte aligned */
128-byte? ;-)
> if (!IS_ALIGNED(sg_dma_address(data->sg), 128)) {
> renesas_sdhi_internal_dmac_unmap(host, data, cookie);
> return false;
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] 8+ messages in thread
* Re: [PATCH v2 1/2] mmc: renesas_sdhi: Get the reset handle early in the probe
2022-06-22 17:36 ` [PATCH v2 1/2] mmc: renesas_sdhi: Get the reset handle early in the probe Lad Prabhakar
@ 2022-06-22 18:14 ` Geert Uytterhoeven
0 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2022-06-22 18:14 UTC (permalink / raw)
To: Lad Prabhakar
Cc: Wolfram Sang, Ulf Hansson, Philipp Zabel, Yoshihiro Shimoda,
Geert Uytterhoeven, Pavel Machek, Linux MMC List, Linux-Renesas,
Linux Kernel Mailing List, Prabhakar, Biju Das
On Wed, Jun 22, 2022 at 7:36 PM Lad Prabhakar
<prabhakar.mahadev-lad.rj@bp.renesas.com> 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>
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] 8+ messages in thread
* Re: [PATCH v2 2/2] mmc: renesas_sdhi: Fix typo's
2022-06-22 18:11 ` Geert Uytterhoeven
@ 2022-06-22 18:21 ` Lad, Prabhakar
2022-06-22 19:09 ` Wolfram Sang
0 siblings, 1 reply; 8+ messages in thread
From: Lad, Prabhakar @ 2022-06-22 18:21 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Lad Prabhakar, Wolfram Sang, Ulf Hansson, Philipp Zabel,
Yoshihiro Shimoda, Geert Uytterhoeven, Pavel Machek,
Linux MMC List, Linux-Renesas, Linux Kernel Mailing List,
Biju Das
Hi Geert,
Thank you for the review.
On Wed, Jun 22, 2022 at 7:11 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Prabhakar,
>
> On Wed, Jun 22, 2022 at 7:36 PM Lad Prabhakar
> <prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
> > Fix typo's,
> > * difference -> different
> > * alignment -> aligned
> >
> > While at it replaced 128-bytes -> 128 byte.
> >
> > Reported-by: Pavel Machek <pavel@denx.de>
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> Thanks for your patch!
>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> > --- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> > +++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> > @@ -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 cannot handle if buffer is not 128 byte aligned */
>
> 128-byte? ;-)
>
In the previous version of the patch Wolfram never came back on your
reply, so I went with 128 byte instead.
Cheers,
Prabhakar
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/2] mmc: renesas_sdhi: Fix typo's
2022-06-22 18:21 ` Lad, Prabhakar
@ 2022-06-22 19:09 ` Wolfram Sang
2022-06-23 11:39 ` Lad, Prabhakar
0 siblings, 1 reply; 8+ messages in thread
From: Wolfram Sang @ 2022-06-22 19:09 UTC (permalink / raw)
To: Lad, Prabhakar
Cc: Geert Uytterhoeven, Lad Prabhakar, Ulf Hansson, Philipp Zabel,
Yoshihiro Shimoda, Geert Uytterhoeven, Pavel Machek,
Linux MMC List, Linux-Renesas, Linux Kernel Mailing List,
Biju Das
[-- Attachment #1: Type: text/plain, Size: 463 bytes --]
> > > - /* This DMAC cannot handle if buffer is not 128-bytes alignment */
> > > + /* This DMAC cannot handle if buffer is not 128 byte aligned */
> >
> > 128-byte? ;-)
> >
> In the previous version of the patch Wolfram never came back on your
> reply, so I went with 128 byte instead.
I hoped for a native speaker to chime in. I don't care about the '-' but
maybe we should rephrase it to:
/* This DMAC needs buffers to be 128-byte aligned */
?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/2] mmc: renesas_sdhi: Fix typo's
2022-06-22 19:09 ` Wolfram Sang
@ 2022-06-23 11:39 ` Lad, Prabhakar
0 siblings, 0 replies; 8+ messages in thread
From: Lad, Prabhakar @ 2022-06-23 11:39 UTC (permalink / raw)
To: Wolfram Sang, Lad, Prabhakar, Geert Uytterhoeven, Lad Prabhakar,
Ulf Hansson, Philipp Zabel, Yoshihiro Shimoda,
Geert Uytterhoeven, Pavel Machek, Linux MMC List, Linux-Renesas,
Linux Kernel Mailing List, Biju Das
Hi Wolfram,
On Wed, Jun 22, 2022 at 8:09 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
>
> > > > - /* This DMAC cannot handle if buffer is not 128-bytes alignment */
> > > > + /* This DMAC cannot handle if buffer is not 128 byte aligned */
> > >
> > > 128-byte? ;-)
> > >
> > In the previous version of the patch Wolfram never came back on your
> > reply, so I went with 128 byte instead.
>
> I hoped for a native speaker to chime in. I don't care about the '-' but
> maybe we should rephrase it to:
>
> /* This DMAC needs buffers to be 128-byte aligned */
>
> ?
Fine by me, will update and resend a v3.
Cheers,
Prabhakar
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-06-23 11:39 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-22 17:36 [PATCH v2 0/2] mmc: renesas_sdhi: Trivial fixes Lad Prabhakar
2022-06-22 17:36 ` [PATCH v2 1/2] mmc: renesas_sdhi: Get the reset handle early in the probe Lad Prabhakar
2022-06-22 18:14 ` Geert Uytterhoeven
2022-06-22 17:36 ` [PATCH v2 2/2] mmc: renesas_sdhi: Fix typo's Lad Prabhakar
2022-06-22 18:11 ` Geert Uytterhoeven
2022-06-22 18:21 ` Lad, Prabhakar
2022-06-22 19:09 ` Wolfram Sang
2022-06-23 11:39 ` Lad, Prabhakar
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).