hw/block: m25p80: Add ISSI SPI flash support
commit10509e1095c9910957c4c2b93bbf2f1833838e68
authorBin Meng <bin.meng@windriver.com>
Tue, 26 Jan 2021 05:59:59 +0000 (26 13:59 +0800)
committerAlistair Francis <alistair.francis@wdc.com>
Thu, 4 Mar 2021 14:43:29 +0000 (4 09:43 -0500)
tree6e868b3f660923756f98b0f4bf5781e76117c7e3
parent43a9658889c32a2d8b4a4c1f7ac6a7f7741aa781
hw/block: m25p80: Add ISSI SPI flash support

This adds the ISSI SPI flash support. The number of dummy cycles in
fast read, fast read dual output and fast read quad output commands
is currently using the default 8. Likewise, the same default value
is used for fast read dual/quad I/O command. Per the datasheet [1],
the number of dummy cycles is configurable, but this is not modeled
at present.

For flash whose size is larger than 16 MiB, the sequence of 3-byte
address along with EXTADD bit in the bank address register (BAR) is
not supported. We assume that guest software always uses op codes
with 4-byte address sequence. Fortunately, this is the case for both
U-Boot and Linux spi-nor drivers.

QPI (Quad Peripheral Interface) that supports 2-cycle instruction
has different default values for dummy cycles of fast read family
commands, and is unsupported at the time being.

[1] http://www.issi.com/WW/pdf/25LP-WP256.pdf

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20210126060007.12904-2-bmeng.cn@gmail.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
hw/block/m25p80.c