[U-Boot] CFI flash broken for 8-bit bus

Radovan Prodanovic radovan.prodanovic at mitel.com
Thu Apr 19 15:17:48 UTC 2018


Has the pending patch for the issue described below ever been released?

Am observing the same issue in the U-Boot version 2015-10.


On 2011/03/18 6:02 AM, Aaron Williams wrote:
> Hi,
>
> I am running into issues in that the CFI code is broken for flash with an 8-
> bit bus. The problem is that the CFI code uses the wrong addresses for 8-bits
> vs 16-bits.
>
> The CFI function flash_map incorrectly calculates the byte offset with
> Spansion flash.
>
> In our case, we have an 8-bit Spansion S29GL-N MirrorBit flash chip on an 8-
> bit bus.
>
> According to the data sheet, in 8-bit mode the first unlock address is 0xAAA
> and the second is 0x555. Basically all of the addresses are approximately
> double what they are in 16-bit mode.
>
> Most of the addresses in the CFI code are wrong for 8-bit mode.
>
> They should be as follows:
> unlock1: 0xAAA
> unlock2: 0x555
> CFI Query: 0xAA
>
> Offset Device ID: 0x02, 0x1c, 0x1e
> Offset Silicon Sector Factory Protect: 0x6
> Sector protect verify (sector address) + 4
>
> The problem is that the dectection code detects (incorrectly) that we're an 8-
> bit device on a 16-bit bus when in fact it's an 8-bit bus.
>
> For 16-bits, it's:
>
> unlock1: 0x555
> unlock2: 0x2aa
> CFI Query: 0x55
> Offset Device ID: 0x1, 0x0e, 0x0f
>
> Now, in 16-bit mode these addresses should be effectively doubled so they
> should look to be the same to software as I understand it.
>
> This is all taken from the datasheet.
>
> Note that the CFI code works fine with the flash hooked up as 16-bit on a 16-
> bit bus.
>
> If it's an 8-bit flash on a 16-bit bus then the addresses should be doubled.
>

>
> -Aaron




Thanks,
Radovan Prodanovic
S/W Designer, Embedded Platforms
613-691-3358


________________________________
NOTE: This e-mail (including any attachments) is for the sole use of the intended recipient(s) and may contain information that is confidential and/or protected by legal privilege. Any unauthorized review, use, copy, disclosure or distribution of this e-mail is strictly prohibited. If you are not the intended recipient, please notify Mitel immediately and destroy all copies of this e-mail. Mitel does not accept any liability for breach of security, error or virus that may result from the transmission of this message.


More information about the U-Boot mailing list