From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KltdE-00080b-6q for qemu-devel@nongnu.org; Fri, 03 Oct 2008 19:00:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KltdC-00080P-JS for qemu-devel@nongnu.org; Fri, 03 Oct 2008 19:00:18 -0400 Received: from [199.232.76.173] (port=41324 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KltdC-00080M-Gg for qemu-devel@nongnu.org; Fri, 03 Oct 2008 19:00:18 -0400 Received: from savannah.gnu.org ([199.232.41.3]:52725 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KltdC-00038J-0j for qemu-devel@nongnu.org; Fri, 03 Oct 2008 19:00:18 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KltdB-0007YL-7Q for qemu-devel@nongnu.org; Fri, 03 Oct 2008 23:00:17 +0000 Received: from balrog by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KltdA-0007YH-S5 for qemu-devel@nongnu.org; Fri, 03 Oct 2008 23:00:17 +0000 MIME-Version: 1.0 Errors-To: balrog Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Andrzej Zaborowski Message-Id: Date: Fri, 03 Oct 2008 23:00:16 +0000 Subject: [Qemu-devel] [5409] Reset CFI01 flash wcycle after erase confirm (Thomas Petazzoni). Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 5409 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5409 Author: balrog Date: 2008-10-03 23:00:09 +0000 (Fri, 03 Oct 2008) Log Message: ----------- 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 Modified Paths: -------------- trunk/hw/pflash_cfi01.c Modified: trunk/hw/pflash_cfi01.c =================================================================== --- trunk/hw/pflash_cfi01.c 2008-10-03 19:04:42 UTC (rev 5408) +++ trunk/hw/pflash_cfi01.c 2008-10-03 23:00:09 UTC (rev 5409) @@ -267,7 +267,7 @@ 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;