Edward O'Callaghan has uploaded this change for review.

View Change

flashrom.c: Drop programmer global singleton handle [WIP]

What is remaining:
[ ] - delay framework patches still need to land.
[?] - do something about programmer name printing?

Change-Id: I23061ef2f965cf59d74fc3f29952c09117ef6c4f
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
---
M flashrom.c
1 file changed, 17 insertions(+), 3 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/50/68250/1
diff --git a/flashrom.c b/flashrom.c
index 7996e6b..695c3f0 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -37,8 +37,6 @@
const char flashrom_version[] = FLASHROM_VERSION;
const char *chip_to_probe = NULL;

-static const struct programmer_entry *programmer = NULL;
-
/*
* Programmers supporting multiple buses can have differing size limits on
* each bus. Store the limits for each bus in a common struct.
@@ -133,7 +131,6 @@
msg_perr("Invalid programmer specified!\n");
return -1;
}
- programmer = prog;
/* Initialize all programmer specific data. */
/* Default to unlimited decode sizes. */
max_rom_decode = (const struct decode_sizes) {
@@ -863,8 +860,11 @@
if (master_uses_physmap(mst))
msg_cinfo("mapped at physical address 0x%0*" PRIxPTR ".\n",
PRIxPTR_WIDTH, flash->physical_memory);
+#if 0
+ /* TODO(quasisec): No good ideas, maybe just delete the else branch??? */
else
msg_cinfo("on %s.\n", programmer->name);
+#endif

/* Flash registers may more likely not be mapped if the chip was forced.
* Lock info may be stored in registers, so avoid lock info printing. */

To view, visit change 68250. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I23061ef2f965cf59d74fc3f29952c09117ef6c4f
Gerrit-Change-Number: 68250
Gerrit-PatchSet: 1
Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-MessageType: newchange