Attention is currently required from: Angel Pons.
Peter Marheine has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/52405 )
Change subject: lspcon, realtek_mst: move i2c bus resolution from params to i2c_helper
......................................................................
Patch Set 6:
(3 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/52405/comment/ea63dc7a_12c132d1
PS4, Line 9: As with the lspcon_i2c_spi programmer
> I'd suggest looking into moving the I2C bus handling code to a common place, i2c_helper_linux. […]
Moving the code to i2c_helper suggests API changes too, so I've done it all in one change on top of the lspcon_i2c_spi change.
File realtek_mst_i2c_spi.c:
https://review.coreboot.org/c/flashrom/+/52405/comment/1261a6cf_08d9d540
PS4, Line 466: // free bus_str later.
> nit: For consistency with existing comments, I'd use C-style
Done
https://review.coreboot.org/c/flashrom/+/52405/comment/e6f5ece5_be3c5978
PS4, Line 536: // bus= and devpath= should be mutually exclusive, but defensively handle both here
> This would already be guaranteed by the `get_params` function. […]
Obviated by refactoring.
--
To view, visit https://review.coreboot.org/c/flashrom/+/52405
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ieea57b2445f3aca16c87d8f839dff131009531a0
Gerrit-Change-Number: 52405
Gerrit-PatchSet: 6
Gerrit-Owner: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Mon, 19 Apr 2021 00:59:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: comment
Attention is currently required from: Peter Marheine.
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/52405
to look at the new patch set (#6).
Change subject: lspcon, realtek_mst: move i2c bus resolution from params to i2c_helper
......................................................................
lspcon, realtek_mst: move i2c bus resolution from params to i2c_helper
The general pattern of taking either a bus number or device path should
apply to both of these programmers, so change the I2C API to provide a
common way to get the device path and reduce the duplication between
the two programmers.
TEST=Both programmers now accept either bus= or devpath=
Change-Id: Ieea57b2445f3aca16c87d8f839dff131009531a0
---
M i2c_helper.h
M i2c_helper_linux.c
M lspcon_i2c_spi.c
M realtek_mst_i2c_spi.c
4 files changed, 88 insertions(+), 128 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/05/52405/6
--
To view, visit https://review.coreboot.org/c/flashrom/+/52405
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ieea57b2445f3aca16c87d8f839dff131009531a0
Gerrit-Change-Number: 52405
Gerrit-PatchSet: 6
Gerrit-Owner: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: Peter Marheine.
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/52405
to look at the new patch set (#5).
Change subject: lspcon, realtek_mst: move i2c bus resolution from params to i2c_helper
......................................................................
lspcon, realtek_mst: move i2c bus resolution from params to i2c_helper
The general pattern of taking either a bus number or device path should
apply to both of these programmers, so change the I2C API to provide a
common way to get the device path and reduce the duplication between
the two programmers.
TEST=Both programmers now accept either bus= or devpath=
Change-Id: Ieea57b2445f3aca16c87d8f839dff131009531a0
---
M i2c_helper.h
M i2c_helper_linux.c
M lspcon_i2c_spi.c
M realtek_mst_i2c_spi.c
4 files changed, 88 insertions(+), 128 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/05/52405/5
--
To view, visit https://review.coreboot.org/c/flashrom/+/52405
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ieea57b2445f3aca16c87d8f839dff131009531a0
Gerrit-Change-Number: 52405
Gerrit-PatchSet: 5
Gerrit-Owner: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: Edward O'Callaghan, Angel Pons.
Peter Marheine has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/51967 )
Change subject: lspcon_i2c_spi: support a devpath option
......................................................................
Patch Set 4:
(1 comment)
Patchset:
PS4:
Rebased to resolve merge conflict with 75b4536085664c8e81882656dbed9e52558e61e4.
--
To view, visit https://review.coreboot.org/c/flashrom/+/51967
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id2adf8a307b9205ce5e5804a6c3e22f19d0c34c9
Gerrit-Change-Number: 51967
Gerrit-PatchSet: 4
Gerrit-Owner: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Daniel Campello <campello(a)chromium.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Sun, 18 Apr 2021 23:52:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Edward O'Callaghan, Peter Marheine.
Hello build bot (Jenkins), Edward O'Callaghan, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/51967
to look at the new patch set (#4).
Change subject: lspcon_i2c_spi: support a devpath option
......................................................................
lspcon_i2c_spi: support a devpath option
Some callers may find it easier to provide the path to an I2C device
at which to communicate with the device, rather than specify the bus
number- doing so might involve trying to parse a path to extract the
number only for flashrom to do the reverse, which is error-prone and
unnecessary.
This change adds support for a `devpath` option, continuing to
allow `bus` and requiring only one of them be specified.
TEST=Verified --flash-size outputs correct values with both
devpath=/dev/i2c-7 and bus=7, as well as noting that one is
required if neither is specified and only one may be specified
if both are given.
Signed-off-by: Peter Marheine <pmarheine(a)chromium.org>
Change-Id: Id2adf8a307b9205ce5e5804a6c3e22f19d0c34c9
---
M i2c_helper.h
M i2c_helper_linux.c
M lspcon_i2c_spi.c
3 files changed, 78 insertions(+), 50 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/67/51967/4
--
To view, visit https://review.coreboot.org/c/flashrom/+/51967
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id2adf8a307b9205ce5e5804a6c3e22f19d0c34c9
Gerrit-Change-Number: 51967
Gerrit-PatchSet: 4
Gerrit-Owner: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Daniel Campello <campello(a)chromium.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Peter Marheine <pmarheine(a)chromium.org>
Gerrit-MessageType: newpatchset
Nico Huber has submitted this change. ( https://review.coreboot.org/c/flashrom/+/52406 )
Change subject: ene_lpc.c: Move register_shutdown to the end of initialisation
......................................................................
ene_lpc.c: Move register_shutdown to the end of initialisation
A bit more details: since register_shutdown has moved a few lines
below, now ene_enter_flash_mode is called before the shutdown function
is registered. ene_enter_flash_mode can fail (at least in theory,
it has some return 1s), but its return value is not analyzed, so even if
it returns non-0, execution goes further and register_shutdown will
happen anyway.
It is a separate question whether the return value of
ene_enter_flash_mode needs to be analyzed or is it ok to ignore it,
but in this patch I plan to keep the same behaviour, and probably I
will get back to error handling later.
This unlocks API change which plans to move register_shutdown inside
register master API, see https://review.coreboot.org/c/flashrom/+/51761
TEST=builds
BUG=b:185191942
Change-Id: If89a758c91c77486adbac2779449bcd71ab8fc78
Signed-off-by: Anastasia Klimchuk <aklm(a)chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/52406
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Angel Pons <th3fanbus(a)gmail.com>
Reviewed-by: Nico Huber <nico.h(a)gmx.de>
---
M ene_lpc.c
1 file changed, 4 insertions(+), 5 deletions(-)
Approvals:
build bot (Jenkins): Verified
Nico Huber: Looks good to me, approved
Angel Pons: Looks good to me, approved
diff --git a/ene_lpc.c b/ene_lpc.c
index 993ef4d..1d045b8 100644
--- a/ene_lpc.c
+++ b/ene_lpc.c
@@ -559,16 +559,15 @@
* Compal - ec_command(0x41, 0xa1) returns 43 4f 4d 50 41 4c 9c
*/
+ ene_enter_flash_mode(ctx_data);
+
+ internal_buses_supported |= BUS_LPC;
+ spi_master_ene.data = ctx_data;
if (register_shutdown(ene_leave_flash_mode, ctx_data)) {
ret = 1;
goto ene_probe_spi_flash_exit;
}
-
- ene_enter_flash_mode(ctx_data);
-
- internal_buses_supported |= BUS_LPC;
- spi_master_ene.data = ctx_data;
register_spi_master(&spi_master_ene);
msg_pdbg("%s: successfully initialized ene\n", __func__);
--
To view, visit https://review.coreboot.org/c/flashrom/+/52406
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: If89a758c91c77486adbac2779449bcd71ab8fc78
Gerrit-Change-Number: 52406
Gerrit-PatchSet: 4
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Victor Ding <victording(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-CC: Sam McNally <sammc(a)google.com>
Gerrit-MessageType: merged
Attention is currently required from: Simon Buhrow, Alan Green, Edward O'Callaghan, Anastasia Klimchuk, Samir Ibradžić.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/40477 )
Change subject: ft2232_spi.c: Pack WREN and op in one ftdi_write_data() call
......................................................................
Patch Set 25:
(1 comment)
File ft2232_spi.c:
https://review.coreboot.org/c/flashrom/+/40477/comment/c39cfe7e_a4ce3711
PS25, Line 295: 9
> I counted 15 (lines 303, 309, 320, 328, 335). […]
I see 6 potential paths, due to the 3 if's but the second may end
the path prematurely with the `continue;`:
* false, false, false: 303, 335 (empty command, actually impossible due to the loop condition)
* false, false, true: 303, 328, 335 (read)
* false, true, *: 303, 320 (empty command with continuation, impossible due to the loop condition)
* true, false, false: 303, 309, 335 (write without continuation)
* true, false, true: 303, 309, 328, 335 (write+read)
* true, true, *: 303, 309, 320 (write with continuation)
Turns out there's actually only 4 paths :) The simple write+read wins
with 4 * 3 == 12 (assert CS#, write, read, de-assert CS#). Overhead
for any continuation would be accounted for in the next iteration.
Now that it's decoded (admittedly, it doesn't look like it), I think
it could get more obvious if the continuation check would be moved
after the regular CS# de-assertion. i.e.
assert cs#
if (write)
write command
if (read)
read command
de-assert cs#
if (!read && possible continuation)
continue
send_buf()
Simon, what do you think? That should make it clear that we always do
* assert - foo - de-assert,
* eventually either continue with the next iteration or call send_buf().
--
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: 25
Gerrit-Owner: Simon Buhrow
Gerrit-Reviewer: Alan Green <avg(a)google.com>
Gerrit-Reviewer: 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: Samir Ibradžić <sibradzic(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Simon Buhrow
Gerrit-Attention: Alan Green <avg(a)google.com>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Attention: Samir Ibradžić <sibradzic(a)gmail.com>
Gerrit-Comment-Date: Sun, 18 Apr 2021 23:06:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Sam McNally, Nico Huber, Stefan Reinauer, Edward O'Callaghan, Angel Pons, Arthur Heymans, Nikolai Artemiev.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/52425 )
Change subject: Revert "Makefile: Explicitly set '-std=c99'"
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
Patchset:
PS2:
My understanding is: if original commit breaks so many things then it needs to be reverted now. Fix can be done later, and especially if it requires lots of testing.
Sorry.
--
To view, visit https://review.coreboot.org/c/flashrom/+/52425
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I57b5125207de3fd156dface67cba605da893d6aa
Gerrit-Change-Number: 52425
Gerrit-PatchSet: 2
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Reviewer: Sam McNally <sammc(a)google.com>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Idwer Vollering <vidwer(a)gmail.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Sam McNally <sammc(a)google.com>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Attention: Nikolai Artemiev <nartemiev(a)google.com>
Gerrit-Comment-Date: Sun, 18 Apr 2021 22:45:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Victor Ding.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/52406 )
Change subject: ene_lpc.c: Move register_shutdown to the end of initialisation
......................................................................
Patch Set 3:
(1 comment)
Commit Message:
https://review.coreboot.org/c/flashrom/+/52406/comment/5df20484_8f8ee8db
PS1, Line 7: Moving
> Should be present tense "Move". Actually, "Move ... to" I guess.
Done.
This "ing" is haunting me for some reason :(
--
To view, visit https://review.coreboot.org/c/flashrom/+/52406
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: If89a758c91c77486adbac2779449bcd71ab8fc78
Gerrit-Change-Number: 52406
Gerrit-PatchSet: 3
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Victor Ding <victording(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-CC: Sam McNally <sammc(a)google.com>
Gerrit-Attention: Victor Ding <victording(a)google.com>
Gerrit-Comment-Date: Sun, 18 Apr 2021 22:27:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: comment
Attention is currently required from: Victor Ding, Anastasia Klimchuk.
Hello build bot (Jenkins), Nico Huber, Victor Ding, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/52406
to look at the new patch set (#2).
Change subject: ene_lpc.c: Move register_shutdown to the end of initialisation
......................................................................
ene_lpc.c: Move register_shutdown to the end of initialisation
A bit more details: since register_shutdown has moved a few lines
below, now ene_enter_flash_mode is called before the shutdown function
is registered. ene_enter_flash_mode can fail (at least in theory,
it has some return 1s), but its return value is not analyzed, so even if
it returns non-0, execution goes further and register_shutdown will
happen anyway.
It is a separate question whether the return value of
ene_enter_flash_mode needs to be analyzed or is it ok to ignore it,
but in this patch I plan to keep the same behaviour, and probably I
will get back to error handling later.
This unlocks API change which plans to move register_shutdown inside
register master API, see https://review.coreboot.org/c/flashrom/+/51761
TEST=builds
BUG=b:185191942
Change-Id: If89a758c91c77486adbac2779449bcd71ab8fc78
Signed-off-by: Anastasia Klimchuk <aklm(a)chromium.org>
---
M ene_lpc.c
1 file changed, 4 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/06/52406/2
--
To view, visit https://review.coreboot.org/c/flashrom/+/52406
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: If89a758c91c77486adbac2779449bcd71ab8fc78
Gerrit-Change-Number: 52406
Gerrit-PatchSet: 2
Gerrit-Owner: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Victor Ding <victording(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-CC: Sam McNally <sammc(a)google.com>
Gerrit-Attention: Victor Ding <victording(a)google.com>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: newpatchset