All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Alistair Francis <alistair@alistair23.me>
Cc: "Kevin Wolf" <kwolf@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	qemu-block@nongnu.org, "Andrew Jeffery" <andrew@aj.id.au>,
	qemu-devel@nongnu.org, "Max Reitz" <mreitz@redhat.com>,
	qemu-arm@nongnu.org, "Cédric Le Goater" <clg@kaod.org>,
	"Guenter Roeck" <linux@roeck-us.net>,
	"Joel Stanley" <joel@jms.id.au>
Subject: [PATCH 3/3] aspeed/smc: Fix number of dummy cycles for FAST_READ_4 command
Date: Mon,  3 Feb 2020 10:09:04 -0800	[thread overview]
Message-ID: <20200203180904.2727-3-linux@roeck-us.net> (raw)
In-Reply-To: <20200203180904.2727-1-linux@roeck-us.net>

The Linux kernel recently started using FAST_READ_4 commands.
This results in flash read failures. At the same time, the m25p80
emulation is seen to read 8 more bytes than expected. Adjusting the
expected number of dummy cycles to match FAST_READ fixes the problem.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 hw/ssi/aspeed_smc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c
index f0c7bbbad3..61e8fa57d3 100644
--- a/hw/ssi/aspeed_smc.c
+++ b/hw/ssi/aspeed_smc.c
@@ -762,11 +762,11 @@ static int aspeed_smc_num_dummies(uint8_t command)
     case FAST_READ:
     case DOR:
     case QOR:
+    case FAST_READ_4:
     case DOR_4:
     case QOR_4:
         return 1;
     case DIOR:
-    case FAST_READ_4:
     case DIOR_4:
         return 2;
     case QIOR:
-- 
2.17.1


  parent reply	other threads:[~2020-02-03 18:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-03 18:09 [PATCH 1/3] m25p80: Convert to support tracing Guenter Roeck
2020-02-03 18:09 ` [PATCH 2/3] m25p80: Improve command handling for Jedec and unsupported commands Guenter Roeck
2020-02-04  8:53   ` Cédric Le Goater
2020-02-04 12:27     ` Philippe Mathieu-Daudé
2020-02-04 14:28     ` Guenter Roeck
2020-02-05 10:08       ` Cédric Le Goater
2020-02-05 17:43         ` Guenter Roeck
2020-02-06  7:04           ` Joel Stanley
2020-02-06 14:26             ` Guenter Roeck
2020-02-04 12:13   ` Philippe Mathieu-Daudé
2020-02-03 18:09 ` Guenter Roeck [this message]
2020-02-04  7:45   ` [PATCH 3/3] aspeed/smc: Fix number of dummy cycles for FAST_READ_4 command Cédric Le Goater
2020-02-04 14:19     ` Guenter Roeck
2020-02-18 11:38     ` Francisco Iglesias
2020-02-03 18:44 ` [PATCH 1/3] m25p80: Convert to support tracing Alistair Francis
2020-02-04  7:16 ` Cédric Le Goater
2020-02-04 14:18   ` Guenter Roeck
2020-02-04 12:08 ` Philippe Mathieu-Daudé
2020-02-05 10:05 ` Cédric Le Goater
2020-02-05 16:35   ` Guenter Roeck
2020-02-05 17:10     ` Cédric Le Goater
2020-02-05 18:34       ` Guenter Roeck

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=20200203180904.2727-3-linux@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=alistair@alistair23.me \
    --cc=andrew@aj.id.au \
    --cc=clg@kaod.org \
    --cc=joel@jms.id.au \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.