Commit 0bdc0929 authored by Michael Karcher's avatar Michael Karcher
Browse files

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: default avatarMichael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: default avatarSean Nelson <audiohacked@gmail.com>
parent 5fbd18dc
This diff is collapsed.
......@@ -288,6 +288,7 @@ struct board_pciid_enable {
const char *board_name;
int max_rom_decode_parallel;
int status;
int (*enable) (const char *name);
};
......@@ -383,6 +384,7 @@ void get_io_perms(void);
void release_io_perms(void);
#if INTERNAL_SUPPORT == 1
extern int is_laptop;
extern int force_boardenable;
void probe_superio(void);
int internal_init(void);
int internal_shutdown(void);
......
......@@ -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 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment