Nico Huber has uploaded this change for review.
[NOTFORMERGE] Do not try to map SPI flash chips
Trying to map SPI chips seems superfluous and might not work at all.
Though, it would require a very deep investigation to find out if
this is always the case for all programmers. If somebody has the time
for that, it's probably better spent on (re)moving the mapping stuff
altogether.
Change-Id: I57350f65211b4c0ae2a285ee1b1151a6e6bfa031
Signed-off-by: Nico Huber <nico.h@gmx.de>
---
M flashrom.c
1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/44/23344/1
diff --git a/flashrom.c b/flashrom.c
index ac987fd..a8bef3a 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -1111,6 +1111,10 @@
void unmap_flash(struct flashctx *flash)
{
+ /* FIXME: The whole (un)mapping should be handled at programmer level. */
+ if ((flash->chip->bustype & BUS_NONSPI) == 0)
+ return;
+
if (flash->virtual_registers != (chipaddr)ERROR_PTR) {
programmer_unmap_flash_region((void *)flash->virtual_registers, flash->chip->total_size * 1024);
flash->physical_registers = 0;
@@ -1126,6 +1130,10 @@
int map_flash(struct flashctx *flash)
{
+ /* FIXME: The whole (un)mapping should be handled at programmer level. */
+ if ((flash->chip->bustype & BUS_NONSPI) == 0)
+ return 0;
+
/* Init pointers to the fail-safe state to distinguish them later from legit values. */
flash->virtual_memory = (chipaddr)ERROR_PTR;
flash->virtual_registers = (chipaddr)ERROR_PTR;
To view, visit change 23344. To unsubscribe, or for help writing mail filters, visit settings.