summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Stuge <peter@stuge.se>2009-02-09 20:26:14 +0000
committerPeter Stuge <peter@stuge.se>2009-02-09 20:26:14 +0000
commit816139e06de126a6c57f4537c6857bcef54dce83 (patch)
tree2ff225b1396034a9ed77c66901b3a6c30387a336
parent09c13337022502f0a6421c99dbd5ee3a50565b26 (diff)
downloadast2050-flashrom-816139e06de126a6c57f4537c6857bcef54dce83.zip
ast2050-flashrom-816139e06de126a6c57f4537c6857bcef54dce83.tar.gz
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 <peter@stuge.se> Acked-by: Myles Watson <mylesgw@gmail.com>
-rw-r--r--flashrom.c2
1 files changed, 1 insertions, 1 deletions
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)
OpenPOWER on IntegriCloud