[U-Boot-Users] [PATCH] cfi_flash: fix flash on Big Endian machines.

Stefan Roese sr at denx.de
Tue Jul 15 14:57:28 CEST 2008


On Tuesday 15 July 2008, Sebastian Siewior wrote:
> * Stefan Roese | 2008-07-15 11:48:11 [+0200]:
> >OK, I'll await a separate patch for this.
>
> Could be in your inbox allready :)

Yes. :)

> >> >And to you main patch:
> >> >
> >> >NAK. After applying this, CFI support on kilauea (PPC405EX with 1*
> >> > Spansion S29GL512N, 16bit wide) breaks:
> >>
> >> Is this big endian + CFG_WRITE_SWAPPED_DATA? Did it work before the
> >> patch?
> >
> >This is big endian and CFG_WRITE_SWAPPED_DATA *not* defined. You can check
> >this yourself, the port is officially available. And yes, of course it
> > worked before the patch.
>
> So I might have an idea where the bug is.

Good.

<snip>

> >> defined and your result should
> >> be 0xf0 in the case i = 0. Right now, I get 0x00 on my BE machine while
> >> LE case is working fine.
> >
> >I have to admit that I don't have the time to test anything right now. It
> >seems that you have a problem with the #else path in flash_make_cmd(). Do
> > you have access to a big endian platform which doesn't define
> >CFG_WRITE_SWAPPED_DATA? If yes, you could test both cases.
>
> No I don't, but I have an idea how I could test this assuming that it
> has work after the patch in question and didn't after mine.

Yes, it works on those kind of platforms (CFG_WRITE_SWAPPED_DATA not defined) 
on current top of git repository. And fails with your patch applied.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================




More information about the U-Boot mailing list