Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/39973 )
Change subject: libflashrom.c: Use correct type for sizeof
......................................................................
libflashrom.c: Use correct type for sizeof
As we want to allocate an array of `flashrom_board_info` structs, use
that type in sizeof. This did not cause problems as `board_info` was at
least as big as `flashrom_board_info`, but nothing guarantees it.
Change-Id: I66e875d54c9a7cc59898b072b052282b0b5cbb2f
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
---
M libflashrom.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/73/39973/1
diff --git a/libflashrom.c b/libflashrom.c
index 0dec22e..ab7e364 100644
--- a/libflashrom.c
+++ b/libflashrom.c
@@ -182,7 +182,7 @@
++boards_known_size;
struct flashrom_board_info *supported_boards =
- malloc(boards_known_size * sizeof(*binfo));
+ malloc(boards_known_size * sizeof(struct flashrom_board_info));
if (supported_boards != NULL) {
for (; i < boards_known_size; ++i) {
--
To view, visit https://review.coreboot.org/c/flashrom/+/39973
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I66e875d54c9a7cc59898b072b052282b0b5cbb2f
Gerrit-Change-Number: 39973
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newchange
Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/40857 )
Change subject: chipset_enable.c: Spell `BIOS` in uppercase
......................................................................
chipset_enable.c: Spell `BIOS` in uppercase
Change-Id: Ib66547b2b5d77658ab1925e4ad3acfe44e14843c
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
---
M chipset_enable.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/57/40857/1
diff --git a/chipset_enable.c b/chipset_enable.c
index 783bb94..632679c 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -354,7 +354,7 @@
msg_pwarn("Warning: BIOS region SMM protection is enabled!\n");
if (new != wanted)
- msg_pwarn("Warning: Setting Bios Control at 0x%x from 0x%02x to 0x%02x failed.\n"
+ msg_pwarn("Warning: Setting BIOS Control at 0x%x from 0x%02x to 0x%02x failed.\n"
"New value is 0x%02x.\n", bios_cntl, old, wanted, new);
/* Return an error if we could not set the write enable only. */
--
To view, visit https://review.coreboot.org/c/flashrom/+/40857
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ib66547b2b5d77658ab1925e4ad3acfe44e14843c
Gerrit-Change-Number: 40857
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newchange
Shiyu Sun has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/40903 )
Change subject: lspcon_i2c_spi.c: Switch logs with 'Error:' to '__func__:'
......................................................................
lspcon_i2c_spi.c: Switch logs with 'Error:' to '__func__:'
Showing Error is not very informative and switch to function
name to make it easy for debug.
BUG=b:154285774
BRANCH=none
TEST=build success
Change-Id: If3205d8e453cfcd37f725b4fd135fe1221c913c0
Signed-off-by: Shiyu Sun <sshiyu(a)chromium.org>
Change-Id: I34d326a9b40a95334995db2c6de80cfb7d133b03
---
M lspcon_i2c_spi.c
1 file changed, 12 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/03/40903/1
diff --git a/lspcon_i2c_spi.c b/lspcon_i2c_spi.c
index 8de2c14..0e01607 100644
--- a/lspcon_i2c_spi.c
+++ b/lspcon_i2c_spi.c
@@ -154,7 +154,7 @@
} while (!ret && (val & mask) && ++tried < MAX_SPI_WAIT_RETRIES);
if (tried == MAX_SPI_WAIT_RETRIES) {
- msg_perr("Error: Time out on sending command.\n");
+ msg_perr("%s: Time out on sending command.\n", __func__);
return -MAX_SPI_WAIT_RETRIES;
}
@@ -179,7 +179,7 @@
} while (!ret && (val & SWSPICTL_ACCESS_TRIGGER) && ++tried < MAX_SPI_WAIT_RETRIES);
if (tried == MAX_SPI_WAIT_RETRIES) {
- msg_perr("Error: Time out on waiting ROM free.\n");
+ msg_perr("%s: Time out on waiting ROM free.\n", __func__);
return -MAX_SPI_WAIT_RETRIES;
}
@@ -258,7 +258,8 @@
{
unsigned int i;
if (writecnt > 16 || readcnt > 16 || writecnt == 0) {
- msg_perr("Error: Invalid read/write count for send command.\n");
+ msg_perr("%s: Invalid read/write count for send command.\n",
+ __func__);
return SPI_GENERIC_ERROR;
}
@@ -402,7 +403,8 @@
static int lspcon_i2c_spi_write_aai(struct flashctx *flash, const uint8_t *buf,
unsigned int start, unsigned int len)
{
- msg_perr("Error: AAI write function is not supported.\n");
+ msg_perr("%s: AAI write function is not supported.\n",
+ __func__);
return SPI_GENERIC_ERROR;
}
@@ -441,17 +443,19 @@
errno = 0;
int bus = (int)strtol(bus_str, &bus_suffix, 10);
if (errno != 0 || bus_str == bus_suffix) {
- msg_perr("Error: Could not convert 'bus'.\n");
+ msg_perr("%s: Could not convert 'bus'.\n", __func__);
goto get_bus_done;
}
if (bus < 0 || bus > 255) {
- msg_perr("Error: Value for 'bus' is out of range(0-255).\n");
+ msg_perr("%s: Value for 'bus' is out of range(0-255).\n",
+ __func__);
goto get_bus_done;
}
if (strlen(bus_suffix) > 0) {
- msg_perr("Error: Garbage following 'bus' value.\n");
+ msg_perr("%s: Garbage following 'bus' value.\n",
+ __func__);
goto get_bus_done;
}
@@ -459,7 +463,7 @@
ret = bus;
goto get_bus_done;
} else {
- msg_perr("Error: Bus number not specified.\n");
+ msg_perr("%s: Bus number not specified.\n", __func__);
}
get_bus_done:
if (bus_str)
--
To view, visit https://review.coreboot.org/c/flashrom/+/40903
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I34d326a9b40a95334995db2c6de80cfb7d133b03
Gerrit-Change-Number: 40903
Gerrit-PatchSet: 1
Gerrit-Owner: Shiyu Sun <sshiyu(a)google.com>
Gerrit-MessageType: newchange
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/40477
to look at the new patch set (#7).
Change subject: ft2232_spi.c: Pack WREN and op in one ftdi_write_data() call to save programming time
......................................................................
ft2232_spi.c: Pack WREN and op in one ftdi_write_data() call to save programming time
Every ftdi_write_data() call is quite time consuming as the ftdi-chips seems to take always 2-3ms to respond.
This leads to what the comment already says: Minimize USB transfers by packing as many commands as possible together.
So I packed the WREN command together with the following operation which can be program or erase operation.
This saves about 1 minute when programming a 128MBit Flash with my config!
See timings WREN in extra ftdi_write_data() call:
https://ibb.co/0c1J25d
WREN packed with op:
https://ibb.co/7G1hLkj
I´m using ftdi-2232H chip. That´s why I put it at this place.
If anyone has a good overview about all programmers:
This could be implemented in spi_write_cmd() in case that it is compatible to all programmers
or this principle could be transfered to other programmers which act in a similar way.
Signed-off-by: Simon Buhrow <simon.buhrow(a)posteo.de>
Change-Id: Ie4a07499ec5ef0af23818593f45dc427285a9e8a
---
M ft2232_spi.c
1 file changed, 18 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/77/40477/7
--
To view, visit https://review.coreboot.org/c/flashrom/+/40477
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ie4a07499ec5ef0af23818593f45dc427285a9e8a
Gerrit-Change-Number: 40477
Gerrit-PatchSet: 7
Gerrit-Owner: Simon Buhrow
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: newpatchset