diff options
author | Edward O'Callaghan <quasisec@google.com> | 2022-08-12 14:21:58 +1000 |
---|---|---|
committer | Anastasia Klimchuk <aklm@chromium.org> | 2022-09-07 01:54:17 +0000 |
commit | c3df94cb96dd0a6771926e2c6a1ed6309452de83 (patch) | |
tree | c554a90f20ddb490280c74ad8ebc76aea23f3454 /raiden_debug_spi.c | |
parent | 323973b4dd5898333fd536e2872b987ca94d56f9 (diff) | |
download | flashrom-c3df94cb96dd0a6771926e2c6a1ed6309452de83.tar.gz flashrom-c3df94cb96dd0a6771926e2c6a1ed6309452de83.tar.bz2 flashrom-c3df94cb96dd0a6771926e2c6a1ed6309452de83.zip |
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>
Diffstat (limited to 'raiden_debug_spi.c')
-rw-r--r-- | raiden_debug_spi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/raiden_debug_spi.c b/raiden_debug_spi.c index c6689acd..d2eea6ad 100644 --- a/raiden_debug_spi.c +++ b/raiden_debug_spi.c @@ -1429,7 +1429,7 @@ static int configure_protocol(struct raiden_debug_spi_data *ctx_data) 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 @@ static int get_ap_request_type(void) 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 @@ static int get_target(void) 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 @@ static int raiden_debug_spi_init(const struct programmer_cfg *cfg) int found = 0; int ret; - int request_enable = get_target(); + int request_enable = get_target(cfg); if (request_enable < 0) { free(serial); return 1; |