1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 23:22:37 +02:00

tree: plumb programmer_cfg into chipset_flash_enable()

Change-Id: I963c674d212ce791ee155020fa97bcf26cefca0c
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/66673
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
This commit is contained in:
Edward O'Callaghan 2022-08-12 15:42:29 +10:00 committed by Anastasia Klimchuk
parent a20ceffa35
commit 162b997f2f
3 changed files with 4 additions and 4 deletions

View File

@ -2182,7 +2182,7 @@ const struct penable chipset_enables[] = {
{0}, {0},
}; };
int chipset_flash_enable(void) int chipset_flash_enable(const struct programmer_cfg *cfg)
{ {
struct pci_dev *dev = NULL; struct pci_dev *dev = NULL;
int ret = -2; /* Nothing! */ int ret = -2; /* Nothing! */
@ -2231,7 +2231,7 @@ int chipset_flash_enable(void)
continue; continue;
} }
msg_pinfo("Enabling flash write... "); msg_pinfo("Enabling flash write... ");
ret = chipset_enables[i].doit(NULL, dev, chipset_enables[i].device_name); ret = chipset_enables[i].doit(cfg, dev, chipset_enables[i].device_name);
if (ret == NOT_DONE_YET) { if (ret == NOT_DONE_YET) {
ret = -2; ret = -2;
msg_pinfo("OK - searching further chips.\n"); msg_pinfo("OK - searching further chips.\n");

View File

@ -231,7 +231,7 @@ void board_handle_before_laptop(void);
int board_flash_enable(const char *vendor, const char *model, const char *cb_vendor, const char *cb_model); int board_flash_enable(const char *vendor, const char *model, const char *cb_vendor, const char *cb_model);
/* chipset_enable.c */ /* chipset_enable.c */
int chipset_flash_enable(void); int chipset_flash_enable(const struct programmer_cfg *cfg);
/* processor_enable.c */ /* processor_enable.c */
int processor_flash_enable(void); int processor_flash_enable(void);

View File

@ -282,7 +282,7 @@ static int internal_init(const struct programmer_cfg *cfg)
/* try to enable it. Failure IS an option, since not all motherboards /* try to enable it. Failure IS an option, since not all motherboards
* really need this to be done, etc., etc. * really need this to be done, etc., etc.
*/ */
ret = chipset_flash_enable(); ret = chipset_flash_enable(cfg);
if (ret == -2) { if (ret == -2) {
msg_perr("WARNING: No chipset found. Flash detection " msg_perr("WARNING: No chipset found. Flash detection "
"will most likely fail.\n"); "will most likely fail.\n");