Hi flashrom folks,
I'm trying to add support for SST26VF064B after I got a patch from Elias. I made some changes to it after reading the datasheet, but none of the block erasing commands worked, and I don't know why...
Erasing and writing flash chip... *Trying erase function 0... 0x000000-0x000fff*:E program_opcodes: preop=5006 optype=463b opmenu=05200302c79f0190 on-the-fly *OPCODE (0x20)* re-programmed, op-pos=2 FAILED at 0x00000010! Expected=0xff, Found=0x5a, failed byte count from 0x00000000-0x00000fff: 0x83 ERASE FAILED! Reading current flash chip contents... done. Looking for another erase function. *Trying erase function 1... 0x000000-0x00ffff*:E program_opcodes: preop=5006 optype=463b opmenu=05d80302c79f0190 on-the-fly *OPCODE (0xD8)* re-programmed, op-pos=2 FAILED at 0x00000010! Expected=0xff, Found=0x5a, failed byte count from 0x00000000-0x0000ffff: 0xdf16 ERASE FAILED! Reading current flash chip contents... done. Looking for another erase function. *Trying erase function 2... 0x000000-0x7fffff*:EFAILED at 0x00000010! Expected=0xff, Found=0x5a, failed byte count from 0x00000000-0x007fffff: 0x702b2a ERASE FAILED! Looking for another erase function. No usable erase functions left. FAILED!
It tried the commands for erasing 4KB, 64KB, 8MB, and all failed...
This is basically what I had in the block_erasers[] array. Full diff is attached. Thanks for your help!
{ { .eraseblocks = { {4 * 1024, 2048} }, .block_erase = spi_block_erase_20, }, { .eraseblocks = { {64 * 1024, 128} }, .block_erase = spi_block_erase_d8, }, { .eraseblocks = { {8 * 1024 * 1024, 1} }, .block_erase = spi_block_erase_c7, }, },