1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 22:21:16 +02:00

Fix some of the issues reported by LLVM/clang's scan-build

Corresponding to flashrom svn r722.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>

This commit fixes only some of the issues, those that were
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:
Stefan Reinauer
2009-09-16 08:18:08 +00:00
committed by Stefan Reinauer
parent b08ee5c506
commit 9e72aa51a7
4 changed files with 20 additions and 27 deletions

View File

@ -54,19 +54,17 @@ int probe_stm50flw0x0x(struct flashchip *flash)
static void wait_stm50flw0x0x(chipaddr bios)
{
uint8_t id1;
// id2;
chip_writeb(0x70, bios);
if ((chip_readb(bios) & 0x80) == 0) { // it's busy
while ((chip_readb(bios) & 0x80) == 0) ;
}
// put another command to get out of status register mode
chip_writeb(0x90, bios);
programmer_delay(10);
id1 = chip_readb(bios);
chip_readb(bios); // Read device ID (to make sure?)
// this is needed to jam it out of "read id" mode
chip_writeb(0xAA, bios + 0x5555);