- 15 Jun, 2012 1 commit
-
-
Nico Huber authored
Currently spi_aai_write() is implemented without an abstraction mechanism for the programmer driver. This adds another function pointer 'write_aai' to struct spi_programmer, which is set to default_spi_write_aai (renamed spi_aai_write) for all programmers for now. A patch which utilises this abstraction in the dediprog driver will follow. Corresponding to flashrom svn r1543. Signed-off-by:
Nico Huber <nico.huber@secunet.com> Acked-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-
- 14 Jun, 2012 1 commit
-
-
Ilya A. Volynets-Evenbakh authored
The patch that should have improved the clock divisor setting in r1537 made it much worse: the divisor used was from an uninitialized buffer. Corresponding to flashrom svn r1542. Signed-off-by:
Ilya A. Volynets-Evenbakh <ilya@total-knowledge.com> Acked-by:
Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
-
- 15 May, 2012 1 commit
-
-
Samir Ibradžić authored
This adds an optional argument when using the ft2232_spi programmer to set the frequency divisor. The valid values for the divisor is any even integer between 2 and 131072. Corresponding to flashrom svn r1537. Signed-off-by:
Samir Ibradžić <sibradzic@gmail.com> Signed-off-by:
Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by:
Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
-
- 20 Dec, 2011 1 commit
-
-
Paul Fertser authored
These devices have an additional output buffer which is activated only by pulling ADBUS4 low. This patch was real-life tested with arm-usb-ocd; arm-usb-ocd-h should be the same (as it shares the same documentation). Corresponding to flashrom svn r1478. Signed-off-by:
Paul Fertser <fercerpav@gmail.com> Acked-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-
- 18 Dec, 2011 1 commit
-
-
Carl-Daniel Hailfinger authored
All programmer access function prototypes except init have been made static and moved to the respective file. A few internal functions in flash chip drivers had chipaddr parameters which are no longer needed. The lines touched by flashctx changes have been adjusted to 80 columns except in header files. Corresponding to flashrom svn r1474. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
-
- 20 Oct, 2011 1 commit
-
-
Samir Ibradžić authored
http://www.goepel.com/en/jtagboundary-scan/hardware/picotap.html This device is actually a JTAG adapter, but since it uses standard FT2232 A interface pins, it can be easily used as SPI programmer (tested it here successfully). PicoTAP supports only 5V output, so one needs to reduce this to 3.3V in a same manner as DLP Design DLP-USB1232H, see http://flashrom.org/FT2232SPI_Programmer#DLP_Design_DLP-USB1232H for details. The PicoTAP pin-out is as follows: PicoTAP | SPI ---------+------- TCK | SCLK TMS | CS# TDI | SO TDO | SI /TRST | - GND | GND +5V | VCC, HOLD# & WP# after 3.3V regulator I managed to run PicoTAP in 10MHz, 15MHz and 30MHz modes (by forcing DIVIDE_BY), against SST25VF016B SPI flash, read/write/erase all worked fine (write seems somewhat slow). Corresponding to flashrom svn r1453. Signed-off-by:
Samir Ibradžić <sibradzic@gmail.com> Acked-by:
Uwe Hermann <uwe@hermann-uwe.de>
-
- 14 Oct, 2011 1 commit
-
-
Uwe Hermann authored
Thanks to TIAO/DIYGADGET for sponsoring a test device! This is an FTDI FT2232H based device which provides an easily accessible JTAG, SPI, I2C, serial breakout. The SPI part can be used to flash SPI flash chips using flashrom. http://www.diygadget.com/tiao-usb-multi-protocol-adapter-jtag-spi-i2c-serial.html http://www.tiaowiki.com/w/TIAO_USB_Multi_Protocol_Adapter_User%27s_Manual#SPI_Connector_1 There are two SPI connectors (pin headers) on the board: SPI1, which is connected to the FT2232H's A interface, and SPI2, which is connected to the chip's B interface. Both can be used to flash SPI chips: flashrom -p ft2232_spi:type=tumpa,port=A flashrom -p ft2232_spi:type=tumpa,port=B The default interface is A, so for SPI1 you can also just write: flashrom -p ft2232_spi:type=tumpa I tested all operations on both interfaces, everything works fine. Corresponding to flashrom svn r1451. Signed-off-by:
Uwe Hermann <uwe@hermann-uwe.de> Acked-by:
Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
-
- 16 Aug, 2011 1 commit
-
-
Stefan Tauner authored
This is related to the spi split patch as discussed in: http://www.flashrom.org/pipermail/flashrom/2010-February/thread.html#2364 the old commit (r914) log notes: "Some of the spi programmer drivers required chipdrivers.h, needs fixing later: it87spi.c ichspi.c sb600spi.c wbsio_spi.c buspirate_spi.c ft2232spi.c bitbang_spi.c dediprog.c" there still remain a few cases where chipdrivers.h is needed: dediprog.c (spi_read_chunked and spi_write_chunked) it87spi.c (due to spi_write_enable and spi_read_status_register) wbsio_spi.c (spi_programmer registration only) besides that, there are also non-spi files that do not need it. also, add flash.h to chipdrivers.h because it uses some types of it and remove flashchips.h from print.c Corresponding to flashrom svn r1414. Signed-off-by:
Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by:
Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
-
- 15 Aug, 2011 1 commit
-
-
Carl-Daniel Hailfinger authored
- Mixing uninitialized and initialized local variables leads to confusion. - ft2232_spi error cases should have gotten some error handling, and that's the reason the curly braces were there. - Fixing typos/wording in some places would have been nice given that those places were touched anyway. Corresponding to flashrom svn r1413. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
-
- 12 Aug, 2011 1 commit
-
-
Steve Markgraf authored
Add support for the Dangerous Prototypes Bus Blaster (v1/v2). The new model is called "busblaster". So far only v2 has been tested, but since both v1 and v2 emulate a Amontec JTAGKEY in the default configuration, it is assumed that v1 should work fine as well. Information about the Busblaster can be found at: http://dangerousprototypes.com/docs/Bus_Blaster Corresponding to flashrom svn r1412. Signed-off-by:
Steve Markgraf <steve@steve-m.de> Acked-by:
Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
-
- 28 Jul, 2011 1 commit
-
-
Uwe Hermann authored
Also, indentation fixes, e.g. due to conversion to msg_*, use ARRAY_SIZE where possible, wrap overly long line, etc. Compile-tested. There should be no functional changes. Corresponding to flashrom svn r1397. Signed-off-by:
Uwe Hermann <uwe@hermann-uwe.de> Acked-by:
Uwe Hermann <uwe@hermann-uwe.de>
-
- 21 Jul, 2011 1 commit
-
-
Uwe Hermann authored
In order to make the ft2232_spi code more usable in libflashrom (e.g. from frontends/GUIs) there must not be any exit() calls in the code, as that would also terminate the frontend. Thus, replace all exit() calls with proper error handling code by returning a _unique_ negative error number, so that the frontend (and/or user/developer) can also know a bit more exactly _which_ error occured, not only _that_ an error occured. Also, call ftdi_usb_close() before returning due to errors. Corresponding to flashrom svn r1377. Signed-off-by:
Uwe Hermann <uwe@hermann-uwe.de> Acked-by:
Tadas Slotkus <devtadas@gmail.com>
-
- 11 Jun, 2011 1 commit
-
-
Pete Batard authored
- add support for Olimex' ARM-USB-TINY, ARM-USB-TINY-H, ARM-USB-OCD AND ARM-USB-OCD-H and adjust man page - minor string change ("First International Computer, Inc." -> "FIC") Corresponding to flashrom svn r1331. Signed-off-by:
Pete Batard <pbatard@gmail.com> Acked-by:
Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
-
- 11 May, 2011 2 commits
-
-
Michael Karcher authored
Remove the array spi_programmer, replace it by dynamic registration instead. Also initially start with no busses supported, and switch to the default non-SPI only for the internal programmer. Also this patch changes the initialization for the buses_supported variable from "everything-except-SPI" to "nothing". All programmers have to set the bus type on their own, and this enables register_spi_programmer to just add the SPI both for on-board SPI interfaces (where the internal programmer already detected the other bus types), as well as for external programmers (where we have the default "none"). Corresponding to flashrom svn r1299. Signed-off-by:
Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> Acked-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-
Michael Karcher authored
Corresponding to flashrom svn r1298. Signed-off-by:
Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> Acked-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-
- 10 Nov, 2010 4 commits
-
-
Alex Badea authored
Add support for the OpenMoko Neo1973/Neo FreeRunner debug board version 2 or 3 (vid:pid 1457:5118). The new type is called "openmoko". Information about the debug board can be found at http://wiki.openmoko.org/wiki/Debug_Board_v3 Corresponding to flashrom svn r1231. Signed-off-by:
Alex Badea <vamposdecampos@gmail.com> Acked-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-
Alex Badea authored
ft2232_spi ftdi_usb_open() is called with the constant FTDI_VID vendor ID. Fix it by using the programmer-type-dependent ft2232_vid variable, to allow programmers with other vendor IDs. Corresponding to flashrom svn r1230. Signed-off-by:
Alex Badea <vamposdecampos@gmail.com> Acked-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-
Alex Badea authored
Check at init time whether the chip is a type 'H' (FT2232H or FT4232H). If not, omit the disable-divide-by-5 (0x8a) command which can confuse older chips. Corresponding to flashrom svn r1229. Signed-off-by:
Alex Badea <vamposdecampos@gmail.com> Acked-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-
Alex Badea authored
It is possible that ftdi_read_data() returns less data than requested. Catch this case and retry reading the rest of the buffer. Corresponding to flashrom svn r1228. Signed-off-by:
Alex Badea <vamposdecampos@gmail.com> Acked-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-
- 08 Oct, 2010 1 commit
-
-
Carl-Daniel Hailfinger authored
CONFIG_BITBANG_SPI was not selected if CONFIG_NICINTEL_SPI was on by default. Wiki output was missing all flash chips if CONFIG_INTERNAL was not selected. Use correct type for toupper()/tolower()/isspace() functions. Specify software requirements in a generic way. Non-x86 compilation does not work with the default programmer set, so list the make parameters which result in a working build. Corresponding to flashrom svn r1203. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
-
- 06 Oct, 2010 2 commits
-
-
Carl-Daniel Hailfinger authored
Flashrom -L output did not contain a list of programmers nor were all programmers listed. Fix it and mention at least the name of each programmer. Wiki output is unchanged, and will need separate fixups. Corresponding to flashrom svn r1199. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Uwe Hermann <uwe@hermann-uwe.de>
-
Stefan Reinauer authored
Corresponding to flashrom svn r1196. Signed-off-by:
Stefan Reinauer <stepan@coresystems.de> Acked-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-
- 05 Oct, 2010 1 commit
-
-
Uwe Hermann authored
Not sure if this is the final/correct fix, but for now it definately fixes writes on FT2232H hardware. I have tested this on both, the DLP Design DLP-USB1232H, and the openbiosprog-spi hardware. Thanks to Joshua Roys <roysjosh@gmail.com> for the hint on IRC. Corresponding to flashrom svn r1190. Signed-off-by:
Uwe Hermann <uwe@hermann-uwe.de> Acked-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-
- 29 Jul, 2010 2 commits
-
-
Uwe Hermann authored
Various whitespace- and cosmetic fixes. Also, Use %04x:%04x for printing the USB IDs (which are 4 hex digits long), not %02x:%02x. Corresponding to flashrom svn r1123. Signed-off-by:
Uwe Hermann <uwe@hermann-uwe.de> Acked-by:
Uwe Hermann <uwe@hermann-uwe.de>
-
Jörg Fischer authored
Add support for the Amontec JTAGkey2, see http://www.amontec.com/jtagkey2.shtml http://www.amontec.com/jtagkey.shtml . This FTDI 2232H variant has an additional output enable, which will be set to its "on" (L) when CS is pulled low. But it lacks a power supply and you need an external 3.3V source. The attached patch adds "jtagkey" as "type" parameter for ft2232_spi. It should work with all JTAGkeys (JTAGkey, JTAGkey-tiny and JTAGkey2) but I only have a JTAGkey2 here for testing. Add all FT2232H/FT4232H based programmers to the list printed with flashrom -L Corresponding to flashrom svn r1119. Signed-off-by:
Jörg Fischer <turboj@gmx.de> Acked-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-
- 27 Jul, 2010 1 commit
-
-
Carl-Daniel Hailfinger authored
Programmer specific functions are of absolutely no interest to any file except those dealing with programmer specific actions (special SPI commands and the generic core). The new header structure is as follows (and yes, improvements are possible): flashchips.h flash chip IDs chipdrivers.h chip-specific read/write/... functions flash.h common header for all stuff that doesn't fit elsewhere hwaccess.h hardware access functions programmer.h programmer specific functions coreboot_tables.h header from coreboot, internal programmer only spi.h SPI command definitions Corresponding to flashrom svn r1112. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Uwe Hermann <uwe@hermann-uwe.de>
-
- 14 Jul, 2010 2 commits
-
-
Carl-Daniel Hailfinger authored
Actually check if the unlock worked instead of just assuming it worked. Corresponding to flashrom svn r1082. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
-
Carl-Daniel Hailfinger authored
However, wrap the write functions in a compat layer to allow converting the rest of flashrom later. Tested on Intel NM10 by David Hendricks. Corresponding to flashrom svn r1080. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
-
- 08 Jul, 2010 1 commit
-
-
Carl-Daniel Hailfinger authored
Make programmer_param static by converting all users to extract_programmer_param. Programmer parameters can no longer be separated with a colon, they have to be separated with a comma. Corresponding to flashrom svn r1072. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
-
- 06 Jul, 2010 1 commit
-
-
Carl-Daniel Hailfinger authored
This led to wildly differing syntax for programmer parameters, and it also voids pretty much every assumption you could make about programmer_param. The latter is a problem for libflashrom. Use extract_param everywhere, clean up related code and make it more foolproof. Add two instances of exit(1) where we have no option to return an error. Remove six instances of exit(1) where returning an error was possible. WARNING: This changes programmer parameter syntax for a few programmers! Corresponding to flashrom svn r1070. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
-
- 03 Jul, 2010 1 commit
-
-
Carl-Daniel Hailfinger authored
Constify variables where possible. Initialize programmer-related variables explicitly in programmer_init to allow running programmer_init from a clean state after programmer_shutdown. Prohibit registering programmer shutdown functions before init or after shutdown. Kill some dead code. Rename global variables with namespace-polluting names. Use a previously unused locking helper function in sst49lfxxxc.c. This is needed for libflashrom. Effects on the binary size of flashrom are minimal (300 bytes shrinkage), but the data section shrinks by 4384 bytes, and that's a good thing if flashrom is operating in constrained envionments. Corresponding to flashrom svn r1068. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
-
- 31 May, 2010 1 commit
-
-
Carl-Daniel Hailfinger authored
CONFIG_FT2232SPI (makefile config option) FT2232_SPI_SUPPORT (#define) ft2232spi (programmer name) ft2232_spi.c (programmer file) Use CONFIG_* with underscores for makefile config options and #defines and kill the useless _SUPPORT idiom. Use lowercase names with underscores for programmer names and programmer files. With this, you can run "grep -i ft2232_spi" and find everything related to the ft2232_spi driver. Same applies to all other programmers. Corresponding to flashrom svn r1023. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Uwe Hermann <uwe@hermann-uwe.de>
-
- 21 May, 2010 1 commit
-
-
Carl-Daniel Hailfinger authored
Every SPI programmer driver had its own completely different chip write implementation, and all of them were insufficiently commented. Create spi_write_chunked as a copy of spi_read_chunked and convert all SPI programmers to use it. No functional changes except: - Bus Pirate uses 12 Byte writes instead of 8 Byte writes - SB600 uses 5 Byte writes instead of 1 Byte writes Corresponding to flashrom svn r1005. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> Acked-by:
David Hendricks <dhendrix@google.com>
-
- 26 Feb, 2010 1 commit
-
-
Sean Nelson authored
Some of the spi programmer drivers required chipdrivers.h, needs fixing later: it87spi.c ichspi.c sb600spi.c wbsio_spi.c buspirate_spi.c ft2232spi.c bitbang_spi.c dediprog.c Corresponding to flashrom svn r914. Signed-off-by:
Sean Nelson <audiohacked@gmail.com> Acked-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-
- 10 Jan, 2010 1 commit
-
-
Sean Nelson authored
Fix one pinfo message to be pdbg. Corresponding to flashrom svn r854. Signed-off-by:
Sean Nelson <audiohacked@gmail.com> Acked-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-
- 07 Jan, 2010 1 commit
-
-
Carl-Daniel Hailfinger authored
Programmer debug messages during programmer init/shutdown are useful because they print hardware settings and desired configuration. They help in getting a quick overview of hardware and software state on startup and shutdown. Programmer debug messages during flash chip access are mostly a distraction in logs and should only be enabled if someone is having problems which are suspected to stem from a programmer hardware or programmer software bug. Disable those messages by default, they can be reenabled by #define COMM_DEBUG in the affected programmer file. An added benefit is a tremendous size reduction in verbose probe/read/write/erase logs because only flash chip driver messages remain. In some cases, logs will shrink from 65 MB to 10 kB or less. The right(tm) fix would be two different debug levels (DEBUG and SPEW) and the ability to differentiate between programmer debug messages and flash chip debug messages. Until the design for the message printing infrastructure is finished, this is the best stop-gap measure we can get. Corresponding to flashrom svn r834. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Sean Nelson <audioahcked@gmail.com>
-
- 25 Nov, 2009 1 commit
-
-
Carl-Daniel Hailfinger authored
FT2232 ran realloc() for every executed command. Start with a big enough buffer and don't touch buffer size unless it needs to grow. Bitbang was slightly better: It only ran realloc() if buffer size changed. Still, the solution above improves performance and reliability. Corresponding to flashrom svn r780. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Sean Nelson <audiohacked@gmail.com>
-
- 22 Nov, 2009 1 commit
-
-
Carl-Daniel Hailfinger authored
Pretty much everybody who used the FT2232 SPI driver had problems with incorrect reads from time to time. One reason was that the hardware is pretty timing sensitive even for reads. The other reason was that the code silently ignored errors. This patch doesn't add any error recovery, but it will emit error messages if FT2232 communication goes wrong. That allows us to track down errors without investing hours in driver debugging. Thanks to Jeremy Buseman <naviathan@gmail.com> for testing. He found out that certain libftdi/libusb/kernel/hardware combinations drop some bytes without returning any error codes. Corresponding to flashrom svn r769. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Paul Fox <pgf@laptop.org>
-
- 01 Oct, 2009 1 commit
-
-
Uwe Hermann authored
Also, introduce BITMODE_BITBANG_SPI to eliminate a magic value. Corresponding to flashrom svn r742. Signed-off-by:
Uwe Hermann <uwe@hermann-uwe.de> Acked-by:
Uwe Hermann <uwe@hermann-uwe.de>
-
- 16 Sep, 2009 1 commit
-
-
Stefan Reinauer authored
Corresponding to flashrom svn r723. Signed-off-by:
Stefan Reinauer <stepan@coresystems.de> Acked-by:
Ronald G. Minnich <rminnich@gmail.com>
-