Hello David Hendricks, Paul Menzel, build bot (Jenkins), Nico Huber,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/23057
to look at the new patch set (#6).
Change subject: buspirate_spi: Add support for variable serial speeds
......................................................................
buspirate_spi: Add support for variable serial speeds
This patch sets the default baud rate for communication between
the host device and the Bus Pirate for hardware versions 3.0
and greater to 2M baud.
It also introduces the ability to manually set the baud rate via
the added 'serialspeed' programmer parameter.
This is done in two parts. Firstly, the requested serial speed is looked up
in a table to determine the appropriate clock divisor and the divisor is sent
to the bus pirate. Then, the system's baud rate for the selected serial port
is set using serial.c's 'serialport_config'. This function's prototype had to
be added to programmer.h.
In testing, using the 2M baud rate was able to significantly decrease
flash times (down from 20+ minutes to less than 2 minutes for an 8MB flash).
Change-Id: I3706f17a94fdf056063f2ad4a5f0a219665cdcbf
Signed-off-by: Shawn Anastasio <shawnanastasio(a)yahoo.com>
---
M buspirate_spi.c
M flashrom.8.tmpl
M programmer.h
3 files changed, 134 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/57/23057/6
--
To view, visit https://review.coreboot.org/23057
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3706f17a94fdf056063f2ad4a5f0a219665cdcbf
Gerrit-Change-Number: 23057
Gerrit-PatchSet: 6
Gerrit-Owner: Shawn Anastasio <shawnanastasio(a)yahoo.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Shawn Anastasio <shawnanastasio(a)yahoo.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Hello David Hendricks, Paul Menzel, build bot (Jenkins), Nico Huber,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/23057
to look at the new patch set (#5).
Change subject: buspirate_spi: Add support for variable serial speeds
......................................................................
buspirate_spi: Add support for variable serial speeds
This patch sets the default baud rate for communication between
the host device and the Bus Pirate for hardware versions 3.0
and greater to 2M baud.
It also introduces the ability to manually set the baud rate via
the added 'serialspeed' programmer parameter.
This is done in two parts. Firstly, the requested serial speed is looked up
in a table to determine the appropriate clock divisor and the divisor is sent
to the bus pirate. Then, the system's baud rate for the selected serial port
is set using serial.c's 'serialport_config'. This function's prototype had to
be added to programmer.h.
In testing, using the 2M baud rate was able to significantly decrease
flash times (down from 20+ minutes to less than 2 minutes for an 8MB flash).
Change-Id: I3706f17a94fdf056063f2ad4a5f0a219665cdcbf
Signed-off-by: Shawn Anastasio <shawnanastasio(a)yahoo.com>
---
M buspirate_spi.c
M flashrom.8.tmpl
M programmer.h
3 files changed, 136 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/57/23057/5
--
To view, visit https://review.coreboot.org/23057
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3706f17a94fdf056063f2ad4a5f0a219665cdcbf
Gerrit-Change-Number: 23057
Gerrit-PatchSet: 5
Gerrit-Owner: Shawn Anastasio <shawnanastasio(a)yahoo.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Shawn Anastasio <shawnanastasio(a)yahoo.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Shawn Anastasio has posted comments on this change. ( https://review.coreboot.org/23057 )
Change subject: buspirate_spi: Add support for variable serial speeds
......................................................................
Patch Set 4:
(4 comments)
https://review.coreboot.org/#/c/23057/4/buspirate_spi.c
File buspirate_spi.c:
https://review.coreboot.org/#/c/23057/4/buspirate_spi.c@452
PS4, Line 452: /* Ignore requests to set the serial speed to the default value */
> What about keeping the default? e.g. […]
In the case of a v3 with serialspeed=115200, the intended behavior would occur, but the warning will still be printed.
I think I'll just remove the warning entirely.
https://review.coreboot.org/#/c/23057/4/buspirate_spi.c@453
PS4, Line 453: msg_pdbg("Ignoring request to set serial speed to default value of %d\n", BP_DEFAULTBAUD);
> Line is too long (even for flashrom's 112 char limit).
Will fix.
https://review.coreboot.org/#/c/23057/4/buspirate_spi.c@456
PS4, Line 456: msg_pwarn("Bus Pirate hardware version older than 3.0 may not support increased serial speeds."
> Line is too long, and it looks like the output wouldn't fit a […]
I'll fix that.
You raise a fair point about code that may go unused, but in this case since the added code is a single print statement, I don't think the potential for project-damaging behavior is significant.
https://review.coreboot.org/#/c/23057/4/buspirate_spi.c@497
PS4, Line 497: msg_pdbg("Serial speed is %d baud\n", serialspeeds[serialspeed_index].speed);
> Move into the if body above, serialspeed_index may be off. […]
Good catch, I'll fix that.
As for the visibility, do you mean I should change the log level (use msg_pinfo)? I chose msg_pdbg because a similar statement above which prints out the SPI speed also uses it.
--
To view, visit https://review.coreboot.org/23057
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3706f17a94fdf056063f2ad4a5f0a219665cdcbf
Gerrit-Change-Number: 23057
Gerrit-PatchSet: 4
Gerrit-Owner: Shawn Anastasio <shawnanastasio(a)yahoo.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Shawn Anastasio <shawnanastasio(a)yahoo.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 16 Jan 2018 21:36:58 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
Nico Huber has posted comments on this change. ( https://review.coreboot.org/23057 )
Change subject: buspirate_spi: Add support for variable serial speeds
......................................................................
Patch Set 4:
(5 comments)
https://review.coreboot.org/#/c/23057/4/buspirate_spi.c
File buspirate_spi.c:
https://review.coreboot.org/#/c/23057/4/buspirate_spi.c@41
PS4, Line 41: };
Nit, this is now the same struct as buspirate_spispeeds. You
could unite them, e.g. as `struct buspirate_speed`.
https://review.coreboot.org/#/c/23057/4/buspirate_spi.c@452
PS4, Line 452: /* Ignore requests to set the serial speed to the default value */
What about keeping the default? e.g. using 115200 with v3+?
https://review.coreboot.org/#/c/23057/4/buspirate_spi.c@453
PS4, Line 453: msg_pdbg("Ignoring request to set serial speed to default value of %d\n", BP_DEFAULTBAUD);
Line is too long (even for flashrom's 112 char limit).
https://review.coreboot.org/#/c/23057/4/buspirate_spi.c@456
PS4, Line 456: msg_pwarn("Bus Pirate hardware version older than 3.0 may not support increased serial speeds."
Line is too long, and it looks like the output wouldn't fit a
80x25 terminal line either and missing space after the full-stop.
Btw. this is exactly why I don't like to add code that we don't
know if anybody will ever run it: People don't test the code
paths, nobody cares if they are correct... it usually means that
a project drags around dead, sometimes broken code.
https://review.coreboot.org/#/c/23057/4/buspirate_spi.c@497
PS4, Line 497: msg_pdbg("Serial speed is %d baud\n", serialspeeds[serialspeed_index].speed);
Move into the if body above, serialspeed_index may be off.
I would also make the message visible by default.
--
To view, visit https://review.coreboot.org/23057
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3706f17a94fdf056063f2ad4a5f0a219665cdcbf
Gerrit-Change-Number: 23057
Gerrit-PatchSet: 4
Gerrit-Owner: Shawn Anastasio <shawnanastasio(a)yahoo.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Shawn Anastasio <shawnanastasio(a)yahoo.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 15 Jan 2018 13:19:51 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/23259 )
Change subject: [v4,2/6] ENE Embedded Debug Interface EDI and ENE KB9012 EC flashing support
......................................................................
Patch Set 2: Verified+1
Build Successful
https://qa.coreboot.org/job/flashrom-customrules/1032/ : SUCCESS
--
To view, visit https://review.coreboot.org/23259
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib8b2eb2feeef5c337d725d15ebf994a299897854
Gerrit-Change-Number: 23259
Gerrit-PatchSet: 2
Gerrit-Owner: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sun, 14 Jan 2018 22:18:42 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/23259
to look at the new patch set (#2).
Change subject: [v4,2/6] ENE Embedded Debug Interface EDI and ENE KB9012 EC flashing support
......................................................................
[v4,2/6] ENE Embedded Debug Interface EDI and ENE KB9012 EC flashing support
The ENE Embedded Debug Interface (EDI) is a SPI-based interface for
accessing the memory of ENE embedded controllers.
The ENE KB9012 EC is an embedded controller found on various laptops
such as the Lenovo G505s. It features a 8051 microcontroller and
has 128 KiB of internal storage for program data.
EDI can be accessed on the KB9012 through pins 59-62 (CS-CLK-MOSI-MISO)
when flash direct access is not in use. Some firmwares disable EDI at runtime
so it might be necessary to ground pin 42 to reset the 8051 microcontroller
before accessing the KB9012 via EDI.
The example of flashing KB9012 at Lenovo G505S laptop could be found here:
http://dangerousprototypes.com/docs/Flashing_KB9012_with_Bus_Pirate
Original patch has been created by Paul Kocialkowski, the previous version:
http://patchwork.coreboot.org/patch/4413/
Now it has been ported to the latest source code of flashrom master branch
Change-Id: Ib8b2eb2feeef5c337d725d15ebf994a299897854
Signed-off-by: Mike Banon <mikebdp2(a)gmail.com>
---
M Makefile
M chipdrivers.h
A edi.c
A edi.h
A ene.h
M flashchips.c
6 files changed, 608 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/59/23259/2
--
To view, visit https://review.coreboot.org/23259
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib8b2eb2feeef5c337d725d15ebf994a299897854
Gerrit-Change-Number: 23259
Gerrit-PatchSet: 2
Gerrit-Owner: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>