flashrom: Fix broken flash chip base address logic

Elan SC520 requries us to deal with flash chip base addresses at locations
other than top of 4GB. The logic for that was incorrectly triggered also when
a board had more than one flash chip. This patch will honor flashbase only when
probing for the first flash chip on the board, and look at top of 4GB for later
chips.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Myles Watson <mylesgw@gmail.com>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3932 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Peter Stuge 2009-02-09 20:26:14 +00:00
parent c4ddbff706
commit cd7e9b55dd
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ struct flashchip *probe_flash(struct flashchip *first_flash, int force)
size = getpagesize();
}
base = flashbase ? flashbase : (0xffffffff - size + 1);
base = flashbase && flashchips == first_flash ? flashbase : (0xffffffff - size + 1);
flash->virtual_memory = bios = physmap("flash chip", base, size);
if (force)