[U-Boot-Users] [PATCH] Fixed cfi flash read uchar bug.
Wolfgang Denk
wd at denx.de
Tue Dec 26 00:24:57 CET 2006
Dear Zhang Wei,
in message <458F77D0.10203 at freescale.com> you wrote:
>
> Merry X'mas!
Thanks, and the same to you.
> I want to explain two key points. I also take the x16 connection flash
> example.
OK.
> 1. Reading 16bit data in flash_read_uchar() will not cause an error.
OK.
> 2. Reading 16bit data in flash_read_uchar() is a safety operation, which
> will avoid the potential problem.
Now this is what I want to understand. What exactly is the "potential
problem"?
> In the Linux kernel, the cfi driver using the similar
Can you please point out which specific part of the Linux MTD code you
mean? And which version of the code?
> implementation. I think reading the full width bit data from the flash
> port may clear the flash data buffer. I've tested to add 'volatile'
I have to admit that I don't really understand this. I would not be
surprised that some statement like this can be found in some chip
errata, but I would like to know this for certain first.
> keyword to the flash_get_size() and flash_read_jedec_ids() functions'
> declaration. The flash can not work also. From Chris' work, the
> compiler's optimizing causes some flash to get the error.
For me this is an indication that the problem is actually somewhere
else, and while your modification might actually fix the symptoms, I
doubt that it is the correct fix - or the correct problem. If your
explanation was right, this should not depend on compiler versions.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Any sufficiently advanced technology is indistinguishable from a
rigged demo. - Andy Finkel, computer guy
More information about the U-Boot
mailing list