From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52803) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bL8sN-0003Kl-TV for qemu-devel@nongnu.org; Thu, 07 Jul 2016 08:57:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bL8sK-0007rU-Nj for qemu-devel@nongnu.org; Thu, 07 Jul 2016 08:57:55 -0400 Received: from 2.mo53.mail-out.ovh.net ([178.33.254.39]:34383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bL8sK-0007rI-Hc for qemu-devel@nongnu.org; Thu, 07 Jul 2016 08:57:52 -0400 Received: from player158.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo53.mail-out.ovh.net (Postfix) with ESMTP id 992A5FF99C4 for ; Thu, 7 Jul 2016 14:57:50 +0200 (CEST) References: <1467809036-6986-1-git-send-email-marcin.krzeminski@nokia.com> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Message-ID: <20e93f92-a447-dc1c-4a5b-948ef433e63e@kaod.org> Date: Thu, 7 Jul 2016 14:57:23 +0200 MIME-Version: 1.0 In-Reply-To: <1467809036-6986-1-git-send-email-marcin.krzeminski@nokia.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] m25p80: Fix QIOR/DIOR handling for Winbond List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Hello Marcin, On 07/06/2016 02:43 PM, marcin.krzeminski@nokia.com wrote: > From: Marcin Krzeminski > > 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 > --- > 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; >