summaryrefslogtreecommitdiff
path: root/jedec.c
diff options
context:
space:
mode:
authorstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2014-08-30 23:39:51 +0000
committerstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2014-08-30 23:39:51 +0000
commite218311a53921ae44e7d23263c5f25b0e728e5bf (patch)
tree5ca7051747f8161639957c37d984cbe8f878271a /jedec.c
parentc7f893affc0116d2081da4ac4545e31dfebe56ed (diff)
downloadflashrom-e218311a53921ae44e7d23263c5f25b0e728e5bf.tar.gz
Refine physical address mapping of flash chips.
- Create distinct functions for mapping and unmapping for flash chips. - Map only when needed: map before probing and unmap immediately after it. Map again when a single chip was probed successfully before taking any actual actions and clean up afterwards. - Map special function chip registers centrally together with flash space instead of within (some) probing methods after successful probes. - Save the used base addresses of the mappings in struct flashctx as well. - Do not try to (un)map the zero-sized chip definitions that are merely hacks. This also fixes the printing of wrong warnings for these chip definitions introduced in r1765. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1847 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'jedec.c')
-rw-r--r--jedec.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/jedec.c b/jedec.c
index 358b850..1345b89 100644
--- a/jedec.c
+++ b/jedec.c
@@ -166,9 +166,6 @@ int probe_jedec_29gl(struct flashctx *flash)
if (man_id != chip->manufacture_id || dev_id != chip->model_id)
return 0;
- if (chip->feature_bits & FEATURE_REGISTERMAP)
- map_flash_registers(flash);
-
return 1;
}
@@ -287,9 +284,6 @@ static int probe_jedec_common(struct flashctx *flash, unsigned int mask)
if (largeid1 != chip->manufacture_id || largeid2 != chip->model_id)
return 0;
- if (chip->feature_bits & FEATURE_REGISTERMAP)
- map_flash_registers(flash);
-
return 1;
}