Add the ability to set Bus Pirate SPI speed via the command line

Example usage:
flashrom -p buspiratespi:spispeed=2.6MHz,dev=/dev/foo
flashrom -p buspiratespi:dev=/dev/foo,spispeed=2.6M

Refactor programmer option parsing (this allows cleanups in other
programmers as well).

Increase SPI read size from 8 to 12 bytes (current single-transaction
limit of the Bus Pirate raw SPI protocol).

Add Bus Pirate to the list of programmers supporting 4 byte RDID.

Add Bus Pirate syntax to the man page.

Tested-by: Sean Nelson <audiohacked@gmail.com>

Corresponding to flashrom svn r776.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
diff --git a/flashrom.8 b/flashrom.8
index 3986f75..011840c 100644
--- a/flashrom.8
+++ b/flashrom.8
@@ -152,6 +152,8 @@
 .sp
 .BR "* serprog" " (for flash ROMs attached to Urja's AVR programmer)"
 .sp
+.BR "* buspiratespi" " (for flash ROMs attached to a Bus Pirate)"
+.sp
 The dummy programmer has an optional parameter specifying the bus types it
 should support. For that you have to use the
 .B "flashrom -p dummy:type"
@@ -219,6 +221,16 @@
 instead. More information about serprog is available in serprog-protocol.txt in
 the source distribution.
 .sp
+The buspiratespi programmer has a required dev parameter specifying the Bus
+Pirate device node and an optional spispeed parameter specifying the frequency
+of the SPI bus. The parameter delimiter is a comma. Syntax is
+.B "flashrom -p buspiratespi:dev=/dev/device,spispeed=frequency"
+where
+.B frequency
+can be any of
+.B 30k 125k 250k 1M 2M 2.6M 4M 8M
+(in Hz).
+.sp
 Support for some programmers can be disabled at compile time.
 .B "flashrom -h"
 lists all supported programmers.