Attention is currently required from: Nico Huber, Edward O'Callaghan, Anastasia Klimchuk.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/54994 )
Change subject: mcp6x_spi.c: Refactor singleton states into reentrant pattern
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
File mcp6x_spi.c:
https://review.coreboot.org/c/flashrom/+/54994/comment/dc53e92c_faf2f831
PS1, Line 42: uint8_t mcp_gpiostate;
I'd rename the struct members to drop the `mcp6x` and `mcp` prefixes. Since this patch already touches the code, one might as well do it as part of this commit.
--
To view, visit https://review.coreboot.org/c/flashrom/+/54994
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ia02c1cb9d36fb7b15bb7e09b769d8969c08c2bd5
Gerrit-Change-Number: 54994
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Thu, 27 May 2021 10:24:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Angel Pons, Anastasia Klimchuk.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/54990 )
Change subject: bitbang: Extend register_spi_bitbang_master() API with spi data
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
File bitbang_spi.c:
https://review.coreboot.org/c/flashrom/+/54990/comment/5cff25e5_2a184792
PS1, Line 164: mst.data = data;
: register_spi_master(&mst, NULL);
I feel like the removal of `mst.data = data;` and instead passing data directly into register_spi_master() is itself a patch. small granted but none the less technically not within the scope of this patch.
--
To view, visit https://review.coreboot.org/c/flashrom/+/54990
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I13e83ae74dbc3a3e79c84d1463683d360ff47bc0
Gerrit-Change-Number: 54990
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Thu, 27 May 2021 10:19:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: David Bartley, Nico Huber.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/54968 )
Change subject: flashchips: add support for Winbond W25Q01JV
......................................................................
Patch Set 1:
(6 comments)
File flashchips.c:
https://review.coreboot.org/c/flashrom/+/54968/comment/e9563905_4d8bc47c
PS1, Line 17745: W25Q501V
Flash chip entries are sorted alphabetically by vendor and name. This one should be placed between `W25P80` and `W25Q128.V`.
https://review.coreboot.org/c/flashrom/+/54968/comment/df90eb13_fb1880d9
PS1, Line 17745: 5
The `5` seems spurious?
https://review.coreboot.org/c/flashrom/+/54968/comment/c8b5bb4b_ce6abeb1
PS1, Line 17757: /* Full chip erase is fastest, typically takes 200s */
Block erasers for the other flash chip entries are intentionally sorted in ascending block size. Please keep this ordering.
# Context
When writing, flashrom first reads the old flash chip contents and only erases/writes the blocks which have changed. This significantly reduces flashing time when only a part of the data needs to be rewritten. This behavior is also useful when using a layout file to only rewrite specific sections of the flash chip.
However, flashrom currently always uses the first block eraser, and only falls back to the other block erasers if there's an error. Dynamically choosing the best block erasers for each case would be great to have, but someone needs to implement it. Patches are welcome!
https://review.coreboot.org/c/flashrom/+/54968/comment/9aa66627_05ce4e8c
PS1, Line 17781: spi_prettyprint_status_register_plain
spi_prettyprint_status_register_bp3_srwd
https://review.coreboot.org/c/flashrom/+/54968/comment/bf58c60a_28a6a207
PS1, Line 17782: spi_disable_blockprotect
spi_disable_blockprotect_bp3_srwd
https://review.coreboot.org/c/flashrom/+/54968/comment/f6300f56_5c9ea10b
PS1, Line 17788:
nit: use only one blank line (there's two right now)
--
To view, visit https://review.coreboot.org/c/flashrom/+/54968
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: If369409419332070c1fed96ce0e96b7cfe42c169
Gerrit-Change-Number: 54968
Gerrit-PatchSet: 1
Gerrit-Owner: David Bartley <andareed(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: David Bartley <andareed(a)gmail.com>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Comment-Date: Thu, 27 May 2021 09:32:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/52958 )
Change subject: buspirate_spi.c: Refactor singleton states into reentrant pattern
......................................................................
Patch Set 3:
(2 comments)
File buspirate_spi.c:
https://review.coreboot.org/c/flashrom/+/52958/comment/21f643f3_6ce3fdfa
PS3, Line 58: unsigned char **bp_commbuf
> I'd just pass a pointer to `struct bp_spi_data`
I was considering the idea to pass a pointer to `struct bp_spi_data` into buspirate_commbuf_grow but it didn't look great [to me] in init function.
Init function is quite long, and I wanted to use local variables for bp_commbuf and bp_commbufsize in init function to minimize diffs and noise. But at the same time, buspirate_commbuf_grow is called twice in the middle of init function, and each of those calls can change the pointer and the size.
So, if I would need to pass data struct into buspirate_commbuf_grow, and also using local variables during init, that would mean:
assigning local values into data,
calling buspirate_commbuf_grow,
and then assigning updated values from data into local variables.
https://review.coreboot.org/c/flashrom/+/52958/comment/f8d568a4_c90df3f2
PS3, Line 221: unsigned char *const bp_commbuf = bp_data->bp_commbuf;
> I thought that buspirate_commbuf_grow can change the pointer, and I can have this local variable as […]
As I learned today from C standard, realloc can change the pointer. And because I want this to be a constant pointer, I only can define it after the call to buspirate_commbuf_grow (because it does realloc).
--
To view, visit https://review.coreboot.org/c/flashrom/+/52958
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I418bbfff15fb126b042fbc9be09dbf59f4d243b8
Gerrit-Change-Number: 52958
Gerrit-PatchSet: 3
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Thu, 27 May 2021 02:43:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Edward O'Callaghan <quasisec(a)chromium.org>
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment