<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Mar 31, 2016 at 8:21 AM, Tim Chick <span dir="ltr"><<a href="mailto:Tim.Chick@mediatek.com" target="_blank">Tim.Chick@mediatek.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">





<div lang="EN-GB" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span lang="EN-US">Hi List,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Flashrom would not detect this chip. When the definition was added, everything failed as the chip only supports 4 byte address operation.</span></p></div></div></blockquote><div><br></div><div>Interesting - I didn't know such chips existed. The ones I've used have backwards-compatible commands that support 3-byte addresses. FYI - Some other high-capacity chips have 4-byte address enable bit in a config register that will make the usual read/write/erase instructions accept 4 byte addresses. And yet other large chips have alternative instructions that function the same but only accept a 4-byte address.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div lang="EN-GB" link="blue" vlink="purple"><p class="MsoNormal"><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal">The attached patch adds 4 byte address support for 4 byte only chips, as determined by the JEDEC flash parameter table, and support for this chip specifically.<br></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I’ve only allowed it to work with the SPI_CONTROLLER_FT2232 controller, as that is the only one I have to test.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I’ve also only ported spi_block_erase_20 – the other block erase functions will fail.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Please let me know what you think!</span></p></div></blockquote><div><br></div><div>Good stuff! FWIW, I have a work-in-progress patch on <a href="http://chromium.org">chromium.org</a> (<a href="https://chromium-review.googlesource.com/#/c/323359/">https://chromium-review.googlesource.com/#/c/323359/</a>) for the other types of high-capacity flash chips. I've tested on a Spansion S25FS256 using linux_spi and ft2232. It needs a lot of clean-up, but might be of help. Most of the changes were to convert read/write/erase functions to use allocated buffers whose length depends on whether we're using a 3- or 4-byte address.</div><div><br></div><div>I'll borrow some ideas from your patch as well to support the "4-byte address only" chips.</div></div><div><br></div>-- <br><div>David Hendricks (dhendrix)<br>Systems Software Engineer, Google Inc.</div>
</div></div>