Attention is currently required from: Peter Marheine.
Felix Singer has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/67896 )
Change subject: realtek_mst_i2c_spi.c: Move variable allow_brick into parameters struct ......................................................................
realtek_mst_i2c_spi.c: Move variable allow_brick into parameters struct
Signed-off-by: Felix Singer felixsinger@posteo.net Change-Id: I98ef6f7a44714ea684b6875dc7e61ea5e5911184 --- M realtek_mst_i2c_spi.c 1 file changed, 17 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/96/67896/1
diff --git a/realtek_mst_i2c_spi.c b/realtek_mst_i2c_spi.c index 6221134..1863e9b 100644 --- a/realtek_mst_i2c_spi.c +++ b/realtek_mst_i2c_spi.c @@ -55,6 +55,7 @@ };
struct realtek_mst_i2c_spi_parameters { + bool allow_brick; bool reset; };
@@ -448,16 +449,16 @@ .probe_opcode = default_spi_probe_opcode, };
-static int get_params(const struct programmer_cfg *cfg, bool *enter_isp, bool *allow_brick, struct realtek_mst_i2c_spi_parameters *parameters) +static int get_params(const struct programmer_cfg *cfg, bool *enter_isp, struct realtek_mst_i2c_spi_parameters *parameters) { char *param_str; int ret = 0;
- *allow_brick = false; /* Default behaviour is to bail. */ + parameters->allow_brick = false; /* Default behaviour is to bail. */ param_str = extract_programmer_param_str(cfg, "allow_brick"); if (param_str) { if (!strcmp(param_str, "yes")) { - *allow_brick = true; + parameters->allow_brick = true; } else { msg_perr("%s: Incorrect param format, allow_brick=yes.\n", __func__); ret = SPI_GENERIC_ERROR; @@ -499,17 +500,17 @@ static int realtek_mst_i2c_spi_init(const struct programmer_cfg *cfg) { int ret = 0; - bool enter_isp, allow_brick; + bool enter_isp; struct realtek_mst_i2c_spi_parameters parameters = { 0 };
- if (get_params(cfg, &enter_isp, &allow_brick, ¶meters)) + if (get_params(cfg, &enter_isp, ¶meters)) return SPI_GENERIC_ERROR;
/* * TODO: Once board_enable can facilitate safe i2c allow listing * then this can be removed. */ - if (!allow_brick) { + if (!parameters.allow_brick) { msg_perr("%s: For i2c drivers you must explicitly 'allow_brick=yes'. ", __func__); msg_perr("There is currently no way to determine if the programmer works on a board " "as i2c device address space can be overloaded. Set 'allow_brick=yes' if "