m25p80: add support for two bytes WRSR for Macronix chips
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 16 lines · Cédric Le Goater
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 <[email protected]>--- hw/block/m25p80.c | 1 + 1 file changed, 1 insertion(+)hw/block/m25p80.c +0
-0
hw/block/m25p80.c static void complete_collecting_data(Flash *s) · line 705
Quoted 7 lines
hw/block/m25p80.c +1
-0@@ -699,6 +699,7 @@ static void complete_collecting_data(Flash *s)case MAN_MACRONIX : s->quad_enable =extract32 (s->data[0 ],6 ,1 );if (s->len >1 ) { + s->volatile_cfg = s->data[1 ]; s->four_bytes_address_mode =extract32 (s->data[1 ],5 ,1 ); }break ;
I sent this patch to qemu-ppc instead of qemu-devel ...
Sorry for the noise.
C.
Alistair Francis
Acked-byQuoted 7 lines · Cédric Le Goater
Quoted 6 lines · Cédric Le Goater
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 <[email protected]>
Alistair
Quoted 24 lines
Quoted 10 lines
--- hw/block/m25p80.c | 1 + 1 file changed, 1 insertion(+)hw/block/m25p80.c +0
-0hw/block/m25p80.c static void complete_collecting_data(Flash *s) · line 705
Quoted 7 lines
hw/block/m25p80.c +1
-0@@ -699,6 +699,7 @@ static void complete_collecting_data(Flash *s)case MAN_MACRONIX : s->quad_enable =extract32 (s->data[0 ],6 ,1 );if (s->len >1 ) { + s->volatile_cfg = s->data[1 ]; s->four_bytes_address_mode =extract32 (s->data[1 ],5 ,1 ); }break ;I sent this patch to qemu-ppc instead of qemu-devel ...
Sorry for the noise.
C.
Peter Maydell
AppliedQuoted 10 lines · Alistair Francis
Quoted 7 lines · Cédric Le Goater
Quoted 6 lines · Cédric Le Goater
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 <[email protected]>Acked-by Alistair Francis <[email protected]>
Applied to target-arm.next, thanks.
-- PMM