block: m25p80: Dummy cycles for N25Q256/512
Use the setting from the volatile cfg register to correctly set the number of dummy cycles. Signed-off-by: Marcin Krzeminski <marcin.krzeminski@nokia.com> Reviewed-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Message-id: 1458719789-29868-8-git-send-email-marcin.krzeminski@nokia.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
cb475951c0
commit
aeb83edbf3
|
@ -583,7 +583,11 @@ static void decode_new_cmd(Flash *s, uint32_t value)
|
||||||
case FAST_READ:
|
case FAST_READ:
|
||||||
case DOR:
|
case DOR:
|
||||||
case QOR:
|
case QOR:
|
||||||
s->needed_bytes = get_addr_length(s) + 1;
|
s->needed_bytes = get_addr_length(s);
|
||||||
|
if (((s->pi->jedec >> 16) & 0xFF) == JEDEC_NUMONYX) {
|
||||||
|
/* Dummy cycles modeled with bytes writes instead of bits */
|
||||||
|
s->needed_bytes += extract32(s->volatile_cfg, 4, 4);
|
||||||
|
}
|
||||||
s->pos = 0;
|
s->pos = 0;
|
||||||
s->len = 0;
|
s->len = 0;
|
||||||
s->state = STATE_COLLECTING_DATA;
|
s->state = STATE_COLLECTING_DATA;
|
||||||
|
@ -596,7 +600,9 @@ static void decode_new_cmd(Flash *s, uint32_t value)
|
||||||
s->needed_bytes = 4;
|
s->needed_bytes = 4;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
s->needed_bytes = get_addr_length(s) + 2;
|
s->needed_bytes = get_addr_length(s);
|
||||||
|
/* Dummy cycles modeled with bytes writes instead of bits */
|
||||||
|
s->needed_bytes += extract32(s->volatile_cfg, 4, 4);
|
||||||
}
|
}
|
||||||
s->pos = 0;
|
s->pos = 0;
|
||||||
s->len = 0;
|
s->len = 0;
|
||||||
|
@ -610,7 +616,9 @@ static void decode_new_cmd(Flash *s, uint32_t value)
|
||||||
s->needed_bytes = 6;
|
s->needed_bytes = 6;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
s->needed_bytes = get_addr_length(s) + 4;
|
s->needed_bytes = get_addr_length(s);
|
||||||
|
/* Dummy cycles modeled with bytes writes instead of bits */
|
||||||
|
s->needed_bytes += extract32(s->volatile_cfg, 4, 4);
|
||||||
}
|
}
|
||||||
s->pos = 0;
|
s->pos = 0;
|
||||||
s->len = 0;
|
s->len = 0;
|
||||||
|
|
Loading…
Reference in a new issue