1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-28 07:23:43 +02:00

1249 Commits

Author SHA1 Message Date
Carl-Daniel Hailfinger
e8e369fcc3 Write granularity is chip specific
The following write granularities exist according to my datasheet
survey: - 1 bit. Each bit can be cleared individually. - 1 byte. A byte
can be written once. Further writes to an already written byte cause
the contents to be either undefined or to stay unchanged. - 128 bytes.
If less than 128 bytes are written, the rest will be erased. Each write
to a 128-byte region will trigger an automatic erase before anything is
written. Very uncommon behaviour. - 256 bytes. If less than 256 bytes
are written, the contents of the unwritten bytes are undefined.

Note that chips with default 256-byte writes, which keep the original
contents for unwritten bytes, have a granularity of 1 byte.

Handle 1-bit, 1-byte and 256-byte write granularity.

Corresponding to flashrom svn r927.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: David Hendricks <dhendrix@google.com>
2010-03-08 00:42:32 +00:00
Michael Karcher
7f0c3ec56b Move untested board enable documentation to manpage
This also checks the testedness of boards in all cases, not just for
PCI/DMI detection.

Corresponding to flashrom svn r926.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-03-07 22:29:28 +00:00
Michael Karcher
5fdf270450 Board enable for MS-7202 (K8N GM2-L)
Board enable code is untested, marked as such.

Corresponding to flashrom svn r925.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
2010-03-07 16:52:59 +00:00
Michael Karcher
b2184c153f Board enable for Asus M2NBP-VM CSM
Board info: http://www.coreboot.org/pipermail/flashrom/2009-December/001373.html

Corresponding to flashrom svn r924.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
2010-03-07 16:42:55 +00:00
Michael Karcher
03b80e922c Board enable for HP Vectra VL420SFF
This code has been tested by Mattias Mattsson on 23. December 2009,
but without the DMI match. Now that DMI support is in and working,
the board can be added to mainline flashrom.

board info: http://www.coreboot.org/pipermail/flashrom/2009-December/001440.html

Corresponding to flashrom svn r923.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
2010-03-07 16:32:32 +00:00
Michael Karcher
e5eafb2191 Refactor man page
This patch puts the description of the different programmers into a
separate section of the manpage instead of having them one after the
other without visual structuring in the description of "-p". It is
made as a preparation of a man-page patch that adds the background
of board enables into flashrom.8 that would really blow up the OPTIONS
section.

The only differences in content are:
 - The parameter for serprog is mandatory, not optional
 - Default behaviour of it87spi (using BIOS-set I/O address) is mentioned.
 - Default speed of buspiratespi is mentioned.

Corresponding to flashrom svn r922.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-03-07 12:11:08 +00:00
Russ Dill
3cd5a12e04 Add support for Eon EN29F010
Tested by Russ Dill.
Checked against datasheet by Sean Nelson.
Datasheet: http://www.essi.com.tw/upfile/p2008929171446.pdf

Corresponding to flashrom svn r921.

Signed-off-by: Russ Dill <Russ.Dill@gmail.com>
Acked-by: Sean Nelson <audiohacked@gmail.com>
2010-03-05 08:44:11 +00:00
Michael Karcher
b4a3d1c422 Board enable for Abit IP35 Pro
This board is like the IP35. Just changed the IDs to match.

Corresponding to flashrom svn r920.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Timothy Lepre <Klavious@gmail.com>
2010-03-03 16:15:12 +00:00
Michael Karcher
0bdc0929f5 Implement tested/untested status for board enables
The message printing code greatly exceed the 80 character limit. I can
reformat it on request to obey the limit.

Intended behaviour:
on untested boards an explanation of that status is printed and the board
enable code is not run, unless the option "boardenable=force" has been
passed to the internal programmer.

Corresponding to flashrom svn r919.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
2010-02-28 01:33:48 +00:00
Michael Karcher
5fbd18dc8d Board enable for HP Vectra VL400
Corresponding to flashrom svn r918.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: bas nowaira <bas429@gmail.com>
Acked-by: Luc Verhaegen <libv@skynet.be>

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
2010-02-27 18:35:54 +00:00
Sean Nelson
36172342c8 Convert the remaining references to *_49fl00x
Now the only remaining and used function in pm49fl00x.c is unlock_49fl00x.

Also:
 - Add missing unlock to AMIC A49LF040A.
 - Add lock_49fl00x function.

Corresponding to flashrom svn r917.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-02-27 18:01:15 +00:00
Michael Karcher
8c1df280e3 Warn if running on laptops
Corresponding to flashrom svn r916.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-02-26 09:51:20 +00:00
Michael Karcher
0d7fb7c5ed Factor out DMI string reading into subfunction
Corresponding to flashrom svn r915.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-02-26 09:51:16 +00:00
Sean Nelson
14ba6682e9 Split spi.c into programmer and chip code Remove chipdriver.h include from 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>
2010-02-26 05:48:29 +00:00
Michael Karcher
cfa674fde7 Rename identifiers called 'byte'
Still fallout of adding "-Wshadow". Missed the ht1000 one
(chipset_enable is not compied on Windows where we had the collision
with "byte" last time) and the other occurrence is newly introduced.
Old libpci defines a global symbol called "byte" too.

Corresponding to flashrom svn r913.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-02-25 11:38:23 +00:00
Michael Karcher
f6498d7a44 Remove unused short IDs
This also replaces the meaningless numbers in the DMI debug printout
with the parameter names.

Corresponding to flashrom svn r912.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-02-24 22:43:44 +00:00
Michael Karcher
844863933d Replace PCI_OK/PCI_NT by OK/NT
We don't need to duplicate OK and NT as PCI_OK and PCI_NT if the symbols
are already there (defined for the chipset enable table).

Corresponding to flashrom svn r911.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2010-02-24 00:04:40 +00:00
Michael Karcher
01f6d7d15d Fix PIIX4 GPO set
Intel datasheet says "byte accesses only". Looks like they mean it.
Also fix use of or instead of and for lowering GPOs.

Corresponding to flashrom svn r910.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Luc Verhaegen <libv@skynet.be>
2010-02-24 00:00:21 +00:00
Sean Nelson
c351992895 Patch to remove all references to dead chipdrivers
We also need to 'svn rm' the following files:
  am29f040b.c
  en29f002a.c
  m29f002.c
  mx29f002.c
  pm29f002.c
  sst49lf040.c
  w49f002u.c

Corresponding to flashrom svn r909.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-02-22 15:52:57 +00:00
Uwe Hermann
ddd5c9e147 Add initial (non-working) code for Highpoint ATA/RAID controllers
It's disabled by default. The current status is detailed at:
http://www.flashrom.org/pipermail/flashrom/2010-January/001828.html

Corresponding to flashrom svn r908.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-02-21 21:17:00 +00:00
Sean Nelson
6e0b912f46 Here's a very quick patch to fix the missing unlock code
Fixes missing unlock for certain chips:
 * unlock_49lf00x
    * Pm49fl002
    * Pm49fl004

 * unlock_49flxxxc
    * SST49LF160C

 * unlock_winbond_fwhub
    * W39V080FA
    * W39V080FA (dual mode)

Fixes missing printlock for certain chip:
 * printlock_w39v040c
    * W39V040C

Corresponding to flashrom svn r907.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
2010-02-19 00:52:10 +00:00
Carl-Daniel Hailfinger
ce5fad038d Refactor MCP SPI detection
- Set supported buses based on ISA bridge reg 0x8a
- Use MCP55 chipset enable only if LPC is detected
- Allow LPC on MCP61
- Eliminate duplicated code where possible

Corresponding to flashrom svn r906.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
2010-02-18 12:24:38 +00:00
Jonathan A. Kollasch
d8dfc441ed More NetBSD fixes (w/ patch)
Cast input to tolower() to unsigned char to work around how tolower() is
implemented on NetBSD.

