From: "Cédric Le Goater" <clg@kaod.org>
To: marcin.krzeminski@nokia.com, qemu-devel@nongnu.org
Cc: crosthwaitepeter@gmail.com, rfsw-patches@mlist.nokia.com,
peter.maydell@linaro.org, clg@fr.ibm.com
Subject: Re: [Qemu-devel] [PATCH] m25p80: Fix QIOR/DIOR handling for Winbond
Date: Thu, 7 Jul 2016 14:57:23 +0200 [thread overview]
Message-ID: <20e93f92-a447-dc1c-4a5b-948ef433e63e@kaod.org> (raw)
In-Reply-To: <1467809036-6986-1-git-send-email-marcin.krzeminski@nokia.com>
Hello Marcin,
On 07/06/2016 02:43 PM, marcin.krzeminski@nokia.com wrote:
> From: Marcin Krzeminski <marcin.krzeminski@nokia.com>
>
> Winbond also support continuous read mode, but as an opposite for other
> flash type read mode clock cycles are included to dummy cycles number.
> This path add proper handling of read mode byte and update needed
> dummy cycles. QPI mode and dummy cycles configuration are not supported.
>
> Signed-off-by: Marcin Krzeminski <marcin.krzeminski@nokia.com>
> ---
> hw/block/m25p80.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c
> index d9b2793..a349544 100644
> --- a/hw/block/m25p80.c
> +++ b/hw/block/m25p80.c
> @@ -149,6 +149,7 @@ typedef struct FlashPartInfo {
> */
>
> #define SPANSION_CONTINUOUS_READ_MODE_CMD_LEN 1
> +#define WINBOND_CONTINUOUS_READ_MODE_CMD_LEN 1
I checked the W25Q256FV datasheet and
> static const FlashPartInfo known_devices[] = {
> /* Atmel -- some are (confusingly) marketed as "DataFlash" */
> @@ -775,7 +776,7 @@ static void decode_dio_read_cmd(Flash *s)
> /* Dummy cycles modeled with bytes writes instead of bits */
> switch (get_man(s)) {
> case MAN_WINBOND:
> - s->needed_bytes += 8;
> + s->needed_bytes += WINBOND_CONTINUOUS_READ_MODE_CMD_LEN;
this looks fine,
> break;
> case MAN_SPANSION:
> s->needed_bytes += SPANSION_CONTINUOUS_READ_MODE_CMD_LEN;
> @@ -814,7 +815,8 @@ static void decode_qio_read_cmd(Flash *s)
> /* Dummy cycles modeled with bytes writes instead of bits */
> switch (get_man(s)) {
> case MAN_WINBOND:
> - s->needed_bytes += 8;
> + s->needed_bytes += WINBOND_CONTINUOUS_READ_MODE_CMD_LEN;
> + s->needed_bytes += 4;
but I don't understand the above. I see the address + M7-0 + 2 dummies.
Thanks,
C.
> break;
> case MAN_SPANSION:
> s->needed_bytes += SPANSION_CONTINUOUS_READ_MODE_CMD_LEN;
>
next prev parent reply other threads:[~2016-07-07 12:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-06 12:43 [Qemu-devel] [PATCH] m25p80: Fix QIOR/DIOR handling for Winbond marcin.krzeminski
2016-07-07 12:57 ` Cédric Le Goater [this message]
2016-07-07 13:04 ` Krzeminski, Marcin (Nokia - PL/Wroclaw)
2016-07-11 18:05 ` Peter Maydell
2016-07-12 8:24 ` Cédric Le Goater
2016-07-12 14:16 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20e93f92-a447-dc1c-4a5b-948ef433e63e@kaod.org \
--to=clg@kaod.org \
--cc=clg@fr.ibm.com \
--cc=crosthwaitepeter@gmail.com \
--cc=marcin.krzeminski@nokia.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rfsw-patches@mlist.nokia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).