public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mmc:fsl_esdhc: fix invalidate dcache scope
@ 2016-04-06 10:12 Shengzhou Liu
  2016-04-06 15:26 ` York Sun
  0 siblings, 1 reply; 3+ messages in thread
From: Shengzhou Liu @ 2016-04-06 10:12 UTC (permalink / raw)
  To: u-boot

commit 4683b220655 "mmc:fsl_esdhc invalidate dcache before read"
intended for ARM, which broke on PowerPC(caused memory allocation
failure under SD boot), so add condition CONFIG_ARM.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com>
---
 drivers/mmc/fsl_esdhc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 7cc61a0..7812e6c 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -348,8 +348,10 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
 		if(err)
 			return err;
 
+#ifdef CONFIG_ARM
 		if (data->flags & MMC_DATA_READ)
 			check_and_invalidate_dcache_range(cmd, data);
+#endif
 	}
 
 	/* Figure out the transfer arguments */
-- 
2.1.0.27.g96db324

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

* [U-Boot] [PATCH] mmc:fsl_esdhc: fix invalidate dcache scope
  2016-04-06 10:12 [U-Boot] [PATCH] mmc:fsl_esdhc: fix invalidate dcache scope Shengzhou Liu
@ 2016-04-06 15:26 ` York Sun
  2016-04-07  4:15   ` Shengzhou Liu
  0 siblings, 1 reply; 3+ messages in thread
From: York Sun @ 2016-04-06 15:26 UTC (permalink / raw)
  To: u-boot

On 04/06/2016 03:22 AM, Shengzhou Liu wrote:
> commit 4683b220655 "mmc:fsl_esdhc invalidate dcache before read"
> intended for ARM, which broke on PowerPC(caused memory allocation
> failure under SD boot), so add condition CONFIG_ARM.
> 
> Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com>
> ---
>  drivers/mmc/fsl_esdhc.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
> index 7cc61a0..7812e6c 100644
> --- a/drivers/mmc/fsl_esdhc.c
> +++ b/drivers/mmc/fsl_esdhc.c
> @@ -348,8 +348,10 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
>  		if(err)
>  			return err;
>  
> +#ifdef CONFIG_ARM
>  		if (data->flags & MMC_DATA_READ)
>  			check_and_invalidate_dcache_range(cmd, data);
> +#endif
>  	}
>  
>  	/* Figure out the transfer arguments */
> 

Shenghzou,

This is not a correct fix. This issue is related to

http://lists.denx.de/pipermail/u-boot/2015-December/236272.html
http://lists.denx.de/pipermail/u-boot/2016-March/249377.html

In short, the invalidate_dcache_range function was added for
512x/5xxx/83xx/85xx. Although it shouldn't do any harm, it actually does. I
haven't got a chance to investigate. Please look into it if you can.

York

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

* [U-Boot] [PATCH] mmc:fsl_esdhc: fix invalidate dcache scope
  2016-04-06 15:26 ` York Sun
@ 2016-04-07  4:15   ` Shengzhou Liu
  0 siblings, 0 replies; 3+ messages in thread
From: Shengzhou Liu @ 2016-04-07  4:15 UTC (permalink / raw)
  To: u-boot


> -----Original Message-----
> From: York Sun [mailto:york.sun at nxp.com]
> Sent: Wednesday, April 06, 2016 11:26 PM
> To: Shengzhou Liu <shengzhou.liu@nxp.com>; u-boot at lists.denx.de
> Subject: Re: [PATCH] mmc:fsl_esdhc: fix invalidate dcache scope
> >
> 
> Shenghzou,
> 
> This is not a correct fix. This issue is related to
> 
> http://lists.denx.de/pipermail/u-boot/2015-December/236272.html
> http://lists.denx.de/pipermail/u-boot/2016-March/249377.html
> 
> In short, the invalidate_dcache_range function was added for
> 512x/5xxx/83xx/85xx. Although it shouldn't do any harm, it actually does. I
> haven't got a chance to investigate. Please look into it if you can.
> 
> York

York,   
This patch is just a quick hack, I thought root cause is needed to be dug, this issue didn't occur on ARM, just happened on PPC(e.g. T1/T2/T4 platforms). I have no time on this(occupied on ONL), suggest MMC owner continue to investigate it.
Shengzhou

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

end of thread, other threads:[~2016-04-07  4:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-06 10:12 [U-Boot] [PATCH] mmc:fsl_esdhc: fix invalidate dcache scope Shengzhou Liu
2016-04-06 15:26 ` York Sun
2016-04-07  4:15   ` Shengzhou Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox