<div dir="ltr">Hi flashrom folks,<div><br></div><div>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...</div>

<div><br></div>
<div><div style="font-family:arial,sans-serif;font-size:13px"><div>Erasing and writing flash chip... <b>Trying erase function 0... 0x000000-0x000fff</b>:E</div><div>program_opcodes: preop=5006 optype=463b opmenu=05200302c79f0190</div>

<div>on-the-fly <b>OPCODE (0x20)</b> re-programmed, op-pos=2</div><div>FAILED at 0x00000010! Expected=0xff, Found=0x5a, failed byte count from 0x00000000-0x00000fff: 0x83</div><div>ERASE FAILED!</div><div>Reading current flash chip contents... done. Looking for another erase function.</div>

<div><b>Trying erase function 1... 0x000000-0x00ffff</b>:E</div><div>program_opcodes: preop=5006 optype=463b opmenu=05d80302c79f0190</div><div>on-the-fly <b>OPCODE (0xD8)</b> re-programmed, op-pos=2</div><div>FAILED at 0x00000010! Expected=0xff, Found=0x5a, failed byte count from 0x00000000-0x0000ffff: 0xdf16</div>

<div>ERASE FAILED!</div><div>Reading current flash chip contents... done. Looking for another erase function.</div><div><b>Trying erase function 2... 0x000000-0x7fffff</b>:EFAILED at 0x00000010! Expected=0xff, Found=0x5a, failed byte count from 0x00000000-0x007fffff: 0x702b2a</div>

<div>ERASE FAILED!</div><div>Looking for another erase function.</div><div>No usable erase functions left.</div><div>FAILED!</div></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">

It tried the commands for erasing 4KB, 64KB, 8MB, and all failed...</div></div><div class="gmail_extra"><br></div><div class="gmail_extra">This is basically what I had in the block_erasers[] array. Full diff is attached. Thanks for your help!</div>

<div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">                {</div><div class="gmail_extra">                        {</div><div class="gmail_extra">                                .eraseblocks = { {4 * 1024, 2048} },</div>

<div class="gmail_extra">                                .block_erase = spi_block_erase_20,</div><div class="gmail_extra">                        }, {</div><div class="gmail_extra">                                .eraseblocks = { {64 * 1024, 128} },</div>

<div class="gmail_extra">                                .block_erase = spi_block_erase_d8,</div><div class="gmail_extra">                        }, {</div><div class="gmail_extra">                                .eraseblocks = { {8 * 1024 * 1024, 1} },</div>

<div class="gmail_extra">                                .block_erase = spi_block_erase_c7,</div><div class="gmail_extra">                        },</div><div class="gmail_extra">                },</div></div></div>