[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 07/11] block: m25p80: Dummy cycles for N25Q25
From: |
Peter Crosthwaite |
Subject: |
Re: [Qemu-devel] [PATCH v4 07/11] block: m25p80: Dummy cycles for N25Q256/512 |
Date: |
Thu, 17 Mar 2016 10:30:28 -0700 |
On Mon, Feb 22, 2016 at 12:03 AM, <address@hidden> wrote:
> From: Marcin Krzeminski <address@hidden>
>
> This patch handles dummy cycles.
>
More commit message needed:
"Use the setting in the volatile cfg register to correctly set the
number of dummy bytes"
> Signed-off-by: Marcin Krzeminski <address@hidden>
> ---
> hw/block/m25p80.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c
> index 9d5a071..aff28f3 100644
> --- a/hw/block/m25p80.c
> +++ b/hw/block/m25p80.c
> @@ -566,6 +566,10 @@ static void decode_new_cmd(Flash *s, uint32_t value)
> case DOR:
> case QOR:
> 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->len = 0;
> s->state = STATE_COLLECTING_DATA;
> @@ -579,6 +583,8 @@ static void decode_new_cmd(Flash *s, uint32_t value)
> break;
> case JEDEC_NUMONYX:
> 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);
> break;
> default:
> s->needed_bytes = 5;
Following on from before, these defaults are NUMONYX policy based, so
I think your patch is to the default.
Otherwise: Reviewed-by: Peter Crosthwaite <address@hidden>
Regards,
Peter
> @@ -596,6 +602,8 @@ static void decode_new_cmd(Flash *s, uint32_t value)
> break;
> case JEDEC_NUMONYX:
> 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);
> break;
> default:
> s->needed_bytes = 8;
> --
> 2.5.0
>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH v4 07/11] block: m25p80: Dummy cycles for N25Q256/512,
Peter Crosthwaite <=