diff options
author | Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> | 2010-02-28 01:33:48 +0000 |
---|---|---|
committer | Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> | 2010-02-28 01:33:48 +0000 |
commit | 0bdc0929f54feda41687aa5180a17f7d9661f7ed (patch) | |
tree | d927e42fe112b245062ff252a5329233792bcf84 /internal.c | |
parent | 5fbd18dc8d2801281645f8b325af02b7acaaa66b (diff) | |
download | ast2050-flashrom-0bdc0929f54feda41687aa5180a17f7d9661f7ed.zip ast2050-flashrom-0bdc0929f54feda41687aa5180a17f7d9661f7ed.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.
Corresponding to flashrom svn r919.
Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
Diffstat (limited to 'internal.c')
-rw-r--r-- | internal.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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 */ |