summaryrefslogtreecommitdiffstats
path: root/serprog.c
Commit message (Collapse)AuthorAgeFilesLines
* Split off programmer.h from flash.hCarl-Daniel Hailfinger2010-07-271-1/+2
| | | | | | | | | | | | | | | | | | | | | 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>
* Unify programmer parameter extractionCarl-Daniel Hailfinger2010-07-081-2/+2
| | | | | | | | | | | 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>
* Various places in the flashrom source feature custom parameter extraction ↵Carl-Daniel Hailfinger2010-07-061-32/+69
| | | | | | | | | | | | | | | | | | | | from programmer_param 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>
* Polish the flashrom code comments and outputs a bitUwe Hermann2010-03-251-4/+4
| | | | | | | | | | | - Fix a number of typos (found via ispell). - Use correct vendor names (as per their websites) consistently. Corresponding to flashrom svn r985. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Convert all messages in serprog.c to the new message infrastructureSean Nelson2010-01-101-58/+45
| | | | | | | | | Rename some msg_pdbg to msg_pspew. Corresponding to flashrom svn r853. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Move serial handling from serprog.c to serial.cCarl-Daniel Hailfinger2009-11-231-110/+0
| | | | | | | | | | | | | This is the first step in enabling platform independent serprog and it also allows other drivers to use serial port functionality without requiring serprog. Pure code move, no code changed. Corresponding to flashrom svn r771. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Bus Pirate support needs serial communicationCarl-Daniel Hailfinger2009-11-211-9/+5
| | | | | | | | | | | | Serprog already has such functionality, so it makes sense to share that. TODO: Factor out serial communication into a separate file, have that code be available even if serprog is not selected and make it portable (it is very Linux-centric right now). Corresponding to flashrom svn r768. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Fix some of the issues reported by LLVM/clang's scan-buildStefan Reinauer2009-09-161-1/+1
| | | | | | | | | Corresponding to flashrom svn r722. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> This commit fixes only some of the issues, those that were Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Fix strict aliasing in serprogCarl-Daniel Hailfinger2009-09-051-6/+5
| | | | | | | | | | Initialize the sockaddr,sockaddr_in union directly instead of running memset later. Corresponding to flashrom svn r715. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Allow to compile out serprog completelyCarl-Daniel Hailfinger2009-08-121-42/+0
| | | | | | | | | | | | | | | | If CONFIG_SERPROG is not set, no stubs and no data of serprog will remain. Side benefit: This kills a few dozen lines of code. r678, r679 and r680 made this possible. Once "Only list available programers in usage()" is committed, even the usage message will be adjusted automatically. Corresponding to flashrom svn r681. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Use a common parameter variable for all programmersCarl-Daniel Hailfinger2009-08-121-15/+14
| | | | | | | | | | This allows us to reduce #ifdef clauses a lot if we compile out some programmers completely. Corresponding to flashrom svn r679. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Remove unnecessary #include filesCarl-Daniel Hailfinger2009-08-091-2/+0
| | | | | | | | | | Serprog compilation is now controlled by a Makefile variable. Replace munmap with physunmap where appropriate. Corresponding to flashrom svn r671. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Support for an external serial flasher protocolUrja Rannikko2009-07-211-1/+739
| | | | | | | | | | | | | | Supports RS-232, USB serial converters (untested) and TCP streams. The protocol specification is in serprog-protocol.txt There will be tweaks to the code and maybe the protocol in the future, so the API is not set in stone yet. Corresponding to flashrom svn r656. Signed-off-by: Urja Rannikko <urjaman@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Initial commit of an external serial flasher protocolUrja Rannikko2009-06-231-0/+80
Supports RS-232, USB serial converters (untested) and TCP streams. All functionality is stubbed out to allow multiplatform compile testing of the headers we use. The real serial flasher protocol driver will be committed next. Corresponding to flashrom svn r625. Signed-off-by: Urja Rannikko <urjaman@gmail.com> 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>
OpenPOWER on IntegriCloud