mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-02 22:43:17 +02:00
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@yahoo.com> Reviewed-on: https://review.coreboot.org/23057 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:

committed by
Nico Huber

parent
25fde40f85
commit
2b5adfb1b6
@ -817,6 +817,18 @@ can be
|
||||
.BR 30k ", " 125k ", " 250k ", " 1M ", " 2M ", " 2.6M ", " 4M " or " 8M
|
||||
(in Hz). The default is the maximum frequency of 8 MHz.
|
||||
.sp
|
||||
The baud rate for communication between the host and the Bus Pirate can be specified with the optional
|
||||
.B serialspeed
|
||||
parameter. Syntax is
|
||||
.sp
|
||||
.B " flashrom -p buspirate_spi:serialspeed=baud
|
||||
.sp
|
||||
where
|
||||
.B baud
|
||||
can be
|
||||
.BR 115200 ", " 230400 ", " 250000 " or " 2000000 " (" 2M ")."
|
||||
The default is 2M baud for Bus Pirate hardware version 3.0 and greater, and 115200 otherwise.
|
||||
.sp
|
||||
An optional pullups parameter specifies the use of the Bus Pirate internal pull-up resistors. This may be
|
||||
needed if you are working with a flash ROM chip that you have physically removed from the board. Syntax is
|
||||
.sp
|
||||
|
Reference in New Issue
Block a user