Implement tested/untested status for board enables
The message printing code greatly exceed the 80 character limit. I can
reformat it on request to obey the limit.
Intended behaviour:
on untested boards an explanation of that status is printed and the board
enable code is not run, unless the option "boardenable=force" has been
passed to the internal programmer.
Corresponding to flashrom svn r919.
Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
diff --git a/internal.c b/internal.c
index d38ae4b..0afed72 100644
--- a/internal.c
+++ b/internal.c
@@ -100,6 +100,7 @@
#if INTERNAL_SUPPORT == 1
struct superio superio = {};
+int force_boardenable = 0;
void probe_superio(void)
{
@@ -116,6 +117,25 @@
{
int ret = 0;
+ if (programmer_param && !strlen(programmer_param)) {
+ free(programmer_param);
+ programmer_param = NULL;
+ }
+ if (programmer_param) {
+ char *arg;
+ arg = extract_param(&programmer_param, "boardenable=", ",:");
+ if (arg && !strcmp(arg,"force"))
+ force_boardenable = 1;
+ else if (arg)
+ msg_perr("Unknown argument for boardenable: %s\n", arg);
+ free(arg);
+
+ if (strlen(programmer_param))
+ msg_perr("Unhandled programmer parameters: %s\n",
+ programmer_param);
+ free(programmer_param);
+ programmer_param = NULL;
+ }
get_io_perms();
/* Initialize PCI access for flash enables */