mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-02 14:33:18 +02:00
board_enables: Allow for prog cfg coupling with board cfg
Some boards need to configure the programmer in specific ways. For example, a programmer such as internal may need to be configured either as laptop or not type and as such the board enable needs the ability to feed state back into the programmer configuration. Plumb this though by creating a board_cfg structure that can be packed. Change-Id: I7058a693e714a6966a842ae97cc8da7296e63e5e Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/71623 Reviewed-by: Sam McNally <sammc@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:

committed by
Edward O'Callaghan

parent
73e4709110
commit
40cc15f55d
@ -149,6 +149,7 @@ static int internal_init(const struct programmer_cfg *cfg)
|
||||
const char *cb_model = NULL;
|
||||
#endif
|
||||
bool force_boardenable = false;
|
||||
struct board_cfg bcfg;
|
||||
|
||||
ret = get_params(cfg,
|
||||
&force_boardenable, &force_boardmismatch,
|
||||
@ -208,7 +209,7 @@ static int internal_init(const struct programmer_cfg *cfg)
|
||||
dmi_init(&g_is_laptop);
|
||||
|
||||
/* In case Super I/O probing would cause pretty explosions. */
|
||||
board_handle_before_superio(force_boardenable);
|
||||
board_handle_before_superio(&bcfg, force_boardenable);
|
||||
|
||||
/* Probe for the Super I/O chip and fill global struct superio. */
|
||||
probe_superio();
|
||||
@ -221,7 +222,7 @@ static int internal_init(const struct programmer_cfg *cfg)
|
||||
#endif
|
||||
|
||||
/* Check laptop whitelist. */
|
||||
board_handle_before_laptop(force_boardenable);
|
||||
board_handle_before_laptop(&bcfg, force_boardenable);
|
||||
|
||||
/*
|
||||
* Disable all internal buses by default if we are not sure
|
||||
@ -247,7 +248,8 @@ static int internal_init(const struct programmer_cfg *cfg)
|
||||
* parallel writes on IT8705F. Also, this handles the manual chip select for Gigabyte's DualBIOS. */
|
||||
init_superio_ite(cfg);
|
||||
|
||||
if (board_flash_enable(board_vendor, board_model, cb_vendor, cb_model, force_boardenable)) {
|
||||
if (board_flash_enable(&bcfg,
|
||||
board_vendor, board_model, cb_vendor, cb_model, force_boardenable)) {
|
||||
msg_perr("Aborting to be safe.\n");
|
||||
ret = 1;
|
||||
goto internal_init_exit;
|
||||
|
Reference in New Issue
Block a user