[U-Boot] fsl_esdhc.c bug

Ira W. Snyder iws at ovro.caltech.edu
Fri Dec 16 19:06:48 CET 2011


On Fri, Dec 16, 2011 at 09:53:20AM -0500, Jim Lentz wrote:
> On 12/16/2011 09:51 AM, Fabio Estevam wrote:
> > Hi Jim,
> >
> > On Fri, Dec 16, 2011 at 11:48 AM, Jim Lentz<JLentz at zhone.com>  wrote:
> >> All,
> >>
> >> There is a bug rendering SDCard support useless on Freescale esdhc
> >> controller.
> > Which Freescale processor do you use?
> >
> > Please describe in details the problem you see, how to reproduce it,
> > the U-boot version
> > that you use, etc.
> >
> > Regards,
> >
> > Fabio Estevam
> Freescale P2020. Latest U-boot version.
> 
> Easiest way to see it is typing mmcinfo at the U-boot cli. It will hang.
> 
> By default, PIO mode is selected when CONFIG_P2020 is defined. Legacy 
> P2020 silicon revisions require PIO mode.
> 
> The esdhc_pio_read_write function has a bad reg pointer.
> 

Hi Jim,

I tested this on my P2020, and PIO mode fails as you describe. Your fix
works. I've attached a patch which is suitable for inclusion into
U-Boot. Feel free to submit your own patch to supercede this one. It is
a bug you found, you should get credit for it! :)

It looks like the patch which introduced this code (77c1458d1 "ppc/85xx:
PIO Support for FSL eSDHC Controller Driver") was carried out of tree
for a while. While it was out of tree, another commit happened
(c67bee146 "fsl_esdhc: add support for mx51 processor") which changed
how the mmc->priv variable is used.




More information about the U-Boot mailing list