[coreboot] [flashrom] r488 - trunk

svn at coreboot.org svn at coreboot.org
Sat May 9 09:27:23 CEST 2009


Author: hailfinger
Date: 2009-05-09 09:27:23 +0200 (Sat, 09 May 2009)
New Revision: 488

Modified:
   trunk/flashrom.c
Log:
Fix Elan SC520 handling.

flashbase is a variable which should never be set outside chipset code.
It is only used to calculate the base address of the flash space at
exactly one location in the code.

Setting flashbase during probe caused subsequent probes to fail unless
special handling code was used. We had such code and it caused every
probe except the first to fail on Elan SC520.

Remove the superfluous flashbase assignment and simplify the rest of the
code.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
Acked-by: Ronald G. Minnich <rminnich at gmail.com>


Modified: trunk/flashrom.c
===================================================================
--- trunk/flashrom.c	2009-05-09 07:24:23 UTC (rev 487)
+++ trunk/flashrom.c	2009-05-09 07:27:23 UTC (rev 488)
@@ -113,7 +113,7 @@
 			size = getpagesize();
 		}
 
-		base = flashbase && flashchips == first_flash ? flashbase : (0xffffffff - size + 1);
+		base = flashbase ? flashbase : (0xffffffff - size + 1);
 		flash->virtual_memory = bios = physmap("flash chip", base, size);
 
 		if (force)
@@ -135,7 +135,6 @@
 
 	printf("Found chip \"%s %s\" (%d KB) at physical address 0x%lx.\n",
 	       flash->vendor, flash->name, flash->total_size, base);
-	flashbase = base;
 	return flash;
 }
 





More information about the coreboot mailing list