* [PATCH v1] mmc: fsl_esdhc_imx: fix watermark level in dma
@ 2022-01-31 22:08 ` Marcel Ziswiler
2022-02-01 1:44 ` Fabio Estevam
2022-02-08 23:37 ` Jaehoon Chung
0 siblings, 2 replies; 6+ messages in thread
From: Marcel Ziswiler @ 2022-01-31 22:08 UTC (permalink / raw)
To: u-boot
Cc: Michael Walle, NXP i . MX U-Boot Team, Jaehoon Chung,
Sean Anderson, Marcel Ziswiler, Fabio Estevam, Peng Fan,
Stefano Babic
From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Seems that we need the waterlevel setting not only for PIO mode as
without this at least the i.MX 8M Mini won't boot anymore when being
written by such a U-Boot. Corruption has also been observed both on
the i.MX 6 as well as i.MX 8M Mini when using ums on the eMMC. Fix
this by setting the watermark level again regardless of whether in
DMA or PIO mode.
Fixes: 41c6a22fc296 ("mmc: fsl_esdhc_imx: simplify esdhc_setup_data()")
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
---
drivers/mmc/fsl_esdhc_imx.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
index 9299635f50..efa5ed0af7 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -336,9 +336,8 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc,
}
}
- if (IS_ENABLED(CONFIG_SYS_FSL_ESDHC_USE_PIO))
- esdhc_setup_watermark_level(priv, data);
- else
+ esdhc_setup_watermark_level(priv, data);
+ if (!IS_ENABLED(CONFIG_SYS_FSL_ESDHC_USE_PIO))
esdhc_setup_dma(priv, data);
/* Calculate the timeout period for data transactions */
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v1] mmc: fsl_esdhc_imx: fix watermark level in dma
2022-01-31 22:08 ` [PATCH v1] mmc: fsl_esdhc_imx: fix watermark level in dma Marcel Ziswiler
@ 2022-02-01 1:44 ` Fabio Estevam
2022-02-02 17:08 ` Fabio Estevam
2022-02-08 23:37 ` Jaehoon Chung
1 sibling, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2022-02-01 1:44 UTC (permalink / raw)
To: Marcel Ziswiler
Cc: U-Boot-Denx, Michael Walle, NXP i . MX U-Boot Team,
Jaehoon Chung, Sean Anderson, Marcel Ziswiler, Peng Fan,
Stefano Babic
Hi Marcel,
On Mon, Jan 31, 2022 at 7:08 PM Marcel Ziswiler <marcel@ziswiler.com> wrote:
>
> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>
> Seems that we need the waterlevel setting not only for PIO mode as
> without this at least the i.MX 8M Mini won't boot anymore when being
> written by such a U-Boot. Corruption has also been observed both on
> the i.MX 6 as well as i.MX 8M Mini when using ums on the eMMC. Fix
> this by setting the watermark level again regardless of whether in
> DMA or PIO mode.
>
> Fixes: 41c6a22fc296 ("mmc: fsl_esdhc_imx: simplify esdhc_setup_data()")
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
This is probably the failure I saw on imx7 when I tried testing 'ums'.
Reviewed-by: Fabio Estevam <festevam@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] mmc: fsl_esdhc_imx: fix watermark level in dma
2022-02-01 1:44 ` Fabio Estevam
@ 2022-02-02 17:08 ` Fabio Estevam
2022-02-08 1:32 ` Fabio Estevam
0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2022-02-02 17:08 UTC (permalink / raw)
To: Marcel Ziswiler, Tom Rini
Cc: U-Boot-Denx, Michael Walle, NXP i . MX U-Boot Team,
Jaehoon Chung, Sean Anderson, Marcel Ziswiler, Peng Fan,
Stefano Babic
On Mon, Jan 31, 2022 at 10:44 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> Hi Marcel,
>
> On Mon, Jan 31, 2022 at 7:08 PM Marcel Ziswiler <marcel@ziswiler.com> wrote:
> >
> > From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> >
> > Seems that we need the waterlevel setting not only for PIO mode as
> > without this at least the i.MX 8M Mini won't boot anymore when being
> > written by such a U-Boot. Corruption has also been observed both on
> > the i.MX 6 as well as i.MX 8M Mini when using ums on the eMMC. Fix
> > this by setting the watermark level again regardless of whether in
> > DMA or PIO mode.
> >
> > Fixes: 41c6a22fc296 ("mmc: fsl_esdhc_imx: simplify esdhc_setup_data()")
> > Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>
> This is probably the failure I saw on imx7 when I tried testing 'ums'.
>
> Reviewed-by: Fabio Estevam <festevam@gmail.com>
This indeed fixes the regression I was seeing with imx7s-warp:
Tested-by: Fabio Estevam <festevam@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] mmc: fsl_esdhc_imx: fix watermark level in dma
2022-02-02 17:08 ` Fabio Estevam
@ 2022-02-08 1:32 ` Fabio Estevam
2022-02-08 2:15 ` Jaehoon Chung
0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2022-02-08 1:32 UTC (permalink / raw)
To: Marcel Ziswiler, Tom Rini
Cc: U-Boot-Denx, Michael Walle, NXP i . MX U-Boot Team,
Jaehoon Chung, Sean Anderson, Marcel Ziswiler, Peng Fan,
Stefano Babic
Hi Jaehoon,
On Wed, Feb 2, 2022 at 2:08 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> On Mon, Jan 31, 2022 at 10:44 PM Fabio Estevam <festevam@gmail.com> wrote:
> >
> > Hi Marcel,
> >
> > On Mon, Jan 31, 2022 at 7:08 PM Marcel Ziswiler <marcel@ziswiler.com> wrote:
> > >
> > > From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > >
> > > Seems that we need the waterlevel setting not only for PIO mode as
> > > without this at least the i.MX 8M Mini won't boot anymore when being
> > > written by such a U-Boot. Corruption has also been observed both on
> > > the i.MX 6 as well as i.MX 8M Mini when using ums on the eMMC. Fix
> > > this by setting the watermark level again regardless of whether in
> > > DMA or PIO mode.
> > >
> > > Fixes: 41c6a22fc296 ("mmc: fsl_esdhc_imx: simplify esdhc_setup_data()")
> > > Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> >
> > This is probably the failure I saw on imx7 when I tried testing 'ums'.
> >
> > Reviewed-by: Fabio Estevam <festevam@gmail.com>
>
> This indeed fixes the regression I was seeing with imx7s-warp:
>
> Tested-by: Fabio Estevam <festevam@gmail.com>
Could you please apply this fix?
Thanks
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] mmc: fsl_esdhc_imx: fix watermark level in dma
2022-02-08 1:32 ` Fabio Estevam
@ 2022-02-08 2:15 ` Jaehoon Chung
0 siblings, 0 replies; 6+ messages in thread
From: Jaehoon Chung @ 2022-02-08 2:15 UTC (permalink / raw)
To: Fabio Estevam, Marcel Ziswiler, Tom Rini
Cc: U-Boot-Denx, Michael Walle, NXP i . MX U-Boot Team,
Sean Anderson, Marcel Ziswiler, Peng Fan, Stefano Babic
Hi Fabio,
On 2/8/22 10:32, Fabio Estevam wrote:
> Hi Jaehoon,
>
> On Wed, Feb 2, 2022 at 2:08 PM Fabio Estevam <festevam@gmail.com> wrote:
>>
>> On Mon, Jan 31, 2022 at 10:44 PM Fabio Estevam <festevam@gmail.com> wrote:
>>>
>>> Hi Marcel,
>>>
>>> On Mon, Jan 31, 2022 at 7:08 PM Marcel Ziswiler <marcel@ziswiler.com> wrote:
>>>>
>>>> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>>>>
>>>> Seems that we need the waterlevel setting not only for PIO mode as
>>>> without this at least the i.MX 8M Mini won't boot anymore when being
>>>> written by such a U-Boot. Corruption has also been observed both on
>>>> the i.MX 6 as well as i.MX 8M Mini when using ums on the eMMC. Fix
>>>> this by setting the watermark level again regardless of whether in
>>>> DMA or PIO mode.
>>>>
>>>> Fixes: 41c6a22fc296 ("mmc: fsl_esdhc_imx: simplify esdhc_setup_data()")
>>>> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>>>
>>> This is probably the failure I saw on imx7 when I tried testing 'ums'.
>>>
>>> Reviewed-by: Fabio Estevam <festevam@gmail.com>
>>
>> This indeed fixes the regression I was seeing with imx7s-warp:
>>
>> Tested-by: Fabio Estevam <festevam@gmail.com>
>
> Could you please apply this fix?
Sorry for late. I had been vacation until yesterday. I'm looking for pending patches.
I will pick this soon.
Best Regards,
Jaehoon Chung
>
> Thanks
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] mmc: fsl_esdhc_imx: fix watermark level in dma
2022-01-31 22:08 ` [PATCH v1] mmc: fsl_esdhc_imx: fix watermark level in dma Marcel Ziswiler
2022-02-01 1:44 ` Fabio Estevam
@ 2022-02-08 23:37 ` Jaehoon Chung
1 sibling, 0 replies; 6+ messages in thread
From: Jaehoon Chung @ 2022-02-08 23:37 UTC (permalink / raw)
To: Marcel Ziswiler, u-boot
Cc: Michael Walle, NXP i . MX U-Boot Team, Sean Anderson,
Marcel Ziswiler, Fabio Estevam, Peng Fan, Stefano Babic
On 2/1/22 07:08, Marcel Ziswiler wrote:
> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>
> Seems that we need the waterlevel setting not only for PIO mode as
> without this at least the i.MX 8M Mini won't boot anymore when being
> written by such a U-Boot. Corruption has also been observed both on
> the i.MX 6 as well as i.MX 8M Mini when using ums on the eMMC. Fix
> this by setting the watermark level again regardless of whether in
> DMA or PIO mode.
>
> Fixes: 41c6a22fc296 ("mmc: fsl_esdhc_imx: simplify esdhc_setup_data()")
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Applied on u-boot-mmc/master.
Thanks!
Best Regards,
Jaehoon Chung
>
> ---
>
> drivers/mmc/fsl_esdhc_imx.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
> index 9299635f50..efa5ed0af7 100644
> --- a/drivers/mmc/fsl_esdhc_imx.c
> +++ b/drivers/mmc/fsl_esdhc_imx.c
> @@ -336,9 +336,8 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc,
> }
> }
>
> - if (IS_ENABLED(CONFIG_SYS_FSL_ESDHC_USE_PIO))
> - esdhc_setup_watermark_level(priv, data);
> - else
> + esdhc_setup_watermark_level(priv, data);
> + if (!IS_ENABLED(CONFIG_SYS_FSL_ESDHC_USE_PIO))
> esdhc_setup_dma(priv, data);
>
> /* Calculate the timeout period for data transactions */
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-02-08 23:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20220131220855epcas1p1a3c5547afa644ae58e98bc7d7ff2baa5@epcas1p1.samsung.com>
2022-01-31 22:08 ` [PATCH v1] mmc: fsl_esdhc_imx: fix watermark level in dma Marcel Ziswiler
2022-02-01 1:44 ` Fabio Estevam
2022-02-02 17:08 ` Fabio Estevam
2022-02-08 1:32 ` Fabio Estevam
2022-02-08 2:15 ` Jaehoon Chung
2022-02-08 23:37 ` Jaehoon Chung
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.