Skip to content

Commit 2151b04

Browse files
legoaterpm215
authored andcommitted
m25p80: add support for two bytes WRSR for Macronix chips
On Macronix chips, two bytes can written to the WRSR. First byte will configure the status register and the second the configuration register. It is important to save the configuration value as it contains the dummy cycle setting when using dual or quad IO mode. Signed-off-by: Cédric Le Goater <clg@kaod.org> Acked-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
1 parent acd9575 commit 2151b04

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

hw/block/m25p80.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,7 @@ static void complete_collecting_data(Flash *s)
698698
case MAN_MACRONIX:
699699
s->quad_enable = extract32(s->data[0], 6, 1);
700700
if (s->len > 1) {
701+
s->volatile_cfg = s->data[1];
701702
s->four_bytes_address_mode = extract32(s->data[1], 5, 1);
702703
}
703704
break;

0 commit comments

Comments
 (0)