summaryrefslogtreecommitdiff
path: root/internal.c
diff options
context:
space:
mode:
authormkarcher <mkarcher@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2010-02-28 01:33:48 +0000
committermkarcher <mkarcher@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2010-02-28 01:33:48 +0000
commitbaeb3999394b11aa6c7ebc519ca55850f02c55e0 (patch)
treed927e42fe112b245062ff252a5329233792bcf84 /internal.c
parente3da2f4aa40a26b021b029180b1150acfae7f1c4 (diff)
downloadflashrom-baeb3999394b11aa6c7ebc519ca55850f02c55e0.tar.gz
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. Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> Acked-by: Sean Nelson <audiohacked@gmail.com> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@919 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'internal.c')
-rw-r--r--internal.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/internal.c b/internal.c
index d38ae4b..0afed72 100644
--- a/internal.c
+++ b/internal.c
@@ -100,6 +100,7 @@ struct pci_dev *pci_card_find(uint16_t vendor, uint16_t device,
#if INTERNAL_SUPPORT == 1
struct superio superio = {};
+int force_boardenable = 0;
void probe_superio(void)
{
@@ -116,6 +117,25 @@ int internal_init(void)
{
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 */