Attention is currently required from: Felix Singer.
Peter Marheine has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/67897 )
Change subject: realtek_mst_i2c_spi.c: Move variable enter_isp into parameter struct
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://review.coreboot.org/c/flashrom/+/67897
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: If95160c68b2dea40fb31abf68a430be5d20c4cf1
Gerrit-Change-Number: 67897
Gerrit-PatchSet: 1
Gerrit-Owner: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Comment-Date: Tue, 27 Sep 2022 05:51:48 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer.
Peter Marheine has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/67895 )
Change subject: realtek_mst_i2c_spi.c: Move variable `reset` into parameters struct
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://review.coreboot.org/c/flashrom/+/67895
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I471ce9e6fedc5ec7f3d2bf54a0e1633dbac3cfd5
Gerrit-Change-Number: 67895
Gerrit-PatchSet: 1
Gerrit-Owner: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Comment-Date: Tue, 27 Sep 2022 05:51:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer.
Peter Marheine has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/67896 )
Change subject: realtek_mst_i2c_spi.c: Move variable allow_brick into parameters struct
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://review.coreboot.org/c/flashrom/+/67896
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I98ef6f7a44714ea684b6875dc7e61ea5e5911184
Gerrit-Change-Number: 67896
Gerrit-PatchSet: 1
Gerrit-Owner: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Comment-Date: Tue, 27 Sep 2022 05:50:58 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
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(a)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 "
--
To view, visit https://review.coreboot.org/c/flashrom/+/67896
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I98ef6f7a44714ea684b6875dc7e61ea5e5911184
Gerrit-Change-Number: 67896
Gerrit-PatchSet: 1
Gerrit-Owner: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-MessageType: newchange