
Dear Zhang Wei,
in message 458F77D0.10203@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.
- Reading 16bit data in flash_read_uchar() will not cause an error.
OK.
- 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