mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 23:22:37 +02:00
realtek_mst_i2c_spi: Use underscores for parameters instead hyphens
realtek_mst_i2c_spi is the only programmer which uses hyphens instead of underscores in its parameter names. Thus, for consistency, rename the parameters so that they use underscores. Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: I5ff6d8d432d875670fcaa2088e9cf9d9f1b83dc2 Reviewed-on: https://review.coreboot.org/c/flashrom/+/65935 Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Thomas Heijligen <src@posteo.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
This commit is contained in:
parent
a2fc6185e6
commit
e6e4ca5fe4
@ -1543,30 +1543,30 @@ commands through the MST hub's I2C connection with the host).
|
|||||||
.TP
|
.TP
|
||||||
.B In-system programming (ISP) mode
|
.B In-system programming (ISP) mode
|
||||||
.sp
|
.sp
|
||||||
The \fBreset-mcu\fP and \fBenter-isp\fP options provide control over device
|
The \fBreset_mcu\fP and \fBenter_isp\fP options provide control over device
|
||||||
mode changes, where each can be set to 0 or 1 to enable or disable the
|
mode changes, where each can be set to 0 or 1 to enable or disable the
|
||||||
corresponding mode transition.
|
corresponding mode transition.
|
||||||
|
|
||||||
\fBenter-isp\fP defaults to 1, and if enabled will issue commands to the MST
|
\fBenter_isp\fP defaults to 1, and if enabled will issue commands to the MST
|
||||||
hub when beginning operation to put it into ISP mode.
|
hub when beginning operation to put it into ISP mode.
|
||||||
|
|
||||||
\fBreset-mcu\fP defaults to 0, and if enabled will issue a reset command to
|
\fBreset_mcu\fP defaults to 0, and if enabled will issue a reset command to
|
||||||
the MST hub on programming completion, causing it to exit ISP mode and to
|
the MST hub on programming completion, causing it to exit ISP mode and to
|
||||||
reload its own firmware from flash.
|
reload its own firmware from flash.
|
||||||
|
|
||||||
\fBallow-brick\fP defaults to no, however must be set explicitly to "yes"
|
\fBallow_brick\fP defaults to no, however must be set explicitly to "yes"
|
||||||
to allow the driver to run if you are sure you have a MST chip.
|
to allow the driver to run if you are sure you have a MST chip.
|
||||||
|
|
||||||
The hub must be in ISP mode for SPI flash access to be possible, so it is
|
The hub must be in ISP mode for SPI flash access to be possible, so it is
|
||||||
usually only useful to disable \fBenter-isp\fP if an earlier invocation avoided
|
usually only useful to disable \fBenter_isp\fP if an earlier invocation avoided
|
||||||
resetting it on completion. For instance, to erase the flash and
|
resetting it on completion. For instance, to erase the flash and
|
||||||
rewrite it with the contents of a file without resetting in between (which
|
rewrite it with the contents of a file without resetting in between (which
|
||||||
could render it nonfunctional if attempting to load firmware from a blank
|
could render it nonfunctional if attempting to load firmware from a blank
|
||||||
flash):
|
flash):
|
||||||
.sp
|
.sp
|
||||||
.B " flashrom -p realtek_mst_i2c_spi:bus=0,enter-isp=1,reset-mcu=0 -E"
|
.B " flashrom -p realtek_mst_i2c_spi:bus=0,enter_isp=1,reset_mcu=0 -E"
|
||||||
.br
|
.br
|
||||||
.B " flashrom -p realtek_mst_i2c_spi:bus=0,enter-isp=0,reset-mcu=1 -w new.bin"
|
.B " flashrom -p realtek_mst_i2c_spi:bus=0,enter_isp=0,reset_mcu=1 -w new.bin"
|
||||||
.SS
|
.SS
|
||||||
.BR "parade_lspcon " programmer
|
.BR "parade_lspcon " programmer
|
||||||
.IP
|
.IP
|
||||||
|
@ -449,7 +449,7 @@ static int get_params(int *reset, int *enter_isp, int *allow_brick)
|
|||||||
char *reset_str = NULL, *isp_str = NULL, *brick_str = NULL;
|
char *reset_str = NULL, *isp_str = NULL, *brick_str = NULL;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
brick_str = extract_programmer_param_str("allow-brick");
|
brick_str = extract_programmer_param_str("allow_brick");
|
||||||
if (brick_str) {
|
if (brick_str) {
|
||||||
if (!strcmp(brick_str, "yes")) {
|
if (!strcmp(brick_str, "yes")) {
|
||||||
*allow_brick = 1;
|
*allow_brick = 1;
|
||||||
@ -462,14 +462,14 @@ static int get_params(int *reset, int *enter_isp, int *allow_brick)
|
|||||||
}
|
}
|
||||||
free(brick_str);
|
free(brick_str);
|
||||||
|
|
||||||
reset_str = extract_programmer_param_str("reset-mcu");
|
reset_str = extract_programmer_param_str("reset_mcu");
|
||||||
if (reset_str) {
|
if (reset_str) {
|
||||||
if (reset_str[0] == '1') {
|
if (reset_str[0] == '1') {
|
||||||
*reset = 1;
|
*reset = 1;
|
||||||
} else if (reset_str[0] == '0') {
|
} else if (reset_str[0] == '0') {
|
||||||
*reset = 0;
|
*reset = 0;
|
||||||
} else {
|
} else {
|
||||||
msg_perr("%s: Incorrect param format, reset-mcu=1 or 0.\n", __func__);
|
msg_perr("%s: Incorrect param format, reset_mcu=1 or 0.\n", __func__);
|
||||||
ret = SPI_GENERIC_ERROR;
|
ret = SPI_GENERIC_ERROR;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -477,14 +477,14 @@ static int get_params(int *reset, int *enter_isp, int *allow_brick)
|
|||||||
}
|
}
|
||||||
free(reset_str);
|
free(reset_str);
|
||||||
|
|
||||||
isp_str = extract_programmer_param_str("enter-isp");
|
isp_str = extract_programmer_param_str("enter_isp");
|
||||||
if (isp_str) {
|
if (isp_str) {
|
||||||
if (isp_str[0] == '1') {
|
if (isp_str[0] == '1') {
|
||||||
*enter_isp = 1;
|
*enter_isp = 1;
|
||||||
} else if (isp_str[0] == '0') {
|
} else if (isp_str[0] == '0') {
|
||||||
*enter_isp = 0;
|
*enter_isp = 0;
|
||||||
} else {
|
} else {
|
||||||
msg_perr("%s: Incorrect param format, enter-isp=1 or 0.\n", __func__);
|
msg_perr("%s: Incorrect param format, enter_isp=1 or 0.\n", __func__);
|
||||||
ret = SPI_GENERIC_ERROR;
|
ret = SPI_GENERIC_ERROR;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -508,9 +508,9 @@ static int realtek_mst_i2c_spi_init(void)
|
|||||||
* then this can be removed.
|
* then this can be removed.
|
||||||
*/
|
*/
|
||||||
if (!allow_brick) {
|
if (!allow_brick) {
|
||||||
msg_perr("%s: For i2c drivers you must explicitly 'allow-brick=yes'. ", __func__);
|
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 "
|
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 "
|
"as i2c device address space can be overloaded. Set 'allow_brick=yes' if "
|
||||||
"you are sure you know what you are doing.\n");
|
"you are sure you know what you are doing.\n");
|
||||||
return SPI_GENERIC_ERROR;
|
return SPI_GENERIC_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ void realtek_mst_basic_lifecycle_test_success(void **state)
|
|||||||
.fallback_open_state = &realtek_mst_fallback_open_state,
|
.fallback_open_state = &realtek_mst_fallback_open_state,
|
||||||
};
|
};
|
||||||
|
|
||||||
run_basic_lifecycle(state, &realtek_mst_io, &programmer_realtek_mst_i2c_spi, "bus=254,enter-isp=0,allow-brick=yes");
|
run_basic_lifecycle(state, &realtek_mst_io, &programmer_realtek_mst_i2c_spi, "bus=254,enter_isp=0,allow_brick=yes");
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
SKIP_TEST(realtek_mst_basic_lifecycle_test_success)
|
SKIP_TEST(realtek_mst_basic_lifecycle_test_success)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user