Also, use CPPFLAGS (rather than overriding CFLAGS) for the
NetBSD/DragonFly build example.

Corresponding to flashrom svn r905.

Signed-off-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
2010-02-16 00:49:50 +00:00
Carl-Daniel Hailfinger
cc389fc6b1 Allow the registration of functions to be called at programmer shutdown
Some programmers want to run certain functions during programmer
shutdown, but the function choice depends on the code path taken
during programmer init. Rather than rebuilding the whole init logic in
the shutdown function, it is now possible to register functions for
execution on programmer shutdown. The behaviour is similar to atexit(),
but the registered functions will be run on programmer shutdown instead
of on exit and the functions will be called with a void * argument
that is specified on registration. Registered functions must have
the prototype void function(void *); and will be executed in reverse
registration order directly before calling the programmer-specific
shutdown() function. It is recommended to have shutdown() only disable
programmer/hardware access and leave all code path sensitive shutdown to
functions registered with register_shutdown().

The most prominent use case is resetting the EC after flashing on
laptops.

Note: There are quite a few code paths in flashrom which proceed to
terminate flashrom without any programmer shutdown. Those code paths
will not get the benefit of register_shutdown() and they should be
changed wherever possible.

Corresponding to flashrom svn r904.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
2010-02-14 01:20:28 +00:00
Jonathan A. Kollasch
879b351bfe Use uname -p instead of -m on NetBSD so we get the right architecture library name
Corresponding to flashrom svn r903.

Signed-off-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-02-14 01:00:36 +00:00
Carl-Daniel Hailfinger
ea3b1b4db2 Add SPI mode diagnostics for all post-MCP55 (nForce 5) chipsets from Nvidia
Huge thanks to Michael Karcher for reverse engineering the MCP67 chipset
and writing a spec. Due to this, we were able to use the chinese wall
technique for 100% clean room reverse engineering.

This patch doesn't touch any of the new registers, it only reads them.
Assuming that read has no side effects, this patch is a no-op and safe.

We need "flashrom -V" output from all post-MCP55 (nForce 5) chipset
boards. Please indicate if your board uses SPI flash or LPC flash (if
you know it). Note: That output is only helpful if it is created with
patched flashrom and if is from the first run of flashrom after a cold
boot (reset or Ctrl-Alt-Del is not sufficient). There is a pattern based
on which we can probably detect which flash type is present on the
board.

Thanks to Alessandro Polverini for testing earlier iterations of this
patch.

Note: The MCP67 should work. I guessed that the other recent Nvidia
chipsets would work in a similar way, and created a simplified
do-nothing catchall chipset enable function which dumps some info and
instructs the user to send more info.

Corresponding to flashrom svn r902.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
2010-02-13 23:41:01 +00:00
Carl-Daniel Hailfinger
cd446f4b93 Kill an erroneous .erase introduced in r900
Corresponding to flashrom svn r901.

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>
2010-02-13 19:22:11 +00:00
Sean Nelson
f5ae4d4a35 Adds support for the Intel E28F004S5 flash chip
Corresponding to flashrom svn r900.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-02-13 18:41:53 +00:00
Carl-Daniel Hailfinger
e4edb067a6 Ignore RES (1 byte) if chip replied to REMS (2 bytes)
SPI RES is the most unreliable way to identify chips because it only
returns a 1-byte ID for most chips.

For every given ID out there, probably a dozen incompatible flash
chips match it. We already refuse to identify a chip with RES if that
chip responds to RDID (3 bytes, good match), and with this patch we
additionally refuse RES if the chip responds to REMS (2 bytes, still a
good match). This increases matching accuracy a lot.

Besides that, the RDID/REMS response checking has been cleaned up for
better readability.

Corresponding to flashrom svn r899.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
2010-02-12 19:37:25 +00:00
Carl-Daniel Hailfinger
fb0828f3db Split internal.c into internal.c and hwaccess.c
Linking in support for the internal programmer doesn't make sense if you
only need hardware (ioport, memory) access.

