
Haavard Skinnemoen wrote:
On 11/20/06, Tolunay Orkun listmember@orkun.us wrote:
Haavard Skinnemoen wrote:
Now, I would like to use the cfi driver with the AT49BV6416 chip on atstk1000 instead of the custom driver, but unfortunately, it doesn't work. I'll have a closer look at it later (I think it's a combination of the geometry reversal issue and a special non-intel unlocking algorithm.)
Try the latest cfi driver from git. My patch to address geometry reversal for AMD style flash was applied today.
Thanks, but I already tried the latest patch I could find in my inbox. After I added a special case for AT49BV6416, it got the geometry right, but it still needs to learn how to "soft unlock" sectors before erasing/programming.
I did check the data sheet of AT49BV6416. http://www.atmel.com/dyn/resources/prod_documents/doc3451.pdf
It's a total mess. It is not just "soft unlock" that is needed. Via CFI, it claims compatibility with AMD Standard command set but 2nd cycle is written to address AAA instead of 2AA. I do not know if 2AA works for this device as the address to use in second cycle as well.
It also claims CFI version 1.0 in Primary Extended Vendor Specific Table, but table layout is different from AMD standard. It is using a different byte for top/bottom flag and in a different value setup there.
I think to use this chip with CFI driver, you will have to identify this device using jedec manufacturer and possibility jedec device id and implement correct command sequences for this device if manufacturer id and device id match this device. However, even JEDEC identification sequence might fail since the second cycle address is to AAA instead of 2AA. Major incompatibilities....
FYI, compare that with the following AMD style chips:
http://www.st.com/stonline/books/pdf/docs/9195.pdf http://www.spansion.com/datasheets/s29gl-m_00_b6_e.pdf http://www.mcu-memory.com/datasheet/macronix/MX29LV640T-B-1.0.pdf
We could of course just unlock the whole thing at initialization time, like Linux does. AMD-style chips aren't supposed to be locked after reset.
Intel Legacy unlock does that (no individual sector unlock). CFI driver relocks all those sectors that was supposed to be locked when using Intel legacy unlock sequence. I personally think individually locking and unlocking is a better way.
Best regards, Tolunay