From: Stefan Roese Date: Wed, 20 Jul 2016 11:23:06 +0200 Subject: [U-Boot] [PATCH] mtd: cfi_flash: fix polling for bit XSR.7 on Intel chips In-Reply-To: <20160718121037.16677-1-daniel.schwierzeck@gmail.com> References: <20160718121037.16677-1-daniel.schwierzeck@gmail.com> Message-ID: <9f471db6-17fd-49f6-de96-651d2ed32b11@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Daniel, On 18.07.2016 14:10, Daniel Schwierzeck wrote: > flash_full_status_check() checks bit XSR.7 on Intel chips. This > should be done by only checking bit 7 and not by comparing the > whole status byte or word with 0x80. > > This fixes the non-working block erase in the pflash emulation > of Qemu when used with the MIPS Malta board. MIPS Malta uses x32 > mode to access the pflash device. In x32 mode Qemu mirrors the > lower 16 bits of the status word into the upper 16 bits. Thus > the CFI driver gets a status word of 0x8080 in x32 mode. If > flash_full_status_check() uses flash_isequal(), then it polls for > XSR.7 by comparing 0x8080 with 0x80 which never becomes true. > > Reported-by: Alon Bar-Lev > Signed-off-by: Daniel Schwierzeck Applied to u-boot-cfi-flash/master. Thanks, Stefan