block: m25p80: fix dummy byte count read from spansion cfg register
PATCH 1/1 block: m25p80: fix dummy byte count read from spansion cfg register
Spansion nor-flash stores the dummy read count in bits in a config register. This is currently read and used as the byte count which is wrong.
This patch fixes this bit to byte conversion without warning about unsupported configurations (such as bits % 8 != 0)
Signed-off-by Ramon Aerne <[email protected]>
--- hw/block/m25p80.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
hw/block/m25p80.c +3 -3
@@ -981,7 +981,7 @@ static void decode_fast_read_cmd(Flash *s) s->needed_bytes +=extract32 (s->spansion_cr2v,SPANSION_DUMMY_CLK_POS ,SPANSION_DUMMY_CLK_LEN - ); + ) /8 ;break ;case MAN_ISSI :/*
@@ -1017,7 +1017,7 @@ static void decode_dio_read_cmd(Flash *s) s->needed_bytes +=extract32 (s->spansion_cr2v,SPANSION_DUMMY_CLK_POS ,SPANSION_DUMMY_CLK_LEN - ); + ) /8 ;break ;case MAN_NUMONYX : s->needed_bytes +=numonyx_extract_cfg_num_dummies (s);
@@ -1067,7 +1067,7 @@ static void decode_qio_read_cmd(Flash *s) s->needed_bytes +=extract32 (s->spansion_cr2v,SPANSION_DUMMY_CLK_POS ,SPANSION_DUMMY_CLK_LEN - ); + ) /8 ;break ;case MAN_NUMONYX : s->needed_bytes +=numonyx_extract_cfg_num_dummies (s);
Signature · 1 line
2.25.1