Attention is currently required from: Alan Green, Xiang Wang, Paul Menzel.
Hello build bot (Jenkins), Xiang Wang, Paul Menzel, Edward O'Callaghan, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/49637
to look at the new patch set (#9).
Change subject: ft2232_spi.c: Generalize GPIOL pin control
......................................................................
ft2232_spi.c: Generalize GPIOL pin control
Adds a new arg "gpiol" to allow the four FT2232 GPIOL pins to be set to
any combination of high, low or high-impedance.
The existing arg "csgpiol", is intended to function as an additional
"cs" signal, allowing pins to be set high but not low. This patch
preserves the csgpiol arg for backward compatibility. In the event that
both arguments are specified, gpiol is used.
Signed-off-by: Alan Green <avg(a)google.com>
Change-Id: I1f2b3b968577e62e3c5b11bcdf4afe2de6eb84ab
---
M ft2232_spi.c
1 file changed, 43 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/37/49637/9
--
To view, visit https://review.coreboot.org/c/flashrom/+/49637
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I1f2b3b968577e62e3c5b11bcdf4afe2de6eb84ab
Gerrit-Change-Number: 49637
Gerrit-PatchSet: 9
Gerrit-Owner: Alan Green <avg(a)google.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Alan Green <avg(a)google.com>
Gerrit-Attention: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Attention: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: newpatchset
Attention is currently required from: Alan Green.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/49780 )
Change subject: ft2232_spi.c: Rename cs_bits to pinlvl
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://review.coreboot.org/c/flashrom/+/49780
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I53d1ccae8fa870f037b03762bec79fee1b7bad21
Gerrit-Change-Number: 49780
Gerrit-PatchSet: 2
Gerrit-Owner: Alan Green <avg(a)google.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Alan Green <avg(a)google.com>
Gerrit-Comment-Date: Wed, 20 Jan 2021 23:12:56 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Alan Green, Xiang Wang, Paul Menzel.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/49637 )
Change subject: ft2232_spi.c: Generalize GPIOL pin control
......................................................................
Patch Set 8: Code-Review+1
(4 comments)
File ft2232_spi.c:
https://review.coreboot.org/c/flashrom/+/49637/comment/d68939cb_21713728
PS5, Line 377: cs_bits
> I think you're suggesting a change of variable name from cs_bits to pinlvl, right? […]
Yes, thanks!
https://review.coreboot.org/c/flashrom/+/49637/comment/845cdc90_9451d3ea
PS5, Line 381:
> Good point. […]
SGTM
File ft2232_spi.c:
https://review.coreboot.org/c/flashrom/+/49637/comment/d529b564_13ef4746
PS8, Line 396: "Valid values are 4 character strings of H, L, Z "
: "and X.\n"
Please don't break user-visible strings. They can be as long as necessary.
https://review.coreboot.org/c/flashrom/+/49637/comment/2215c79d_4fe43a52
PS8, Line 402: "Example: gpiol=LZXH drives GPIOL 0 low, and GPIOL 3 "
: "high, sets GPIOL 1\n"
: "to an input and leaves GPIOL 2 in the default "
: "state\n", arg);
Ditto
--
To view, visit https://review.coreboot.org/c/flashrom/+/49637
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I1f2b3b968577e62e3c5b11bcdf4afe2de6eb84ab
Gerrit-Change-Number: 49637
Gerrit-PatchSet: 8
Gerrit-Owner: Alan Green <avg(a)google.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Alan Green <avg(a)google.com>
Gerrit-Attention: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Attention: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Wed, 20 Jan 2021 23:01:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Alan Green <avg(a)google.com>
Comment-In-Reply-To: Xiang Wang <merle(a)hardenedlinux.org>
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: comment
Attention is currently required from: Angel Pons.
Alan Green has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/49780 )
Change subject: ft2232_spi.c: Rename cs_bits to pinlvl
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
Hi Angel: you suggested this rename.
--
To view, visit https://review.coreboot.org/c/flashrom/+/49780
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I53d1ccae8fa870f037b03762bec79fee1b7bad21
Gerrit-Change-Number: 49780
Gerrit-PatchSet: 2
Gerrit-Owner: Alan Green <avg(a)google.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Wed, 20 Jan 2021 22:59:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Xiang Wang, Paul Menzel, Angel Pons.
Alan Green has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/49637 )
Change subject: ft2232_spi.c: Generalize GPIOL pin control
......................................................................
Patch Set 6:
(4 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/49637/comment/441f8f4b_3ffc4bac
PS5, Line 7: Generalized GPIOL pin control
> Please make it a statement, e.g.: […]
Done
File ft2232_spi.c:
https://review.coreboot.org/c/flashrom/+/49637/comment/845bfa2f_b10eaf5b
PS5, Line 377: cs_bits
> pinlvl ?
I think you're suggesting a change of variable name from cs_bits to pinlvl, right?
SGTM. It will touch many lines, so I'll do it in a separate change.
https://review.coreboot.org/c/flashrom/+/49637/comment/a226563a_df14d903
PS5, Line 381:
> This would allow overriding the settings for some programmers
Good point.
I made a fourth value 'Z' to indicate overriding a programmer default and force a pin to be an input.
https://review.coreboot.org/c/flashrom/+/49637/comment/1cbf176c_c710c85d
PS5, Line 384:
> Using the default value can work, but it is recommended to add the following code to make the meanin […]
Thanks. I made this the 'Z' case, while allowing 'X' to mean 'accept the programmer default'.
--
To view, visit https://review.coreboot.org/c/flashrom/+/49637
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I1f2b3b968577e62e3c5b11bcdf4afe2de6eb84ab
Gerrit-Change-Number: 49637
Gerrit-PatchSet: 6
Gerrit-Owner: Alan Green <avg(a)google.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Attention: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Wed, 20 Jan 2021 22:47:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Xiang Wang <merle(a)hardenedlinux.org>
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: comment
Attention is currently required from: Alan Green, Xiang Wang, Paul Menzel.
Hello build bot (Jenkins), Xiang Wang, Paul Menzel, Edward O'Callaghan, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/49637
to look at the new patch set (#7).
Change subject: ft2232_spi.c: Generalize GPIOL pin control
......................................................................
ft2232_spi.c: Generalize GPIOL pin control
Adds a new arg "gpiol" to allow the four FT2232 GPIOL pins to be set to
any combination of high, low or high-impedance.
The existing arg "csgpiol", is intended to function as an additional
"cs" signal, allowing pins to be set high but not low. This patch
preserves the csgpiol arg for backward compatibility. In the event that
both arguments are specified, gpiol is used.
Signed-off-by: Alan Green <avg(a)google.com>
Change-Id: I1f2b3b968577e62e3c5b11bcdf4afe2de6eb84ab
---
M ft2232_spi.c
1 file changed, 46 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/37/49637/7
--
To view, visit https://review.coreboot.org/c/flashrom/+/49637
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I1f2b3b968577e62e3c5b11bcdf4afe2de6eb84ab
Gerrit-Change-Number: 49637
Gerrit-PatchSet: 7
Gerrit-Owner: Alan Green <avg(a)google.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Alan Green <avg(a)google.com>
Gerrit-Attention: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Attention: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: newpatchset
Attention is currently required from: Alan Green, Xiang Wang, Paul Menzel.
Hello build bot (Jenkins), Xiang Wang, Paul Menzel, Edward O'Callaghan, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/49637
to look at the new patch set (#6).
Change subject: ft2232_spi.c: Generalize GPIOL pin control
......................................................................
ft2232_spi.c: Generalize GPIOL pin control
Adds a new arg "gpiol" to allow the four FT2232 GPIOL pins to be set to
any combination of high, low or high-impedance.
The existing arg "csgpiol", is intended to function as an additional
"cs" signal, allowing pins to be set high but not low. This patch
preserves the csgpiol arg for backward compatibility. In the event that
both arguments are specified, gpiol is used.
Signed-off-by: Alan Green <avg(a)google.com>
Change-Id: I1f2b3b968577e62e3c5b11bcdf4afe2de6eb84ab
---
M ft2232_spi.c
1 file changed, 38 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/37/49637/6
--
To view, visit https://review.coreboot.org/c/flashrom/+/49637
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I1f2b3b968577e62e3c5b11bcdf4afe2de6eb84ab
Gerrit-Change-Number: 49637
Gerrit-PatchSet: 6
Gerrit-Owner: Alan Green <avg(a)google.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Alan Green <avg(a)google.com>
Gerrit-Attention: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Attention: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: newpatchset
Attention is currently required from: Xiang Wang, Stefan Reinauer.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/49741 )
Change subject: helpers.c: Fix undefined behavior in strndup()
......................................................................
Patch Set 2:
(1 comment)
Commit Message:
https://review.coreboot.org/c/flashrom/+/49741/comment/72da94ff_27eaa553
PS1, Line 7: helpers.c: optimize strndup
> Thanks a bunch for the rewrite Angel, I couldn't understand the initial msg either and was going to […]
About adding a unit-test for this function: Maybe, but it is only used for MinGW. Moreover, I doubt unit-tests can catch undefined behavior. I don't mind if someone writes a unit-test for it, but I think there's better candidates for unit-testing.
--
To view, visit https://review.coreboot.org/c/flashrom/+/49741
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id34127024085879228626fbad59af03268ec5255
Gerrit-Change-Number: 49741
Gerrit-PatchSet: 2
Gerrit-Owner: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-CC: Shawn C <citypw(a)hardenedlinux.org>
Gerrit-Attention: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Comment-Date: Wed, 20 Jan 2021 15:19:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Xiang Wang <merle(a)hardenedlinux.org>
Comment-In-Reply-To: Edward O'Callaghan <quasisec(a)chromium.org>
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: comment
Attention is currently required from: Xiang Wang, Stefan Reinauer.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/49741 )
Change subject: helpers.c: Fix undefined behavior in strndup()
......................................................................
Patch Set 2: Code-Review+2
(1 comment)
Commit Message:
https://review.coreboot.org/c/flashrom/+/49741/comment/4b69cc63_bde38df3
PS1, Line 7: helpers.c: optimize strndup
> really thankful
Thanks a bunch for the rewrite Angel, I couldn't understand the initial msg either and was going to come back with a comment on some questions. However your feedback was super constructive! Thanks Xiang Wang for all these patches!
What do you think about adding a unit-test for this kind of stuff?
--
To view, visit https://review.coreboot.org/c/flashrom/+/49741
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id34127024085879228626fbad59af03268ec5255
Gerrit-Change-Number: 49741
Gerrit-PatchSet: 2
Gerrit-Owner: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-CC: Shawn C <citypw(a)hardenedlinux.org>
Gerrit-Attention: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-Attention: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Comment-Date: Wed, 20 Jan 2021 15:04:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Xiang Wang <merle(a)hardenedlinux.org>
Comment-In-Reply-To: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: comment