From 816139e06de126a6c57f4537c6857bcef54dce83 Mon Sep 17 00:00:00 2001 From: Peter Stuge Date: Mon, 9 Feb 2009 20:26:14 +0000 Subject: 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. Corresponding to flashrom svn r415 and coreboot v2 svn r3932. Signed-off-by: Peter Stuge Acked-by: Myles Watson --- flashrom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'flashrom.c') diff --git a/flashrom.c b/flashrom.c index e19f7f2..a47bfa0 100644 --- a/flashrom.c +++ b/flashrom.c @@ -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) -- cgit v1.1