[U-Boot] [PATCH] mx6: fsl_esdhc: Fix waiting for DMA operation completion

Gabbasov, Andrew Andrew_Gabbasov at mentor.com
Wed Apr 3 09:33:10 CEST 2013


> From: Eric Nelson [eric.nelson at boundarydevices.com]
> Sent: Wednesday, April 03, 2013 01:50
> To: Dirk Behme
> Cc: Gabbasov, Andrew; u-boot at lists.denx.de
> Subject: Re: [U-Boot] [PATCH] mx6: fsl_esdhc: Fix waiting for DMA operation completion
> 
> Thanks Dirk,
> 
> On 04/02/2013 11:10 AM, Dirk Behme wrote:
> > Am 02.04.2013 17:49, schrieb Eric Nelson:
> >> Thanks Andrew,
> >>
> >> On 04/02/2013 03:04 AM, Andrew Gabbasov wrote:
> >>> On iMX6 sometimes the Transfer Complete interrupt occurs earlier
> >>> than the DMA part completes its operation. If immediately after that
> >>> the read data is used for some data verification, those obtained data
> >>> may be incomplete, which causes intermittent verification failures.
> >>>
> >>
> >> Can you describe how to repeat this?
> >>
> >>> For example, when the default environment command tries to load and run
> >>> boot script from FAT partition on SD/MMC card, it sometimes fails,
> >>> reporting invalid partition table, or unknown partition type, or
> >>> something else of that kind. Such errors disappear if the build
> >>> configuration has CONFIG_SYS_FSL_ESDHC_USE_PIO, or if some delay
> >>> is added after transfer completion.
> >>>
> >> We do this on every boot on SABRE Lite and Nitrogen6x boards,
> >> and haven't seen an issue.
> >>
> >> What board are you testing on?
> >>
> >> Do you have cache enabled?
> >>
> >> Is this with an SD card or eMMC?
> >
> > Andrew will have the details, but to my understanding this implements in
> > U-Boot what the Freescale kernel has in
> >
> > http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/drivers/mmc/host/sdhci-esdhc-imx.c?h=imx_3.0.35_12.09.01#n234
> >
> 
> Andrew, did you trap one of these?

Hi Eric,

Yes, I saw that part of code in the kernel and that led me to check if the events can come out of order in my case, and after finding that they indeed do, to make that patch. So, this is the similar workaround but on U-Boot level.

Thanks.

Best regards,
Andrew


More information about the U-Boot mailing list