hw/block: m25p80: support quad mode for w25q01jvq
authorJamin Lin <jamin_lin@aspeedtech.com>
Thu, 4 Jul 2024 08:29:20 +0000 (16:29 +0800)
committerCédric Le Goater <clg@redhat.com>
Tue, 9 Jul 2024 06:05:44 +0000 (08:05 +0200)
commit61f93767751341e29445c052d4db53791aeab035
treefb8b152e5d1d3a06f5d3609d533cbce727a6e5f7
parentf2146bc6cb98e3e6d5749a6a974a53a1a1a754fc
hw/block: m25p80: support quad mode for w25q01jvq

According to the w25q01jv datasheet at page 16,
it is required to set QE bit in "Status Register 2".
Besides, users are able to utilize "Write Status Register 1(0x01)"
command to set QE bit in "Status Register 2" and
utilize "Read Status Register 2(0x35)" command to get the QE bit status.

To support quad mode for w25q01jvq, update collecting data needed
2 bytes for WRSR command in decode_new_cmd function and
verify QE bit at the second byte of collecting data bit 2
in complete_collecting_data.

Update RDCR_EQIO command to set bit 2 of return data
if quad mode enable in decode_new_cmd.

Signed-off-by: Troy Lee <troy_lee@aspeedtech.com>
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
hw/block/m25p80.c