From mboxrd@z Thu Jan 1 00:00:00 1970 From: Detlev Zundel Date: Thu, 10 May 2007 08:53:31 +0200 Subject: [U-Boot-Users] CFI driver does not verify writes in buffered mode - feature? In-Reply-To: <4642941E.7080007@orkun.us> (Tolunay Orkun's message of "Wed\, 09 May 2007 22\:40\:14 -0500") References: <20070509223319.4CF4935264E@atlas.denx.de> <4642941E.7080007@orkun.us> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Tolunay, > Wolfgang Denk wrote: >> In message <46422E3E.40703@orkun.us> you wrote: >>>> when using the CFI flash driver with CFG_FLASH_USE_BUFFER_WRITE the >>>> "usual" verification whether the write did indeed happen correctly is >>>> not done: >> ... >>> In the above example you are overwriting the same data. Which is OK >>> to write without erasing first. You can turn 1 bits to 0 or >>> re-write the same data without erasing which is OK. The redundant >>> environment implementation takes advantage of this in U-Boot. This >>> is not an error. >>> >>> Am I missing something? >> >> Yes, you do. Detlev wrote different data, and it was not discovered by >> the CFI driver. Using one of the propriatary flash drivers like on the >> TQM8xxL will complain... > > Yes, in that case we need to fix this! Detlev, do you have a patch > suggestion? No sorry, not right now. This actually turned out to be a problem during a training that I do right now. The participants complained that they copied u-boot images being correct in RAM to flash but they were corrupt in flash. It took me a while to figure out what was going on here. If I understand the code correctly then we would have to do a buffer read after a buffer write and compare the data, right? I am not too fluent in working with CFI flashes so I would have to look up all details like can I simply read from flash after the program cycle or do I have to do things like take it out of command mode etc so I couldn't come up with a fix "after work". On the other hand I consider this to be a serious problem so I brazenly posted it in the hope that someone else might be able to solve it more quickly. If this does not happen, I will have to spend some time on it, but this will not happen this week nor early next week... Thanks Detlev -- I will use free software even if it is less powerful, or less reliable, because freedom is the most important thing, and that is what the Free Software movement is about. How we get freedom. -- Richard M. Stallman -- DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk Office: Kirchenstr. 5, D-82194 Groebenzell, Germany +49 8142 66989 40