From 3656744cddce7937e54b78c5f9b5ba002d440105 Mon Sep 17 00:00:00 2001 From: balrog Date: Fri, 3 Oct 2008 23:00:09 +0000 Subject: [PATCH] Reset CFI01 flash wcycle after erase confirm (Thomas Petazzoni). pfl->wcycle was set to 1 when the erase confirm command was set, which lead to the next command being misinterpreted by Qemu: pflash_write: Unimplemented flash cmd sequence (offset 00000000, wcycle 0x1 cmd 0x20 value 0x70) This patch fixes this issue by resetting pfl->wcycle to 0 on erase confirm so that the next command is considered as a new one. Signed-off-by: Thomas Petazzoni git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5409 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/pflash_cfi01.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pflash_cfi01.c b/hw/pflash_cfi01.c index 25e1eb9f23..93c172008c 100644 --- a/hw/pflash_cfi01.c +++ b/hw/pflash_cfi01.c @@ -267,7 +267,7 @@ static void pflash_write (pflash_t *pfl, target_ulong offset, uint32_t value, case 0x20: /* Block erase */ case 0x28: if (cmd == 0xd0) { /* confirm */ - pfl->wcycle = 1; + pfl->wcycle = 0; pfl->status |= 0x80; } else if (cmd == 0xff) { /* read array mode */ goto reset_flash;