diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2012-08-17 17:30:43 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2012-08-17 17:30:43 +0000 |
commit | a16a892ca462b6034fd513bb92245ad827b2945f (patch) | |
tree | 0f623d6207b8dd60a1b1bc939db0a431b7a4d0af /ogp_spi.c | |
parent | a8da224c63fd9e41d87e57f72050c0e23a285d86 (diff) | |
download | flashrom-a16a892ca462b6034fd513bb92245ad827b2945f.tar.gz flashrom-a16a892ca462b6034fd513bb92245ad827b2945f.tar.bz2 flashrom-a16a892ca462b6034fd513bb92245ad827b2945f.zip |
Bus Pirate init cleanup and fixes
The Bus Pirate firmware (at least v6.1 and earlier) can't handle UART
input buffer overflow in BBIO mode, and sending a sequence of 0x00 too
fast apparently triggers such an UART input buffer overflow. Wait 10 ms
after sending each 0x00 byte during init to give the Bus Pirate enough
time to handle the input. This fixes a Bus Pirate hang if the previous
flashrom run was aborted by the user.
The Bus Pirate firmware v6.1 and earlier use the wrong (too slow) SPI
speed if more than 2 MHz are requested. Automatically downgrade SPI
speed to 2 MHz for affected firmware versions.
Detect Bus Pirate hardware and firmware versions to allow quirk
handling.
The Bus Pirate init sequence has lots of open-coded sequences which wait
for a given string on the serial line. Refactor them into
buspirate_wait_for_string().
Corresponding to flashrom svn r1576.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'ogp_spi.c')
0 files changed, 0 insertions, 0 deletions