Note: This patch was created by "svn cp internal.c hwaccess.c" and then
removing stuff from both files. That's why you can't apply the patch
as-is before running the svn cp.

Corresponding to flashrom svn r898.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
2010-02-12 19:35:25 +00:00
Sean Nelson
ca33140ebf Fix erase blocks for Winbond W25X{10,20,40,80} SPI chips
The Winbond W25X10 and related chips only have 4k and 64k blocks and
only accept erase commands: 20h, d8h, and c7h.

Corresponding to flashrom svn r897.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: David Hendricks <dhendrix@google.com>
2010-02-12 18:40:27 +00:00
Michael Karcher
4dfa093bd5 Fix DMI match logic
This bug slipped in on changing back match-specific to match-any

Corresponding to flashrom svn r896.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-02-12 05:44:18 +00:00
Carl-Daniel Hailfinger
48f1d73b5f At long last, the day has come, and we can bury full-chip erase once and for all
Back in November 2008(!) I proposed the first version of the flexible
sector-based erase structure, and now we can finally rip out the old
full-chip erase code without ill effects. Rejoice and party!

Thanks to everyone who made this possible, especially to Sean Nelson who
converted the majority of flash chips to sector erase.

Corresponding to flashrom svn r895.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
2010-02-11 23:03:53 +00:00
Carl-Daniel Hailfinger
f15e1abbaa Rewrite substantial parts of the ICH SPI support
This megapatch rewrites substantial parts of ICH SPI to actually do
what the SPI layer wants instead of its own weird idea about commands
(running unrequested commands, running modified commands). Besides that,
there is a fair share of cleanups as well.

- Add JEDEC_EWSR (Enable Write Status Register) to default commands. -
Mark a no longer used opcode/preopcode table as unused. - Declare all
commands as non-atomic/standalone by default. The ICH SPI driver has
no business executing commands (preopcodes) automatically if they were
not requested. - Automatically adjust preopcode/opcode pairings (like
WREN+ERASE) based on what the SPI layer requested. The ICH SPI driver
has no business executing altered opcode pairs as it sees fit. - Fix
incomplete initialization in the case of a locked down chipset. Leaving
the first 4 opcodes with uninitialized pairings had unpredictable
results. - switch() exists for a reason. Nested if() checking on the
same variable is an interesting style. - Actually check if the requested
readcnt/writecnt for a command is supported by the hardware instead
of delivering corrupt/incomplete commands and data. - If a command
has unsupported readlen/writelen, complain loudly to the user. - Use
find_opcode instead of open-coding the same stuff in a dozen variations.
- Introduce infrastructure for updating the command set of unlocked
chipsets on the fly.

Corresponding to flashrom svn r894.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: David Hendricks <dhendrix@google.com>
2010-02-11 11:28:37 +00:00
Carl-Daniel Hailfinger
7a788f567d Document the rules for DMI matching with PCI subsystem IDs
The rules may change in the future, but right now it is important that
the comments match the code.

Corresponding to flashrom svn r893.

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>
2010-02-04 11:12:04 +00:00
Michael Karcher
2eab70da70 Allow DMI supported board enables with subsystem ID zero
This is needed for the Intel SE440BX-2 as well as the Asus P5A.

Corresponding to flashrom svn r892.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-02-04 10:58:50 +00:00
Patrick Georgi
975aa7e2c6 Properly initialize USB device in dediprog driver
That's necessary to use bulk transfers, and just the
right thing in any case.

Corresponding to flashrom svn r891.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2010-02-04 08:29:18 +00:00
Uwe Hermann
873599d8a9 Add a second set of PCI IDs for the Tekram P6Pro-A5
(Re-)tested on hardware, detection works OK.

Corresponding to flashrom svn r890.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2010-02-04 02:40:16 +00:00
Carl-Daniel Hailfinger
baaffe0831 Create a physical memory mapping function which requests cached readonly memory
This should take care of picky Linux kernels which do not allow uncached
mappings to cached areas. Handle mapping failure gracefully (no forced
exit()) if the caller specifies it.

