diff options
author | Guenter Roeck | 2020-03-16 16:52:24 +0100 |
---|---|---|
committer | Peter Maydell | 2020-03-17 12:36:44 +0100 |
commit | 7faf6f1790dddf9f3acf6ddd95f7bbc1b4a755d0 (patch) | |
tree | 75950e8b8daa11ca88407ba4e10dd99cd6e05c6a /hw/ssi/aspeed_smc.c | |
parent | m25p80: Improve command handling for unsupported commands (diff) | |
download | qemu-7faf6f1790dddf9f3acf6ddd95f7bbc1b4a755d0.tar.gz qemu-7faf6f1790dddf9f3acf6ddd95f7bbc1b4a755d0.tar.xz qemu-7faf6f1790dddf9f3acf6ddd95f7bbc1b4a755d0.zip |
aspeed/smc: Fix number of dummy cycles for FAST_READ_4 command
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.
Fixes: f95c4bffdc4c ("aspeed/smc: snoop SPI transfers to fake dummy cycles")
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/ssi/aspeed_smc.c')
-rw-r--r-- | hw/ssi/aspeed_smc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c index 32be2a02b0..9d5c696d5a 100644 --- a/hw/ssi/aspeed_smc.c +++ b/hw/ssi/aspeed_smc.c @@ -788,11 +788,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: |