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
raiden_debug_spi.c: plumb programmer_cfg though get_params

Modify the type signature of the programmer get_param
helper functions to allow for the consumption of the
programmer parameterisation string data.

Change-Id: I20041a9aead513de71c2c384842046f64c1614b6
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/66667
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
---
M raiden_debug_spi.c
1 file changed, 22 insertions(+), 4 deletions(-)

diff --git a/raiden_debug_spi.c b/raiden_debug_spi.c
index c6689ac..d2eea6a 100644
--- a/raiden_debug_spi.c
+++ b/raiden_debug_spi.c
@@ -1429,7 +1429,7 @@
return 0;
}

-static int get_ap_request_type(void)
+static int get_ap_request_type(const struct programmer_cfg *cfg)
{
int ap_request = RAIDEN_DEBUG_SPI_REQ_ENABLE_AP;
char *custom_rst_str = extract_programmer_param_str(NULL, "custom_rst");
@@ -1448,7 +1448,7 @@
return ap_request;
}

-static int get_target(void)
+static int get_target(const struct programmer_cfg *cfg)
{
/**
* REQ_ENABLE doesn't specify a target bus, and will be rejected
@@ -1459,7 +1459,7 @@
char *target_str = extract_programmer_param_str(NULL, "target");
if (target_str) {
if (!strcasecmp(target_str, "ap"))
- request_enable = get_ap_request_type();
+ request_enable = get_ap_request_type(cfg);
else if (!strcasecmp(target_str, "ec"))
request_enable = RAIDEN_DEBUG_SPI_REQ_ENABLE_EC;
else {
@@ -1491,7 +1491,7 @@
int found = 0;
int ret;

- int request_enable = get_target();
+ int request_enable = get_target(cfg);
if (request_enable < 0) {
free(serial);
return 1;

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

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I20041a9aead513de71c2c384842046f64c1614b6
Gerrit-Change-Number: 66667
Gerrit-PatchSet: 9
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