Such cached areas which can handle mapping failure are DMI tables and
coreboot tables. On failure we just ignore those tables. That is not
perfect, but a lot better than aborting flashrom due to an error in
nonessential functionality.

This should fix flashrom on a sizable number of machines where it
currently aborts early.

Yes, I could have exploited a Linux kernel bug to "solve" this, but
relying on such bugs is not exactly the best idea.

Corresponding to flashrom svn r889.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Vincent Pelletier <plr.vincent@gmail.com>
2010-02-02 11:09:03 +00:00
Jeffrey A. Kent
ba7c9228d3 Adds support for ST M29W512B
Tested and works for me.

Corresponding to flashrom svn r888.

Signed-off-by: Jeffrey A. Kent <jakent@gmail.com>
Acked-by: Sean Nelson <audiohacked@gmail.com>
2010-02-01 05:49:46 +00:00
Uwe Hermann
012b3a1024 Add the Tekram P6Pro-A5 board as supported
The board doesn't need a board-enable, writing works out of the box.

Also, the board can only decode 256KB. I verified this by writing a 512KB
image of random bytes (which fails), whereas 256KB of random bytes can be
written correctly.

Corresponding to flashrom svn r887.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2010-01-31 20:13:06 +00:00
Sean Nelson
35727f7618 Complete the addition of Feature Bits for all Jedec based chips
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>
2010-01-28 23:55:12 +00:00
Uwe Hermann
b1bd3e85ba The GIGABYTE GA-7ZM has a maximum decode size (parallel chips) of 512 KB
Add this information to the new field in the board-enable table. We match the
board via two sets of PCI IDs. However, as we don't need a board-enable
function for this board (it works out of the box; well, at least if you remove
the JP9 jumper on the board), change the code to allow NULL as value for
the board-enable function. There will likely be more boards in the future where
we want to record a maximum decode size but which don't need a board-enable.

This is hardware-tested on the GIGABYTE GA-7ZM by successfully writing a 512KB
image of random bytes to a chip in this board.

Corresponding to flashrom svn r885.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
2010-01-28 19:02:36 +00:00
Michael Karcher
823dc9d9bc Avoid bogus gcc warning
Recent gcc/glibc combinations warn about ignoring the fgets() result.
The problem exists on Ubuntu 9.10 with current updates. This "fix" of
the non-problem (as I check ferror() afterwards) should even be a
(negligible) performance optimization.

Corresponding to flashrom svn r884.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Andrew Morgan <ziltro@ziltro.com>
2010-01-27 10:08:33 +00:00
Patrick Georgi
06602c239c Windows wants UNC names for COM ports >9 (legacy COM ports only work with one digit)
As UNC also works for smaller names, just retarget all requests for
dev=COMx on win32 to \\.\COMx. Tested with large and small COM port
numbers on XP.

Corresponding to flashrom svn r883.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-01-26 20:58:40 +00:00
Patrick Georgi
0bf842d0ca Open binary files in binary mode
No change on UNIX (or Mac OS, according to its documentation), but fixes
operation on Windows.

Corresponding to flashrom svn r882.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2010-01-25 22:55:33 +00:00
Uwe Hermann
48da3f9f99 Add support for the SST39SF512 chip
All operations tested by me, works fine.

Corresponding to flashrom svn r881.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
2010-01-23 15:15:19 +00:00
Stefan Reinauer
e8683b6fc1 Backout unintentional chunk
Corresponding to flashrom svn r880.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2010-01-22 10:49:33 +00:00
Carl-Daniel Hailfinger
eac6579090 Add write support
Speed up reads by a factor of 4 by switching block size from 4 to 16.
Add support for 4 byte RDID.
Add USB error decoding via usb_strerror.

Corresponding to flashrom svn r879.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2010-01-22 02:53:30 +00:00
Stefan Reinauer
2fea3f3197 This patch fixes the use of CFLAGS and CPPFLAGS in the flashrom makefile
Corresponding to flashrom svn r878.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
2010-01-21 20:26:30 +00:00