Anastasia Klimchuk submitted this change.

View Change


Approvals: build bot (Jenkins): Verified Felix Singer: Looks good to me, approved Anastasia Klimchuk: Looks good to me, approved
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>
---
M chipset_enable.c
M include/programmer.h
M internal.c
3 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/chipset_enable.c b/chipset_enable.c
index 64af483..d8aa53d 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -2182,7 +2182,7 @@
{0},
};

-int chipset_flash_enable(void)
+int chipset_flash_enable(const struct programmer_cfg *cfg)
{
struct pci_dev *dev = NULL;
int ret = -2; /* Nothing! */
@@ -2231,7 +2231,7 @@
continue;
}
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) {
ret = -2;
msg_pinfo("OK - searching further chips.\n");
diff --git a/include/programmer.h b/include/programmer.h
index 2a4b118..5331a12 100644
--- a/include/programmer.h
+++ b/include/programmer.h
@@ -231,7 +231,7 @@
int board_flash_enable(const char *vendor, const char *model, const char *cb_vendor, const char *cb_model);

/* chipset_enable.c */
-int chipset_flash_enable(void);
+int chipset_flash_enable(const struct programmer_cfg *cfg);

/* processor_enable.c */
int processor_flash_enable(void);
diff --git a/internal.c b/internal.c
index 18ac088..426730f 100644
--- a/internal.c
+++ b/internal.c
@@ -282,7 +282,7 @@
/* try to enable it. Failure IS an option, since not all motherboards
* really need this to be done, etc., etc.
*/
- ret = chipset_flash_enable();
+ ret = chipset_flash_enable(cfg);
if (ret == -2) {
msg_perr("WARNING: No chipset found. Flash detection "
"will most likely fail.\n");

To view, visit change 66673. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I963c674d212ce791ee155020fa97bcf26cefca0c
Gerrit-Change-Number: 66673
Gerrit-PatchSet: 10
Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger@posteo.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged