summaryrefslogtreecommitdiffstats
path: root/jedec.c
Commit message (Collapse)AuthorAgeFilesLines
* Kill global variables, constants and functions if local scope sufficesCarl-Daniel Hailfinger2010-07-031-10/+10
| | | | | | | | | | | | | | | | | | | | | | | 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>
* Polish the flashrom code comments and outputs a bitUwe Hermann2010-03-251-1/+1
| | | | | | | | | | | - 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 chips' message printing to msg_c* Fixed suggestions by Carl-DanielSean Nelson2010-03-241-27/+27
| | | | | | | Corresponding to flashrom svn r982. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Split spi.c into programmer and chip code Remove chipdriver.h include from ↵Sean Nelson2010-02-261-0/+1
| | | | | | | | | | | | | | | | | | | flash.h 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>
* Complete the addition of Feature Bits for all Jedec based chipsSean Nelson2010-01-281-10/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add FEATURE_SHORT_RESET, FEATURE_LONG_RESET, and FEATURE_EITHER_RESET rewrite jedec functions to use getaddrmask convert write_49f002 to write_jedec_1 convert write_w39v040c to write_jedec_1 convert probe_w39v040c to probe_jedec convert write_49lf040 to write_jedec_1 convert write_pm29f002 to write_jedec convert write_29f040b to write_jedec_1 convert probe_29f040b to probe_jedec convert erase_chip_29f040b to erase_chip_block_jedec convert erase_sector_29f040b to erase_sector_jedec convert write_m29f002b to write_jedec convert write_m29f002t to write_jedec convert *_29f002 to *_jedec decouple unused files from Makefile: am29f040b.c en29f002a.c m29f002.c mx29f002.c pm29f002.c sst49lf040.c w39v040c.c w49f002u.c Corresponding to flashrom svn r886. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Anders Juel Jensen <andersjjensen@gmail.com>
* Use address mask in probe_jedecCarl-Daniel Hailfinger2010-01-091-1/+17
| | | | | | | | | | | | This allows us to have one common probe_jedec function instead of half a dozen wrappers. The trick here is to have FEATURE_ADDR_FULL==0 and thus default to unmasked addresses. That way, we only have to annotate chips which need small address masks. Corresponding to flashrom svn r840. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Sean Nelson <audiohacked@gmail.com>
* Use the register mapping feature bitCarl-Daniel Hailfinger2010-01-091-3/+3
| | | | | | | | | | | | | | | | | | | All functions which just call probe_jedec and then map flash registers are replaced by probe_jedec. All functions which call probe_jedec, map flash registers and do something else can at least eliminate mapping flash registers. Fix logic inversion in probe_jedec to map flash registers on success instead of on failure. Change a few TIMING_IGNORED to TIMING_FIXME where probe_jedec is used. Total savings: One probe function simplified, three probe functions eliminated. Corresponding to flashrom svn r839. 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: Sean Nelson <audiohacked@gmail.com>
* Generify jedec functions by introducing an address maskSean Nelson2010-01-041-93/+128
| | | | | | | | | | | | | | | | | The patch converts jedec functions into mask-based generics which can be used for many chip provided the only changes are the addresses are converted from 0x5555/0x2AAA to 0x555/0x2AA or similar. The patch mostly changes jedec.c, but a few other files are changed because they use the jedec functions within their own functions. The patch also adds a copyright line to flashchips.c because of my recent work in converting AMD and Atmel chips to use struct erase_block. Corresponding to flashrom svn r828. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Convert the following chips to use struct eraseblockSean Nelson2009-12-221-0/+11
| | | | | | | | | | | | | | | | | | | | | | Am29F010A/B Am29F002(N)BB Am29F002(N)BT Am29F016D Am29F040B Am29F080B Am29LV040B Am29LV081B A29040B Pm29F002T Pm29F002B Change function signature of Am29 erase functions and JEDEC chip erase to be usable with block_erasers. Corresponding to flashrom svn r812. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* jedec: warn if toggle bit is stuck for too long and allow for delays between ↵Carl-Daniel Hailfinger2009-12-171-4/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | tries If the JEDEC Toggle Bit algorithm needs more than 2^20 loops, it is a good sign we should have used delays between toggle bit reads. Tell the user about this. 2^20 loops need roughly a second depending on flash bus speed. One reason for excessive loops can be a slow operation like erase. The Winbond W39V040C requires a 50 ms delay between toggle bit reads during erase according to the datasheet. Turns out a 2 ms delay is sufficient. Use a safety factor of 4 and default all erase operations to 8 ms delay between toggle reads. This is short enough not to have a substantial negative impact on erase times, and should improve reliability. This patch addresses the excessive toggle behaviour (observed on some non-Winbond chips) and the toggle delay requirement (Winbond W39V040C). Corresponding to flashrom svn r807. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Javier Ortega Conde (aka Malkavian) <malkavian666@gmail.com> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
* Skip all delays in probe_jedec() if probe_delay is 0Sean Nelson2009-12-171-6/+12
| | | | | | | | | | | Probe_jedec() checks the delay value and issues programmer_delay based on the value except for delays between single chip_writeb. If a chip has zero probe_delay, delays between chip_writeb should be skipped as well. Corresponding to flashrom svn r805. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Use common jedec functionality where appropriateMichael Karcher2009-11-271-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | The deleted function in en29f002a.c is reintroduced as write_by_byte_jedec in jedec.c as it contains no chip-specific instructions. It is not yet used in other chip drivers, as key addresses (0x2AAA/0x5555) are often specified with less bits. After crosschecking datasheets, most of the fixmes can probably be resolved as indicated in them, causing significant code reduction. The common JEDEC code for bytewise programming does not program 0xFF at all. The chips that had a dedicated bytewise flash function which has been changed to write_jedec_1 thus changed flashing behaviour and the "write" test flag has been removed. This applies to: AMD Am29F002BB/Am29F002NBB AMD Am29F002BT/Am29F002NBT (TEST_OK_PREW before) AMIC A29002B AMIC A29002T (TEST_OK_PREW before) EON EN29F002(A)(N)B EON EN29F002(A)(N)T (TEST_OK_PREW before) Macronix MX29F001B (TEST_OK_PREW before) Macronix MX29F001T (TEST_OK_PREW before) Macronix MX29F002B Macronix MX29F002T (TEST_OK_PREW before) Macronix MX29LV040 Similar analysis should be performed for the read id stuff. Corresponding to flashrom svn r785. Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> Acked-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Refine support for the JEDEC Software Data ProtectionMichael Karcher2009-11-261-23/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the extremely dangerous unprotect_jedec function which is not used at all within flashrom code, and renames the misleadingly named protect_jedec function to start_program_jedec. Calls to protect_jedec after flashing are removed, because a) on LPC chips, the command sent by protoct_jedec is not even in the datasheet and b) on parallel chips, the block write command issued before already contained the software protection sequence, so software protection is definitely enabled. This patch also removes two clones of protect_jedec Background: JEDEC Software Data Protection started as an optional feature, which was disabled on the first single-voltage-flash chips. The software data protection is the need to prefix a write with a magic "write enable" command, while without write protection every write access into the chip's address space modifies flash content. This magic write enable command also tells the flash chip that the programmer obviously support sending write-enable commands and turns off the "any write modifies flash content" mode. There also exist a two-command (6 writes) sequence that disables Software Data Protection completey, which should only ever be used to prepare updating with a device that can't handle software data protection. Corresponding to flashrom svn r783. Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> Acked-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Jedec.c was missing error handling in a few casesCarl-Daniel Hailfinger2009-11-251-17/+23
| | | | | | | | | | Fix. jedec.c error handling used double negation in too many places for no good reason. Clean up. Corresponding to flashrom svn r779. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Sean Nelson <audiohacked@gmail.com>
* Retry correct range in write_page_write_jedec()Carl-Daniel Hailfinger2009-11-141-3/+3
| | | | | | | | | | | | | | | | The automatic retry in write_page_write_jedec didn't retry flashing the correct range, essentially rendering the functionality useless. This patch simplifies the code and fixes the bug. Thanks to Luke Dashjr for testing. Mark Winbond W29C040P as supported. Corresponding to flashrom svn r757. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Luke Dashjr <luke_coreboot@dashjr.org>
* Remove confusing out-of-date commentCarl-Daniel Hailfinger2009-10-191-3/+0
| | | | | | | Corresponding to flashrom svn r751. 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>
* Switch SST49LF004A/B to block erase, remove the hack which simulated ↵Carl-Daniel Hailfinger2009-09-231-2/+2
| | | | | | | | | | | | | | | | | (unsupported) chip erase Annotate SST49LF004B quirks for TBL#. Add TEST_OK_PRW which is useful when a PREW chip gets a new erase routine. Change a few erase function prototypes to use unsigned int instead of int. Corresponding to flashrom svn r731. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Luc Verhaegen <libv@skynet.be>
* Standardize on using __func__ instead of __FUNCTION__Uwe Hermann2009-09-021-1/+1
| | | | | | | | | | | | | | | The __func__ variant is standardized in C99 and recommended to be used instead of __FUNCTION__ in the gcc info page. Only _very_ old versions of gcc did not know about __func__, but we've been using both __func__ and __FUNCTION__ for a long while now, and nobody complained about this, so all our users seem to use recent enough compilers. Corresponding to flashrom svn r711. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Verbose probe output is split across multiple lines for some probe functionsCarl-Daniel Hailfinger2009-07-231-1/+1
| | | | | | | | | | | | | This makes visual inspection and grepping a lot harder than necessary. Remove line breaks where appropriate. Some error messages should end up on stderr instead of just being displayed in verbose mode. Thanks to Maciej Pijanka for testing. Corresponding to flashrom svn r660. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Change chip_readb in loop to use verify_range in write_page_write_jedec ↵Urja Rannikko2009-06-251-14/+8
| | | | | | | | | | | | | | (jedec.c) Tested by Urja Rannikko with external flasher. Tested by Uwe Hermann with onboard flash. Corresponding to flashrom svn r632. Signed-off-by: Urja Rannikko <urjaman@gmail.com> Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Urja Rannikko <urjaman@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Flashrom only checks for very few chips if the erase workedCarl-Daniel Hailfinger2009-06-151-10/+23
| | | | | | | | | | | | | | | | | | | And even when it checks if the erase worked, the result of that check is often ignored. Convert all erase functions and actually check return codes almost everywhere. Check inside all erase_* routines if erase worked, not outside. erase_sector_jedec and erase_block_jedec have changed prototypes to enable erase checking. Uwe successfully tested LPC on an CK804 box and SPI on some SB600 box. Corresponding to flashrom svn r595. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Signed-off-by: Urja Rannikko <urjaman@gmail.com> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Add programmer-specific delay functionsCarl-Daniel Hailfinger2009-06-051-26/+26
| | | | | | | | | | | Add external programmer delay functions so external programmers can handle the delay on their own if needed. Corresponding to flashrom svn r578. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Urja Rannikko <urjaman@gmail.com>
* Add probe_timing information (int uS value)Maciej Pijanka2009-06-031-2/+18
| | | | | | | | | | This eliminates the conflicting delay requirements for old and new chips with the same probing sequence. Corresponding to flashrom svn r569. Signed-off-by: Maciej Pijanka <maciej.pijanka@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Drop unused/duplicated #includes and some dead codeUwe Hermann2009-05-161-2/+0
| | | | | | | | | Build-tested on 32bit x86. Corresponding to flashrom svn r521. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Introduce a type "chipaddr" to abstract the offsets within flash regionsCarl-Daniel Hailfinger2009-05-161-19/+19
| | | | | | | | | | | | | | | | | | | Use chipaddr instead of volatile uint8_t * because when we access chips in external flashers, they are not accessed via pointers at all. Benefits: This allows us to differentiate between volatile machine memory accesses and flash chip accesses. It also enforces usage of chip_{read,write}[bwl] to access flash chips, so nobody will unintentionally use pointers to access chips anymore. Some unneeded casts are removed as well. Grepping for chip operations and machine memory operations doesn't yield any false positives anymore. Compile tested on 32 bit and 64 bit Linux. Corresponding to flashrom svn r519. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Use helper functions chip_{read,write}[bwl] to access flash chipsCarl-Daniel Hailfinger2009-05-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The semantic patch I used in r418 to make the original conversion to accessor functions was missing one isomorphism: a[b] <=> *(a+b) The semantic patcher Coccinelle was used to create this patch. Semantic patch follows: @@ typedef uint8_t; expression a; volatile uint8_t *b; @@ - b[a] + *(b + a) @@ expression a; volatile uint8_t *b; @@ - *(b) = (a); + chip_writeb(a, b); @@ volatile uint8_t *b; @@ - *(b) + chip_readb(b) @@ type T; T b; @@ ( chip_readb | chip_writeb ) (..., - (T) - (b) + b ) Corresponding to flashrom svn r498. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Check probing results for flash contentsCarl-Daniel Hailfinger2009-05-111-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | When flashrom JEDEC code sends the ID command to the chip, it expects to see IDs in the default flash location. However, sometimes the chip does not react to the ID command, either because it doesn't understand the command or because the command never reached it. One way to detect this is to compare ID output with flash chip contents for the same location. If they are identical, there is a high chance you're not actually seeing ID output. Warn the user in that case. This patch helps a lot when a chip is not recognized and we want to check if the probe responses are real IDs or just random flash chip contents. This should probably be added to all probe functions, but probe_jedec is called for all sizes and thus flashrom will check this condition at least once per size, making sure we can cross-match the warning. Corresponding to flashrom svn r494. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: FENG Yu Ning <fengyuning1984@gmail.com>
* FreeBSD definitions of (read|write)[bwl] collide with our ownCarl-Daniel Hailfinger2009-03-061-50/+50
| | | | | | | | | | | | Before we attempt trickery, we can simply rename the accessor functions. Patch created with the help of Coccinelle. Corresponding to flashrom svn r420 and coreboot v2 svn r3984. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Idwer Vollering <idwer_v@hotmail.com> Acked-by: Patrick Georgi <patrick@georgi-clan.de>
* Use helper functions to access flash chipsCarl-Daniel Hailfinger2009-03-051-50/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now we perform direct pointer manipulation without any abstraction to read from and write to memory mapped flash chips. That makes it impossible to drive any flasher which does not mmap the whole chip. Using helper functions readb() and writeb() allows a driver for external flash programmers like Paraflasher to replace readb and writeb with calls to its own chip access routines. This patch has the additional advantage of removing lots of unnecessary casts to volatile uint8_t * and now-superfluous parentheses which caused poor readability. I used the semantic patcher Coccinelle to create this patch. The semantic patch follows: @@ expression a; typedef uint8_t; volatile uint8_t *b; @@ - *(b) = (a); + writeb(a, b); @@ volatile uint8_t *b; @@ - *(b) + readb(b) @@ type T; T b; @@ ( readb | writeb ) (..., - (T) - (b) + b ) In contrast to a sed script, the semantic patch performs type checking before converting anything. Tested-by: Joe Julian Corresponding to flashrom svn r418 and coreboot v2 svn r3971. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: FENG Yu Ning <fengyuning1984@gmail.com>
* Beautify flash chip ID verbose printout a little, always use %02xPeter Stuge2009-01-251-1/+1
| | | | | | | Corresponding to flashrom svn r390 and coreboot v2 svn r3895. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Increase delay in probe_jedec() after Product ID Entry to 10msPeter Stuge2008-06-241-3/+2
| | | | | | | | | | We should follow data sheet timing, even if chips have been tested to answer faster in the field. Corresponding to flashrom svn r273 and coreboot v2 svn r3387. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Update comment to match delay change in probe_jedec() r3373Peter Stuge2008-06-211-1/+1
| | | | | | | Corresponding to flashrom svn r264 and coreboot v2 svn r3375. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Increase delay in probe_jedec() to 2ms to reliably detect AT29C020Peter Stuge2008-06-211-1/+1
| | | | | | | | | | Run time is increased a few 100ms but this is needed for reliability. I consider this trivial. Corresponding to flashrom svn r262 and coreboot v2 svn r3373. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Check the JEDEC vendor ID for correct parityCarl-Daniel Hailfinger2008-05-141-1/+12
| | | | | | | | | | | | Flash chips which can be detected by JEDEC probe routines all have vendor IDs with correct parity. Use a parity check as additional hint whether a vendor ID makes sense. Note: Device IDs have no parity requirements whatsoever. Corresponding to flashrom svn r231 and coreboot v2 svn r3308. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Peter Stuge <peter@stuge.se>
* Add continuation ID support to jedec.cCarl-Daniel Hailfinger2007-12-311-2/+18
| | | | | | | | | | | | | | | | | | | | | | | The continuation ID code does not go further than checking for IDs of the type 0x7fXX, but does this for vendor and product ID. The current published JEDEC spec has a list where the largest vendor ID is 7 bytes long, but all leading bytes are 0x7f. The list will grow in the future, and using a 64bit variable will not be enough anymore. Besides that, it seems that the location of the ID byte after the first continuation ID byte is very vendor specific, so we may have to revisit that code some time in the future. (Suggestion for a new encoding: Use a two-byte data type for the ID, the lower byte contains the only non-0x7f byte, the upper byte contains the number of 0x7f bytes used as prefix, which is the bank number minus 1 the vendor ID appears in.) Add support for EON EN29F002AT. Corresponding to flashrom svn r171 and coreboot v2 svn r3030. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Corey Osgood <corey.osgood@gmail.com>
* Fix ATMEL 29C020 detection with flashromCarl-Daniel Hailfinger2007-11-131-2/+6
| | | | | | | | | | | | The JEDEC probe routine had a delay of 10 us after entering ID mode and this was insufficient for the 29C020. The data sheet claims we have to wait 10 ms, but tests have shown that 20 us suffice. Allow for variations in chip delays with a factor of 2 safety margin. Corresponding to flashrom svn r159 and coreboot v2 svn r2962. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Peter Stuge <peter@stuge.se>
* Some cosmetic cleanups in the flashrom code and outputUwe Hermann2007-10-171-2/+2
| | | | | | | Corresponding to flashrom svn r151 and coreboot v2 svn r2873. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Changes to support the K8N-NEO3, first tested at Google on GSOC day :-)Ronald G. Minnich2007-10-121-1/+1
| | | | | | | | | | Also minor changes to remove tab-space combinations where possible. Corresponding to flashrom svn r144 and coreboot v2 svn r2850. Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Signed-off-by: David Hendricks <david.hendricks@gmail.com> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Add '(C)' where it's missing (for consistency reasons)Uwe Hermann2007-09-091-3/+3
| | | | | | | Corresponding to flashrom svn r136 and coreboot v2 svn r2768. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Change all flashrom license headers to use our standard formatUwe Hermann2007-08-291-17/+12
| | | | | | | | | No changes in content of the files. Corresponding to flashrom svn r131 and coreboot v2 svn r2751. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Cosmetic fixesUwe Hermann2007-08-231-7/+7
| | | | | | | Corresponding to flashrom svn r130 and coreboot v2 svn r2748. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Drop a bunch of useless header files, merge them into flash.hUwe Hermann2007-08-231-2/+0
| | | | | | | Corresponding to flashrom svn r128 and coreboot v2 svn r2746. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Move code into *.c files, there's no reason to have it in header filesUwe Hermann2007-08-231-0/+52
| | | | | | | Corresponding to flashrom svn r127 and coreboot v2 svn r2745. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Big cosmetic offensive on flashromStefan Reinauer2007-05-231-3/+3
| | | | | | | | | | | | * Give decent names to virt_addr and virt_addr_2 * add some comments * move virtual addresses to the end of the struct, so they dont mess up the initializer. Corresponding to flashrom svn r111 and coreboot v2 svn r2689. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Fix coding style of flashrom by running indent on all filesUwe Hermann2007-05-091-49/+49
| | | | | | | | | | | | indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs *.[ch] Some minor fixups were required, and maybe a few more cosmetic changes are needed. Corresponding to flashrom svn r108 and coreboot v2 svn r2643. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Fix write_page_write_jedec() in jedec.cGiampiero Giancipoli2006-11-221-14/+49
| | | | | | | | | | | | | | | | | | | Added a check-reprogram loop in the same function, to come around the high page write failure rate on some boards. This patch includes the changes suggested by Ron to simplify the control flow. It also includes trivial changes by me to make flashrom build on newer systems (libpci needs libz now). I also made a small type case compile fix and proper return code handling in one or two places. Corresponding to flashrom svn r78 and coreboot v2 svn r2505. Signed-off-by: Giampiero Giancipoli <gianci@email.it> Signed-off-by: Ronald G Minnich <rminnich@gmail.com> Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Removing $Id$ tags as they have no meaning in SVNStefan Reinauer2006-08-231-1/+0
| | | | Corresponding to flashrom svn r60 and coreboot v2 svn r2386.
* Flashrom update from Stefan, resolve issue 21Ollie Lho2005-11-261-47/+49
| | | | Corresponding to flashrom svn r34 and coreboot v2 svn r2111.
* Add -E option for chip erase, remove duplicated codeOllie Lho2004-12-081-41/+21
| | | | Corresponding to flashrom svn r30 and coreboot v2 svn r1815.
* Add retry to write_byte_program_jedec(), 99% success rateOllie Lho2004-12-081-1/+7
| | | | Corresponding to flashrom svn r29 and coreboot v2 svn r1814.
OpenPOWER on IntegriCloud