------------------------------------------------------------------------
r1563 | hailfinger | 2012-08-08 02:13:10 +0200 (Wed, 08 Aug 2012) | 5 lines

Increase flashrom release number to 0.9.6.1

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

------------------------------------------------------------------------
r1562 | hailfinger | 2012-08-07 13:59:59 +0200 (Tue, 07 Aug 2012) | 13 lines

Fix missing #include hwaccess.h

In r1549 #include "hwaccess.h" was moved to individual drivers.
Unfortunately, flashrom.c was forgotten. This caused flashrom to falsely
report an unknown PCI library version and big-endianness on all
platforms.

Add #include "hwaccess.h".
Explicitly check for __FLASHROM_BIG_ENDIAN__

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>

------------------------------------------------------------------------
r1561 | stefanct | 2012-08-03 01:56:49 +0200 (Fri, 03 Aug 2012) | 6 lines

Refine messages of SPI block protection disables.

Make them real progress indicators with a final "done" message on success.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1560 | stefanct | 2012-08-03 01:51:28 +0200 (Fri, 03 Aug 2012) | 8 lines

Clean up a25.c, at25.c, spi25.c.

- introduce spi_prettyprint_status_register_atmel_at25_wpen()
- use spi_prettyprint_status_register_bit() where possible
- generify spi_prettyprint_status_register_bp3210 and use it in at25.c too

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1558 | hailfinger | 2012-08-03 00:00:05 +0200 (Fri, 03 Aug 2012) | 5 lines

Increase flashrom release number to 0.9.6

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

------------------------------------------------------------------------
r1557 | stefanct | 2012-07-30 21:42:33 +0200 (Mon, 30 Jul 2012) | 13 lines

Remove more exit calls.

This patch removes the remaining exit calls from
 - sp_openserport
 - sp_opensocket
 - sp_docommand
 - internal_init

Almost all of this was done by Niklas.

Signed-off-by: Niklas S?\195?\182derlund <niso@kth.se>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1556 | stefanct | 2012-07-29 04:04:21 +0200 (Sun, 29 Jul 2012) | 14 lines

print_wiki: fix columns calculations.

for
- chipsets
- boards, and
- chips

Previously the chipset columns were not uniformly divided at all,
which led to very odd table bottoms. This patches fixes this as far
as wiki code can do (browser rendering can still create odd effects
because we do not define cell heights).

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1555 | stefanct | 2012-07-28 21:35:26 +0200 (Sat, 28 Jul 2012) | 13 lines

Introduce enum test_state.

Previously boards in the wiki were tagged either as working or as known
bad. But we added support to various boards via board enables that were
then never tested because the owners have not reported back. This can
now be tagged with NT and is shown appropriately.

Also, the underlying data structure indicating state was converted from
macros to an enum while preserving original integer values and is used
for programmers and chipsets too.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1554 | stefanct | 2012-07-28 05:17:15 +0200 (Sat, 28 Jul 2012) | 90 lines

Add a bunch of new/tested stuff and various small changes 13.

Tested Mainboards:
OK:
 - ASRock A780FullHD
   http://www.flashrom.org/pipermail/flashrom/2012-July/009599.html
 - ASRock 880G Pro3
   http://www.flashrom.org/pipermail/flashrom/2012-July/009492.html
 - ASRock N61P-S
   http://www.flashrom.org/pipermail/flashrom/2012-May/009316.html
 - ASUS M2N68-VM
   http://www.flashrom.org/pipermail/flashrom/2012-May/009334.html
 - ASUS M3N78 PRO
   http://www.flashrom.org/pipermail/flashrom/2012-July/009519.html
 - ASUS M4N68T V2
   http://www.flashrom.org/pipermail/flashrom/2012-May/009277.html
 - ASUS M5A78L-M LX
   reported by clavile on IRC
 - ASUS P8P67 PRO (rev. 3.0)
   http://www.flashrom.org/pipermail/flashrom/2012-April/009188.html
 - ASUS P8Z68-V
   reported by Kano on IRC
   http://paste.flashrom.org/view.php?id=1232
 - ASUS SABERTOOTH 990FX
   http://paste.flashrom.org/view.php?id=1214
 - Dell Inspiron 1420
   http://www.flashrom.org/pipermail/flashrom/2012-May/009196.html
 - ECS GF8200A
   http://www.flashrom.org/pipermail/flashrom/2012-May/009256.html
 - GIGABYTE GA-H61M-D2H-USB3
   http://www.flashrom.org/pipermail/flashrom/2012-May/009333.html
 - MSI MS-7250 (K9N SLI (rev 2.1))
   http://www.flashrom.org/pipermail/flashrom/2012-June/009436.html
 - MSI MS-7676 (Z68MA-G45 (B3))
   http://www.flashrom.org/pipermail/flashrom/2012-June/009424.html
 - Palit N61S
   http://www.flashrom.org/pipermail/flashrom/2012-May/009212.html

NOT OK:
 - ASRock H61M-ITX
   http://www.flashrom.org/pipermail/flashrom/2012-May/009224.html
 - Dell Latitude E6520
   http://www.flashrom.org/pipermail/flashrom/2012-May/009197.html
 - Dell Vostro 3700
   http://www.flashrom.org/pipermail/flashrom/2012-May/009197.html
 - Intel DH61AG
   http://www.flashrom.org/pipermail/flashrom/2012-June/009417.html
 - Intel DQ965GF
   http://www.flashrom.org/pipermail/flashrom/2012-May/009295.html
 - HP/Compaq 8100 Elite CMT PC (304Bh)
   http://paste.flashrom.org/view.php?id=1182
 - HP Z400 Workstation (0AE4h)
   http://www.flashrom.org/pipermail/flashrom/2012-June/009350.html
 - Supermicro X9DR3-F
   http://www.flashrom.org/pipermail/flashrom/2012-June/009422.html
   

Tested flash chips:
 - mark AMIC A25L032 as TEST_OK_PREW (+PREW)
   http://www.flashrom.org/pipermail/flashrom/2012-June/009363.html
 - mark Atmel AT25DF321A as TEST_OK_PREW (+REW)
   http://www.flashrom.org/pipermail/flashrom/2012-July/009492.html
 - mark Atmel AT26DF161 as TEST_OK_PR (+PR)
   http://www.flashrom.org/pipermail/flashrom/2012-June/009350.html
 - mark Eon EN25QH16 as TEST_OK_PR (+PR)
   http://www.flashrom.org/pipermail/flashrom/2012-July/009566.html
 - mark SST SST39VF010 as TEST_OK_PREW (+W)
   http://www.flashrom.org/pipermail/flashrom/2012-June/009425.html
 - mark ST M25P64 as TEST_OK_PREW (+PREW)
   http://www.flashrom.org/pipermail/flashrom/2012-May/009332.html

Tested chipset enables:
 - Intel 3420
   http://www.flashrom.org/pipermail/flashrom/2012-May/009332.html

 - Add board enable for ASUS P5GD2-X
   lspci: http://paste.flashrom.org/view.php?id=1234
   write: http://paste.flashrom.org/view.php?id=1240

Miscellaneous
 - Reorder some boards in print.c.
 - Remove broken abit URLs.
 - Whitespace changes.
 - Fix the maximum number of southbridge straps in the ICH descriptor structs.
 - Refine documentation regarding ICH region lock bits.
 - Demote verbosity of ICH Opcode reprogramming to -VV.
 - Exclude Pony-SPI for DOS targets (missing serial support).

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1553 | stefanct | 2012-07-24 18:33:55 +0200 (Tue, 24 Jul 2012) | 7 lines

Intel 7 Series fixes (addition of QM77, fixed straps printing).

I looked at the datasheet to be sure that the strap names (SPI, PCI,
LPC) are the same as on the series 5 and 6 chipsets.

Signed-off-by: Helge Wagner <Helge.Wagner@ge.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1552 | hailfinger | 2012-07-22 14:01:43 +0200 (Sun, 22 Jul 2012) | 8 lines

Always require the --programmer parameter on the command line if any
flash chip access (probe/read/write/erase/...) is requested.

Fix a few man page oddities as well.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

------------------------------------------------------------------------
r1551 | hailfinger | 2012-07-21 19:27:08 +0200 (Sat, 21 Jul 2012) | 19 lines

Automatically release I/O permissions on shutdown.

get_io_perms() is renamed to rget_io_perms() and automatically registers
a function to release I/O permissions on shutdown.

Actually release I/O permissions on Solaris and iopl()-supporting
operating systems like Linux.

This patch fixes quite a few programmers which forgot to release I/O
permissions on shutdown, and it simplifies the shutdown and error
handling code for all others.

Do not call exit(1) if I/O permissions are denied and return an error
instead. This part of the patch was written by Niklas S?\195?\182derlund.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Signed-off-by: Niklas S?\195?\182derlund <niso@kth.se>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1550 | hailfinger | 2012-07-21 18:56:04 +0200 (Sat, 21 Jul 2012) | 6 lines

Document --output in the man page.
Add an examples section to the man page.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>

------------------------------------------------------------------------
r1549 | hailfinger | 2012-07-20 22:35:14 +0200 (Fri, 20 Jul 2012) | 11 lines

Hide hwaccess.h from public API.

Move hwaccess.h #include from flash.h to individual drivers.
libflashrom users need flash.h, but they do not care about hwaccess.h
and should not see its definitions because they may conflict with
other hardware access functions and #defines used by the libflashrom
user.

Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1548 | hailfinger | 2012-07-16 23:32:19 +0200 (Mon, 16 Jul 2012) | 12 lines

Check vendor_id for PCI based external programmers.

Restructure PCI device detection code.
Rename pcidev_validate to pcidev_readbar.

Note: Slight changes in behaviour are possible, especially on dual/quad
chip NICs which appear as more than one PCI device. Found devices are no
longer printed at _pinfo level, but rather at _pdbg level.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1547 | hailfinger | 2012-06-30 01:07:14 +0200 (Sat, 30 Jun 2012) | 8 lines

Add board enable for MSI K9N SLI (MS-7250 VER:2.1)

Handle PCI Device ID 0x0360 for MCP55 ISA bridge GPIO as well.

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Tested-by: Stefan A. Scholtz

------------------------------------------------------------------------
r1546 | hailfinger | 2012-06-19 14:06:53 +0200 (Tue, 19 Jun 2012) | 11 lines

Add native SPI AAI write support to the Dediprog SF100 driver

To tell the programmer how to handle the data on the spi bus, a flag in
the fourth byte sent with the usb command is used. The second word was
mistaken for the size of the chunks sent over usb earlier. The third
byte (first of the second word) is now set to zero. This also adds some
checks for the size of data chunks sent over usb.

Signed-off-by: Nico Huber <nico.huber@secunet.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1545 | hailfinger | 2012-06-16 02:11:16 +0200 (Sat, 16 Jun 2012) | 8 lines

Remove exit() call from show_id

The only caller is able to check the return code and handle it
correctly.

Signed-off-by: Niklas S?\195?\182derlund <niso@kth.se>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1544 | hailfinger | 2012-06-16 02:02:27 +0200 (Sat, 16 Jun 2012) | 9 lines

Add voltage change delays to dediprog driver

Some investigations have shown that the original dediprog driver waits
about 200ms after setting voltage up and before setting voltage down.
This patch adds those delays. It helps flash chips to come up in time.

Signed-off-by: Nico Huber <nico.huber@secunet.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1543 | hailfinger | 2012-06-16 00:28:12 +0200 (Sat, 16 Jun 2012) | 14 lines

Let the programmer driver decide how to do AAI transfers

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.

Signed-off-by: Nico Huber <nico.huber@secunet.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1542 | stefanct | 2012-06-14 15:08:33 +0200 (Thu, 14 Jun 2012) | 7 lines

Fix setting the divisor in ft2232_spi.

The patch that should have improved the clock divisor setting in r1537 made
it much worse: the divisor used was from an uninitialized buffer.

Signed-off-by: Ilya A. Volynets-Evenbakh <ilya@total-knowledge.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1541 | hailfinger | 2012-06-08 17:27:47 +0200 (Fri, 08 Jun 2012) | 11 lines

Bus Pirate buffer management revamp

The buffer management of the Bus Pirate driver has been revamped to use
grow-only buffers with a reasonable initial default size so realloc()
will not have to be called in normal operation. A side effect is the
ability to switch to a static buffer without major hassle.
Handle OOM gracefully.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Patrick Georgi <patrick@georgi-clan.de>

------------------------------------------------------------------------
r1540 | hailfinger | 2012-06-06 11:17:06 +0200 (Wed, 06 Jun 2012) | 11 lines

Add logfile support to flashrom

Usage: flashrom --output logfile.txt

Logfile output has at least dbg2 verbosity or screen verbosity,
whichever is greater.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Tested on Linux, Windows and FreeBSD.
Acked-by: Idwer Vollering <vidwer@gmail.com>

------------------------------------------------------------------------
r1539 | stefanct | 2012-05-21 01:32:33 +0200 (Mon, 21 May 2012) | 7 lines

Add support for PMC Pm39LV512.

This flash is like PMC model Pm39LV010 but capacity is 64kB.
Model ID was already defined. PREW works for me.

Signed-off-by: Ky?\195?\182sti M?\195?\164lkki <kyosti.malkki@gmail.com>
Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>
------------------------------------------------------------------------
r1538 | stefanct | 2012-05-16 02:15:53 +0200 (Wed, 16 May 2012) | 8 lines

Remove sharplhf00l04.c.

The currently unreferenced function in sharplhf00l04.c does a standard
FWH block protection reset (writes 0 to the protection register) and a
standard FWH block erase.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1537 | stefanct | 2012-05-16 00:58:19 +0200 (Wed, 16 May 2012) | 9 lines

ft2232_spi.c: add frequency divisor parameter.

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.

Signed-off-by: Samir Ibrad?\197?\190i?\196?\135 <sibradzic@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1536 | hailfinger | 2012-05-15 00:54:58 +0200 (Tue, 15 May 2012) | 12 lines

Convert printf to msg_* where appropriate.
Clean up cli_output.c to be more readable.
Use enum instead of #define for message levels.
Kill a few exit(0) calls.
Print the command line arguments in verbose mode.
Move actions (--list-supported etc.) after argument sanity checks.
Reduce the number of code paths which have their own
programmer_shutdown().

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

------------------------------------------------------------------------
r1535 | stefanct | 2012-05-14 03:51:46 +0200 (Mon, 14 May 2012) | 7 lines

Add support for Eon EN25QH32.

Its ID was spotted in an descriptor region update by Jetway:
http://paste.flashrom.org/view.php?id=1217

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1534 | stefanct | 2012-05-08 00:12:16 +0200 (Tue, 08 May 2012) | 8 lines

dummyflasher.c: add support for SFDP by adding a new emulator chip: MX25L6436

The chip features a complete 1.0 SFDP JEDEC flash parameter table and also a
vendor-specific extension table (defining voltages, lock bits etc).
NB: the MX25L6436 uses the same RDID as the MX25L6405.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1533 | hailfinger | 2012-05-07 00:48:01 +0200 (Mon, 07 May 2012) | 9 lines

Add Winbond W836xx SuperI/O detection.
Add ITE IT8707F/IT8710F detection.

Note that we autodetect those chips, but we don't handle their flash
translation features automatically yet.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1532 | stefanct | 2012-05-06 19:03:40 +0200 (Sun, 06 May 2012) | 4 lines

dummyflasher: Add a status register to SPI chips.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>  
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1531 | stefanct | 2012-05-06 17:11:26 +0200 (Sun, 06 May 2012) | 4 lines

Refine reprogram_opcode_on_the_fly to indicate wrong readcnt/writecnt combinations.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1530 | mkarcher | 2012-05-05 22:53:59 +0200 (Sat, 05 May 2012) | 4 lines

Add manpage entry for pony_spi

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1529 | hailfinger | 2012-05-05 22:43:42 +0200 (Sat, 05 May 2012) | 6 lines

Function to enable the flash interface on w83697 family SuperIO chips.
Not hooked up to the superio detection framework yet.

Signed-off-by: David Borg <borg.db@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1528 | stefanct | 2012-05-02 22:08:01 +0200 (Wed, 02 May 2012) | 22 lines

spi25.c: Refactor spi_write_status_register helpers.

In r1115 "Write protection handling for Atmel AT25*" the old spi_write_status_register
function was duplicated to send WREN and EWSR commands respectively controlled
by a new common wrapper function spi_write_status_register without a reason.
Both functions' resulting code is  equal apart from the opcode used. The code
itself does also differ in the macros used, but their value (apart from the opcode)
is equal. This patch adds a new parameter for the opcode to the helper function
which allows removal of the other one. This relies on the fact that EWSR and WREN
have the same INSIZE and OUTSIZE though. If that is really seen as an issue, the
sizes could be made parameters too.

This patch also changes the wrapper so that it no longer sets the feature bits
of the struct flash(ctx) argument. This may result in changed output, because it
no longer implicitly disables the debug message in following executions. Since
almost all chips had their feature bits fixed in the previous commit, this is
a minor problem.

Also, spi_write_status_enable has been dead code since r658 or so. Remove it.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1527 | stefanct | 2012-05-02 22:07:57 +0200 (Wed, 02 May 2012) | 28 lines

Tag all EWSR chips correctly.

All SPI chips without a WRSR feature bit set were evaluated except the
Sanyo LF25FW203A for which no datasheet is available.

The following list includes all SPI-capable chips that still have no
WRSR feature bit set:
 - AT26DF041
 - AT45CS1282
 - AT45DB011D
 - AT45DB021D
 - AT45DB041D
 - AT45DB081D
 - AT45DB161D
 - AT45DB321C
 - AT45DB321D
 - AT45DB642D

All of them have no write function set and can be therefore ignored
for now.

Apart from those the generic chips are also not tagged. The opaque
flash interface should not be affected. The SFDP dummy chip is
changed to explicitly set EWSR if it can't deduce it dynamically.
The vendor detecting generic chips can't write anyway.

Signed-off-by: Steven Zakulec <spzakulec@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1526 | stefanct | 2012-05-02 21:48:21 +0200 (Wed, 02 May 2012) | 9 lines

Add board enable for ASUS P5BV-R.

These are used in ASUS RS120-E5/PA2 servers.

GPIO pin discovered, patch prepared and
Tested-by: Geoffrey McRae

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1525 | mkarcher | 2012-05-01 01:11:06 +0200 (Tue, 01 May 2012) | 8 lines

Add serial port bitbanging code

This adds the pony_spi driver which supports the SI_Prog adapter, which
is commonly used for SPI chips with PonyProg 2000, and a custom adapter
called "SERBANG" which differs in the logic of two pins.

Signed-off-by: Virgil-Adrian Teaca <darkstarlinux@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r1524 | stefanct | 2012-04-27 22:41:23 +0200 (Fri, 27 Apr 2012) | 87 lines

Add a bunch of new/tested stuff and various small changes 12.

Tested Mainboards:
OK:
 - ASUS M4A785T-M
   http://www.flashrom.org/pipermail/flashrom/2012-April/009118.html
 - ASUS P5VD2-MX
   http://www.flashrom.org/pipermail/flashrom/2012-March/009014.html
 - ASUS P8Z68-V PRO/GEN3
   http://www.flashrom.org/pipermail/flashrom/2012-April/009086.html
 - Bachmann electronic OT200
   http://www.flashrom.org/pipermail/flashrom/2012-April/009094.html
 - Biostar N61PB-M2S
   http://www.flashrom.org/pipermail/flashrom/2012-March/008958.html
 - GIGABYTE GA-H61M-D2-B3
   http://www.flashrom.org/pipermail/flashrom/2012-March/009002.html
 - MSI MS-7740 (H61MA-E35(B3))
   http://www.flashrom.org/pipermail/flashrom/2012-March/008985.html
 - Tyan S2875 (Tiger K8W)
   http://www.flashrom.org/pipermail/flashrom/2012-March/008986.html
 - ZOTAC nForce 630i Supreme (N73U-Supreme)
   http://www.flashrom.org/pipermail/flashrom/2012-April/009073.html
 - ZOTAC ZBOX AD02 (PLUS)
   http://www.flashrom.org/pipermail/flashrom/2012-April/009047.html
NOT OK:
 - ASRock H67M
   http://www.flashrom.org/pipermail/flashrom/2012-March/008909.html
 - ASUS P8P67 LE
   http://paste.flashrom.org/view.php?id=1097
 - ASUS Maximus IV Extreme
   http://www.flashrom.org/pipermail/flashrom/2012-March/009033.html
 - Biostar H61MU3
   http://www.flashrom.org/pipermail/flashrom/2012-February/008832.html
 - Biostar M7VIQ
   http://www.flashrom.org/pipermail/flashrom/2012-February/008863.html
 - Dell Inspiron 580
   http://www.flashrom.org/pipermail/flashrom/2012-March/008888.html
 - Dell Vostro 460
   http://www.flashrom.org/pipermail/flashrom/2012-April/009144.html
 - Fujitsu-Siemens CELSIUS W410 (D3062-A1)
   http://www.flashrom.org/pipermail/flashrom/2012-March/008987.html
 - EPoX EP-3PTA
   http://www.flashrom.org/pipermail/flashrom/2012-April/009043.html
 - HP XW6400
   http://www.flashrom.org/pipermail/flashrom/2012-March/009006.html
 - HP XW9300
   http://www.flashrom.org/pipermail/flashrom/2012-February/008862.html
 - Intel DG965OT
   http://paste.flashrom.org/view.php?id=1096
 - Intel DN2800MT (Marshalltown)
   http://www.flashrom.org/pipermail/flashrom/2012-April/009095.html
 - Lenovo T420
   http://paste.flashrom.org/view.php?id=1095
 - Lenovo X1
   http://www.flashrom.org/pipermail/flashrom/2012-April/009135.html
 - MSI GF615M-P33
   http://www.flashrom.org/pipermail/flashrom/2012-March/008956.html

Tested flash chips:
 - mark EN25Q32(A/B) as TEST_OK_PROBE (+P)
   http://www.flashrom.org/pipermail/flashrom/2012-February/008832.html
 - mark S25FL032A as TEST_OK_PR (+PR)
   http://www.flashrom.org/pipermail/flashrom/2012-April/009105.html
 - mark AT25DF161 as TEST_OK_PROBE (+P)
   http://www.flashrom.org/pipermail/flashrom/2012-April/009095.html
 - mark SST as TEST_OK_PREW (+EW)
   http://www.flashrom.org/pipermail/flashrom/2012-April/009094.html

Tested chipset enables:
 - H61 (various reports)
 - SiS 755
   http://www.flashrom.org/pipermail/flashrom/2012-April/009072.html

 - Fix compilation of ich_descriptor_tool which was broken since r1492.
 - Add Documentation regarding unlocking the ME region on Intel chipsets.
 - Fix reading the flash descriptor via FDOC/FDOD and prettyprinting of the
   descriptor on boards with 5 active regions.
 - Reorder some boards in print.c.
 - Add Intel 7 Series (Panther Point) PCI IDs.
 - Add preliminary PCI IDs for future Intel chipsets (DH89xxCC and Lynx Point)
   see https://lkml.org/lkml/2012/2/20/467
 - Change the message for untested chipsets to send only after an attempt to
   update the firmware with flashrom.
 - Fix warnings in ich_descriptor_tool's build.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1523 | stefanct | 2012-04-15 16:09:16 +0200 (Sun, 15 Apr 2012) | 6 lines

Check for duplicate -i arguments.

And a tiny cleanup.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
------------------------------------------------------------------------
r1522 | uwe | 2012-04-15 15:16:32 +0200 (Sun, 15 Apr 2012) | 9 lines

Add support for for the Atmel AT49F040 chip.

Chip features an optional permanent boot block write protection.

Signed-off-by: David Borg <borg.db@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1521 | uwe | 2012-04-15 00:51:40 +0200 (Sun, 15 Apr 2012) | 11 lines

Add support for the Eon EN29LV640B chip.

This chip needs special command sequences in 8 bit mode. Also, 8 bit
programming needs actually 16bit double byte program.

The chip is found on the Bifferos Bifferboard, for example.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1520 | uwe | 2012-04-14 23:59:23 +0200 (Sat, 14 Apr 2012) | 13 lines

Add GigaDevice GD25QXX series support.

http://www.gigadevice.com/Product/SPI.php?WebPageTypeId=98&WebPageTypeId2=151&WebPageTypeId3=134

The GD25Q80 has been successfully tested, the other ones are marked as
untested for now.

http://www.flashrom.org/pipermail/flashrom/2012-March/009028.html

Signed-off-by: Justin Chevrier <jchevrier@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1519 | uwe | 2012-04-14 23:06:31 +0200 (Sat, 14 Apr 2012) | 9 lines

Minor NetBSD/DragonFly/pkgsrc build instruction update.

Add -I/usr/pkg/include to NetBSD/Dragon Fly build example CPPFLAGS.
This is needed to pick up libftdi.

Signed-off-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1518 | uwe | 2012-04-14 23:04:03 +0200 (Sat, 14 Apr 2012) | 10 lines

Add support for the Numonyx N25Q064 chip.

All operations were successfully tested.
http://www.flashrom.org/pipermail/flashrom/2012-April/009048.html

Signed-off-by: Niklas S?\195?\182derlund <niklas.soderlund@ericsson.com>
Acked-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1517 | stefanct | 2012-03-13 01:18:19 +0100 (Tue, 13 Mar 2012) | 8 lines

Make the presence of Linux SPI headers mandatory for linux_spi.

This solution is copied from ft2232_spi and is equally hacky.
Thanks to M.K. for investigating the history of <linux/spi/spidev.h>, which
led to a hopefully more robust check.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r1516 | stefanct | 2012-03-10 20:22:13 +0100 (Sat, 10 Mar 2012) | 9 lines

Add (untested) board enable for ASUS TUSL2-C

Primary IDs SMBus controller, secondary IDs MCH.
The reverse engineering was done by Michael Karcher.
?\208?\144?\208?\189?\208?\180?\209?\128?\208?\181?\208?\185 ?\208?\162?\208?\184?\208?\188?\208?\184?\209?\128?\208?\176?\208?\181?\208?\178 <dark_prof@mail.ru> reported the problem, but did not
reply (yet) to our propsed fix.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r1514 | hailfinger | 2012-03-08 22:58:40 +0100 (Thu, 08 Mar 2012) | 5 lines

Increase flashrom release number to 0.9.5.2

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

------------------------------------------------------------------------
r1513 | mkarcher | 2012-03-06 23:17:06 +0100 (Tue, 06 Mar 2012) | 11 lines

Prevent submission of empty read requests in linux_spi.

The submission of zero-sized read requests in a write-only transaction
fails at least for omap2_mcspi drivers and is pointless in general.

This patch does not address the implementation of zero-sized writes (which
would need to skip the write command), as there are no flash transactions
not starting with a command.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1512 | stefanct | 2012-03-03 19:09:33 +0100 (Sat, 03 Mar 2012) | 11 lines

linux_spi.c: set SPI mode, bit order and bits per word on init.

Previously we relied on a correctly set up state.

Also, we start to rely on the shutdown function for cleanup after
registering it, i.e. we no longer explicitly call close(fd) after
register_shutdown().

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Tested-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1511 | hailfinger | 2012-03-01 23:38:27 +0100 (Thu, 01 Mar 2012) | 21 lines

Fix parallel-style programmer access from ITE IT87/Winbond W83627 SPI

The ITE IT87 SPI driver uses a trick to speed up reading and writing:
If a flash chip is 512 kByte or less, the flash chip can be completely
mapped in memory and both read and write accesses are faster that way.
The current IT87 SPI code did use the parallel programmer interface for
memory mapped reads and writes, but that's the wrong abstraction. It has
been fixed to use mmio_read*/mmio_write* for that purpose.

The Winbond W83627 SPI driver uses the same trick in its read path for
all supported chip sizes. Fix it the same way.

Switch internal_chip_readn to use mmio_readn as proper abstraction.

Kudos to Michael Karcher for spotting the bugs.

Reported-by: Johan Svensson <flashrom.js@crypt.se>
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Tested-by: Johan Svensson <flashrom.js@crypt.se>

------------------------------------------------------------------------
r1510 | stefanct | 2012-02-27 20:44:16 +0100 (Mon, 27 Feb 2012) | 4 lines

nicintel_spi.c: check if write enable is really set (and minor comment changes).

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Idwer Vollering <vidwer@gmail.com>
------------------------------------------------------------------------
r1508 | hailfinger | 2012-02-26 00:39:29 +0100 (Sun, 26 Feb 2012) | 5 lines

Increase flashrom release number to 0.9.5.1

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

------------------------------------------------------------------------
r1507 | hailfinger | 2012-02-25 23:50:21 +0100 (Sat, 25 Feb 2012) | 7 lines

Support Debian/kFreeBSD

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Tested-by: Robert Millan <rmh@debian.org>
Tested-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1506 | hailfinger | 2012-02-25 00:49:30 +0100 (Sat, 25 Feb 2012) | 11 lines

SFDP: Fetch parameter table in a more portable way

SFDP parameter table reads expect a dummy byte between written data
(opcode+address) and read data on the SPI bus. Read that dummy byte
instead of writing it to be compatible with all programmer drivers.
Reduce SFDP parameter table read chunk size from 8 to 2 to handle
programmers with small readcount limits.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

------------------------------------------------------------------------
r1505 | stefanct | 2012-02-22 01:14:14 +0100 (Wed, 22 Feb 2012) | 19 lines

Fix SFDP probing.

sfdp_add_uniform_eraser checks for existing erasers. Due to a bug it
looked for eraser slots that have no erase functions set instead of
those that have one set.

Postpone adding an erase function for the special 4k block erase
opcode until we know the flash chip size and add an additional check
to sfdp_add_uniform_eraser.

Fix the output of the parameter table contents.

This patch fixes the index used to retrieve the eraser types, which
was off one double word.

Refine some messages and add a few further debugging prints.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1503 | hailfinger | 2012-02-18 03:34:58 +0100 (Sat, 18 Feb 2012) | 5 lines

Increase flashrom release number to 0.9.5

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

------------------------------------------------------------------------
r1502 | stefanct | 2012-02-17 21:03:37 +0100 (Fri, 17 Feb 2012) | 12 lines

Add a bunch of new/tested stuff and various small changes 11

Tested Mainboards:
NOT OK:
 - HP dc7800
   http://paste.flashrom.org/view.php?id=1084

 - add "Low Profile Desktop" to our dmi whitelist
 - fix print_wiki (broken since r1488)

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1501 | stefanct | 2012-02-17 15:51:15 +0100 (Fri, 17 Feb 2012) | 14 lines

Add board enable for ASUS OPLX-M.

The vendor enable does some other funky stuff with MTRRs/MSRs, SMIs,
cache and legacy ISA address forward twiddling. I would only use
this patch to read and verify the existing contents, just to be safe.

The PCI IDs of the onboard devices do contain no subsystem IDs at all.

Probing and reading was
Tested-by: Ville Skytt?\195?\164 <ville.skytta@iki.fi>
See http://www.flashrom.org/pipermail/flashrom/2010-October/005256.html

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1500 | stefanct | 2012-02-17 15:51:04 +0100 (Fri, 17 Feb 2012) | 24 lines

Add support for SFDP (JESD216).

Similar to modules using the opaque programmer framework (e.g. ICH Hardware
Sequencing) this uses a template struct flashchip element in flashchips.c with
a special probe function that fills the obtained values into that struct.

This allows yet unknown SPI chips to be supported (read, erase, write) almost
as if it was already added to flashchips.c.

Documentation used:
http://www.jedec.org/standards-documents/docs/jesd216 (2011-04)
W25Q32BV data sheet Revision F (2011-04-01)
EN25QH16 data sheet Revision F (2011-06-01)
MX25L6436E data sheet Revision 1.8 (2011-12-26)

Tested-by: David Hendricks <dhendrix@google.com>
on W25Q64CV + dediprog
Tested-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
on a 2010 MX25L6436E with preliminary (i.e. incorrect) SFDP implementation + serprog

Thanks also to Michael Karcher for his comments and preliminary review!

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1499 | stefanct | 2012-02-16 22:07:07 +0100 (Thu, 16 Feb 2012) | 109 lines

Add a bunch of new/tested stuff and various small changes 10

Tested mainboards:
OK:
 - ABIT A-S78H
   http://www.flashrom.org/pipermail/flashrom/2012-January/008603.html
 - ASRock AM2NF6G-VSTA
   http://www.flashrom.org/pipermail/flashrom/2012-January/008534.html
 - ASUS KFSN4-DRE/SAS
   reported by ted on IRC
 - ASUS M2A-VM (HDMI variant)
   http://www.flashrom.org/pipermail/flashrom/2012-January/008509.html
 - ASUS M4N78 PRO
   http://www.flashrom.org/pipermail/flashrom/2012-January/008598.html
 - ASUS P5K-V
   http://www.flashrom.org/pipermail/flashrom/2012-February/008737.html
 - ASUS P5KPL-CM
   http://www.flashrom.org/pipermail/flashrom/2012-January/008522.html
 - ASUS P5N7A-VM
   http://www.flashrom.org/pipermail/flashrom/2012-January/008508.html
 - ASUS P5QPL-AM
   http://www.flashrom.org/pipermail/flashrom/2012-January/008557.html
 - ECS GF7100PVT-M3
   http://www.flashrom.org/pipermail/flashrom/2011-December/008412.html
 - ECS K7SEM
   http://www.flashrom.org/pipermail/flashrom/2011-December/008362.html
 - ECS P4M800PRO-M V2.0
   http://www.flashrom.org/pipermail/flashrom/2012-January/008478.html
 - Gigabyte 880GMA-USB3
   http://www.flashrom.org/pipermail/flashrom/2012-February/008715.html
 - Gigabyte GA-EP31-DS3L
   http://www.flashrom.org/pipermail/flashrom/2012-January/008601.html
 - Gigabyte GA-X58A-UDR3
   http://www.flashrom.org/pipermail/flashrom/2012-January/008572.html
 - Gigabyte GA-Z68XP-UD3
   http://paste.flashrom.org/view.php?id=1058
 - HP ProLiant N40L
   http://www.flashrom.org/pipermail/flashrom/2012-February/008650.html
 - MSI MS-7309 (K9N6PGM2-V2)
   http://www.flashrom.org/pipermail/flashrom/2011-December/008441.html
 - MSI MS-7548 (Aspen-GL8E used in HP Pavilion a6750f)
   http://www.flashrom.org/pipermail/flashrom/2012-February/008666.html
 - MSI MS-7676 (H67MA-ED55(B3))
   http://www.flashrom.org/pipermail/flashrom/2012-January/008547.html
 - PC Engines Alix.6f2
   Reported by Philip Prindeville on IRC
 - Shuttle AV18E2
   http://www.flashrom.org/pipermail/flashrom/2011-December/008459.html
 - Supermicro X8DTE-F
   http://www.flashrom.org/pipermail/flashrom/2011-November/008304.html
 - Supermicro X8DTT-HIBQF
   http://www.flashrom.org/pipermail/flashrom/2012-January/008520.html
NOT OK:
 - ASUS P8H61-M LE/USB3
   http://www.flashrom.org/pipermail/flashrom/2012-January/008491.html
 - ASUS P8H67-M PRO
   http://www.flashrom.org/pipermail/flashrom/2011-December/008321.html
 - ASUS P8Z68-V PRO
   http://www.flashrom.org/pipermail/flashrom/2012-January/008469.html
 - Clevo P150HM (laptop)
   http://www.flashrom.org/pipermail/flashrom/2012-February/008717.html
 - Intel D425KT
   http://www.flashrom.org/pipermail/flashrom/2012-January/008600.html
 - Supermicro X9SCA-F
   http://www.flashrom.org/pipermail/flashrom/2011-December/008313.html

Tested flash chips:
 - mark AT29C512 as TEST_OK_PREW
   http://paste.flashrom.org/view.php?id=977
 - mark M25P40 as TEST_OK_PREW
   http://www.flashrom.org/pipermail/flashrom/2011-December/008351.html
 - mark M25PE80 as TEST_OK_PREW
   http://paste.flashrom.org/view.php?id=1061
 - mark MX25L6405 as TEST_OK_PREW
   tested myself with an MX25L6436E variant on serprog
 - mark W39V080A as TEST_OK_PREW
   http://www.flashrom.org/pipermail/flashrom/2012-January/008509.html

Tested chipsets:
 - SiS 730 (:0730)
   http://www.flashrom.org/pipermail/flashrom/2011-December/008362.html
 - NVIDIA MCP61 (:03e0)
   http://www.flashrom.org/pipermail/flashrom/2012-January/008534.html
 - NVIDIA MCP73 (:07d7)
   http://www.flashrom.org/pipermail/flashrom/2011-December/008412.html
 - NVIDIA MCP79 (:0aac)
   http://www.flashrom.org/pipermail/flashrom/2012-January/008508.html
 - VIA VT82C69x (0691) and VT82C686A/B (:0686)
   http://www.flashrom.org/pipermail/flashrom/2011-December/008459.html

 - AMD's SB950 (and presumably also SB920) have the same PCI ID as previous
   generations, hence change the chipset enable device string. Thanks to
   Christian Ruppert for the suggestion.
 - Fix the board enable of the abit NF-M2 nView which had the IDs of its onboard
   graphics card in its pattern. Change this to the LPC controller.
 - Intel X79 SPI registers are identical to 6 Series', so use the chipsetenable
   wrapper of it (enable_flash_pch6).
 - Fix two paranoid checks for address < 0 in ichspi.c which became futile (and
   generate clang warnings) with the unsignify patch committed in r1470.
 - Rename AT25DF641 to AT25DF641(A). They are almost idencical, but could
   be distinguished by an extended RDID probe (Atmel's patented EDI procedure),
   which we do not support yet, hence handle them as one model for now.
 - Source format fixes and typos

the addition of the ASRock AM2NF6G-VSTA to print.c is
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
everything else is
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1498 | hailfinger | 2012-02-16 22:00:27 +0100 (Thu, 16 Feb 2012) | 8 lines

Document and enable the linux_spi driver

The linux_spi driver is now enabled by default on Linux.
A man page entry and a line in --list-supported output have been added.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

------------------------------------------------------------------------
r1497 | stefanct | 2012-02-16 21:55:27 +0100 (Thu, 16 Feb 2012) | 18 lines

Manpage improvements.

The sections describing the various options of the internal and dummy
programmers have grown out of proportions. This patch adds some headlines
to devide the unrelated topics a bit (with .TP commands). The previous indented
paragraphs for the various programmers were transformed to subsections (.SS).

Also, rephrase the documention related to laptops completely to make it
less redundant and more informative.
Document the laptop=this_is_not_a_laptop internal programmer parameter

Change the contact info in the bugs section by removing the trac
reference and adding IRC (and the pastebin) instead.

Remove some superfluous white space and a .RE (restore indentation) command.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1496 | hailfinger | 2012-02-16 21:31:25 +0100 (Thu, 16 Feb 2012) | 18 lines

Reenable forced read

Forced read functionality was disabled when programmer registration was
merged in r1475.

We now support registering more than one controller at once for each bus
type. This can happen e.g. if one SPI controller has an attached flash
chip and one controller doesn't. In such a case we rely on the probe
mechanism to find exactly one chip, and the probe mechanism will
remember which controller/bus the flash chip is attached to. A forced
read does not have the luxury of knowing which compatible controller to
use, so this case is handled by always picking the first one. That may
or may not be the correct one, but there is no way (yet) to specify
which controller a flash chip is attached to.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

------------------------------------------------------------------------
r1495 | hailfinger | 2012-02-16 02:43:06 +0100 (Thu, 16 Feb 2012) | 8 lines

Workaround missing %hhx support in MinGW sscanf

MinGW uses standard Windows C libraries and those apparently don't
support %hhx for sscanf into a uint8_t. SCNx8 isn't available either.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Idwer Vollering <vidwer@gmail.com>

------------------------------------------------------------------------
r1494 | stefanct | 2012-02-16 02:13:00 +0100 (Thu, 16 Feb 2012) | 10 lines

ichspi.c: warn user and disable writes when a protected address range is detected.

This includes not only the notorious read-only flash descriptors and locked ME
regions, but also the more rarely used PRs (Protected Ranges).
The user can enforce write support by specifying ich_spi_force=yes in the
programmer options, but we don't tell him the exact syntax interactively. He
has to read it up in the man page.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1493 | stefanct | 2012-02-16 00:40:23 +0100 (Thu, 16 Feb 2012) | 15 lines

Warn of one-time programmable (OTP) memory

Some flash chips contain OTP memory that we cannot read or write (yet). This
prohibits us from cloning them, hence warn the user if we detect it. Not all
variations of the tagged chips contain OTP memory. They are often only
enabled on request or have there own ordering numbers. There is usually no
way to distinguish them. Because this is a supposedly seldomly used feature
the warning is shown in with dbg verbosity.

The manpage is extended to describe the backgrounds a bit.

This patch is based on the idea and code of Daniel Lenski.
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1492 | hailfinger | 2012-02-13 01:35:35 +0100 (Mon, 13 Feb 2012) | 11 lines

Support compilation for the ARM architecture (little-endian only).

Note: The internal programmer will abort during processor check. This is
intentional.
The other hardware drivers (except those using port I/O) should work.

Signed-off-by: David Hendricks <dhendrix@google.com>
Acked-by: David Hendricks <dhendrix@google.com>
Tested-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1491 | mkarcher | 2012-02-12 01:13:14 +0100 (Sun, 12 Feb 2012) | 9 lines

Board enable for TriGem Anaheim-3

lspci: http://paste.flashrom.org/view.php?id=1069
flashrom -V: http://paste.flashrom.org/view.php?id=1072
flashrom -w: http://paste.flashrom.org/view.php?id=1073

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
(ack via IRC Feb 11, 23:14 GMT)
------------------------------------------------------------------------
r1490 | hailfinger | 2012-02-09 00:28:54 +0100 (Thu, 09 Feb 2012) | 23 lines

SPI command black-/ignorelisting for the flash chip emulator in the dummy programmer

Usage:
flashrom -p dummy:spi_blacklist=commandlist
flashrom -p dummy:spi_ignorelist=commandlist

If commandlist is 0302, flashrom will refuse (blacklist) or ignore
(ignorelist) command 0x03 (READ) and command 0x02 (WRITE). The
commandlist can be up to 512 bytes (256 commands) long.
Specifying flash chip emulation is a good idea to get useful results.

Very useful for testing corner cases if you don't own a locked down
Intel chipset and want to simulate such a thing.

Example usage:
dd if=/dev/zeros bs=1024k count=4 of=dummy_simulator.rom
dd if=/dev/urandom bs=1024k count=4 of=randomimage.rom
flashrom -p dummy:emulate=SST25VF032B,image=dummy_simulator.rom,\
spi_blacklist=20,spi_ignorelist=52 -w randomimage.rom -V

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: David Hendricks <dhendrix@google.com>

------------------------------------------------------------------------
r1489 | stefanct | 2012-02-07 22:29:48 +0100 (Tue, 07 Feb 2012) | 6 lines

Add support for RDC R6030 chipset

Tested on Bifferboard.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1488 | stefanct | 2012-02-03 23:32:09 +0100 (Fri, 03 Feb 2012) | 13 lines

print*.c: Refine the do not count nor print generic flash chip entries conditions.

Previously only the generic "unknown XXXX SPI chips" were ignored (because their
name started with "unknown".
This patch adds also all chips whose vendor starts with "Unknown" (none so far)
and "Programmer" (currently used by the opaque flash chip framework) .
A patch will add the SFDP chip template with an "Unknown" vendor field later.

Rationale: these entries do not contain any useful information when shown in -L
or wiki output. It would be better to add them to a general feature section or similar.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1487 | stefanct | 2012-01-31 07:51:56 +0100 (Tue, 31 Jan 2012) | 8 lines

Add board enable for the MSC Q7 Tunnel Creek board

This patch adds a generic phase 2 board enable that does nothing but set
is_laptop to 0 to circumvent an erroneous laptop detection due to ambigous
DMI chassis information.

Signed-off-by: Ingo Feldschmid <ifel@msc-ge.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1486 | stefanct | 2012-01-19 18:50:32 +0100 (Thu, 19 Jan 2012) | 11 lines

Add board enable for AOpen i945GMx-VFX (used in FCS ESPRIMO Q5010)

Typical AWARD enable structure with an ICH GPIO board enable.
This board seems also to be known as D2544-B1.

Success report:
http://www.flashrom.org/pipermail/flashrom/2012-January/008590.html

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Tested-by: Oliver Rath <rath@mglug.de>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1485 | hailfinger | 2012-01-12 14:58:43 +0100 (Thu, 12 Jan 2012) | 15 lines

Reorder list of options to test

If a chip is unknown the user is asked to test and report the result to
the mailing list. Having `-VE` listed as the last option can result in
an unbootable system for users not knowing what the command does, since
rebooting the system after that command is fatal since the flash chip is
empty. Example report at
http://www.flashrom.org/pipermail/flashrom/2012-January/008551.html

Reorder the options to prevent such accidents in the future.
Suggested by Idwer Vollering.

Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1484 | hailfinger | 2012-01-11 03:10:11 +0100 (Wed, 11 Jan 2012) | 11 lines

Postpone layout file reading

Layout file reading should happen after option parsing like all other
file accesses.
Guard against multiple --layout parameters.

Followup fix for r1483: Remove -m short option from getopt.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

------------------------------------------------------------------------
r1483 | hailfinger | 2012-01-04 01:48:27 +0100 (Wed, 04 Jan 2012) | 22 lines

Replace --mainboard with -p internal:mainboard

--mainboard is a relic from a time before external programmers and makes
the CLI inconsistent.
Use a programmer parameter instead and free up the short option -m.

NOTE:
The --list-supported-wiki output changed to use -p internal:mainboard=
instead of -m
The --list-supported output changed the heading of the mainboard list
from

Vendor Board   Status  Required option
to
Vendor Board   Status  Required value for
                       -p internal:mainboard=

Fix lb_vendor_dev_from_string() not to write to the supplied string.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

------------------------------------------------------------------------
r1482 | stefanct | 2011-12-25 10:12:16 +0100 (Sun, 25 Dec 2011) | 20 lines

Add deferred --image processing

The general idea and most of the code are based on the following
commits in the chromiumos flashrom tree:

8fc0740356ca15d02fb1c65ab43b10844f148c3b
bb9049c66ca55e0dc621dd2c70b5d2cb6e5179bf
Signed-off-by: Louis Yung-Chieh Lo <yjlou@chromium.org>

and the main part:
d0ea9ed71e7f86bb8e8db2ca7c32a96de25343d8
Signed-off-by: David Hendricks <dhendrix@chromium.org>

This implementation does not defer the processing until doit(), but after the
argument parsing loop only (doit() should not contain argument checks).

This allows to specify -i and -l parameters in any order.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: David Hendricks <dhendrix@google.com>
------------------------------------------------------------------------
r1481 | stefanct | 2011-12-25 10:07:59 +0100 (Sun, 25 Dec 2011) | 10 lines

layout: change return type and name of find_next_included_romentry

 - rename from find_next_included_romentry to get_next_included_romentry
 - return a pointer to a rom_entry instead of just its index.
   this relieves the (single existing) caller from directly accessing the
   data structure holding the entries hence improving segregation and
   readability.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1480 | stefanct | 2011-12-24 01:00:32 +0100 (Sat, 24 Dec 2011) | 23 lines

Add ich_descriptor_tool to decode all flash descriptors stored in a flash dump file

This patch adds an external utility that shares most of the existing descriptor
decoding source code. Additionally to what is available via FDOC/FDOD this
allows to access:
 - the softstraps which are used to configure the chipset by flash content
   without the need for BIOS routines. on ICH8 it is possible to read those
   with FDOC/FDOC too, but this was removed in later chipsets.
 - the ME VSCC (Vendor Specific Component Capabilities) table. simply put,
   this is an SPI chip database used to figure out the flash's capabilities.
 - the MAC address stored in the GbE image.

Intel thinks this information should be confidential for ICH9 and up, but
references some tidbits in their public documentation.
This patch includes the human-readable information for ICH8, Ibex Peak
(5 series) and Cougar Point (6 series); the latter two were obtained from
leaked "SPI Flash Programming Guides" found by google. Data regarding ICH9
and 10 is unknown to us yet. It can probably found in:
"Intel?\194?\174 ICH7, ICH8, ICH9 and ICH10 ?\226?\128?\148 SPI Family Flash Programming Guide"
Information regarding the upcoming Panther Point chipset is also not included.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Matthias Wenzel <bios@mazzoo.de>
------------------------------------------------------------------------
r1479 | mkarcher | 2011-12-23 00:27:03 +0100 (Fri, 23 Dec 2011) | 12 lines

Fix programmer-centric probe (patch v2)

As reported by Stefan Tauner on IRC, the new programmer-centric logic
is broken by re-using occupied members of the flashes array when changing
to the next programmer. This fixes it.

patch v2:
  prevent probing one chip per programmer even if the array is full. Using
  a do-while loop was a bad idea.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1478 | hailfinger | 2011-12-20 03:08:14 +0100 (Tue, 20 Dec 2011) | 10 lines

ft2232_spi: fix arm-usb-ocd and arm-usb-ocd-h

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).

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1477 | hailfinger | 2011-12-20 02:54:19 +0100 (Tue, 20 Dec 2011) | 12 lines

Speed up dediprog SPI page writes

All chips which use spi_chip_write_256 should be written at native
speed. Chips using spi_chip_write_1 or spi_chip_write_aai will
still be slow.

Thanks to Steven A. Falco for testing with a ST/Numonyx M25P16.
Thanks to David Hendricks for testing with a Winbond W25Q64.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Steven A. Falco <sfalco@coincident.com>

------------------------------------------------------------------------
r1476 | hailfinger | 2011-12-20 01:51:44 +0100 (Tue, 20 Dec 2011) | 20 lines

Cross-compilation fixes

Switch from host OS detection to target OS detection.
Complain about unknown target OS/architecture.
Disable annoying format string warnings on DJGPP.

Native and cross-compilation now usually just require setting CC.
Examples:
make CC=i586-pc-msdosdjgpp-gcc
make CC="clang -m64"
make CC=i686-w64-mingw32-gcc

Tested for a boatload of native and cross compilation configurations.

There is a new target "make libpayload" in case you don't want to
specify all tools by hand.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: David Hendricks <dhendrix@google.com>

------------------------------------------------------------------------
r1475 | hailfinger | 2011-12-20 01:19:29 +0100 (Tue, 20 Dec 2011) | 26 lines

Have all programmer init functions register bus masters/programmers

All programmer types (Parallel, SPI, Opaque) now register themselves
into a generic programmer list and probing is now programmer-centric
instead of chip-centric.
Registering multiple SPI/... masters at the same time is now possible
without any problems. Handling multiple flash chips is still unchanged,
but now we have the infrastructure to deal with "dual BIOS" and "one
flash behind southbridge and one flash behind EC" sanely.

A nice side effect is that this patch kills quite a few global variables
and improves the situation for libflashrom.

Hint for developers:
struct {spi,par,opaque}_programmer now have a void *data pointer to
store any additional programmer-specific data, e.g. hardware
configuration info.

Note:
flashrom -f -c FOO -r forced_read.bin
does not work anymore. We have to find an architecturally clean way to
solve this.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1474 | hailfinger | 2011-12-18 16:01:24 +0100 (Sun, 18 Dec 2011) | 14 lines

Add struct flashctx * parameter to all functions accessing flash chips.

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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1473 | hailfinger | 2011-12-14 23:25:15 +0100 (Wed, 14 Dec 2011) | 20 lines

Use struct flashctx instead of struct flashchip for flash chip access

struct flashchip is used only for the flashchips array and for
operations which do not access hardware, e.g. printing a list of
supported flash chips.

struct flashctx (flash context) contains all data available in
struct flashchip, but it also contains runtime information like
mapping addresses. struct flashctx is expected to grow additional
members over time, a prime candidate being programmer info.
struct flashctx contains all of struct flashchip with identical
member layout, but struct flashctx has additional members at the end.

The separation between struct flashchip/flashctx shrinks the memory
requirement of the big flashchips array and allows future extension
of flashctx without having to worry about bloat.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1472 | hailfinger | 2011-12-08 08:49:11 +0100 (Thu, 08 Dec 2011) | 8 lines

Update URLs in print.c

Move Asus A8Jm, Asus M6Ne to the laptop section.
No working URL for the A8Jm found.

Signed-off-by: Benjamin Bellec <b.bellec@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1471 | stefanct | 2011-12-02 22:48:17 +0100 (Fri, 02 Dec 2011) | 40 lines

Add a bunch of new/tested stuff and various small changes 9

Tested mainboards:
OK:
- ABIT NF-M2S
  http://www.flashrom.org/pipermail/flashrom/2011-October/008155.html
- ASUS P5K-VM
  http://www.flashrom.org/pipermail/flashrom/2011-October/008172.html
- ASUS M5A99X EVO
  http://www.flashrom.org/pipermail/flashrom/2011-October/008152.html
- ASUS Z8PE-D12
  http://www.flashrom.org/pipermail/flashrom/2011-November/008195.html
- PC Engines Alix.2d3
  http://www.flashrom.org/pipermail/flashrom/2011-November/008244.html
NOT OK:
- ASUS P8H61 PRO
  http://www.flashrom.org/pipermail/flashrom/2011-November/008308.html
- ASUS P8P67 (rev. 3.1)
  http://www.flashrom.org/pipermail/flashrom/2011-November/008292.html
- MSI MS-7613 (Iona-GL8E)
  http://www.flashrom.org/pipermail/flashrom/2011-November/008295.html
- MSI MS-7635 (H55M-ED55)
  http://www.flashrom.org/pipermail/flashrom/2011-October/008167.html
- Supermicro X9SCL
  http://www.flashrom.org/pipermail/flashrom/2011-November/008254.html
- ZOTAC H67-ITX WiFi
  http://paste.flashrom.org/view.php?id=902

Tested flash chips:
- mark Pm29F002T as TEST_OK_PREW
  http://www.flashrom.org/pipermail/flashrom/2011-October/008171.html
- mark AMIC A49LF040A as TEST_OK_PREW
  http://www.flashrom.org/pipermail/flashrom/2011-November/008244.html
- mark Winbond W39V040FC as TEST_OK_PREW
  http://www.flashrom.org/pipermail/flashrom/2011-November/008281.html

- source format fixes

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1470 | stefanct | 2011-11-23 10:13:48 +0100 (Wed, 23 Nov 2011) | 7 lines

Unsignify lengths and addresses in chip functions and structs

Push those changes forward where needed to prevent new sign
conversion warnings where possible.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1469 | stefanct | 2011-11-19 20:31:17 +0100 (Sat, 19 Nov 2011) | 6 lines

Add board enable for ASUS A7N8X-VM/400

http://www.flashrom.org/pipermail/flashrom/2011-November/008274.html

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1468 | stefanct | 2011-11-16 23:08:11 +0100 (Wed, 16 Nov 2011) | 11 lines

Add board enable for ASRock ConRoeXFire-eSATA2

The reverse engineering was done by Joshua. The actual patch was
fabricated by Paul with some polishing by Stefan.

Success log:
http://www.flashrom.org/pipermail/flashrom/2011-November/008257.html

Signed-off-by: Joshua Roys <roysjosh at gmail.com>
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1467 | stefanct | 2011-11-15 09:08:15 +0100 (Tue, 15 Nov 2011) | 14 lines

Add board enable for ASUS P4GV-LA (Guppy)

The reverse engineering was done by Joshua. The actual patch was
fabricated by Stefan.

Request:
http://www.flashrom.org/pipermail/flashrom/2011-November/008241.html
Success report:
http://paste.flashrom.org/view.php?id=914

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Tested-by: Mugendai <mugendai42@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1466 | stefanct | 2011-11-14 14:00:12 +0100 (Mon, 14 Nov 2011) | 12 lines

board_enable.c: Make it8712f_gpio_set generic

This looks suspiciously like intel_ich_gpio_set.

Based on that, add board enables for the ASUS P5N-D and P5N-E SLI.
This was tested by Guillaume Poirier-Morency on a P5N-D:
http://www.flashrom.org/pipermail/flashrom/2011-August/007706.html

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Small changes were also contributed and
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1465 | stefanct | 2011-11-14 00:03:30 +0100 (Mon, 14 Nov 2011) | 7 lines

Create a directory for documentation files

Move the serprog specification there and document a few things we could not
figure out on intel platforms yet.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1464 | stefanct | 2011-11-13 16:17:10 +0100 (Sun, 13 Nov 2011) | 11 lines

ichspi: fix ich_init_opcodes() calls in ich_init_spi()

By calling it early ichspi_lock was not set up correctly in accordance
with the corresponding register, hence ich_init_opcodes() was always
trying to programming the opcodes instead of reading them in from the
opmenu in case of a locked down configuration.

Thanks to Jonathan A. Kollasch for reporting this bug.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1463 | hailfinger | 2011-11-10 00:40:00 +0100 (Thu, 10 Nov 2011) | 16 lines

Register Parallel/LPC/FWH programmers the same way SPI programmers are registered.

All programmers are now calling programmer registration functions and
direct manipulations of buses_supported are not needed/possible anymore.

Note: Programmers without parallel/LPC/FWH chip support should not call
register_par_programmer().

Additional fixes:
Set max_rom_decode.parallel for drkaiser.
Remove abuse of programmer_map_flash_region in it85spi.
Annotate several FIXMEs in it85spi.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-By: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1462 | stefanct | 2011-11-08 12:55:24 +0100 (Tue, 08 Nov 2011) | 6 lines

ichspi: print flash descriptor dependent information only when it is valid

Also, fix some coding style issues.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1461 | stefanct | 2011-11-08 11:55:54 +0100 (Tue, 08 Nov 2011) | 30 lines

ichspi: add support for Intel Hardware Sequencing

Based on the new opaque programmer framework this patch adds support
for Intel Hardware Sequencing on ICH8 and its successors.

By default (or when setting the ich_spi_mode option to auto)
the module tries to use swseq and only activates hwseq if need be:
- if important opcodes are inaccessible due to lockdown
- if more than one flash chip is attached.
The other options (swseq, hwseq) select the respective mode (if possible).

A general description of Hardware Sequencing can be found in this blog entry:
http://blogs.coreboot.org/blog/2011/06/11/gsoc-2011-flashrom-part-1/

Besides adding hwseq this patch also introduces these unrelated changes:

- Fix enable_flash_ich_dc_spi to pass ERROR_FATAL from ich_init_spi.
  The whole error handling looks a bit odd to me, so this patch does
  change very little. Also, it does not touch the tunnelcreek method,
  which should be refactored anyway.

- Add null-pointer guards to find_opcode and find_preop
  to matches the other opcode methods better:
  curopcodes == NULL has some meaning and is actively used/checked in
  other functions.

TODO: adding real documentation when we have a directory for it

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1460 | stefanct | 2011-11-07 00:51:09 +0100 (Mon, 07 Nov 2011) | 27 lines

ichspi: use a variable to distinguish ich generations instead of spi_programmer->type

The type member is enough most of the time to derive the wanted
information, but
 - not always (e.g. ich_set_bbar),
 - only available after registration, which we want to delay till the
   end of init, and
 - we really want to distinguish between chipset version-grained
   attributes which are not reflected by the registered programmer.

Hence this patch introduces a new static variable which is set up
early by the init functions and allows us to get rid of all "switch
(spi_programmer->type)" in ichspi.c. We reuse the enum introduced
for descriptor mode for the type of the new variable.

Previously magic numbers were passed by chipset_enable wrappers. Now
they use the enumeration items too. To get this working the enum
definition had to be moved to programmer.h.

Another noteworthy detail: previously we have checked for a valid
programmer/ich generation all over the place. I have removed those
checks and added one single check in the init method. Calling any
function of a programmer without executing the init method first, is
undefined behavior.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1459 | hailfinger | 2011-11-04 22:35:26 +0100 (Fri, 04 Nov 2011) | 10 lines

Add opaque programmer registration infrastructure

An opaque programmer does not allow direct flash access and only offers
abstract probe/read/erase/write methods.
Due to that, opaque programmers need their own infrastructure and
registration framework.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1458 | stefanct | 2011-11-02 15:31:18 +0100 (Wed, 02 Nov 2011) | 9 lines

Add board enable for Sun Ultra 40 M2

Failure report with logs:
http://www.flashrom.org/pipermail/flashrom/2011-October/008158.html
Success report:
http://paste.flashrom.org/view.php?id=889

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1457 | stefanct | 2011-10-23 00:01:09 +0200 (Sun, 23 Oct 2011) | 58 lines

Fix all ASUS P5GD* board enables

Changes related to P5GD1 variants:
- Reorder "P5GD1 Pro" in print.c and include a DMI patter to its board enable
- Add an untested "P5GD1(-VM)" board enable and add an entry to print.c
- Add P5GD1-VM/S variant as reported by "Limer"

Changes related to P5GD(2/C) variants:
- Fix the name of "P5GDC-V Deluxe" board enable and add a DMI pattern and
  print.c entry. NB: there is no "P5GDC-V" board.
- Add a generic match for P5GD(2/C)* boards with a not tested tag.
  This are the potential targets for this according to the asus ftp:
  ftp://ftp.asus.com.tw/pub/ASUS/mb/socket775/
   Unsupported variants of the P5GD2:
    P5GD2, P5GD2 Deluxe, P5GD2 Pro, P5GD2-X
    (P5GD2 Premium is already tested)
    (there seems to be also a P5GD2-TVM/GB/SI in the wild, which is not known to
    asus :)
   Unsupported variants of the P5GDC:
   P5GDC Pro, P5GDC-MX
    (P5GDC Deluxe and P5GDC-V Deluxe are already tested)

 References:
P5GD1 PRO (dmi "P5GD1 PRO")
  smbus: 0x8086, 0x266a, 0x1043, 0x80a6; audio: 0x8086, 0x2668, 0x1043, *0x814e*
  http://www.coreboot.org/pipermail/flashrom/2010-August/004539.html
P5GD1 (dmi "P5GD1")
  The non-pro version seems to match the pro pci pattern, but could be
  distinguished by the SATA ID of 1043:2604 vs. 1043:2601:
  https://launchpadlibrarian.net/62167576/Lspci.txt
  or a DMI pattern of course.
P5GD1-VM (dmi "P5GD1-VM")
  This does also match the current PCI IDs.
  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/465379

- P5GD2 Premium (dmi "P5GD2-Premium")
  smbus: 0x8086, 0x266a, 0x1043, 0x80a6; audio: 0x8086, 0x2668, 0x1043, 0x813d
  http://www.flashrom.org/pipermail/flashrom/2010-August/004555.html
- P5GDC-V Deluxe (dmi "P5GDC-V")
  smbus: 0x8086, 0x266a, 0x1043, 0x80a6; audio: 0x8086, 0x2668, 0x1043, 0x813d
  http://www.flashrom.org/pipermail/flashrom/2010-September/004939.html
- P5GDC Deluxe (dmi "P5GDC")
  smbus: 0x8086, 0x266a, 0x1043, 0x80a6; audio: 0x8086, 0x2668, 0x1043, 0x813d
  http://www.flashrom.org/pipermail/flashrom/2010-September/004684.html

- P5GDC Pro, P5GDC-MX, P5GD2-X, P5GD2 Pro, P5GD2
  no useful logs found
- P5GD2-Deluxe (dmi "P5GD2-Deluxe")
  smbus: 0x8086, 0x266a, 0x1043, 0x80a6; audio: 0x8086, 0x2668, 0x1043, 0x813d
  https://bugs.launchpad.net/ubuntu/+source/foomatic-filters/+bug/572514

- P5GD2-TVM/GB/SI (dmi "P5GD2-TVM/GB/SI")
  smbus: 0x8086, 0x266a, 0x1043, 0x266a; audio: 0x8086, 0x2668, 0x1043, *0x81a7*
  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/462500

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
and due to the tremendous interest... ;)
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1456 | stefanct | 2011-10-22 23:45:27 +0200 (Sat, 22 Oct 2011) | 8 lines

serprog: small improvements

- rename serprog_delay parameter to usecs
- fix code style, (output) formatting issues and comments
- sp_docommand: remove unnecessary malloc+memcpy and fix formatting

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
------------------------------------------------------------------------
r1455 | stefanct | 2011-10-21 15:20:11 +0200 (Fri, 21 Oct 2011) | 13 lines

Add board enable for ABIT AV8

I disassembled the write enable and the write disable functions from
the Award BIOS image and reconstructed C code to understand for
myself what happens. For details see:
http://www.flashrom.org/pipermail/flashrom/2011-October/008033.html

I compared the download pages of both, abit AV8 and abit AV8-3rd Eye,
and the BIOS downloads are the same. So it's save to assume that this
board enable works on both versions. Tested on AV8.

Signed-off-by: Christoph Grenz <christophg+cb@grenz-bonn.de>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1454 | stefanct | 2011-10-21 14:33:07 +0200 (Fri, 21 Oct 2011) | 87 lines

Add a bunch of new/tested stuff and various small changes 8

Tested mainboards:
OK:
- ASUS Crosshair II Formula
  http://www.flashrom.org/pipermail/flashrom/2011-September/007888.html
- ASUS K8N
  http://paste.flashrom.org/view.php?id=856
- ASUS M2N-E SLI
  http://www.flashrom.org/pipermail/flashrom/2011-September/007909.html
- ASUS M3N78-VM
  http://www.flashrom.org/pipermail/flashrom/2011-May/006496.html
- ASUS M4A78LT-M LE
  http://www.flashrom.org/pipermail/flashrom/2011-September/007869.html
- ASUS M4A89GTD PRO
  http://www.flashrom.org/pipermail/flashrom/2011-February/005824.html
- MSI A75MA-G55 (MS-7696)
  http://www.flashrom.org/pipermail/flashrom/2011-October/008055.html
- PCCHIPS M598LMR (V9.0)
  http://www.flashrom.org/pipermail/flashrom/2011-October/008051.html
- ECS P4VXMS (V1.0A)
  http://www.flashrom.org/pipermail/flashrom/2011-September/007986.html
- Foxconn P4M800P7MA-RS2
  http://www.flashrom.org/pipermail/flashrom/2011-October/008114.html
- GIGABYTE GA-P67A-UD3P
  http://www.flashrom.org/pipermail/flashrom/2011-September/007930.html
- GIGABYTE Z68MX-UD2H-B
  http://www.flashrom.org/pipermail/flashrom/2011-October/008080.html
- ZOTAC Fusion-ITX WiFi (FUSION350-A-E)
  http://www.flashrom.org/pipermail/flashrom/2011-October/008011.html
NOT OK:
- ASUS P8B-E/4L
  http://www.flashrom.org/pipermail/flashrom/2011-October/008047.html
- ASUS P8B WS
  http://www.flashrom.org/pipermail/flashrom/2011-October/008081.html

Tested chipsets:
- MCP78S (:075d)
  http://www.flashrom.org/pipermail/flashrom/2011-August/007612.html
- VT8233 (:3074)
  http://www.flashrom.org/pipermail/flashrom/2011-September/007986.html
- SiS 530 (:0530)
  http://www.flashrom.org/pipermail/flashrom/2011-October/008051.html
- P67 (:1c46)
  http://www.flashrom.org/pipermail/flashrom/2011-September/007930.html
 - Z68 (:1c44)
  http://www.flashrom.org/pipermail/flashrom/2011-October/008080.html

Tested flash chips:
- mark AMIC A29002T as TEST_OK_PREW
  http://www.flashrom.org/pipermail/flashrom/2011-October/008085.html
- mark Eon EN29F002(A)(N)T as TEST_OK_PREW
  http://www.flashrom.org/pipermail/flashrom/2011-October/008053.html
- mark EonEN25F16 as  TEST_OK_PREW
  http://www.flashrom.org/pipermail/flashrom/2011-February/005824.html
- mark Macronix MX29F002(N)T as TEST_OK_PREW
  http://www.flashrom.org/pipermail/flashrom/2011-October/008083.html
- mark Pm39LV040 as TEST_OK_PR
  http://www.flashrom.org/pipermail/flashrom/2011-September/007942.html
- mark Pm39LV010 as TEST_OK_PREW
  http://www.flashrom.org/pipermail/flashrom/2011-September/007942.html
- mark SST49LF008A as TEST_OK_PREW
  http://www.flashrom.org/pipermail/flashrom/2011-September/007989.html
- mark SyncMOS {F,S,V}29C51002T as TEST_OK_PREW
  http://www.flashrom.org/pipermail/flashrom/2011-October/008052.html
- mark W39V040B as write tested
  http://www.flashrom.org/pipermail/flashrom/2011-October/008114.html
- mark W39V040C as  TEST_OK_PREW
  http://www.flashrom.org/pipermail/flashrom/2011-October/008114.html

- remove superfluous line break in enable_flash_ich_dc_spi
- m->M in "min" and "max" (voltage) in print_wiki.c

- spi25: get rid of unneccessary line breaks (on failed probes)
which is
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

- rayer_spi.c: Remove double word: `s/the the/the/`
which is
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>

The parts added until 2011-10-14 (most of this patch) were
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

everything else is
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1453 | uwe | 2011-10-21 01:14:10 +0200 (Fri, 21 Oct 2011) | 33 lines

Add support for the GOEPEL PicoTAP programmer.

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).

Signed-off-by: Samir Ibrad?\197?\190i?\196?\135 <sibradzic@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1452 | stefanct | 2011-10-20 14:57:14 +0200 (Thu, 20 Oct 2011) | 7 lines

ichspi: add (partially) dead support code for Intel Hardware Sequencing

This was done to ease the review. Another patch will hook up (and
explain) this code later.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1451 | uwe | 2011-10-14 22:33:14 +0200 (Fri, 14 Oct 2011) | 28 lines

TIAO/DIYGADGET USB Multi-Protocol Adapter (TUMPA) support.

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.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>


------------------------------------------------------------------------
r1450 | stefanct | 2011-09-19 00:42:18 +0200 (Mon, 19 Sep 2011) | 17 lines

Revert "Unsignify lengths and addresses in chip functions and structs"

- probe_timing was changed to unsigned although we use negative values
  for special cases
- some code was not changed along hence did no longer compile:
  * dediprog's read and write functions
  * linux_spi's read and write functions
- it introduced a number of new sign conversion warnings
  (http://paste.flashrom.org/view.php?id=832)

To be safe this patch reverts all changes made in r1448, a corrected
patch will follow later.

Thanks to idwer for pointing out the problem first!

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1449 | stefanct | 2011-09-18 17:15:31 +0200 (Sun, 18 Sep 2011) | 11 lines

ichspi: inform the user about the consequences of the security override strap

Ibex Peak SPI Programming Guide:
The PCH has a mechanism to set up to 5 address ranges from HOST access. These are
defined in PR0, PR1, PR2, PR3 and PR4 in the PCH EDS. These address ranges are NOT
unlocked by assertion of Flash descriptor Override.

Also, the datasheets mention the bit in their description of FRAP but not PR[N].

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1448 | stefanct | 2011-09-18 02:41:33 +0200 (Sun, 18 Sep 2011) | 4 lines

Unsignify lengths and addresses in chip functions and structs

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1447 | stefanct | 2011-09-18 00:21:55 +0200 (Sun, 18 Sep 2011) | 8 lines

ichspi: unlock PR register restrictions on ICH8+ if not locked down

Tested-by: Shailendra Sodhi
(predecessor/proof of concept patch)
http://www.flashrom.org/pipermail/flashrom/2011-August/007717.html

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1446 | stefanct | 2011-09-17 23:21:48 +0200 (Sat, 17 Sep 2011) | 4 lines

ichspi: add prettyprinting for PR registers on ICH8+

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1445 | stefanct | 2011-09-17 23:21:42 +0200 (Sat, 17 Sep 2011) | 10 lines

ichspi: don't touch the nonexistent(?) BBAR register on ICH8

There is no sign of BBAR (BIOS Base Address Configuration Register)
in the public datasheet (or specification update) of the ICH8. Also,
the offset of that register has changed between ICH7 (SPIBAR + 50h)
and ICH9 (SPIBAR + A0h), so we have no clue if or where it is on
ICH8. Better don't try to touch it at all and assume/hope it is 0.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1444 | stefanct | 2011-09-17 21:53:11 +0200 (Sat, 17 Sep 2011) | 6 lines

ichspi: improve prettyprint_opcodes

add headers for the columns and some decoding into human readable format.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1443 | stefanct | 2011-09-16 01:52:55 +0200 (Fri, 16 Sep 2011) | 43 lines

ichspi: add ICH/PCH flash descriptor decoding via FDOC/FDOD

based on the work of Matthias 'mazzoo' Wenzel this patch adds pretty
printing of those ICH/PCH flash descriptor sections that are
cached/mapped by the chipset (and which are therefore reachable via
FDOC/FDOD registers).

this includes the following:
- content section:
    describes the image and some generic properties (number of
    sections, offset of sections, PCH/ICH and MCH/PROC strap
    offsets and lengths)
- component section:
    identify the different SPI flash chips and their capabilities.
- region section
    similarly to a partition table this describes the different regions.
    the content of FLREG* is derived from this section.
- master section
    defines SPI master (host, ME, GbE) access rights of the
    individual regions. the content of PR* is derived from this section.

this is only a part of the data included in the descriptor. other
information can be retrieved from a complete binary dump of the
descriptor region only.

this patch also adds macros and pretty printing for "Vendor Specific
Component Capabilities" registers: there are two of them: lower and
upper. they describe the properties of the address space divided by
FPBA (which allows to use multiple flash chips or partitions with
different properties). the properties of all supported flash chips
(together with their RDIDs) are stored in the same format in table
in a descriptor section (which is used by the ME apparently). a
later patch will use the macros outside of ichspi.c which is the
reason why the prettyprinting function and the register bit macros
are not defined in ichspi.c but ich_descriptors.h (else they would
be moved in the follow-up patch).

because this patch relies on (compiler) implementation-specific
layouting of bit-fields, it checks for correct layout before taking
any action on runtime.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1442 | stefanct | 2011-09-16 01:38:14 +0200 (Fri, 16 Sep 2011) | 9 lines

serprog: add SPI support

Adds a new opcode (0x13) that just relays SPI bytes and wires it up to be
usable within serprog.c. Checks for mandatory opcodes are moved around and
changed a bit, but non-SPI programmers should not be harmed by this patch.

Signed-off-by: Urja Rannikko <urjaman@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
------------------------------------------------------------------------
r1441 | stefanct | 2011-09-15 00:09:48 +0200 (Thu, 15 Sep 2011) | 8 lines

Add printing of chip voltage ranges to print_wiki.c

- add voltage ranges
- center some headers (test values OK, No, ? are centered via wiki templates)
- fix style error in header (align:right -> text-align:right)

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
------------------------------------------------------------------------
r1440 | stefanct | 2011-09-14 01:14:25 +0200 (Wed, 14 Sep 2011) | 9 lines

Make the laptop warning less scary if unsure

Telling the user to use "force_I_want_a_brick" if it is not even a
laptop, is a bit over-the-top. Introduce a new laptop parameter
"this_is_not_a_laptop" that allows to force operation, but only if
the detection is not sure.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1439 | uwe | 2011-09-14 00:05:44 +0200 (Wed, 14 Sep 2011) | 10 lines

Add probe/read support for the Catalyst CAT28F512 chip.

Write and erase are NOT yet supported!

Probe and read are tested by Andrew Morgan and Uwe Hermann on Intel NICs.

Signed-off-by: Andrew Morgan <ziltro@ziltro.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1438 | stefanct | 2011-09-13 00:55:01 +0200 (Tue, 13 Sep 2011) | 17 lines

Reformat -L output and add printing of chip voltage ranges to print.c

besides adding output for the voltage ranges, this patch also changes
various aspects of the -L output:
- sizes are right aligned now with a fixed length of 5
- space between columns is selectable with a constant
- test results are always shown in the same column ("PR" and " R"
  instead of "PR" and "R ")
- vendor and device names are split on a delimiter (currently '/') and
  spread over mutliple lines but only if the tokens are not too short.
  all other columns are printed on the first line of a chip.
- voltage ranges are printed in verbose mode only

it also gets rid of POS_PRINT and digits

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1437 | hailfinger | 2011-09-12 08:17:06 +0200 (Mon, 12 Sep 2011) | 9 lines

Add support for Xilinx parallel III (DLC5) programing cable

The rayer_spi driver defaults to the RayeR cable, but selecting other
predefined pin layouts with the type= parameter is possible:
flashrom -p rayer_spi:type=xilinx

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

------------------------------------------------------------------------
r1436 | stefanct | 2011-09-12 00:08:58 +0200 (Mon, 12 Sep 2011) | 10 lines

Print out the flash chip found after the probing loop in verbose mode

This allows easier identification of the flash chip used in verbose logs.
There is no (additional) output if
* -c is used to specify a flash chip, or
* multiple chips are detected, or
* no chips are detected.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
------------------------------------------------------------------------
r1435 | stefanct | 2011-09-09 14:46:32 +0200 (Fri, 09 Sep 2011) | 8 lines

Revamp the warning of failing to set BIOS write enable in enable_flash_ich

 - introduce a new variable 'wanted' that is used instead of 'new'
 - use 'new' for the actual value contained in BIOS_CNTL after we tried to write it
 - rephrase the warning which now also includes the old and new values besides the wanted one

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
------------------------------------------------------------------------
r1434 | uwe | 2011-09-08 21:55:18 +0200 (Thu, 08 Sep 2011) | 11 lines

Add initial Atmel AT49LH002 FWH/LPC chip support.

The chip code is untested, only one erase function out of two is currently
implemented, and unlocking/printlocking is not yet supported.

Thanks Mattias Mattsson <vitplister@gmail.com> for the initial patch!

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1433 | hailfinger | 2011-09-08 02:00:29 +0200 (Thu, 08 Sep 2011) | 12 lines

Change programmer selection in cli and generic code

Bugfix: Do not accept multiple conflicting --programmer selections.
Restriction: Do not accept multiple --programmer selections even if
  there is no conflict.
Unexport the programmer variable.
programmer_init requires the programmer as first parameter.
The default programmer selection is now part of cli_classic.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

------------------------------------------------------------------------
r1432 | uwe | 2011-09-07 22:48:34 +0200 (Wed, 07 Sep 2011) | 6 lines

Small fixes for the linux_spi programmer code.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1431 | uwe | 2011-09-07 22:20:25 +0200 (Wed, 07 Sep 2011) | 12 lines

Mark the GIGABYTE GA-8I945GZME-RH and SST SST25LF040A as supported.

Success report:
http://www.flashrom.org/pipermail/flashrom/2011-June/006797.html

lspci and other info:
http://www.flashrom.org/pipermail/flashrom/2010-August/004531.html

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1430 | uwe | 2011-09-07 21:18:25 +0200 (Wed, 07 Sep 2011) | 19 lines

Add Intel Tunnel Creek chipset support, mark it as tested.

Intel's Tunnel Creek chipset supports both an SPI and an LPC bus. Set the
chipset table entry for Tunnel Creek to the new function
enable_flash_tunnelcreek(), which will read the hardware straps and return
support for the bus that has been used for booting. This function uses
ich_init_spi() with ich_generation set to 7 for initializing the SPI bus
if necessary.

SPI functionality tested on actual hardware, Tunnel Creek LPC interface not
tested yet (missing hardware for that).

Log file / success report:
http://www.flashrom.org/pipermail/flashrom/2011-September/007823.html

Signed-off-by: Ingo Feldschmid <ifel@msc-ge.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1429 | uwe | 2011-09-06 20:49:31 +0200 (Tue, 06 Sep 2011) | 6 lines

Kill all exit() calls in chipset_enable.c.

Signed-off-by: Tadas Slotkus <devtadas@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1428 | uwe | 2011-09-06 20:17:02 +0200 (Tue, 06 Sep 2011) | 6 lines

Fix linux_spi.c build on 32bit systems.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1427 | uwe | 2011-09-03 20:37:52 +0200 (Sat, 03 Sep 2011) | 21 lines

Add support for the Linux SPI subsystem (spidev).

See http://www.kernel.org/doc/Documentation/spi/spidev for an introduction.

Usage is as follows:

  flashrom -p linux_spi:dev=/dev/spidevX.Y

where X is the bus number, and Y device. It accepts an optional parameter
'speed' which allows to set the SPI clock speed in kHz.

Tested on an Atmel AVR32AP7000 board (NGW100 Network Gateway Kit), see
below, which was used to program a ThinkPad X60, but it should work on every
other Linux system, too.
  
  http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4102)

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1426 | uwe | 2011-09-03 19:15:00 +0200 (Sat, 03 Sep 2011) | 6 lines

Introduce ERROR_FATAL, abort upon failed chipset enables.

Signed-off-by: Tadas Slotkus <devtadas@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1425 | stefanct | 2011-09-03 13:22:27 +0200 (Sat, 03 Sep 2011) | 92 lines

Add a bunch of new/tested stuff and various small changes 7

- add Asus Crosshair IV Extreme to the list of supported boards
  http://www.flashrom.org/pipermail/flashrom/2011-August/007640.html
- add Biostar N68S3+ to the list of supported boards
  http://www.flashrom.org/pipermail/flashrom/2011-September/007788.html
- add P7H55-M LX to the list of supported boards
  although flashrom works correctly, it is marked as not ok, because flashing the
  vendor image will break the LAN interface.
- add GA-X58A-UD7 to the list of supported boards
  http://paste.flashrom.org/view.php?id=739
- add Asus P4P800-VM to print.c
  (has a working board enable)
- add Asus K8V-X to print.c
  reported by florz
  http://paste.flashrom.org/view.php?id=742
- add Intel D865GLC to print.c as non-working (ICH5 with BIOS lock enable)
  reported by jmd on IRC
  http://paste.flashrom.org/view.php?id=775
- add Intel DH67CF to print.c as non-working (H67 with BIOS lock enable and locked ME region)
  http://www.flashrom.org/pipermail/flashrom/2011-September/007789.html
- add ECS P4M800PRO-M (V1.0A) to the list of supported boards
  reported by dweg on IRC (hot flashed a SST49LF040B, original was W39V040B)
- add X8DTU-6TF+ to print.c (needs ME unlocking)
  http://www.flashrom.org/pipermail/flashrom/2011-August/007553.html
- add Shuttle FH67 (used in the SH67H3 barebone) to the list of supported boards
  http://www.flashrom.org/pipermail/flashrom/2011-August/007749.html
- add Tyan S2912 to the list of supported boards
  reported by erlan on IRC
- add ZOTAC GeForce 8200 to the list of supported boards
  http://www.flashrom.org/pipermail/flashrom/2011-August/007612.html

- mark AT25DF321A as TEST_OK_PROBE
  http://www.flashrom.org/pipermail/flashrom/2011-August/007553.html
- mark 28F001BN/BX-T as TEST_OK_PR
  http://www.flashrom.org/pipermail/flashrom/2011-July/007208.html
- rename MX29F002
  http://patchwork.coreboot.org/patch/2794/
- mark SST39SF040 as fully tested
  reported by Florian 'florz' Zumbiehl
  http://paste.flashrom.org/view.php?id=742
- mark SST49LF040B as fully tested
  reported by dweg on IRC and later by Armin on the ml:
  http://www.flashrom.org/pipermail/flashrom/2011-August/007764.html

- mark H55 chipset as OK
  http://www.flashrom.org/pipermail/flashrom/2011-July/007432.html
- mark H67 chipset as OK
  http://www.flashrom.org/pipermail/flashrom/2011-August/007749.html
- mark a MCP61 version as OK
  http://www.flashrom.org/pipermail/flashrom/2011-September/007788.html
- add preliminary X79 (patsburg) PCI IDs
  0x1d40 was reported already as working (not archived in our pipermail?)
  http://marc.info/?l=flashrom&m=130683026218257&w=2

- mark "82557/8/9/0/1 Ethernet Pro 100" in nicintel.c as working
  http://www.flashrom.org/pipermail/flashrom/2011-August/007480.html

- rename some chips that had gratuitous "probing" suffixes:
  - SST25VF010.REMS
  - SST25VF040.REMS
  - M25P05.RES
  - M25P10.RES
  some other chip names with suffixes are needed due to lack of support
  for multiple probe functions per chip. this is explained here:
  http://www.flashrom.org/pipermail/flashrom/2011-August/007597.html

- remove unneeded nicintel_spi-related function declarations in programmer.h

- typos and whitespace fixes

- fix Asus P4P800-E Deluxe detection
  The original board enable was added before DMI matching and used
  the IDs of a Promise controller as secondary PCI ID set. The
  controller could be disabled in the BIOS which would make the
  board not match. This patch uses the SMBus controller instead and
  adds a DMI pattern. This was
Tested-by: Michael Schneider <vdrportal_midas at gmx dot de>

- add "Sealed-case PC" to the list of chassis type (as indicating "not a laptop")
This is
Acked-by: Idwer Vollering <vidwer@gmail.com>

the fix for the typo unusued -> unused is
Signed-off-by: Sylvain "ythier" Hitier <sylvain.hitier@gmail.com>

everything else is
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

And everything was reviewed and
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
------------------------------------------------------------------------
r1424 | hailfinger | 2011-08-31 18:19:50 +0200 (Wed, 31 Aug 2011) | 5 lines

Shorten some board enable related function names

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

------------------------------------------------------------------------
r1423 | stefanct | 2011-08-27 23:19:56 +0200 (Sat, 27 Aug 2011) | 26 lines

Fix printing of the Boot BIOS Straps on Intel chipsets

The meaning of the bits involved has changed several times in the past.
This patch takes these changes into account and hence fixes the output of the
pretty printing of GCS on all SPI-supported Intel chipsets that are not ICH7 or
NM10 (the latter were unaffected, because the defaults were correct).

This patch also allows to differentiate Ibex Peak and Cougar Point chipsets from
the earlier chipset series (ICH10) by adding new wrapper functions that set
"ich_generation" to 11 and 12 respectively. This should not change behavior
outside of enable_flash_ich_dc_spi, because the code path for
ich_generation >=9 is equal.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
---
defining all those arrays is not very elegant, but i think it is at least very
readable this way. improvements are welcome!
reviewers should have an eye on the codepaths for ich_generation >= 9. i did not
spot a problem, but it should be checked again.

alternatively we could just remove the pretty printing of GCS and just output
the bits involved. i would like to keep the pch differentiation anyway though,
because i feel it will become handy in the future.

tested on my QS57-based thinkpad (probe + partial read)
------------------------------------------------------------------------
r1422 | uwe | 2011-08-26 23:11:41 +0200 (Fri, 26 Aug 2011) | 9 lines

Add AMD Hudson chipset-enable.

AMD Hudson has different vendor/device IDs than AMD SBx00, handle
that properly.

Signed-off-by: Wang Qing Pei <wangqingpei@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1421 | uwe | 2011-08-26 00:54:23 +0200 (Fri, 26 Aug 2011) | 9 lines

Mark the AMD Am29LV008BB chip as fully tested.

Thanks Mattias Mattsson <vitplister@gmail.com> for the report.
http://www.flashrom.org/pipermail/flashrom/2011-July/007423.html

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1420 | uwe | 2011-08-26 00:44:11 +0200 (Fri, 26 Aug 2011) | 9 lines

Add support for the Sharp LH28F008BJT-BTLZ1 chip.

Tested by Mattias Mattsson <vitplister@gmail.com> on a PowerPC box.

Signed-off-by: Mattias Mattsson <vitplister@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1419 | stefanct | 2011-08-25 16:06:50 +0200 (Thu, 25 Aug 2011) | 15 lines

Add board enable for ASUS P5LP-LE

Based on the REing of Michael Karcher and a good guess of Idwer Vollering.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Tested-by: Leon Zhang <leoncamel at gmail.com>
http://www.coreboot.org/pipermail/flashrom/2010-August/004500.html
Tested-by: medhi <nefkongo@hotmail.com>
http://paste.flashrom.org/view.php?id=779
Acked-by: Idwer Vollering <vidwer@gmail.com>
---
i have added the DMI match and changed the board enable and wiki comments
a bit. i am not sure if this is the right way to add it, because there are so many
variations, but we can change that later too.
------------------------------------------------------------------------
r1418 | uwe | 2011-08-20 16:16:00 +0200 (Sat, 20 Aug 2011) | 23 lines

Makefile: Fix MinGW build, improve output with bogus CC.

As per IRC discussion, the "ARCH :=" line should be moved after any
lines which set CC, as it uses CC itself. This fixes the MinGW build.

Also, add a "2>/dev/null" in the "ARCH :=" as per suggestion from
Stefan Tauner to improve the output in the case CC is bogus:

Before:
$ make CC=foo
/bin/sh: foo: not found
Checking for a C compiler... not found.
make: *** [compiler] Error 1

After:
$ make CC=foo
Checking for a C compiler... not found.
make: *** [compiler] Error 1

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>


------------------------------------------------------------------------
r1417 | uwe | 2011-08-20 16:14:22 +0200 (Sat, 20 Aug 2011) | 14 lines

Move the main() function from flashrom.c to cli_classic.c.

The file flashrom.c is part of libflashrom and should thus not contain a
main() function, that would break compilation of all frontends using
libflashrom. Also, cli_classic.c is the right place anyway, as it's the
main() of the CLI tool.

Rename the simple wrapper cli_classic() in cli_classic.c to main(), as
it's not really needed.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>


------------------------------------------------------------------------
r1416 | stefanct | 2011-08-18 04:27:19 +0200 (Thu, 18 Aug 2011) | 35 lines

Makefile: fix and simplify test program compilations

this was totally broken due to the make's shell function's temporal
behavior.

quote from the gnu make documentation
(http://www.gnu.org/s/hello/manual/make/Shell-Function.html):
"The commands run by calls to the shell function are run when the
function calls are expanded"
we have used the shell function to echo the test programs to a file.
the file name used was equal for all tests and was overwritten for
each test. the result was that all tests (in a single target?) used
the last test program because the echoing of the test programs was
done before all test compilations(!)
see my mail for details:
http://lists.gnu.org/archive/html/bug-make/2011-08/msg00010.html

also the branching for testing ifeq ($(CONFIG_FT2232_SPI), yes) was
unnecessarily complicated.

in my approach here i am using verbatim variables (allows to define
even complex test programs in the makefile without jumping through
hoops) that get exported to environment variables (via "export",
reference afterwards with "$$<varname>").

i have also added the missing redirection of stderr to the compiler
test and changed the definition of ARCH to use simple expansion (:=).

the latter is still wrong, because it uses $(CC) before we check if
a compiler is installed... makes the compiler check pretty much
useless. The simple expansion just reduces the number of errors
printed to 1.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1415 | stefanct | 2011-08-17 11:50:11 +0200 (Wed, 17 Aug 2011) | 10 lines

Add support for the SST25LF080A flash chip

Based on the definition of SST25LF040A and the public datasheet
available here: http://www.sst.com/dotAsset/40316.pdf

Also, move the SST25LF040A up to keep the list ordered
alphabetically (while removing the ".RES" suffix).

Signed-off-by: Zeus Castro <thezeusjuice@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1414 | stefanct | 2011-08-16 14:08:22 +0200 (Tue, 16 Aug 2011) | 19 lines

Remove unneeded inclusions of chipdrivers.h

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

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1413 | hailfinger | 2011-08-15 21:54:20 +0200 (Mon, 15 Aug 2011) | 11 lines

Fixup of r1397:
- 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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

------------------------------------------------------------------------
r1412 | stefanct | 2011-08-12 03:19:32 +0200 (Fri, 12 Aug 2011) | 13 lines

ft2232_spi: add support for the Dangerous Prototypes Bus Blaster

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

Signed-off-by: Steve Markgraf <steve@steve-m.de>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1411 | stefanct | 2011-08-11 07:47:32 +0200 (Thu, 11 Aug 2011) | 19 lines

Add board enable for ASUS P5GD2 Premium

This is based on Joshua's patch, but with a DMI pattern, contrary to
http://www.flashrom.org/pipermail/flashrom/2010-September/004745.html
Rationale: although it looks like all P5GD2/C* might use the same
board enable (intel_ich_gpio21_raise), we need to add the variants
individually as long as we don't have enough reports to make a
better guess. This also guarantees correct output of flashrom -L and -z
and on activation of the board enable - not like this:
http://www.flashrom.org/pipermail/flashrom/attachments/20100930/2286e5d1/attachment-0003.txt

Success report:
http://www.flashrom.org/pipermail/flashrom/2010-August/004555.html

Also, fix last commit by adding a missing comma.

Tested-by: Roberto Malinverni
Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1410 | stefanct | 2011-08-11 06:21:34 +0200 (Thu, 11 Aug 2011) | 15 lines

Add (untested) board enable for Asus P5LD2

There are numerous other variants of the P5LD2 which vary wildly not only in
PCB layout but also in northbridges used, number of PCI, PCI-E and DIMM slots
etc. This one is for the plain P5LD2 without any suffixes.

This patch is essentially a rebased version of Joshua's patch, which was never
tested (user did not reply). I have added additional PCI IDs and the DMI pattern
and also changed the status to NT. An entry in the print.c table was also added.

http://www.flashrom.org/pipermail/flashrom/2010-October/005080.html

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1409 | stefanct | 2011-08-09 03:49:34 +0200 (Tue, 09 Aug 2011) | 9 lines

ichspi.c: refactor filling and reading the fdata/spid registers

- add ich_fill_data to fill the chipset registers from an array
- add ich_read_data to copy the data from the chipset register into an array
- replace the existing code with calls to those functions
- minor cosmetic changes

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1408 | stefanct | 2011-08-07 15:17:20 +0200 (Sun, 07 Aug 2011) | 8 lines

Add a board enable for ASUS A8M2N-LA (HP OEM "NodusM3-GL8E")

It is based on Joshua Roys' RE.
http://www.flashrom.org/pipermail/flashrom/2011-August/007504.html

Tested-by: M?\195?\161rton Mikl?\195?\179s
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1407 | stefanct | 2011-08-06 18:16:45 +0200 (Sat, 06 Aug 2011) | 19 lines

Fix the A8N-SLI Deluxe board enable

Long story short:
- the A8N in print.c should be A8N-SLI Deluxe as documented
- the A8N-SLI Deluxe board enable needs a DMI pattern, else it will get executed
  on the A8N-SLI Premium unnecessarily.
  http://www.flashrom.org/pipermail/flashrom/2010-August/004310.html
  the DMI string is taken from an ubuntu bug report (a real dmidecode or flashrom
  output was not found).
  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/807980
- the other A8N-SLI variants seem to work without the board enable
  A8N-SLI Premium:
  http://www.flashrom.org/pipermail/flashrom/2010-August/004310.html
  A8N-SLI:
  http://www.coreboot.org/pipermail/coreboot/2009-June/049107.html
  http://www.coreboot.org/pipermail/coreboot/2009-May/049002.html

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1406 | stefanct | 2011-08-06 18:16:33 +0200 (Sat, 06 Aug 2011) | 13 lines

Fix the EP-8NPA7I (for the last time hopefully)

 - retag it as OK (tested by Jonathan Kollasch when he wrote it)
   http://patchwork.coreboot.org/patch/2106/
 - add a line with identical pci ids but a different dmi pattern, so that EP-9NPA7I
   is also matched. combining multiple boards in one line is problematic due to
   print.c's detection of board enables - so dont bother for now.
   http://www.flashrom.org/pipermail/flashrom/2011-June/006878.html

See previous commit for additional information.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1405 | stefanct | 2011-08-06 14:45:21 +0200 (Sat, 06 Aug 2011) | 20 lines

Clear byte 0x92 of the LPC bridge for all CK804 (and MCP51) chipsets

The OEM BIOS on the EPoX EP-8PA7I and a number of other boards clear
byte 0x92 in the LPC bridge configuration space.  Do the same for
all CK804 chips, assuming this to be some sort of chipset-generic
write-enable.

Currently the same chipset enable is used for MCP51 (nForce 430).
There have been reports of successful writes with its variations
(e.g. A8N-LA (Nagami-GL8E)), but they were not tagged as OK. Due to
the new "unsupported chipset"-message we will get success reports in
the case this patch does not break anything on the MCP51-based boards.

See also:
http://www.flashrom.org/pipermail/flashrom/2011-July/007252.html
http://patchwork.coreboot.org/patch/3176/

Signed-off-by: Jonathan Kollasch <jakllsch@kollasch.net>
Acked-by: Joshua Roys <roysjosh@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1404 | stefanct | 2011-08-04 19:40:25 +0200 (Thu, 04 Aug 2011) | 4 lines

Introduce msg_*dbg2

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1403 | stefanct | 2011-08-04 19:37:58 +0200 (Thu, 04 Aug 2011) | 4 lines

Rephrase warnings in chipset_enable.c

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1402 | stefanct | 2011-08-01 20:39:28 +0200 (Mon, 01 Aug 2011) | 22 lines

Switch to AAI for some more SST chips

Enable AAI for:
SST25VF016B
SST25VF040B{,.REMS}
SST25VF080B

Chips that support AAI via a different opcode are annotated with a comment:
SST25VF040.REMS
SST25LF040A.RES

SST25VF080B
Tested-by: Joshua Roys <roysjosh@gmail.com>
Write time (w/erase) went from 46 s to 21 s.

SST25VF016B
Tested-by: No?\195?\169 Rubinstein <nrubinstein@avencall.com>
Write time (w/erase) on a dediprog went from 143 mins to 56 mins.

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Rebased and
Acked-by: No?\195?\169 Rubinstein <nrubinstein@avencall.com>
------------------------------------------------------------------------
r1401 | uwe | 2011-07-29 22:13:45 +0200 (Fri, 29 Jul 2011) | 11 lines

Use __func__ instead of __FUNCTION__ as we do elsewhere.

The __func__ variant is standardized in C99 and recommended to be
used instead of __FUNCTION__ in the gcc info page.

See also r711 where we did the same change.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1400 | uwe | 2011-07-29 14:13:01 +0200 (Fri, 29 Jul 2011) | 9 lines

Make flashrom build on PPC/PowerPC with just "make".

Build-tested in a QEMU ppc (Debian) image, and by Andrew Morgan
<ziltro@ziltro.com> on real hardware.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Andrew Morgan <ziltro@ziltro.com>


------------------------------------------------------------------------
r1399 | stefanct | 2011-07-29 14:06:04 +0200 (Fri, 29 Jul 2011) | 7 lines

extract spi_prettyprint_status_register_amic_a25_srwd

extract spi_prettyprint_status_register_amic_a25_srwd from
spi_prettyprint_status_register_amic_a25l* functions

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1398 | uwe | 2011-07-28 21:23:09 +0200 (Thu, 28 Jul 2011) | 6 lines

manpage: Document all ft2232_spi and serprog variants.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1397 | uwe | 2011-07-28 10:13:25 +0200 (Thu, 28 Jul 2011) | 11 lines

Random whitespace and coding-style fixes.

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.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1396 | hailfinger | 2011-07-27 09:13:06 +0200 (Wed, 27 Jul 2011) | 7 lines

Rename CHIP_BUSTYPE_FOO to BUS_FOO.

It's shorter to type, and we have less problems with the 80 column limit.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1394 | hailfinger | 2011-07-26 22:43:13 +0200 (Tue, 26 Jul 2011) | 7 lines

Increase flashrom release number to 0.9.4

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1393 | stefanct | 2011-07-26 16:33:46 +0200 (Tue, 26 Jul 2011) | 14 lines

add a bunch of new/tested stuff and various small changes 6

- add J-7BXAN to the list of supported boards
  http://www.flashrom.org/pipermail/flashrom/2011-July/007397.html

- fix urls, typos, whitespace etc.

- fix counting of supported chips in the wiki output

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
the last one is
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
everything else is
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1392 | stefanct | 2011-07-26 16:28:35 +0200 (Tue, 26 Jul 2011) | 9 lines

Fix output of erase_and_write_flash and surroundings

see http://www.flashrom.org/pipermail/flashrom/2011-July/007220.html
for a discussion about the details.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1391 | hailfinger | 2011-07-26 16:18:52 +0200 (Tue, 26 Jul 2011) | 9 lines

Fix Winbond W29EE011, W29EE012, W29C010M, W29C011A probing.
According to the datasheets probe_w29ee011 is the only valid probe
function for those chips, but we have reports where those chips
were only detected with probe_jedec, and thus we assume that our
datasheets only cover an earlier stepping.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

------------------------------------------------------------------------
r1390 | stefanct | 2011-07-26 02:54:42 +0200 (Tue, 26 Jul 2011) | 18 lines

be more refined regarding DMI chassis types

we had broken laptops in the past that were not detected as such because
their DMI chassis-type was either undefined/out-of-spec, or set to
'other' or 'unknown'.

this patch tries to mitigate this problem as follows:
- if the DMI chassis-type clearly identifies the system as
  laptop/notebook/mobile platform then nothing changes: the user gets
  the laptop warning without a hint to the force switch.
- if the DMI chassis-type is not specific enough, we warn the user
  similarly, but tell them the switch.

to reduce the number of false positives i have added a few new
chassis types that we have encountered in the last months to the list.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1389 | hailfinger | 2011-07-26 00:44:09 +0200 (Tue, 26 Jul 2011) | 9 lines

Fix ICH FWH IDSEL setting with the fwh_idsel= internal programmer
parameter.
The code took 32 bits of input and wrote them to an 48 bit register,
duplicating some values.
Document the fwh_idsel= parameter in the man page.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

------------------------------------------------------------------------
r1388 | hailfinger | 2011-07-26 00:07:05 +0200 (Tue, 26 Jul 2011) | 7 lines

satamv and atahpt require PCI port I/O which isn't currently supported
on any architecture except x86/x86_64.
Generate the same compiler error as other programmer drivers.

Signed-off-by: Andrew Morgan <ziltro@ziltro.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1387 | uwe | 2011-07-25 23:12:57 +0200 (Mon, 25 Jul 2011) | 6 lines

Random manpage improvements and updates.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r1386 | stefanct | 2011-07-25 22:38:52 +0200 (Mon, 25 Jul 2011) | 47 lines

add a bunch of new/tested stuff and various small changes 5

- mark EN25F80 as fully tested
  http://www.flashrom.org/pipermail/flashrom/2011-July/007329.html
- mark W25Q16 as fully tested
  http://www.flashrom.org/pipermail/flashrom/2011-July/007151.html
- mark W39V040A as fully tested
  http://www.flashrom.org/pipermail/flashrom/2011-July/007161.html
- mark Pm25LV040 as fully tested
  reported by TL1 on IRC
- mark W49F002U/N as fully tested
  http://paste.flashrom.org/view.php?id=733g
- mark W39V080FA as fully tested
  http://www.flashrom.org/pipermail/flashrom/2011-July/007225.html

- add ASUS P4S533-X to the list of supported boards
  http://www.flashrom.org/pipermail/flashrom/2011-July/007200.html
- add ASUS M4A785TD-V EVO to the list of supported boards
  http://www.flashrom.org/pipermail/flashrom/2011-July/007329.html
- add GA-945PL-S3P (rev. 6.6) to the list of supported boards
  reported by TL1 on IRC
- add MS-7142 (K8MM-V) to the list of supported boards
  http://www.flashrom.org/pipermail/flashrom/2011-July/007161.html
- add MS-7369 (K9N Neo V2) to the list of supported boards
  http://www.flashrom.org/pipermail/flashrom/2011-July/007181.html
- add X7DBT-INF to the list of supported boards
  http://www.flashrom.org/pipermail/flashrom/2011-July/007225.html

- mark SiS 645DX chipset enable as OK
  http://www.flashrom.org/pipermail/flashrom/2011-July/007200.html
- mark SiS 651 chipset enable as OK
  http://paste.flashrom.org/view.php?id=733

- move intel_ich_gpio34_raise to the correct line(s)
- change the output of unlock_w39_fwh_block from 0x%x to 0x%08x
- fix output for untested chipset enables (missing space)
- reorder the board enable in print.c entry for GA-8SIMLH added in r1385.
- minor other fixes

- fix output for multiple found flash chips by adding quotes and commas
- similarly fix output of "Found/Assuming" chips

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
the last two points are
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
everything else is
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1385 | mkarcher | 2011-07-25 19:25:24 +0200 (Mon, 25 Jul 2011) | 14 lines

Add support for the GIGABYTE GA-8SIMLH board.

The usage of the GPIO output register as bitmap can be confirmed from the
vendor board enable code, so the comment has been deleted. It really is
(1<<gpionumber).

flashrom -V: http://paste.flashrom.org/view.php?id=728
lspci: http://paste.flashrom.org/view.php?id=729
superiotool: http://paste.flashrom.org/view.php?id=730

test report: http://paste.flashrom.org/view.php?id=733

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1384 | stefanct | 2011-07-25 00:21:57 +0200 (Mon, 25 Jul 2011) | 13 lines

add support for EN25Q(H) series SPI flash chips

- EN25Q40
- EN25Q80
- EN25Q16 (half-evil twin of already supported EN25D16, hence merged)
- EN25Q32(A/B)
- EN25Q64
- EN25Q128

- EN25QH16

Signed-off-by: David Hendricks <dhendrix@google.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1383 | hailfinger | 2011-07-24 20:41:13 +0200 (Sun, 24 Jul 2011) | 9 lines

Man page fixes:
- Finish dummy programmer description
- Add satamv programmer
- Merge it87spi programmer into internal section
- Cosmetics

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1382 | stefanct | 2011-07-24 18:30:31 +0200 (Sun, 24 Jul 2011) | 11 lines

mark some ck804 boards as not working

P5N-E SLI, EP-8NPA7I and EP-9NPA7I all need at least this patch:
http://patchwork.coreboot.org/patch/2125/
the P5N-E also needs a board enable:
http://patchwork.coreboot.org/patch/3298/

mark the boards as not working until those are merged.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1381 | stefanct | 2011-07-24 17:34:56 +0200 (Sun, 24 Jul 2011) | 10 lines

ichspi.c: do not print PBR[3] for ICH7 because it does not exist

intel document 307013 (ICH7 datasheet) section 21.1.9 does only
define PBR[0] (at SPIBAR + 60h) to PBR[2] (SPIBAR + 68h). SPIBAR + 6Ch
and following are not defined, but we were printing them as PBR[3]
anyway. i could not find any references to PBR[3] in documentation of
other related chips (NM10, atom e6xx) either, hence kill it.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1380 | hailfinger | 2011-07-21 23:21:04 +0200 (Thu, 21 Jul 2011) | 9 lines

Fix out-of-bounds access if all erase functions fail.
Fix detection of unchanged chip contents on erase failure.
Return error if no usable erase functions exist.

Thanks to Stefan Tauner for spotting the last problem.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

------------------------------------------------------------------------
r1379 | stefanct | 2011-07-21 21:59:34 +0200 (Thu, 21 Jul 2011) | 22 lines

chipset_enable.c: add a message for untested chipset enables

old output:
Calibrating delay loop... OK.
Found chipset "Intel QS57", enabling flash write... OK.
This chipset supports the following protocols: FWH, SPI.

new non-verbose output for tested chipsets:
Calibrating delay loop... OK.
Found chipset "Intel QS57". Enabling flash write... OK.
This chipset supports the following protocols: FWH, SPI.

new non-verbose output for untested chipsets:
Found chipset "Intel QS57".
This chipset is marked as untested. If you are using an up-to-date version
of flashrom please email a report to flashrom@flashrom.org including a
verbose (-V) log. Thank you!
Enabling flash write... OK.
This chipset supports the following protocols: FWH, SPI.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
------------------------------------------------------------------------
r1378 | stefanct | 2011-07-21 21:52:00 +0200 (Thu, 21 Jul 2011) | 5 lines

flashrom.8: explain read accesses as part of the write operation

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
------------------------------------------------------------------------
r1377 | uwe | 2011-07-21 11:18:18 +0200 (Thu, 21 Jul 2011) | 15 lines

ft2232_spi: Improve error handling, remove exit() calls.

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.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Tadas Slotkus <devtadas@gmail.com>


------------------------------------------------------------------------
r1376 | stefanct | 2011-07-20 18:34:18 +0200 (Wed, 20 Jul 2011) | 8 lines

fix the ASUS A8N-VM CSM board enable

based on joshua's work, see:
http://www.flashrom.org/pipermail/flashrom/2011-June/007015.html

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Joshua Roys <roysjosh@gmail.com>
Tested-by: Bernie Innocenti <bernie@fsf.org>
------------------------------------------------------------------------
r1375 | stefanct | 2011-07-19 10:50:18 +0200 (Tue, 19 Jul 2011) | 7 lines

annotate additional flashchips with voltage ranges

also fix a few others and remove the one for Intel 28F002BC/BL/BV/BX-T because we need
to investigate it further.

Signed-off-by: Steven Zakulec <spzakulec@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1374 | stefanct | 2011-07-19 09:58:06 +0200 (Tue, 19 Jul 2011) | 8 lines

fix a bug breaking layout file handling in r1373

Florian Zumbiehl discovered that we have broken the -i switch in the
last commit resulting in self-contradictory output:
http://paste.flashrom.org/view.php?id=707

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1373 | hailfinger | 2011-07-16 01:47:45 +0200 (Sat, 16 Jul 2011) | 11 lines

Fix and clean up cli_classic.c

Don't ignore -i if it is specified before -l
Check if image mentioned by -i is present in layout file
Consolidate duplicated programmer_shutdown calls
Kill outdated comments
Finish parameter checking before -L/-z is executed

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: David Hendricks <dhendrix@google.com>

------------------------------------------------------------------------
r1372 | stefanct | 2011-07-13 22:48:54 +0200 (Wed, 13 Jul 2011) | 6 lines

enable writing on mcp6x_7x

this was deliberately disabled until now, but seems to work well enough.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1371 | uwe | 2011-07-13 13:22:03 +0200 (Wed, 13 Jul 2011) | 11 lines

Change "class" parameter name to "devclass" to avoid C++ issues.

In C++ "class" is a reserved keyword, and as we'll want to use libflashrom
from C++ code at some point, let's make sure it doesn't cause issues.
Other places in the code already used "devclass" anyway, so it also increases
consistency and readability a bit.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1370 | stefanct | 2011-07-13 00:35:21 +0200 (Wed, 13 Jul 2011) | 9 lines

fix unchecked malloc calls and casts of malloc return values

in the long term the exit calls should be replaced by returns.
until then this is the correct way to handle failures.

the casts are not needed (in C) and we don't cast malloc return values anywhere else.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
------------------------------------------------------------------------
r1369 | stefanct | 2011-07-13 00:01:44 +0200 (Wed, 13 Jul 2011) | 6 lines

update motherboard URLs in print.c

Signed-off-by: Benjamin Bellec <b.bellec@gmail.com>
with small changes:
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1368 | stefanct | 2011-07-09 21:46:53 +0200 (Sat, 09 Jul 2011) | 10 lines

add untested board enable for ASUS M6Ne

http://patchwork.coreboot.org/patch/2893/
lspci: http://paste.flashrom.org/view.php?id=494

only writing a backup file was tested, so mark it as untested.

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1367 | stefanct | 2011-07-07 21:56:58 +0200 (Thu, 07 Jul 2011) | 57 lines

add a bunch of new/tested stuff and various small changes 4

- add Asus E35M1-I DELUXE to boards_known
  http://www.flashrom.org/pipermail/flashrom/2011-June/006918.html
- add Asus M3A to boards_known
  http://www.flashrom.org/pipermail/flashrom/2011-July/007085.html
- add Freetech P6F91i to boards_known
  http://www.flashrom.org/pipermail/flashrom/2011-June/006800.html
- add GA-M720-US3 to boards_known
  http://www.flashrom.org/pipermail/flashrom/2011-July/007096.html
- add GA-MA770-UD3 (rev. 2.1) to boards_known
  http://www.flashrom.org/pipermail/flashrom/2011-June/006879.html
- add GA-965GM-S2 to boards_known
  http://www.flashrom.org/pipermail/flashrom/2011-June/006746.html
- add HP xw4400 (0A68h) to boards_known
  http://paste.flashrom.org/view.php?id=686
- add MSI MS-6566 (845 Ultra-C) to boards_known
  http://www.flashrom.org/pipermail/flashrom/2011-June/006908.html
- add MSI MS-7698 (E350IA-E45) to boards_known
  http://www.flashrom.org/pipermail/flashrom/2011-June/007003.html
- add PCCHIPS M863G (V5.1A) to boards_known
  http://www.flashrom.org/pipermail/flashrom/2011-July/007084.html

- modify the X8SIE entry in boards_known with the information from "fuzzy"
  http://paste.flashrom.org/view.php?id=669

- mark W29C020(C)/W29C022 as fully tested
  http://www.flashrom.org/pipermail/flashrom/2011-June/006800.html
- mark W49V002A as fully tested
  http://www.flashrom.org/pipermail/flashrom/2011-July/007084.html
- mark M25P128 as fully tested
  http://www.flashrom.org/pipermail/flashrom/2011-June/006843.html
- mark SST39SF010A as fully tested
  http://www.flashrom.org/pipermail/flashrom/2011-July/007115.html

- correct entries for GA-K8NS Pro-939 (was ultra before. thanks uwe!)
- another tiny fix for "a small fix"/r1321
  Without this you will get broken bus names "Unknow" and "Non-SP".
  Note to self: don't self-ack even fairly trivial patches.
- fix spew output of spi_rems in spi25.c
- add URL to ASUS M3A76-CM
- rename all Winbond W25x chips to W25X
- fixes some common misspellings/typos in comments:
  lenght->length              2
  ocassional->occasional      1
  unsucessfull->unsuccessful  1
  upto->up to                 5

the patch for M25P128 is
Signed-off-by: Cristian M?\196?\131gheru?\200?\153an-Stanciu <cristi.magherusan@gmail.com>

the typos are
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>

everything else is
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1366 | hailfinger | 2011-07-07 08:59:18 +0200 (Thu, 07 Jul 2011) | 7 lines

Autodetect target processor architecture.
Enable architecture dependent compilation of individual sub-drivers for
the internal programmer.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: David Hendricks <dhendrix@google.com>

------------------------------------------------------------------------
r1365 | stefanct | 2011-07-07 06:10:57 +0200 (Thu, 07 Jul 2011) | 7 lines

ichspi.c: print FADDR in ich_init_spi

We print the address registers for ICH7 and VIA at init.
We should do so for ICH9 too.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: David Hendricks <dhendrix@google.com>
------------------------------------------------------------------------
r1364 | stefanct | 2011-07-04 09:27:17 +0200 (Mon, 04 Jul 2011) | 4 lines

Kill unused "log" argument of count_usable_erasers().

Signed-off-by: Sylvain "ythier" Hitier <sylvain.hitier@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1363 | uwe | 2011-07-03 21:44:12 +0200 (Sun, 03 Jul 2011) | 25 lines

Fix and improve Windows/MinGW/MSYS build.

 - Makefile: Use $(OS_ARCH) to add some MinGW-specific workarounds and
   settings, so that a simple "make" is sufficient on MinGW (instead of
   manual Makefile hacking).

 - Explicitly set CC=gcc in the Makefile, otherwise you get an error like
   "cc: command not found" on MinGW.

 - MinGW doesn't have ffs(), use gcc's __builtin_ffs() instead.

 - Add /usr/local/include and /usr/local/lib to CPPFLAGS/LDFLAGS, that's
   where libusb-win32 and libftdi stuff is usually placed on MinGW/MSYS.

 - Disable serprog (no sockets) and all PCI-based programmers (no libpci)
   for now. That leaves dummy, ft2232_spi, and buspirate_spi enabled on
   MinGW per default.

 - serial.c: Use correct type for 'tmp', both on Windows/MinGW (DWORD)
   and POSIX (ssize_t).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r1362 | stefanct | 2011-07-01 02:39:23 +0200 (Fri, 01 Jul 2011) | 4 lines

ichspi.c: preserve reserved bits in address registers

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1361 | stefanct | 2011-07-01 02:39:16 +0200 (Fri, 01 Jul 2011) | 4 lines

ichspi.c: add FPB (Flash Partition Boundary) macros and init printing

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1360 | stefanct | 2011-07-01 02:39:09 +0200 (Fri, 01 Jul 2011) | 6 lines

ichspi.c: simplify ich_set_bbar

Less code, documenting better what the differences are (i.e. offset of BBAR only).

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1359 | stefanct | 2011-07-01 02:39:01 +0200 (Fri, 01 Jul 2011) | 8 lines

ichspi.c: make REGWRITE* macros safer

'+' does have a quite high precedence so "calling" those macros with a
term including weaker operators in the off parameter may have unexpected
consequences.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1358 | stefanct | 2011-07-01 02:19:12 +0200 (Fri, 01 Jul 2011) | 8 lines

add count_usable_erasers which returns the number of well-defined erasers for a chip

It solves one FIXME and consequentially allows to remove a later check
right now, and is used in the upcoming SFDP patch.
Adds a forward declaration of check_block_eraser.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1357 | stefanct | 2011-06-26 22:45:35 +0200 (Sun, 26 Jun 2011) | 4 lines

fix memleaks due to incorrect usage of flashbuses_to_text

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1356 | stefanct | 2011-06-26 20:28:58 +0200 (Sun, 26 Jun 2011) | 11 lines

make Makefile's test programs safe(r)

we don't use -W or similarly strict compiler checks (yet), but
enabling its use is a good thing. if you add -W to the cflags
without this patch, detection of the compiler will fail with gcc 4.4
for example, because compiling of the test program will fail due to
a warning of unused arguments and -Werror. similarly the other
checks involving compiling test programs would fail.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1355 | stefanct | 2011-06-26 19:47:40 +0200 (Sun, 26 Jun 2011) | 4 lines

add a success indicator to the "Reading old flash chip contents..." message

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1354 | stefanct | 2011-06-26 19:38:17 +0200 (Sun, 26 Jun 2011) | 4 lines

constify (a few) parameters in flashrom.c where possible

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1353 | hailfinger | 2011-06-26 19:04:16 +0200 (Sun, 26 Jun 2011) | 9 lines

Erase functions are no longer called from chip drivers and thus their
internal erase verification can be moved to generic code.
This also makes it easier to skip the verify step if desired and to
differentiate between failed command submission and failed erase
verification.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

------------------------------------------------------------------------
r1352 | hailfinger | 2011-06-26 13:50:10 +0200 (Sun, 26 Jun 2011) | 12 lines

Replace sizeof("string")-1 with strlen("string")

We want to avoid calls to strlen at runtime if the string is already
known at compile time.
Turns out that gcc and clang will recognize constant strings and compute
the strlen result already at compile time, so trickery with sizeof only
reduces readability but does not improve the code.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1351 | stefanct | 2011-06-25 19:36:25 +0200 (Sat, 25 Jun 2011) | 4 lines

print.c: change all occurrences of printf to msg_ginfo

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1350 | stefanct | 2011-06-25 19:04:26 +0200 (Sat, 25 Jun 2011) | 7 lines

fix probe_flash to report new values set by probing functions

This is needed if the probing function changes its fill_flash parameter
like in the pattern used to support Intel Hardware Sequencing and SFDP.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1349 | uwe | 2011-06-19 19:27:57 +0200 (Sun, 19 Jun 2011) | 11 lines

Currently messages like "Writing flash chip..." that don't end with a
newline are buffered until the operation is complete, unless the
particular write function generates status output in the meantime.

Flushing stdout after each message ensures that the message appears
immediately.

Signed-off-by: Ed Swierk <eswierk@aristanetworks.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1348 | uwe | 2011-06-19 19:23:55 +0200 (Sun, 19 Jun 2011) | 6 lines

flashchips.c: Fix typo: s/don't/doesn't/.

Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1347 | uwe | 2011-06-19 19:09:49 +0200 (Sun, 19 Jun 2011) | 6 lines

Look at the return value of wait_82802ab().

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1346 | uwe | 2011-06-19 18:52:48 +0200 (Sun, 19 Jun 2011) | 8 lines

Add ASRock K7S41GX board-enable.

Tested reading, writing and verification, all worked fine.

Signed-off-by: Pawel Rozanski <rozie@poczta.onet.pl>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1345 | uwe | 2011-06-19 00:56:14 +0200 (Sun, 19 Jun 2011) | 43 lines

Various board status updates.

Mark the following boards as OK:

 - ASUS P7H57D-V EVO (reported by Andrew Wierzan <andrew@emerginguk.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-October/005042.html

 - Tyan S2723 (Tiger i7501) (reported by Uwe Hermann <uwe@hermann-uwe.de>)
   http://www.flashrom.org/pipermail/flashrom/2010-October/005156.html

 - ASUS P5VD1-X (reported by Olle Gross <gusgross@student.gu.se>)
   http://www.flashrom.org/pipermail/flashrom/2010-October/005205.html

 - Lanner EM-8510C (reported by Christian Motz <christian.motz@funkwerk-ec.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-October/005240.html

 - ASUS A8N-VM (reported by Dave B <flashrom@d10.karoo.co.uk>)
   http://www.flashrom.org/pipermail/flashrom/2010-October/005247.html

 - GIGABYTE GA-6VXE7+ (reported by Justin Doiel <justin.doiel@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-October/005251.html

 - Supermicro X7SPA-HF (reported by Jochen Schulz <ml@well-adjusted.de>)
   http://www.flashrom.org/pipermail/flashrom/2010-November/005346.html

 - ASUS M4A78-EM (reported by Jani Uusitalo <jani@mummila.net>)
   http://www.flashrom.org/pipermail/flashrom/2010-December/005587.html

 - ASUS P5N32-E SLI (reported by Paul Brookman <paul_brookman@sky.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-December/005559.html

Mark the following chips as OK:

 - SST SST39SF020A (reported by Andrew Morgan <ziltro@ziltro.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-October/005107.html

 - ST M25P80 (reported by Harald Gutmann <harald.gutmann@gmx.net>)
   http://www.flashrom.org/pipermail/flashrom/2010-November/005334.html

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1344 | stefanct | 2011-06-18 20:45:56 +0200 (Sat, 18 Jun 2011) | 7 lines

add intel 6 series pci ids to chipset_enables

as defined by Intel 6 Series Chipset and Intel C200 Series Chipset Specification Update;
document number 324646-006, May 2011.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
------------------------------------------------------------------------
r1343 | stefanct | 2011-06-18 20:45:50 +0200 (Sat, 18 Jun 2011) | 5 lines

fix and add a few chipset_enables entries

Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
------------------------------------------------------------------------
r1342 | stefanct | 2011-06-18 20:45:41 +0200 (Sat, 18 Jun 2011) | 5 lines

resort chipset_enables array by pci ids

Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
------------------------------------------------------------------------
r1341 | hailfinger | 2011-06-18 00:38:53 +0200 (Sat, 18 Jun 2011) | 6 lines

Do not display skipped probe messsages in verbose mode.
They are still visible in spew mode (-VV).

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1340 | uwe | 2011-06-17 23:25:48 +0200 (Fri, 17 Jun 2011) | 14 lines

Update the flashrom udev rules file with new programmers.

Add the following missing USB devices:

 - FIC OpenMoko Neo1973 Debug board (V2+)
 - Olimex ARM-USB-OCD
 - Olimex ARM-USB-OCD-H
 - Olimex ARM-USB-TINY
 - Olimex ARM-USB-TINY-H

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>


------------------------------------------------------------------------
r1339 | stefanct | 2011-06-16 01:44:52 +0200 (Thu, 16 Jun 2011) | 12 lines

Update the flashrom manpage

 - Add missing entries for nicintel and satamv.
 - Add various programmers to those that support the 'pci=' option.
 - Small cosmetic, whitespace, grammar or consistency fixes.
 - Update the date of last change of the manpage.
 - Add Stefan Tauner to the list of authors.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Signed-off-by: Andrew Morgan <ziltro@ziltro.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
------------------------------------------------------------------------
r1338 | dhendrix | 2011-06-14 03:35:36 +0200 (Tue, 14 Jun 2011) | 26 lines

Use shutdown callback mechanism to shutdown programmers

This patch attempts to resolve some programmer shutdown ordering issues
by having the programmer init functions register shutdown callbacks explicitly
wherever it makes most sense. Before, assumptions were made that could lead to
the internal programmer's state changing before the external programmer could be
shut down properly. Now, each programmer cleans up after itself and (hopefully)
performs each operation in the correct order.

As a side-effect, this patch gives us a better usage model for reverse
operations such as rpci_* and rmmio_*. In the long-run, this should make
reversing the initialization process easier to understand, less tedious, and
less error-prone.

In short, this patch does the following:
- Registers a shutdown callback during initialization for each programmer.
- Kills the .shutdown function pointer from programmer_entry struct. Also,
  make most shutdown functions static.
- Adds a few minor clean-ups and corrections (e.g. missing physunmap() calls).

TODO: Remove forward declaration of serprog_shutdown() (added to simplify diff)

Signed-off-by: David Hendricks <dhendrix@google.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r1337 | stefanct | 2011-06-13 18:59:01 +0200 (Mon, 13 Jun 2011) | 9 lines

add board enable for GA-8IP775

- logs before: http://paste.flashrom.org/view.php?id=565
- success: http://www.flashrom.org/pipermail/flashrom/2011-June/006747.html

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
------------------------------------------------------------------------
r1336 | stefanct | 2011-06-13 18:58:54 +0200 (Mon, 13 Jun 2011) | 10 lines

add (untested) board enable for GA-K8NS Pro-939

flashrom -V (before patch): http://paste.flashrom.org/view.php?id=531
lspci (short): http://paste.flashrom.org/view.php?id=532
lspci (verbose): http://paste.flashrom.org/view.php?id=533

Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1335 | stefanct | 2011-06-12 21:47:55 +0200 (Sun, 12 Jun 2011) | 24 lines

add a bunch of new/tested motherboards, board/chipset enables and flash chips etc 3

- mark AT25DF321 as fully tested
  http://www.flashrom.org/pipermail/flashrom/attachments/20110527/01f1868b/attachment-0001.log
- mark 82802AB as fully tested
  http://www.flashrom.org/pipermail/flashrom/2011-April/006145.html
- mark Pm49FL002 as fully tested
  http://pastebin.com/pb5NTCmW

- add Supermicro X8DT3 to boards_known
  http://www.flashrom.org/pipermail/flashrom/attachments/20110527/01f1868b/attachment-0001.log
- add Supermicro X5DP8-G2 to boards_known
  http://www.flashrom.org/pipermail/flashrom/2011-April/006145.html

- add Supermicro X8SIE as NOT WORKING to boards_known
  http://www.flashrom.org/pipermail/flashrom/2011-May/006554.html
- add a DMI search pattern for the ASUS A8N-SLI Deluxe board enable to mitigate misdetections
  http://www.flashrom.org/pipermail/flashrom/2010-August/004379.html
  http://www.flashrom.org/pipermail/flashrom/2011-May/006570.html

also, fix some random white space errors and comments/strings

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1334 | stefanct | 2011-06-12 10:14:10 +0200 (Sun, 12 Jun 2011) | 8 lines

ichspi.c: add missing ICH9 register macros and eliminate magic numbers

 - add macros for FRAP, FREG0, PR0-PR4 and BBAR
 - eliminate magic numbers representing those registers and some other bits too
 - remove printing out the contents of FDOC because it is useless

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1333 | stefanct | 2011-06-11 21:44:31 +0200 (Sat, 11 Jun 2011) | 7 lines

use the max_data_read field of the new spi_programmer struct to simplify run_opcode

also, explain the transformation of the read/write array/count in
ich_spi_send_command better.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1332 | stefanct | 2011-06-11 20:16:50 +0200 (Sat, 11 Jun 2011) | 4 lines

enable_flash_ich: warn if SMM BIOS Write Protection is detected in BIOS_CNTL

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1331 | stefanct | 2011-06-11 14:21:37 +0200 (Sat, 11 Jun 2011) | 7 lines

add support for Olimex programmers to ft2232_spi

- 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")

Signed-off-by: Pete Batard <pbatard@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1330 | stefanct | 2011-06-11 11:53:22 +0200 (Sat, 11 Jun 2011) | 4 lines

ichspi.c: add macros and pretty printing for HSFS and HSFC

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1329 | stefanct | 2011-06-11 11:53:16 +0200 (Sat, 11 Jun 2011) | 4 lines

ichspi.c: add pretty printing for SSFS+SSFC and the OPCODE struct

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1328 | stefanct | 2011-06-11 11:53:09 +0200 (Sat, 11 Jun 2011) | 12 lines

ichspi.c: improve macros for SSFS and SSFC bits

 - introduce offset macros and use them to (re)define the existing mask macros
 - fix masks of SSFC_COP, SSFC_DBC, SSFC_SCF (were single-bit masks erroneously)
 - add comments
 - rename SSFS_CDS to SSFS_FDONE (abbr. used in datasheet; not in SSFS but HSFS)
 - use those for refactoring and magic number elemination.

 following patch uses them for pretty printing.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1327 | hailfinger | 2011-06-09 22:59:30 +0200 (Thu, 09 Jun 2011) | 8 lines

Add board enable for MSI MS-6788-040 (848P Neo-V).

Based on reverse engineering by Michael Karcher.
Signed-off-by: Maciej Pijanka <maciej.pijanka@gmail.com>
Acked-by: Idwer Vollering <vidwer@gmail.com>
Tested-by: Melroy van den Berg
http://www.flashrom.org/pipermail/flashrom/2010-December/005642.html

------------------------------------------------------------------------
r1326 | hailfinger | 2011-06-09 22:06:34 +0200 (Thu, 09 Jun 2011) | 10 lines

Fix compilation for CONFIG_INTERNAL=no

CONFIG_INTERNAL implies Super I/O support and NEED_PCI.
NEED_PCI is only used to guard PCI stuff which may be needed for
external PCI-based programmers. That way, using #if NEED_PCI can be
avoided inside #if CONFIG_INTERNAL.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1325 | uwe | 2011-06-06 19:50:20 +0200 (Mon, 06 Jun 2011) | 13 lines

Mark the MSI MS-7529 (G31TM-P21) as supported.

Original report:
http://www.flashrom.org/pipermail/flashrom/2011-May/006594.html

Manufacturer's page:
http://msi.com/product/mb/G31TM-P21.html

Tested-by: Peter Lemenkov <lemenkov@gmail.com>
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1324 | stefanct | 2011-06-04 15:13:34 +0200 (Sat, 04 Jun 2011) | 21 lines

add a bunch of new/tested motherboards, board/chipset enables and flash chips 2

- mark chipset enable for QS57 as OK
  (my thinkpad)

- mark MSI G31M3-L(S) V2 (MS-7529) as OK
  http://www.flashrom.org/pipermail/flashrom/2011-June/006634.html

- mark AT49BV512 as fully tested
  http://www.flashrom.org/pipermail/flashrom/2011-June/006609.html
- mark MX25L4005 as fully tested
  http://www.flashrom.org/pipermail/flashrom/2011-June/006634.html
- mark SST49LF020 as fully tested
  http://www.flashrom.org/pipermail/flashrom/2011-May/006570.html
- mark SST25VF064C as fully tested
  http://www.flashrom.org/pipermail/flashrom/2011-May/006586.html
- mark W25x16 as fully tested
  http://www.flashrom.org/pipermail/flashrom/2011-June/006605.html

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1323 | stefanct | 2011-06-03 09:26:31 +0200 (Fri, 03 Jun 2011) | 5 lines

Add voltage ranges to the flashchips

Signed-off-by: Steven Zakulec <spzakulec@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Peter Stuge <peter@stuge.se>
------------------------------------------------------------------------
r1322 | stefanct | 2011-05-29 00:59:05 +0200 (Sun, 29 May 2011) | 10 lines

tiny fix for a small fix

there was one line break added too much in the previous commit, sorry.
the probing functions need to output at least one '\n' for satisfactory output.
that means even in error cases they have to do that.
OTOH they should not output a sequence of "\n\n" because
it would distort the verbose probing output with empty lines.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1321 | stefanct | 2011-05-28 04:37:14 +0200 (Sat, 28 May 2011) | 8 lines

small fixes

- missing spaces in code and output
- improved documentation/naming/output
- missing line breaks in spi probing functions

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1320 | stefanct | 2011-05-26 16:28:51 +0200 (Thu, 26 May 2011) | 35 lines

add a bunch of new/tested motherboards, board enables and flash chips

tested motherboards:
- MSI MS-7599 (870-C45)
  http://www.flashrom.org/pipermail/flashrom/2011-May/006420.html
- Gigabyte GA-P55A-UD4 (rev 1.0)
  http://www.flashrom.org/pipermail/flashrom/2011-May/006415.html
- Supermicro X8DTU-F
  http://www.flashrom.org/pipermail/flashrom/2011-May/006329.html
- Supermicro X8STi
  http://www.flashrom.org/pipermail/flashrom/2011-May/006436.html

tested board enable:
- abit NF-M2 nView
  success report (without a log though): http://www.flashrom.org/pipermail/flashrom/2011-April/006167.html

tested flash chips:
- ST M50FW080 (+EW)
  http://www.flashrom.org/pipermail/flashrom/2011-May/006409.html
- ST M25P32 (+EW)
  http://www.flashrom.org/pipermail/flashrom/2011-May/006398.html
- Winbond W25x64 (+P)
  http://www.flashrom.org/pipermail/flashrom/2011-March/006012.html
- Winbond W39V040FA (+W)
  http://www.flashrom.org/pipermail/flashrom/2010-December/005642.html

new flash chip
- Winbond W25Q128
  http://www.flashrom.org/pipermail/flashrom/2011-April/006309.html

W25Q128 is:
Signed-off-by: Antony Rheneus <rheneus.paul@gmail.com>
everything else is:
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1319 | stefanct | 2011-05-26 15:30:51 +0200 (Thu, 26 May 2011) | 4 lines

ichspi: fix detection of unused regions

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1318 | stefanct | 2011-05-26 03:35:19 +0200 (Thu, 26 May 2011) | 8 lines

eliminate magic numbers indicating maximum column sizes in print_supported_chipsets and print_supported_boards_helper

without this the magic numbers need to be kept in sync with the maximum length of the
strings printed in the corresponding column. if not, an overflow and a nasty ' '-storm occur
on executing flashrom -L.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1317 | stefanct | 2011-05-19 04:58:17 +0200 (Thu, 19 May 2011) | 12 lines

whitespace, documentation and other small stuff

this patch combines three previously posted patches in a revised form.
one is even stolen from Stefan Reinauer (remove umlauts from man page).

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Signed-off-by: Stefan Reinauer <reinauer@google.com>

some parts are
Acked-by: Carl-Daniel Hailfinger<c-d.hailfinger.devel.2006@gmx.net>
the rest is
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1316 | hailfinger | 2011-05-19 02:06:06 +0200 (Thu, 19 May 2011) | 24 lines

Add lock printing for AMIC A25L05PT, A25L05PU, A25L10PT, A25L10PU,
A25L20PT, A25L20PU, A25L40PT, A25L40PU, A25L80P, A25L16PT, A25L16PU,
A25L512, A25L010, A25L020, A25L040, A25L080, A25L016, A25L032, A25LQ032
to a25.c.

Add lock printing for Atmel AT26DF081A, AT26DF161, AT26DF161A, AT26DF321.

Move Atmel AT25*/AT26* lock related functions originally added in r1115
from spi25.c to at25.c.

For SPI chips the lock printing was handled by one common function, but
sharing a common function which only is a big switch() statement doesn't
make sense, especially if we can define lock printing functions per flash
chip anyway.

The printlock function pointer in struct flashchip is used to print status
register and locking information, and serves as replacement for implicit
status register and lock printing during probe.
That code will later be changed to store locking info in a machine-
accessible data structure so flashrom can handle locked regions correctly.

Signed-off-by: Carl-Daniel Hailfinger<c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>

------------------------------------------------------------------------
r1315 | stefanct | 2011-05-18 13:28:47 +0200 (Wed, 18 May 2011) | 6 lines

mark SST25VF080B tested for writing (again)

Success report: http://www.flashrom.org/pipermail/flashrom/2011-May/006473.html

Signed-off-by: John Schmerge <jschmerge@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1314 | stefanct | 2011-05-18 03:32:25 +0200 (Wed, 18 May 2011) | 4 lines

mark Supermicro X8DTH-6F as supported.

Signed-off-by: Shailendra Sodhi <shailendra.sodhi@endace.com>
Acked-by: Idwer Vollering <vidwer@gmail.com>
------------------------------------------------------------------------
r1313 | stefanct | 2011-05-18 03:32:16 +0200 (Wed, 18 May 2011) | 7 lines

add board enable for AOpen i975Xa-YDG

Success report:
http://www.flashrom.org/pipermail/flashrom/2010-October/005046.html

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Acked-by: Idwer Vollering<vidwer@gmail.com>
------------------------------------------------------------------------
r1312 | stefanct | 2011-05-18 03:32:09 +0200 (Wed, 18 May 2011) | 6 lines

mark EVGA 270-WS-W555-A2 (Classified SR-2) as supported.

success report: http://flashrom.org/pipermail/flashrom/2011-April/006179.html

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Idwer Vollering <vidwer@gmail.com>
------------------------------------------------------------------------
r1311 | stefanct | 2011-05-18 03:32:00 +0200 (Wed, 18 May 2011) | 6 lines

mark SST25VF032B as write tested

success report: http://flashrom.org/pipermail/flashrom/2011-April/006179.html

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Idwer Vollering <vidwer@gmail.com>
------------------------------------------------------------------------
r1310 | stefanct | 2011-05-18 03:31:53 +0200 (Wed, 18 May 2011) | 4 lines

explain better what checks are disabled in case we detect a legacy BIOS

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Peter Stuge <peter@stuge.se>
------------------------------------------------------------------------
r1309 | stefanct | 2011-05-18 03:31:46 +0200 (Wed, 18 May 2011) | 7 lines

Mark Macronix MX29F001T as fully tested

Success report with MX29F001TPC-12 at:
http://flashrom.org/pipermail/flashrom/2011-April/006132.html

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
------------------------------------------------------------------------
r1308 | stefanct | 2011-05-18 03:31:39 +0200 (Wed, 18 May 2011) | 6 lines

add Gigabyte GA-MA790XT-UD4P to the mainboard support list

http://www.flashrom.org/pipermail/flashrom/2011-April/006099.html

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Idwer Vollering <vidwer@gmail.com>
------------------------------------------------------------------------
r1307 | stefanct | 2011-05-18 03:31:33 +0200 (Wed, 18 May 2011) | 4 lines

add MS-7640 (890FXA-GD70) to the boards_known struct in print.c

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Idwer Vollering <vidwer@gmail.com>
------------------------------------------------------------------------
r1306 | stefanct | 2011-05-18 03:31:24 +0200 (Wed, 18 May 2011) | 4 lines

add support for 8086:1076 (82541GI) to nicintel_spi.c

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Idwer Vollering <vidwer@gmail.com>
------------------------------------------------------------------------
r1305 | stefanct | 2011-05-18 03:31:17 +0200 (Wed, 18 May 2011) | 4 lines

add status of Thinkpad T410s and DG45ID to the wiki table

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Idwer Vollering <vidwer@gmail.com>
------------------------------------------------------------------------
r1304 | stefanct | 2011-05-18 03:31:10 +0200 (Wed, 18 May 2011) | 4 lines

Mark MX25L4005 tested for erase

Signed-off-by: Ra?\195?\186l Soriano <GatoLoko@gmail.com>
Acked-by: Idwer Vollering <vidwer@gmail.com>
------------------------------------------------------------------------
r1303 | stefanct | 2011-05-18 03:31:03 +0200 (Wed, 18 May 2011) | 4 lines

Mark w25q80, w25q32, and w25q64 chips tested for write and erase

Signed-off-by: David Hendricks <dhendrix@google.com>
Acked-by: Stefan Reinauer <stepan@coreboot.org>
------------------------------------------------------------------------
r1302 | stefanct | 2011-05-18 03:30:56 +0200 (Wed, 18 May 2011) | 4 lines

Remove filename parameter from chip_safety_check()

Signed-off-by: David Hendricks <dhendrix@google.com>
Acked-by: Stefan Reinauer <stepan@coreboot.org>
------------------------------------------------------------------------
r1301 | stefanct | 2011-05-18 01:30:13 +0200 (Wed, 18 May 2011) | 4 lines

fix typo "not not" in board_enable.c

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Idwer Vollering <vidwer@gmail.com>
------------------------------------------------------------------------
r1300 | stefanct | 2011-05-17 15:31:55 +0200 (Tue, 17 May 2011) | 4 lines

add board enable for Asus A8AE-LE (HP OEM)

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1299 | mkarcher | 2011-05-11 19:07:07 +0200 (Wed, 11 May 2011) | 15 lines

kill central list of SPI programmers

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").

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1298 | mkarcher | 2011-05-11 19:07:02 +0200 (Wed, 11 May 2011) | 4 lines

Factor out SPI write/read chunking wrappers.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1297 | hailfinger | 2011-05-08 02:24:18 +0200 (Sun, 08 May 2011) | 7 lines

Intel NIC with parallel flash support.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Tested-by: Anton Kochkov <anton.kochkov@gmail.com>
Acked-by: Anton Kochkov <anton.kochkov@gmail.com>
Tested-by: Maciej Pijanka <maciej.pijanka@gmail.com>

------------------------------------------------------------------------
r1296 | hailfinger | 2011-05-07 21:19:36 +0200 (Sat, 07 May 2011) | 8 lines

Fix multiple detection of the same chip.

r1293 introduced a bug which caused probing to loop at the first found
chip.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Idwer Vollering <vidwer@gmail.com>

------------------------------------------------------------------------
r1295 | mkarcher | 2011-05-05 19:52:07 +0200 (Thu, 05 May 2011) | 4 lines

Add support for the Via VX855 chipset

Signed-off-by: John Schmerge <jbschmerge@gmail.com> for Devon IT
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1294 | hailfinger | 2011-05-05 09:12:40 +0200 (Thu, 05 May 2011) | 22 lines

Revamp board-specific quirk handling, allow for laptop support

Handle board-specific quirks in three phases:
1. Before Super I/O probing (e.g. blacklisting of some Super I/O probes,
or unhiding the Super I/O)
2. Before the laptop enforcement decision (e.g. whitelisting a laptop
for flashing)
3. After chipset enabling (all current board enables)

Implementation note: All entries in board_pciid_enables get an
additional phase parameter. Alternative variants (3 tables instead of 1)
also have their downsides, and I chose table bloat over table
multiplication).

With this patch, it should be possible to whitelist supported laptops
with a matching entry (phase P2) in board_pciid_enables which points to
a function setting laptop_ok=1. (In case DMI is broken, matching might
be a little bit more difficult, but it is still doable.)

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1293 | hailfinger | 2011-05-04 02:39:50 +0200 (Wed, 04 May 2011) | 6 lines

Constify flashchips array.
This moves 99.5% of the .data section to .rodata (which ends up in .text).

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org>

------------------------------------------------------------------------
r1292 | hailfinger | 2011-05-03 23:49:41 +0200 (Tue, 03 May 2011) | 15 lines

Revert MMIO space writes on shutdown as needed.
Reversible MMIO space writes now use rmmio_write*().
Reversible PCI MMIO space writes now use pci_rmmio_write*().
If a MMIO value needs to be queued for restore without writing it,
use rmmio_val*().
MMIO space writes which are one-shot (e.g. communication with some chip)
should continue to use the permanent mmio_write* variants.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

David tested it successfully on some NM10/ICH7 platforms which switch
between SPI and LPC targets (x86 BIOS ROM vs. EC firmware ROM).

Acked-by: David Hendricks <dhendrix@google.com>

------------------------------------------------------------------------
r1291 | mkarcher | 2011-04-30 01:53:09 +0200 (Sat, 30 Apr 2011) | 4 lines

improve output in case run_opcode fails

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r1290 | mkarcher | 2011-04-30 00:11:36 +0200 (Sat, 30 Apr 2011) | 4 lines

ichspi: Increase timeout to 60s for atomic operations

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1289 | hailfinger | 2011-04-27 16:34:08 +0200 (Wed, 27 Apr 2011) | 25 lines

Add support for more than one Super I/O or EC per machine.

flashrom currently only supports exactly one Super I/O or Embedded
Controller, and this means quite a few notebooks and a small subset of
desktop/server boards cannot be handled reliably and easily.
Allow detection and initialization of up to 3 Super I/O and/or EC chips.

WARNING! If a Super I/O or EC responds on multiple ports (0x2e and
0x4e), the code will do the wrong thing (namely, initialize the hardware
twice). I have no idea if we should handle such situations, and whether
we should ignore the second chip with identical ID or not. Initializing
the hardware twice for the IT87* family is _not_ a problem, but I don't
know how well IT85* can handle it (and whether IT85* would listen at
more than one port anyway).

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

Thanks to Thomas Schneider for testing on a board with ITE IT87* SPI.
Test report (success) is here: http://paste.flashrom.org/view.php?id=379

Thanks to David Hendricks for testing on a Google Cr-48 laptop with
ITE IT85* EC SPI. Test report (success) is here:
http://www.flashrom.org/pipermail/flashrom/2011-April/006275.html
Acked-by: David Hendricks <dhendrix@google.com>

------------------------------------------------------------------------
r1288 | mkarcher | 2011-04-15 02:03:37 +0200 (Fri, 15 Apr 2011) | 16 lines

Remove delays in JEDEC erase sequence

It is extremely unlikely that a chip not requiring delays in probe does
require them in erase. We observed unreliable erasing with a SST49LF004A
with these delays, so remove them if the are not required.

In review, I got the hint that "probe_jedec goes further by making that
call conditional on nonzero delay". I decided to ignore that. For
internal_delay, the small amount of clock cycles wasted for calling
programmer_delay(0) is negligible compared to LPC cycle times. It might
be an issue for 5 wasted bytes on the serial line in serprog. OTOH,
flash erase is still slow compared to 6*5 bytes on a serial port at
reasonable speed.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1287 | mkarcher | 2011-04-15 01:43:19 +0200 (Fri, 15 Apr 2011) | 13 lines

Remove erase_chip_stm50flw0x0x

As the comment indicates, that function is not a chip erase function
at all, but a function calling a block eraser in a loop. So it adds
no extra value to what we already have in the block_eraser
infrastructure.

Furthermore, that function assumes a uniform sector size layout, but
is referenced from flash chip with non-uniform sector size layout, which
is just wrong.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1286 | mkarcher | 2011-04-15 01:14:27 +0200 (Fri, 15 Apr 2011) | 12 lines

Board enable for Foxconn 6150K8MD-8EKRSH

Reported by: wickberg@student.chalmers.se

flashrom -V: http://paste.flashrom.org/view.php?id=452
lspci: http://paste.flashrom.org/view.php?id=453

(note that the flashrom dump is with a foreign chip. That
board is originally equipped with an PMC Pm49FL004.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
------------------------------------------------------------------------
r1285 | hailfinger | 2011-04-02 13:47:21 +0200 (Sat, 02 Apr 2011) | 8 lines

List AMD SB850 as supported (it has the same PCI ID as SB700).

Success report at
http://flashrom.org/pipermail/flashrom/2011-March/006072.html

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Idwer Vollering <vidwer@gmail.com>

------------------------------------------------------------------------
r1284 | stepan | 2011-04-01 20:05:20 +0200 (Fri, 01 Apr 2011) | 5 lines

coreboot table handling: make debug message msg_pdbg.

Signed-off-by: Stefan Reinauer<stefan.reinauer@coreboot.org>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1283 | stepan | 2011-03-29 23:41:41 +0200 (Tue, 29 Mar 2011) | 6 lines

Fix typo in chipset_enable.c

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Idwer Vollering <vidwer@gmail.com>                                                                             


------------------------------------------------------------------------
r1282 | stepan | 2011-03-18 23:00:15 +0100 (Fri, 18 Mar 2011) | 8 lines

Update port of flashrom package to Mac OS X using DirectHW:
http://www.coreboot.org/DirectHW

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>


------------------------------------------------------------------------
r1281 | hailfinger | 2011-03-17 01:10:25 +0100 (Thu, 17 Mar 2011) | 11 lines

Proper error handling for ICH/VIA SPI:
Use 16-bit values for bit masks in 16-bit registers.
Check for SPI Cycle In Progress and wait up to 60 ms.
Do not touch reserved bits.
Reduce SPI cycle timeout from 60 s to 60 ms.
Clear transaction errors caused by our own SPI accesses.
Add better debugging in case the hardware misbehaves.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org>

------------------------------------------------------------------------
r1280 | oxygene | 2011-03-08 08:17:44 +0100 (Tue, 08 Mar 2011) | 12 lines

Fix and improve libpayload platform support

- Fix various minor compile issues (eg. include necessary standard headers)
- Fix compilation of libpayload code paths
- Provide libpayload support in Makefile
- Add make target "libflashrom.a" which links non-CLI code to static
  library

Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Tested-with-DOS-crosscompiler-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1279 | hailfinger | 2011-03-08 01:23:49 +0100 (Tue, 08 Mar 2011) | 18 lines

Various IT85* cleanups and fixes.

Fix a few typos.
Change the EC memory region mapping name.
Drop unused function parameter.
Use mmio_writeb()/mmio_readb() to get reliable access to volatile memory
locations instead of plain pointer access which is optimized away by gcc.
Use own it85_* SPI high-level chip read/write functions instead of
relying on unrelated ICH functions.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

David writes:
I applied the patch against the Chromium OS branch and
successfully tested read and write operations on a Cr48.

Acked-by: David Hendricks <dhendrix@google.com>

------------------------------------------------------------------------
r1278 | hailfinger | 2011-03-08 01:09:11 +0100 (Tue, 08 Mar 2011) | 8 lines

Fix compilation if CONFIG_INTERNAL=no.
Fix compilation if everything except CONFIG_SATAMV is no.
Do not compile in PCI support for wiki printing if no PCI devices are
supported.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1277 | hailfinger | 2011-03-07 16:32:58 +0100 (Mon, 07 Mar 2011) | 5 lines

Fix broken compilation caused by a typo in r1275.

Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Idwer Vollering <vidwer@gmail.com>

------------------------------------------------------------------------
r1276 | hailfinger | 2011-03-07 11:59:06 +0100 (Mon, 07 Mar 2011) | 5 lines

Mark Macronix MX25L1605D as fully tested.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1275 | mkarcher | 2011-03-07 02:09:55 +0100 (Mon, 07 Mar 2011) | 6 lines

SST39SF512 is tested

flashrom -V -w: http://paste.flashrom.org/view.php?id=395

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1274 | hailfinger | 2011-03-07 02:08:09 +0100 (Mon, 07 Mar 2011) | 11 lines

Simplify pcidev_init by killing the vendorid parameter which was pretty
useless anyway since it was present in the pcidevs parameter as well.

This also allows us to handle multiple programmers with different vendor
IDs in the same driver.

Fix compilation of flashrom with only the nicrealtek driver.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1273 | hailfinger | 2011-03-06 23:52:55 +0100 (Sun, 06 Mar 2011) | 11 lines

Add a board enable for Asus P4P800-VM.

Only list the memory controller PCI IDs because the only other subsystem
mentioned is used by network and sound interfaces both of which can be
turned off in BIOS.
Tested on a board rev 1.85.

Signed-off-by: Diego Elio Petten?\195?\178 <flameeyes@gmail.com>
Acked-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Stefan Reinauer <stepan@coreboot.org>

------------------------------------------------------------------------
r1272 | hailfinger | 2011-03-06 23:26:23 +0100 (Sun, 06 Mar 2011) | 6 lines

Mark PMC Pm49FL004, SST SST49LF002A/B, SST SST49LF004A/B and
Winbond_W39V040FB as write tested.

Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1271 | hailfinger | 2011-03-06 23:16:30 +0100 (Sun, 06 Mar 2011) | 7 lines

Add Gigabyte GA-MA780G-UD3H to mainboard support list.

http://www.flashrom.org/pipermail/flashrom/2010-October/005117.html

Signed-off-by: Bernhard Geier <geierb@geierb.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1270 | hailfinger | 2011-03-06 19:45:40 +0100 (Sun, 06 Mar 2011) | 7 lines

Add support for ST M25PX16 and mark it as supported.
Tests were performed with write and verify operations to 4 different
M25PX16 chips with a Dediprog SF100.

Signed-off-by: Carl Worth <carl.d.worth@intel.com>
Acked-by: Idwer Vollering <vidwer@gmail.com>

------------------------------------------------------------------------
r1269 | hailfinger | 2011-03-06 19:31:11 +0100 (Sun, 06 Mar 2011) | 9 lines

Mark SST49LF080A as fully tested.
Mark EVGA nForce 780i board as supported.

Full logs are here:
http://www.flashrom.org/pipermail/flashrom/2011-January/005779.html

Signed-off-by: Brandon Dowdy <brandonrd7@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1268 | mkarcher | 2011-03-06 18:58:05 +0100 (Sun, 06 Mar 2011) | 4 lines

Add W39L040

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1267 | mkarcher | 2011-03-06 18:37:30 +0100 (Sun, 06 Mar 2011) | 4 lines

Add coreboot IDs to make manual selection of HP xw9400 possible

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1266 | mkarcher | 2011-03-06 13:09:05 +0100 (Sun, 06 Mar 2011) | 15 lines

Board-enable for GA-K8N51GMF

Gigabyte is not really helpful with their PCI IDs for us, the subsystem
IDs used just mean "gigabyte northbridge" and "gigabyte southbridge".
We should investigate whether autodetection of this board is causing
interference with other boards.

real version 2: Extend list of PCI IDs for nvidia southbridges.

flashrom -V: http://paste.flashrom.org/view.php?id=326
lspic: http://paste.flashrom.org/view.php?id=328
superiotool: http://paste.flashrom.org/view.php?id=329

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1265 | mkarcher | 2011-03-06 13:07:19 +0100 (Sun, 06 Mar 2011) | 11 lines

Add HP e-Vectra P2706T

Reported by: Michal Janke <jankeso@gmail.com>

flashrom -V: http://paste.flashrom.org/view.php?id=370
lspci: http://paste.flashrom.org/view.php?id=371
superiotool: http://paste.flashrom.org/view.php?id=372 and
  http://www.flashrom.org/pipermail/flashrom/2011-March/005878.html

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1264 | hailfinger | 2011-03-05 17:31:57 +0100 (Sat, 05 Mar 2011) | 9 lines

I tested a few mainboards and flash chips.
Successfully tested MSI MS-7596 (785GM-E51).
Successfully tested ASRock 890GX Extreme3.
Successfully tested Winbond W25x80.
Mention which GIGABYTE GA-MA78G-DS3H board revision was tested.

Signed-off-by: Yul Rottmann <yulrottmann@bitel.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1263 | hailfinger | 2011-03-01 00:58:15 +0100 (Tue, 01 Mar 2011) | 23 lines

Update the ITE IT8500 EC support to match the current state of the
flashrom-chromium tree.

This code has been deployed and tested to work on the Cr-48.
There are a few caveats, though:
- The boot BIOS straps register must be modified to select LPC. This
  can be done with the "select_bbs.sh" script (Install iotools at
  http://code.google.com/p/iotools/ before using select_bbs).
- It is very important to disable power management daemons before
  running flashrom on this EC. I commented out the brute force method
  we use in the Chromium OS branch that disables powerd, since IIRC
  Carl-Daniel has a better approach in the works.
- Due to dependencies which may be introduced by the OEM/ODM EC
  firmware, the code is not guaranteed to work for anything other than
  the Cr-48.

Signed-off-by: David Hendricks <dhendrix@google.com>

Carl-Daniel comments:
Code is not hooked up yet because probing needs to be sorted out.

Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1262 | hailfinger | 2011-02-22 18:16:34 +0100 (Tue, 22 Feb 2011) | 12 lines

Add generalized support for ITE IT8500/IT8502 embedded controllers.

The patch was developed by Google.
It was tested for IT8500E on a Chrome OS platform and may require
modification depending on ODM/OEM customization and EC firmware version.
This patch is not officially supported by ITE Tech Inc.

Signed-off-by: Donald Huang <donald.huang@ite.com.tw>
Signed-off-by: Yung-chieh Lo <yjlou@google.com>
Signed-off-by: David Hendricks <dhendrix@google.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1261 | hailfinger | 2011-02-15 23:44:27 +0100 (Tue, 15 Feb 2011) | 14 lines

Support 64-bit MEM BARs wherever possible.
Add more sanity checks for BARs and abort if resources are unreachable.
Undecoded resources are reported, but flashrom will proceed anyway just
in case the BIOS screwed up the configuration.

(The empty CardBus handler is intentional, according to the spec no BARs
in PCI config space are used by CardBus.)

Found while working on a driver for the Angelbird PCIe-based SSD which
has 64-bit capable MEM BARs.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org>

------------------------------------------------------------------------
r1260 | hailfinger | 2011-02-05 13:11:17 +0100 (Sat, 05 Feb 2011) | 8 lines

Add support for AMD Am29LV001BB, Am29LV001BT, Am29LV002BB, Am29LV002BT,
Am29LV004BB, Am29LV004BT, Am29LV008BB, Am29LV008BT

Thanks to Mark Pustjens for testing the Am29LV001BB.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org>

------------------------------------------------------------------------
r1259 | hailfinger | 2011-02-04 23:52:04 +0100 (Fri, 04 Feb 2011) | 6 lines

Improve debugging for unaligned erase in the flash chip emulator.
Fix out-of-bounds access for chip erase in the flash chip emulator.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: David Hendricks <dhendrix@google.com>

------------------------------------------------------------------------
r1258 | hailfinger | 2011-02-04 22:37:59 +0100 (Fri, 04 Feb 2011) | 12 lines

Support for Angelbird Wings PCIe SSD (solid-state drive).
It uses a Marvell 88SX7042 SATA controller internally which has access
to a separate flash chip hosting the option ROM.

Thanks to Angelbird Ltd for sponsoring development of this driver!

I expect the code to work for that SATA controller even if it is not
part of the Angelbird SSD.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org>

------------------------------------------------------------------------
r1257 | stepan | 2011-01-28 10:00:15 +0100 (Fri, 28 Jan 2011) | 6 lines

Support Dediprog LEDs on devices with 2 and 3 LEDs.

Signed-off-by: Stefan Reinauer <reinauer@google.com>
Acked-by: Mathias Krause <mathias.krause@secunet.com>


------------------------------------------------------------------------
r1256 | stepan | 2011-01-25 01:23:32 +0100 (Tue, 25 Jan 2011) | 10 lines

flashrom: fix sparse warning: Unknown escape %

This patch fixes wrong escaping of %.
In print.c %%2b is correct instead of \%2b ("%%2b"=%2b=+)
In board_enable.c %d is correct instead of \%d.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Stefan Reinauer <stepan@coreboot.org>


------------------------------------------------------------------------
r1255 | stepan | 2011-01-24 20:15:51 +0100 (Mon, 24 Jan 2011) | 10 lines

flashrom: fix sparse warning: Using plain integer as NULL pointer

This patch fixes the "using plain integer as NULL pointer" warnings
generated by running sparse on the flashrom source.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Mathias Krause <mathias.krause@secunet.com>
Acked-by: Stefan Reinauer <stepan@coreboot.org>


------------------------------------------------------------------------
r1254 | stepan | 2011-01-20 22:05:15 +0100 (Thu, 20 Jan 2011) | 13 lines

Secret knowledge is cool, but public knowledge is better.
Implement all Dediprog commands found in USB traces, even if their
purpose is not yet known.
Annotate unknown commands with info about the call sequence they are
embedded in and the firmware version of the log.

Add a new shutdown command for firmware 5.x (of which Stefan thinks it's
"switch the Pass light on" hence it is called late in the game)

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <reinauer@google.com>


------------------------------------------------------------------------
r1253 | stepan | 2011-01-19 07:21:54 +0100 (Wed, 19 Jan 2011) | 9 lines

Don't print the local memory flash chip address on programmers that don't
actually map the flash chip into local memory (like the dediprog) because
the value does not make sense there.

This version was reworked / rewritten by Mathias Krause to have less "impact"

Signed-off-by: Stefan Reinauer <reinauer@google.com>
Acked-by: Mathias Krause <mathias.krause@secunet.com>

------------------------------------------------------------------------
r1252 | krause | 2011-01-17 08:50:42 +0100 (Mon, 17 Jan 2011) | 10 lines

This patch reduces the stack usage by declaring 'const' stack variables
as 'static const' so they end up in the .rodata section instead of being
copied from there to the stack for every invocation of the corresponding
function. As a plus we end up in having a smaller binary as the "copy
from .rodata to stack" code isn't emitted by the compiler any more
(roughly -100 bytes).

Signed-off-by: Mathias Krause <mathias.krause@secunet.com>
Acked-by: Stefan Reinauer <stepan@coreboot.org>

------------------------------------------------------------------------
r1251 | krause | 2011-01-17 08:45:54 +0100 (Mon, 17 Jan 2011) | 9 lines

The AT26DF081A requires the Write Enable Latch (WLE) to be set for
write/erase operations. Also bit 5 is the Erase/Program Error (EPE) bit,
so has nothing to do with the block protection. Ignore it when testing
for block protections.

Signed-off-by: Mathias Krause <mathias.krause@secunet.com>
Tested-by: Mathias Krause <mathias.krause@secunet.com>
Acked-by: Stefan Reinauer <stepan@coreboot.org>

------------------------------------------------------------------------
r1250 | krause | 2011-01-01 11:54:09 +0100 (Sat, 01 Jan 2011) | 8 lines

Fix decoding of SB600 LPC ROM protection registers.

The address part was using a bit of the size, the size was missing the
upper bit, was off by 1023 bytes and included the protection bits.

Signed-off-by: Mathias Krause <mathias.krause@secunet.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1249 | mkarcher | 2010-12-27 00:55:19 +0100 (Mon, 27 Dec 2010) | 9 lines

compilation fix for djgpp

This corrects a djgpp build error, seen with r1232 and later.

pcidev.c:210: error: conflicting types for 'rpci_write_long'
programmer.h:226: error: previous declaration of 'rpci_write_long' was here

Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r1248 | mkarcher | 2010-12-27 00:55:12 +0100 (Mon, 27 Dec 2010) | 7 lines

enable unlocking (erasing/writing) W39V040FB chips

Add code for the unlocking (erasing/writing) of Winbond W39V040FB
chips, enabling erasing/writing this type of chip.

Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r1247 | dhendrix | 2010-12-14 00:54:59 +0100 (Tue, 14 Dec 2010) | 4 lines

Signed-off-by: David Hendricks <dhendrix@google.com>
Acked-by: Stefan Reinauer <stepan@coreboot.org>


------------------------------------------------------------------------
r1246 | hailfinger | 2010-12-06 14:05:44 +0100 (Mon, 06 Dec 2010) | 7 lines

Simplify get_next_write in the partial write code.

Suggested by Michael Karcher.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1245 | hailfinger | 2010-12-05 17:33:59 +0100 (Sun, 05 Dec 2010) | 18 lines

Add support for Winbond W39V040FB and W39V040FC.

Print lock status for all supported Winbond W39* chips:
W39V040A, W39V040B, W39V040C, W39V040FA, W39V040FB, W39V040FC,
W39V080A, W39V080FA, W39V080FA (dual mode).

Fill in correct probe timing for Winbond W39V040C and W39V080FA.

Please note that the W39V040B/W39V040FB pair has identical IDs,
identical read/write/erase, but locking differs. Same applies to
W39V040C/W39V040FC. This causes double detection on chipsets which
support LPC and FWH, making flashing more difficult because the user
has to select the correct chip. This is called the evil twin problem.
A better evil twin handling (patch available) will resolve that problem.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1244 | hailfinger | 2010-12-05 16:14:44 +0100 (Sun, 05 Dec 2010) | 6 lines

Clean up erase function checking.
Update a few comments and messages to improve readability.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1243 | hailfinger | 2010-12-04 12:56:52 +0100 (Sat, 04 Dec 2010) | 5 lines

Stop reading layout info when the max layout count has been reached.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1242 | hailfinger | 2010-12-04 04:26:40 +0100 (Sat, 04 Dec 2010) | 7 lines

Annotate the following chips with probe timing:
Am29F016D, Am29F040B, Am29LV040B, Am29LV081B, A29002B, A29002T, A29040B, 
MX29F001B, MX29F001T, MX29F002B, MX29F002T, MX29LV040, M29F040B 

Signed-off-by: David Borg <borg.db@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1241 | hailfinger | 2010-12-03 15:48:11 +0100 (Fri, 03 Dec 2010) | 28 lines

Add support for the Open Graphics Project development card, OGD1, as a
SPI flash programmer. The project is in the the process of designing
and making a complete, open source, graphics card.
More info at http://wiki.opengraphics.org.

The first development card is a PCI add in card containing a couple of
FPGAs and a couple of serial flash chips (amongst other things). The
FPGAs are called XP10 and S3 (their part numbers). The XP10 contains
its own flash and does not need to be programmed by flashrom - it
ensures that the device can enumerate on the PCI bus without needing
further configuration.

The larger FPGA is the S3. This is configured from a large SPI flash
(2 MBytes). The second SPI flash is used to store the VGA BIOS. It
is smaller (128 KBytes). This patch adds support for programming either
of the two SPI flash chips.

The programmer device takes one configuration option which selects which
of the two flash chips is accessed. This must be set to either "cprom"
or "bprom". (The project refers to the two chips as "cprom" / "bprom",
"s3" and "bios" are more readable alternatives).

Add support for SST SST25VF010 (REMS).
Mark SST SST25VF016B as tested for write.

Signed-off-by: Mark Marshall <mark.marshall@csr.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1240 | hailfinger | 2010-12-02 22:59:42 +0100 (Thu, 02 Dec 2010) | 6 lines

Avoid printing the chip locks if chip detection was forced because lock
access may involve flash chip registers which will not be mapped.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1239 | uwe | 2010-12-02 22:57:42 +0100 (Thu, 02 Dec 2010) | 8 lines

Add a board-enable for the MSI MS-6391 (845 Pro4).

I found this via educated guessing and trial-and-error.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r1238 | hailfinger | 2010-12-02 03:41:55 +0100 (Thu, 02 Dec 2010) | 5 lines

Handle erase failure in partial write.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1237 | hailfinger | 2010-11-29 01:37:49 +0100 (Mon, 29 Nov 2010) | 6 lines

Add support for Spansion S25FL004A, S25FL032A, and S25FL064A.
Tested S25FL064A using a Bus Pirate.

Signed-off-by: Rudy Host <segfault@committeeofdoom.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1236 | hailfinger | 2010-11-25 00:37:22 +0100 (Thu, 25 Nov 2010) | 7 lines

Dump all VIA SPI registers like for ICH7.
Handle BBAR on VIA.
Handle SPI lockdown on VIA.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Rudolf Marek <r.marek@assembler.cz>

------------------------------------------------------------------------
r1235 | hailfinger | 2010-11-23 22:28:16 +0100 (Tue, 23 Nov 2010) | 12 lines

Add chunked write ability to the Dediprog SF100 driver.

Please note that the write speedup only applies to chips which have SPI
page write (i.e. chips using spi_chip_write_256).

This is a quick fix for write speed until I get around to implementing
full bulk SPI write support.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Richard A. Smith  <richard@laptop.org>
Acked-by: Mathias Krause <mathias.krause@secunet.com>

------------------------------------------------------------------------
r1234 | hailfinger | 2010-11-16 22:25:29 +0100 (Tue, 16 Nov 2010) | 16 lines

Support bulk read on Dediprog SF100.
Should result in native speed for plain read and erase.
Should result in a measurable speedup for writes due to a fast verify.
Packet size is 512 bytes. Depending on your USB hardware and the
Dediprog firmware version, this may not work at all. That said, it
worked on the hardware we tested.

Add lots of error checking where it was missing before.

Thanks to Richard A. Smith, Mathias Krause and David Hendricks for
testing multiple iterations of this patch.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-By: Richard A. Smith <richard@laptop.org>
Acked-By: Mathias Krause <mathias.krause@secunet.com>

------------------------------------------------------------------------
r1233 | hailfinger | 2010-11-16 18:21:58 +0100 (Tue, 16 Nov 2010) | 13 lines

Read the to-be-verified area in one go.
verify_range() and check_erased_range() check each page separately.
While that may have seemed like a good idea back when the code was
introduced, it has no benefits for any of the chips where we support
write because all of them handle cross-page reads nicely.
The only class of chips where this change could be a problem is chips
with non power of two sector sizes which have gaps in the address space.
We simply require their read functions to provide gap-free results
and leave it at that.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-By: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1232 | hailfinger | 2010-11-10 16:25:18 +0100 (Wed, 10 Nov 2010) | 12 lines

Revert PCI config space writes on shutdown.
This means all chipset enables etc. will be undone on shutdown.
Reversible PCI config space writes now use rpci_write_*().
PCI config space writes which are one-shot (e.g. communication via
config space) should continue to use the permanent pci_write_*
variants.

Extend the number of available register_shutdown slots to 32.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1231 | hailfinger | 2010-11-10 04:26:57 +0100 (Wed, 10 Nov 2010) | 9 lines

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

Signed-off-by: Alex Badea <vamposdecampos@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1230 | hailfinger | 2010-11-10 04:22:39 +0100 (Wed, 10 Nov 2010) | 7 lines

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.

Signed-off-by: Alex Badea <vamposdecampos@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1229 | hailfinger | 2010-11-10 04:18:41 +0100 (Wed, 10 Nov 2010) | 8 lines

ft2232_spi: allow 5x clock divisor to be set at runtime.
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.

Signed-off-by: Alex Badea <vamposdecampos@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1228 | hailfinger | 2010-11-10 04:10:41 +0100 (Wed, 10 Nov 2010) | 8 lines

Retry short reads in ft2232_spi.
It is possible that ftdi_read_data() returns less data
than requested. Catch this case and retry reading the rest
of the buffer.

Signed-off-by: Alex Badea <vamposdecampos@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1227 | hailfinger | 2010-11-10 00:30:43 +0100 (Wed, 10 Nov 2010) | 8 lines

DediProg firmware version 5.1.5 of the SF-100 works just fine.
Allow any firmware version from 2.x.y to 5.x.y.
Handle errors for the initial USB command to catch -EPERM.

Signed-off-by: Mathias Krause <mathias.krause@secunet.com>
Acked-by: Patrick Georgi <patrick@georgi-clan.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1226 | hailfinger | 2010-11-09 23:00:31 +0100 (Tue, 09 Nov 2010) | 8 lines

Support setting the Dediprog SF100 SPI voltage.
Add a generic voltage parameter parser.
Move tolower_string() from dummyflasher.c to flashrom.c to make it
available everywhere.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coreboot.org>

------------------------------------------------------------------------
r1225 | hailfinger | 2010-11-05 15:51:59 +0100 (Fri, 05 Nov 2010) | 14 lines

Avoid two memory leaks in doit() which were unproblematic for flashrom
because flashrom terminates after finishing doit().
Rename oldcontents to curconents in erase_and_write_block_helper().
Unify the code for all granularities in get_next_write().
Return write length from get_next_write() instead of filling it as
referenced parameter.

Thanks to Michael Karcher for pointing out the first two issues.
Thanks to David Hendricks for pointing out the third issue and
suggesting a way to unify that code.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1224 | hailfinger | 2010-11-04 02:04:27 +0100 (Thu, 04 Nov 2010) | 27 lines

This patch makes flashrom use real partial writes. If you write an image
full of 0xff, flashrom will erase and detect that no write is needed. If
you write an image which differs only in some parts from the current
flash contents, flashrom will detect that and not touch unchanged areas.

Fix a long-standing bug in need_erase() for 256 byte granularity as
well.

Nice side benefit: Detailed progress printing.
S means skipped
E means erased
W means written

Thanks to Andrew Morgan for testing countless iterations of this patch.
Thanks to Richard A. Smith for testing on Dediprog SF100.
Thanks to David Hendricks for the review and for creating a partial write
torture test script and testing with it on Intel NM10 and AMD SB700 SPI.
Thanks to Idwer Vollering for testing with Intel SPI NICs.
Thanks to Rudolf Marek for testing on AMD SB710 and SiI SATA controllers.
Thanks to Michael Karcher for the review.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: David Hendricks <dhendrix@google.com>
Acked-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1223 | hailfinger | 2010-11-02 04:12:51 +0100 (Tue, 02 Nov 2010) | 13 lines

Change semantics of image building in the layout code.
If a layout file was specified, all regions not mentioned in the layout
file were taken from the new image instead of being preserved.
If regions overlap, the non-included regions won.

New behaviour:
If a layout file is specified, only the regions explicitly requested for
inclusion will be taken from the new image.
If regions overlap, the included regions win.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: David Hendricks <dhendrix@google.com>

------------------------------------------------------------------------
r1222 | hailfinger | 2010-11-02 04:03:38 +0100 (Tue, 02 Nov 2010) | 24 lines

Add a line of output for each iteration of the torture test.
This serves as a sort of progress indicator.

The output looks like this::
localhost ~ # FLASHROM="./flashrom" sh flashrom_partial_write_test.sh
testing flashrom binary: ./flashrom
Running test in /tmp/tmp.4xPejwaADU
ffh pattern written in ff_4k.bin
00h pattern written in 00_4k.bin
Reading BIOS image
Original image saved as bios.bin
aligned region 0 test: passed
...
aligned region 15 test: passed
unaligned region 0 test: passed
...
unaligned region 15 test: passed
Result: PASSED
restoring original bios image using system's flashrom
test files remain in /tmp/tmp.4xPejwaADU

Signed-off-by: David Hendricks <dhendrix@google.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1221 | hailfinger | 2010-11-02 01:16:27 +0100 (Tue, 02 Nov 2010) | 6 lines

Use mktemp unconditionally for security reasons.
Avoid non-portable seq.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Idwer Vollering <vidwer@gmail.com>

------------------------------------------------------------------------
r1220 | hailfinger | 2010-11-01 23:07:04 +0100 (Mon, 01 Nov 2010) | 24 lines

Add SPI flash emulation capability to the dummy programmer.

You have to choose between
- no emulation
- ST M25P10.RES SPI flash chip (RES, page write)
- SST SST25VF040.REMS SPI flash chip (REMS, byte write)
- SST SST25VF032B SPI flash chip (RDID, AAI write)
Example usage: flashrom -p dummy:emulate=SST25VF032B

Flash image persistence is available as well.
Example usage: flashrom -p dummy:image=dummy_simulator.rom

Allow setting the max chunksize for page write with the dummy
programmer.
Example usage: flashrom -p dummy:spi_write_256_chunksize=5

Flash emulation is compiled in by default. 

This code helped me find and fix various bugs in the SPI write code
as well as in the testsuite.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: David Hendricks <dhendrix@google.com>

------------------------------------------------------------------------
r1219 | hailfinger | 2010-10-29 23:54:16 +0200 (Fri, 29 Oct 2010) | 8 lines

Replace "$FLASHROM_PARAM" with ${FLASHROM_PARAM} in
util/flashrom_partial_write_test.sh to avoid passing in quoted
parameters which can cause problems especially if FLASHROM_PARAM is
empty or contains spaces.

Signed-off-by: David Hendricks <dhendrix@google.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1218 | hailfinger | 2010-10-29 22:17:41 +0200 (Fri, 29 Oct 2010) | 8 lines

flashrom torture test script.
Focus is on partial write and layout functionality.

Minor modifications by Carl-Daniel Hailfinger.

Signed-off-by: David Hendricks <dhendrix@google.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1217 | hailfinger | 2010-10-28 00:07:11 +0200 (Thu, 28 Oct 2010) | 13 lines

Fix internal offset calculations for SPI BYTE PROGRAM and SPI AAI PROGRAM.
The bug was invisible so far because we always started at offset 0. The
pending partial write patch uses nonzero start offsets and trips over
this bug.

Clarify a few comments in IT87 SPI.

Thanks to Idwer Vollering for reporting write breakage with my latest
partial write patch. This should fix the underlying problem.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Idwer Vollering <vidwer@gmail.com>

------------------------------------------------------------------------
r1216 | hailfinger | 2010-10-20 23:13:19 +0200 (Wed, 20 Oct 2010) | 16 lines

Add a reset to probe_jedec before we read the Chip's IDs.

Previous probes might have had too short delays for entering ID mode,
so the chip may still be in the process of entering the ID mode. Due to
that, an additional delay before the reset makes sense.
Add FEATURE_RESET_MASK to deal cleanly with those feature bits.

Maciej Pijanka tested the patch and it fixes probing for him with some
old Atmel chips.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Anders Juel Jensen <andersjjensen@gmail.com>
Tested-by: Maciej Pijanka <maciej.pijanka@gmail.com>
Acked-by: Sean Nelson <audiohacked@gmail.com> 

------------------------------------------------------------------------
r1215 | hailfinger | 2010-10-20 00:06:20 +0200 (Wed, 20 Oct 2010) | 18 lines

Always read the flash chip before writing. This will allow flashrom to
skip erase of already-erased blocks and to skip write of blocks which
already have the wanted contents.

Avoid emergency messages by checking if the chip contents after a failed
write operation (erase/write) are unchanged.

Keep the emergency messages after a failed pure erase. That part is
debatable because if someone wants erase, he pretty sure doesn't care
about the flash contents anymore.

Please note that this introduces additional overhead of a full chip read
before write. This is frowned upon by people with slow programmers.
A followup patch will make this configurable.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coreboot.org>

------------------------------------------------------------------------
r1214 | uwe | 2010-10-19 00:32:03 +0200 (Tue, 19 Oct 2010) | 12 lines

Fix board name, EP-8NPAI should have been EP-8NPA7I (trivial).

Details, lspci/superiotool/flashrom logs:

  http://www.flashrom.org/pipermail/flashrom/2010-October/005160.html

Also add the vendor website URL for this board.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1213 | uwe | 2010-10-16 01:02:15 +0200 (Sat, 16 Oct 2010) | 7 lines

Add a board enable for the EPoX EP-8NPA7I board.
Also, spelling correction.

Signed-off-by: Jonathan Kollasch <jakllsch@kollasch.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r1212 | hailfinger | 2010-10-15 02:01:14 +0200 (Fri, 15 Oct 2010) | 9 lines

doit() is the monster function we split off from main() when we created
cli_classic() and tried to introduce some abstraction. doit() is a
poster child of WTFs on an astronomic scale.

Make doit() less bad by factoring out self-contained code.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r1211 | hailfinger | 2010-10-14 00:26:56 +0200 (Thu, 14 Oct 2010) | 12 lines

Switch all flash chips to partial write.
The inner write functions which handle partial write are renamed to the
original name of their wrappers. The write wrappers are removed.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Tested-by: Maciej Pijanka <maciej.pijanka@gmail.com>
Tested-by: Andrew Morgan <ziltro@ziltro.com>
Tested-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Idwer Vollering <vidwer@gmail.com>
Tested-by: Sean Nelson <audiohacked@gmail.com> 
Acked-by: Sean Nelson <audiohacked@gmail.com> 

------------------------------------------------------------------------
r1210 | hailfinger | 2010-10-13 23:49:30 +0200 (Wed, 13 Oct 2010) | 17 lines

Refactor remaining write wrappers.

Kill duplicated code.

Annotate write functions with their chunk size.

Mark Fujitsu MBM29F400BC and ST M29F400BB as untested because their
write code no longer uses a broken layout.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Tested-by: Maciej Pijanka <maciej.pijanka@gmail.com>
Tested-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Idwer Vollering <vidwer@gmail.com>
Tested-by: Sean Nelson <audiohacked@gmail.com> 
Acked-by: Sean Nelson <audiohacked@gmail.com> 

------------------------------------------------------------------------
r1209 | hailfinger | 2010-10-10 18:10:49 +0200 (Sun, 10 Oct 2010) | 6 lines

Simplify calls to inner write functions. No behavioural changes, just
equivalence transformations.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1208 | hailfinger | 2010-10-10 16:02:27 +0200 (Sun, 10 Oct 2010) | 37 lines

The currently used write functions (wrappers) all use helpers which
perform the actual write (inner functions).

The signature of the write wrappers is:
int write_chip(struct flashchip *flash, uint8_t * buf);

The signature of the inner write functions varied a lot. This patch
changes them to:
int write_part(struct flashchip *flash, uint8_t *src, int start, int len);

Did you know that flashrom has only 8 inner write functions for all
flash chips?
write_page_write_jedec_common
write_sector_jedec_common
write_sector_28sf040
spi_chip_write_256_new
spi_chip_write_1_new
spi_aai_write_new
write_page_82802ab
write_page_m29f400bt

Export all inner write functions.

Change the function signature of wait_82802ab to eliminate single-use
variables.

Remove an error message in write_page_m29f400bt which was printed for
every byte written regardless of success.

Add sharplhf00l04.c to the list of flash chip drivers in the Makefile.
While the functions in there are unused, I suspect we will need them
later, and by hooking the file up we ensure that compilation won't
break.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1207 | hailfinger | 2010-10-08 22:29:57 +0200 (Fri, 08 Oct 2010) | 8 lines

Remove progress printing from individual flash chip drivers.

Progress printing should be handled in the generic code, and will end up
there once partial write is possible.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r1206 | hailfinger | 2010-10-08 20:52:29 +0200 (Fri, 08 Oct 2010) | 13 lines

flashrom had an implicit erase-on-write for most flash chip and
programmer drivers, but it was not entirely consistent. Some drivers had
their own hand-rolled partial update functionality which made handling
partial updates from generic code impossible.

Move implicit erase out of chip drivers, and kill some dead erase
functions at the same time.
A full chip erase is now performed in the generic code for all flash
chips on write, and after that the whole chip is written.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1204 | hailfinger | 2010-10-08 18:31:43 +0200 (Fri, 08 Oct 2010) | 5 lines

Increase flashrom release number to 0.9.3.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1203 | hailfinger | 2010-10-08 14:40:09 +0200 (Fri, 08 Oct 2010) | 12 lines

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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1202 | hailfinger | 2010-10-08 13:03:02 +0200 (Fri, 08 Oct 2010) | 8 lines

A lot of messages sent to flashrom@flashrom.org just have "flashrom -V"
as the subject. 
Ask people to include more information in the subject line to make life
easier for developers/supporters.

Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1201 | hailfinger | 2010-10-08 02:37:55 +0200 (Fri, 08 Oct 2010) | 7 lines

SPI write status register (WRSR) may take longer than 100 ms, and it
makes sense to poll for completion in 10 ms steps until 5 s are over.
This patch complements r1115.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Joshua Roys <roysjosh@gmail.com>

------------------------------------------------------------------------
r1200 | hailfinger | 2010-10-08 00:21:45 +0200 (Fri, 08 Oct 2010) | 8 lines

List the devices for all supported programmers in "flashrom -L" output.
Fix PCI device ID printing.
Remove personal e-mail addresses from the man page, point people to
flashrom@flashrom.org instead.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1199 | hailfinger | 2010-10-07 01:48:34 +0200 (Thu, 07 Oct 2010) | 8 lines

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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1198 | hailfinger | 2010-10-07 01:16:10 +0200 (Thu, 07 Oct 2010) | 7 lines

The Direct I/O library for Mac OS X is now called DirectHW to make sure
people can find it via an internet search. DirectIO was a generic name
for a concept and thus not a good distinguisher for a library.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Idwer Vollering <vidwer@gmail.com>

------------------------------------------------------------------------
r1197 | hailfinger | 2010-10-07 01:03:21 +0200 (Thu, 07 Oct 2010) | 6 lines

Update the author list in the man page.
Update programmer parameter documentation.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1196 | stepan | 2010-10-06 04:56:44 +0200 (Wed, 06 Oct 2010) | 6 lines

Remove duplicate includes from the code.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r1195 | hailfinger | 2010-10-06 01:21:51 +0200 (Wed, 06 Oct 2010) | 6 lines

DJGPP: Avoid leaking memory on lowmem mapping error.
Add a clarifying comment about why low memory is never unmapped.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Rudolf Marek <r.marek@assembler.cz>

------------------------------------------------------------------------
r1194 | hailfinger | 2010-10-06 00:29:08 +0200 (Wed, 06 Oct 2010) | 9 lines

Use AAI write for SST SST25VF032B.
Speedup from 228 to 113 seconds.

Use page (256 byte) write for SST SST25VF064C.
Speedup from 3091 to 123 seconds.

Signed-off-by: Helge Wagner <helge.wagner@ge.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1193 | hailfinger | 2010-10-06 00:06:05 +0200 (Wed, 06 Oct 2010) | 5 lines

Implement on-the-fly reprogramming of the ICH SPI OPCODE table.

Signed-off-by: Helge Wagner <helge.wagner@ge.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1192 | uwe | 2010-10-05 23:48:43 +0200 (Tue, 05 Oct 2010) | 13 lines

Add a board-enable for the ASRock K7S41, chipset-enable for SiS 741.

This also adds (and marks as tested) a chipset-enable for the SiS 741.

All operations successfully tested on hardware.

lspci/superiotool:
  http://www.flashrom.org/pipermail/flashrom/2010-September/004710.html

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r1191 | mhm | 2010-10-05 23:32:29 +0200 (Tue, 05 Oct 2010) | 24 lines

Add board enable for Dell OptiPlex GX1 and mark Intel 28F002BC/BL/BV/BX-T
as tested.

Match on ethernet and north bridge.

This is tested on an OptiPlex GX1 400L+ but will probably work for
the whole GX1 series as they all share the same vendor BIOS.

lspci/flashrom output
http://www.flashrom.org/pipermail/flashrom/2010-July/004042.html

lspci output (OptiPlex GX1 unknown model)
http://www.coreboot.org/pipermail/coreboot/2010-May/058040.html

superiotool output (OptiPlex GX1 266L+)
http://www.flashrom.org/pipermail/flashrom/2009-July/000207.html

lspci/dmidecode output (OptiPlex GX1 266L+)
http://www.coreboot.org/pipermail/coreboot/2009-July/050958.html


Signed-off-by: Mattias Mattsson <vitplister@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1190 | uwe | 2010-10-05 23:21:09 +0200 (Tue, 05 Oct 2010) | 12 lines

Quickfix for broken writes on FT2232H based programmers.

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.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r1189 | mhm | 2010-10-05 22:28:36 +0200 (Tue, 05 Oct 2010) | 54 lines

Make sure all chip variants are present in .name strings in flashchips.c

Strip package prefix in constant names (everything before "28F").

Prefix every constant name with INTEL_

Sort intel chip constants by ID.

Rename the following constants to their "canonical" name:

P28F400BT (0x70  -> INTEL_28F400T (28F400BV/BX/CE/CV-T)
P28F400BB (0x71) -> INTEL_28F400B (28F400BV/BX/CE/CV-B)
P28F004BT (0x78) -> INTEL_28F004T (28F004B5/BE/BV/BX-T)
P28F004BB (0x79) -> INTEL_28F004B (28F004B5/BE/BV/BX-B)
E_28F008S5 (0xA6) -> INTEL_28F008S3 (28F008S3/S5/SC)
E_28F004S5 (0xA7) -> INTEL_28F004S3 (28F008S3/S5/SC)
P28F001BXT (0x94) -> INTEL_28F001T (28F001BN/BX-T)
P28F001BXB (0x95) -> INTEL_28F001B (28F001BN/BX-B)
E_28F016S5 (0xAA) -> INTEL_28F016S3 (28F016S3/S5/SC)

Add chip IDs for the following chips:

28F320J5
28F640J5
28F320J3
28F640J3
28F128J3
28F256J3
28F200BL/BV/BX/CV-T
28F200BL/BV/BX/CV-B
28F002BL/BV/BX-B
28F008BE/BV-T
28F008BE/BV-B
28F800B5/BV/CE/CV-T
28F800B5/BV/CE/CV-B
28F016SA/SV
28F008SA
28F008S3/S5/SC
28F008S3/S5/SC
28F016XS
28F010
28F512
28F256A
28F020
28F016B3-T
28F016B3-B
28F008B3-T
28F008B3-B
28F004B3-T
28F004B3-B

Signed-off-by: Mattias Mattsson <vitplister@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1188 | hailfinger | 2010-10-05 21:19:48 +0200 (Tue, 05 Oct 2010) | 13 lines

Speed up RayeR SPIPGM driver in flashrom by a factor of 2.

Allow specification of an alternate base address with
flashrom -p rayer_spi:iobase=0x278
Any base address is allowed as long as it is nonzero, below 65536 and a
multiple of four.

Read speed is now on par with original spipgm.exe.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Tested-by: Martin Rehak <rayer@seznam.cz>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1187 | mkarcher | 2010-10-05 19:29:35 +0200 (Tue, 05 Oct 2010) | 11 lines

Board enable for GA-6IEM

Reported by Konstantin <hc@comp.susu.ac.ru>
lspci (superiotool missing, doesn't matter for this patch)
 http://www.coreboot.org/pipermail/flashrom/2010-September/004609.html
DMI is needed, as there are no usefull PCI IDs.

(no test of that board yet, thus marked as untested)

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1186 | hailfinger | 2010-10-05 15:31:12 +0200 (Tue, 05 Oct 2010) | 6 lines

Update README to list all the needed rpm files for DOS cross-compilation
and update the download location of cwsdpmi.

Signed-off-by: Idwer Vollering <vidwer+flashrom@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1185 | hailfinger | 2010-10-05 13:16:14 +0200 (Tue, 05 Oct 2010) | 6 lines

Add Intel 82571EB and 82572EI Gigabit NICs to the supported list.

Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Tested-by: Iain Paton <selsinork@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1184 | oxygene | 2010-09-30 19:03:32 +0200 (Thu, 30 Sep 2010) | 8 lines

Add support for building flashrom against libpayload.
This doesn't include changes to the frontend which must be
done separately, so this won't work out of the box.
This code was tested on hardware.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1183 | hailfinger | 2010-09-30 01:37:24 +0200 (Thu, 30 Sep 2010) | 5 lines

Support for Loongson-2F (MIPS) flashing.

Signed-off-by: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1182 | hailfinger | 2010-09-26 23:43:53 +0200 (Sun, 26 Sep 2010) | 9 lines

Half a dozen hardcoded strcmp() don't make sense if we need a
chassis-type list anyway once we merge the internal DMI decoder.
Provide and array of the most interesting chassis types and annotate
them with laptop/non-laptop status.
Match the dmidecode chassis type against the strings in the array.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r1181 | hailfinger | 2010-09-26 00:53:44 +0200 (Sun, 26 Sep 2010) | 13 lines

Implement libpayload support and improve life for DOS
based flashrom, too:

Change the physmap* behaviour to use (void*)-1 as error code instead
of NULL. That way, 1:1 mapped memory can be supported properly
because (void*)0 is not a magic pointer anymore.
(void*)-1 on the other hand is a rather unlikely memory offset, so that
should be safe.
  
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
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>

------------------------------------------------------------------------
r1180 | uwe | 2010-09-20 19:23:38 +0200 (Mon, 20 Sep 2010) | 14 lines

The variable 'ret' is unused when compiling on BigEndian architecture.

This produces an "unused variable" message, which might be treated as error
if -Werror was passed to compiler.

With this patch I was able to compile flashrom cleanly on ppc and ppc64:

http://koji.fedoraproject.org/koji/taskinfo?taskID=2472482
http://koji.fedoraproject.org/koji/taskinfo?taskID=2472484

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1179 | mhm | 2010-09-19 01:42:36 +0200 (Sun, 19 Sep 2010) | 18 lines

Add chip IDs for Alliance Semiconductor flash chips.

Cross-checked with UniFlash 1.40 source, chip datasheets and
EZoFlash's chip database (http://www.ezoflash.com/chip_database.php).

Datasheets:
http://www.ezoflash.com/datasheets/flash/Alliance/AS29F002.pdf
http://www.alsc.com/pdf/flash.pdf/as29f010.pdf
http://www.alsc.com/pdf/flash.pdf/as29f040.pdf
http://www.alsc.com/pdf/flash.pdf/as29f200.pdf
http://www.ezoflash.com/datasheets/flash/Alliance/AS29LV160.pdf
http://www.ezoflash.com/datasheets/flash/Alliance/AS29LV400.pdf
http://www.ezoflash.com/datasheets/flash/Alliance/AS29LV800.pdf


Signed-off-by: Mattias Mattsson <vitplister@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1178 | hailfinger | 2010-09-17 00:34:25 +0200 (Fri, 17 Sep 2010) | 15 lines

Thanks to Johannes Sj?\195?\182lund for reporting that the Bus Pirate init could
not deal with a Bus Pirate which is already in binary Bitbang mode. This
is caused by a combination of the slowness of the Bus Pirate, the
slowness of USB and a fast serial port flush routine which just flushes
the buffer contents and does not wait until data arrival stops.

Make the Bus Pirate init more robust by running the flush command 10
times with 1.5 ms delay in between.

This code development was sponsored by Mattias Mattsson. Thanks!
Tested a few dozen times, should work reliably.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Mattias Mattsson <vitplister@gmail.com>

------------------------------------------------------------------------
r1177 | mhm | 2010-09-17 00:09:18 +0200 (Fri, 17 Sep 2010) | 15 lines

Add board enable for Elitegroup GeForce6100SM-M

Match on Memory Controller/LPC Bridge.

lspci/superiotool output:
http://www.coreboot.org/pipermail/flashrom/2010-September/004829.html

Test report:
http://www.coreboot.org/pipermail/flashrom/2010-September/004835.html


Tested-by: Andrew Cleveland <evil.saltine@gmail.com>
Signed-off-by: Mattias Mattsson <vitplister@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1176 | mhm | 2010-09-16 02:51:51 +0200 (Thu, 16 Sep 2010) | 21 lines

Add chip definitions for the folowing chips:

Bright BM29F040
Hyundai HY29F040A
Macronix MX29F040

Also add chip IDs for
Bright BM29F400T/B

Datasheets:
http://www.ezoflash.com/datasheets/flash/Winbond/BM29F040.pdf
http://www.ezoflash.com/datasheets/flash/Hyundai/HY29F040A.pdf
http://www.ezoflash.com/datasheets/flash/Macronix/MX29F040.pdf
http://www.ezoflash.com/datasheets/flash/Winbond/BM29F400T_B.pdf

Bright BM29F040 probe/read test report:
http://www.flashrom.org/pipermail/flashrom/2010-September/004805.html

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Acked-by: Mattias Mattsson <vitplister@gmail.com>

------------------------------------------------------------------------
r1175 | mhm | 2010-09-16 01:31:03 +0200 (Thu, 16 Sep 2010) | 22 lines

This patch changes the prefix of chip constant #defines in the following way:

AM_* -> AMD_AM*
AT_* -> ATMEL_AT*
EN_* -> EON_EN*
HY_* -> HYUNDAI_HY*
MBM* -> FUJITSU_MBM*
MX_ID -> MACRONIX_ID
MX_* -> MACRONIX_MX*
PMC_* -> PMC_PM*
SST_* -> SST_SST*

It leaves the Intel #defines alone because there is another pending
patch for that:
http://patchwork.coreboot.org/patch/1937/

Some background discussion here:
http://www.flashrom.org/pipermail/flashrom/2010-July/004059.html

Signed-off-by: Mattias Mattsson <vitplister@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1174 | hailfinger | 2010-09-15 16:47:56 +0200 (Wed, 15 Sep 2010) | 7 lines

Add chipset enable for Broadcom OSB4.

No docs available.

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1173 | hailfinger | 2010-09-15 14:02:07 +0200 (Wed, 15 Sep 2010) | 21 lines

AMD SB700 and later have an integrated microcontroller (IMC) which runs
from shared flash. The IMC will happily issue reads while we write,
issue writes while we read, and generally cause lots of havoc due to the
concurrent accesses it performs while flashrom is running.
A failing or corrupted read can be detected since r1145, and the worst
case is that the read aborts and the user has to retry.
A failing write is much more serious. It can be detected since r1145,
but if the SPI interface locks up, we can't continue writing nor can we
read the current chip contents.

If the IMC is inactive, there is no reason to worry. If the IMC is
active, flashrom will refuse to erase/write the chip with this patch.

The correct fix would be to stop the IMC during flashing, but apparently
the relevant registers are undocumented, so we take the safe route for
now until someone from AMD can give us more info.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Tested-by: Matthias Kretz <kretz@kde.org>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1172 | hailfinger | 2010-09-15 12:20:16 +0200 (Wed, 15 Sep 2010) | 21 lines

Delay between probe and subsequent operations.

Some flash chips need time to exit ID mode, and while we take care of
correct timing for the matching probe, subsequent probes may have
totally different timing, and that can lead to garbage responses from
the flash chip during the first accesses after the probe sequence is
done.
Delay 100 ms between the last probe and any subsequent operation.
To ensure maximum correctness, we would have to reset the chip first in
case the last probe function left the chip in an undefined (non-read)
state. That will be possible once struct flashchip has a .reset
function.

This fixes unstable erase/read/write for some flahs chips on nic3com and
possible other use cases as well.

Thanks to Maciej Pijanka for reporting the issue and testing patches.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1171 | hailfinger | 2010-09-15 02:17:37 +0200 (Wed, 15 Sep 2010) | 23 lines

SPI bitbanging: request/release bus.

SPI bitbanging on devices which speak SPI natively has a dual-use
problem: We need to shut down normal SPI operations to do the bitbanging
ourselves. Once we're done, it makes a lot of sense to reenable "normal"
SPI operations again. Add request_bus/release_bus functions to struct
bitbang_spi_master.
Add a bitbang shutdown function (not used yet).
Change MCP SPI and Intel NIC SPI to use the new request/release bus
infrastructure.
Cosmetic changes to a few error messages (80 column limit).

There are multiple possible strategies for bus request/release:
- Request at the start of a SPI command, release immediately afterwards.
- Request at the start of a SPI multicommand, release once all commands
of the multicommand are done.
- Request on programmer init, release on shutdown.
Each strategy has its own advantages. For now, we will stay with the
first strategy which worked fine so far.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1170 | hailfinger | 2010-09-15 02:13:02 +0200 (Wed, 15 Sep 2010) | 22 lines

Honor ICH SPI address window for reads.

ICH SPI has the ability to restrict SPI read/write accesses to a given
address range. The low end of the range is configurable by the BIOS (and
by flashrom if the BIOS didn't lock down the flash interface), the high
end of the range is 0xffffff (2^24-1).
This patch checks for an address range restriction and uses the low end
of the allowed range as base for SPI reads. A similar workaround for
REMS/RES opcodes has been committed in r500.

This fixes read on the Intel D945GCLF mainboard where the stock BIOS
enforces a restricted address range.
Please note that writes need the same fix, but for architectural reasons
that fix will be merged once partial write is available.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

Tested by David Hendricks on the Intel D945GCLF mainboard, results at
http://paste.flashrom.org/view.php?id=79

Acked-by: David Hendricks <dhendrix@google.com>

------------------------------------------------------------------------
r1169 | uwe | 2010-09-15 02:03:53 +0200 (Wed, 15 Sep 2010) | 6 lines

Add missing GIGABYTE GA-7DXR entry, should have been in r1166.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1168 | mhm | 2010-09-15 01:56:56 +0200 (Wed, 15 Sep 2010) | 56 lines

Rename constants
W_nnnn -> WINBOND_Wnnnn
W_25nnn -> WINBOND_NEX_W25nnn

Kill incorrect ASD chip and vendor id.

Group Winbond SPI and parallel chips separately (they have different
vendor IDs).

Change constant names to the "canonical" chip name for the following
ids:

W_29C020C (0x45)
 -> WINBOND_W29C020 (Same as W29C020C, W29C022 and ASD AE29F2008)

W_29C040P (0x46)
 -> WINBOND_W29C040 ("P" is for package type [32-pin PLCC], irrelevant)

W_29C011 + W_29EE011 (0xC1)
 -> WINBOND_W29C010 (Same as W29C010M, W29C011A, W29EE011, W29EE012,
    and ASD AE29F1008)


List all chip variants in the .name strings in flashchips.c


Have two identical entries for Winbond
W29C010(M)/W29C011A/W29EE011/W29EE012 but with different probe functions
in flashchips.c as sometimes (for newer revisions of these chips?) the
standard jedec probe seems to work. E.g. see test report here:
http://patchwork.coreboot.org/patch/1476/


Also add ids for the following Winbond chips:
W25Q40
W25Q128
W19B160BB
W19B160BT
W19B320SB/W19L320SB
W19B320ST/W19L320ST
W19B322MB
W19B322MT
W19B323MB
W19B323MT
W19B324MB
W19B324MT
W29C512A/W29EE512
W39L010
W39L040A
W39L512
W49F002/W49F002B


Signed-off-by: Mattias Mattsson <vitplister@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1167 | uwe | 2010-09-15 01:20:35 +0200 (Wed, 15 Sep 2010) | 14 lines

Board-enable for the ASUS A7V333.

The board-enable is the same as for the ASUS A7V8X, i.e., it raises
GP51 on the ITE IT8703F. I verified using a multimeter that this
will raise both, WE# and TBL# on the flash chip.

All operations successfully tested on hardware.

Also renamed board_asus_a7v8x() to it8703f_gpio51_raise().

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Joshua Roys <roysjosh@gmail.com>


------------------------------------------------------------------------
r1166 | uwe | 2010-09-15 00:59:39 +0200 (Wed, 15 Sep 2010) | 36 lines

Another round of board/chip status updates.

Mark the following boards as tested:

 - Intel Foxhollow (reported by Jason Shriver <J.Shriver@F5.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-September/004768.html

 - Intel Greencity (reported by Jason Shriver <J.Shriver@F5.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-September/004768.html

 - Tyan S2915-E (Thunder n6650W) (reported by Axel Bergerhoff
   <axelbergerhoff@compuserve.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-August/004560.html

 - ASUS Z8NA-D6C (reported by John Wells <jb@sourceillustrated.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-September/004737.html

 - GIGABYTE GA-7DXR (reported by Uwe Hermann <uwe@hermann-uwe.de>)
   http://www.flashrom.org/pipermail/flashrom/2010-September/004712.html

 - MSI MS-7211 (PM8M3-V) (reported by Shahar Or <mightyiampresence@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-September/004612.html

 - MSI MS-6787 (P4MAM-V/P4MAM-L) (reported by Swift Geek <swiftgeek@gmail.com>)
   Board-enable now marked as tested.
   http://www.flashrom.org/pipermail/flashrom/2010-September/004687.html

Chips:

 - SST SST25VF016B (reported by Warren Turkal <wt@penguintechs.org>)
   http://www.flashrom.org/pipermail/flashrom/2010-September/004716.html

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1165 | uwe | 2010-09-14 15:16:01 +0200 (Tue, 14 Sep 2010) | 7 lines

Add support for ST M25PX32 and M25PX64 flash chips. Probe, read, erase and
write have been tested and all are functional.

Signed-off-by: Jason Shriver <j.shriver@f5.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1164 | hailfinger | 2010-09-14 03:29:49 +0200 (Tue, 14 Sep 2010) | 9 lines

Use caching for Nvidia MCP SPI GPIO accesses.
Reduce clock delay to zero.

Tests show more than 2x speedup.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Tested-by: Andrew Morgan <ziltro@ziltro.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1163 | uwe | 2010-09-14 01:00:57 +0200 (Tue, 14 Sep 2010) | 7 lines

Add support for the abit BM6 board.

Signed-off-by: Tim ter Laak <timl@scintilla.utwente.nl>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1162 | uwe | 2010-09-13 21:59:28 +0200 (Mon, 13 Sep 2010) | 6 lines

Add support for the Macronix MX251635E chip.

Signed-off-by: Stephan Guilloux <stephan.guilloux@free.fr>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1161 | mhm | 2010-09-13 21:39:25 +0200 (Mon, 13 Sep 2010) | 27 lines

Add board enable for ASUS P4SC-E.

I does this by setting bits 3..2 of register 0x24 on the ITE IT8707F,
while keeping bit 3 of register 0x23 set while manipulating the first
register.

AFAIK, there is no public datasheet available for this super i/o chip, but
the above is how the vendor BIOS does it. Also, registers 0x23 and 0x24 seem
to have the same meaning as on the ITE IT8710F.

Matching on NB/SB.

Tested on a P4SC-E with SST 39SF020A flash. Probe, read, erase, write
all work.

lspci/superio output:
http://www.flashrom.org/pipermail/flashrom/2010-July/004090.html

flashrom output:
http://www.flashrom.org/pipermail/flashrom/2010-August/004566.html

Many thanks to Reinder de Haan for help with reverse engineering this!


Signed-off-by: Mattias Mattsson <vitplister@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1160 | mhm | 2010-09-13 20:22:36 +0200 (Mon, 13 Sep 2010) | 18 lines

Board enable for MS-6163 Pro (MS-6163 rev:2)

Matching on NB/SB. Probe, read, erase and write all work.

lspci/superiotool output:
http://www.flashrom.org/pipermail/flashrom/2010-August/004461.html

I believe that this board enable also works for MSI BX Master (MS-6163
rev:3) and perhaps also for MSI MS-6163FC (MS-6163 rev:1) but these
boards have not been tested.

Test logs for MS-6163 (rev:2):
http://www.flashrom.org/pipermail/flashrom/2010-September/004704.html

Signed-off-by: Mattias Mattsson <vitplister@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1159 | hailfinger | 2010-09-13 16:02:22 +0200 (Mon, 13 Sep 2010) | 10 lines

Board enable for ASUS P5GDC Deluxe.

Match on SMBus and Audio.
lspci/superiotool/flashrom output:
http://www.flashrom.org/pipermail/flashrom/2010-September/004689.html

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Tested-by: Alexander Mikhnovets <alexander.mikhnovets@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1158 | uwe | 2010-09-11 17:25:48 +0200 (Sat, 11 Sep 2010) | 15 lines

Add a board enable for MSI MS-6561 (745 Ultra).

SiS 745 chipset + Winbond W83697HF and Winbond W49F002U flash. Probe, read,
erase and write all work.

Matching on "NB/SB" (they are integrated). Also mark SiS 745 chipset
as tested.

lspci/superiotool:
  http://www.flashrom.org/pipermail/flashrom/2010-September/004705.html

Signed-off-by: Mattias Mattsson <vitplister@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1157 | mkarcher | 2010-09-10 16:54:18 +0200 (Fri, 10 Sep 2010) | 18 lines

Board enable for P4P800

lspci/superiotool:
  http://www.coreboot.org/pipermail/flashrom/2010-August/004436.html

This goes the safe route of adding a match for the P4P800 that does not
match the P4P800-E Deluxe which is already in.  It seems quite likely that
the whole P4P800 family could use the same board enable with one generic
board enable match, though.

This match uses host bridge + audio, because all other IDs match the
P4P800-E Deluxe board, as reported in
 http://www.e-monkeys.de/Everest-Bericht.txt

(no user feedback, commit as "untested")

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
------------------------------------------------------------------------
r1156 | mkarcher | 2010-09-10 16:46:46 +0200 (Fri, 10 Sep 2010) | 10 lines

Board enable for ASUS P5GD1 Pro

lspci/superiotool:
  http://www.coreboot.org/pipermail/flashrom/2010-August/004539.html

matching SMBus + Audio, because SMBus is the only core device with
usable IDs.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
------------------------------------------------------------------------
r1155 | uwe | 2010-09-07 20:14:53 +0200 (Tue, 07 Sep 2010) | 9 lines

Add a board-enable for the MSI MS-6787 (P4MAM-V/P4MAM-L).

Marked as untested for now, as there was no response from the user.

Signed-off-by: Sergey A Lichack <shadowpilot34@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1154 | uwe | 2010-09-07 19:52:09 +0200 (Tue, 07 Sep 2010) | 14 lines

Add board-enable for the GIGABYTE GA-K8N51GMF-9.

Interestingly enough, this board's enable looked more like
enable_flash_nvidia_nforce2 than enable_flash_ck804; it whacked
0x92, not 0x88. But according to the lspci, 0x92 is already 0.

Tested successfully on hardware:
 http://www.flashrom.org/pipermail/flashrom/2010-August/004568.html
 http://www.flashrom.org/pipermail/flashrom/2010-September/004575.html

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1153 | uwe | 2010-09-05 14:41:25 +0200 (Sun, 05 Sep 2010) | 61 lines

Updates to the board and chips status tables (trivial).

Mark the following boards as tested:

 - Tyan S2933 (Thunder n3600S) (reported by Pendic Peter <nigma@bluewin.ch>)
   http://www.flashrom.org/pipermail/flashrom/2010-August/004375.html

 - MSI MS-7642 (890GXM-G65) (reported by Alan McMahon <pam@aldersgate.co.uk>)
   http://www.flashrom.org/pipermail/flashrom/2010-August/004393.html

 - Shuttle X50/X50(B) (reported by Ed Driesen <ed@omts.be>)
   http://www.flashrom.org/pipermail/flashrom/2010-August/004472.html
   (the "B" variant is just black instead of white, no hardware differences
    as far as I can see)

 - ASUS M2NPV-VM (reported by Antti Palosaari <crope@iki.fi>)
   http://www.flashrom.org/pipermail/flashrom/2010-August/004476.html

 - ZOTAC ZBOX HD-ID11 (reported by s. ewgen <sewgen@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-August/004512.html

 - ASRock A330GC (reported by Daniel Flinkmann <DFlinkmann@gmx.de>)
   http://www.flashrom.org/pipermail/flashrom/2010-August/004517.html

 - Congatec conga-X852 (reported by Mario Rogen <Mario.Rogen@sie.at>)
   http://www.coreboot.org/pipermail/coreboot/2008-November/041433.html

 - IEI PICOe-9452 (reported by Mario Rogen <Mario.Rogen@sie.at>)
   http://www.coreboot.org/pipermail/coreboot/2008-November/041433.html

 - Lex CV700A (reported by Mario Rogen <Mario.Rogen@sie.at>)
   http://www.coreboot.org/pipermail/coreboot/2008-November/041433.html

 - Portwell PEB-4700VLA (reported by Mario Rogen <Mario.Rogen@sie.at>)
   http://www.coreboot.org/pipermail/coreboot/2008-November/041433.html

Mark the following chips as tested:

 - SST SST39SF040 (reported by Mattias Mattsson <vitplister@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-August/004414.html

 - Eon EN25F80 (reported by Ed Driesen <ed@omts.be>)
   http://www.flashrom.org/pipermail/flashrom/2010-August/004472.html

 - SyncMOS/MoselVitelic {F,S,V}29C51002T (reported by Mattias
   Mattsson <vitplister@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-August/004475.html

 - PMC Pm29F002T (reported by Tadas S <mrtadis@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-September/004583.html

Also:

 - Fix a few whitespace issues and cosmetics while I'm at it.

 - Add the board name (in addition to the Sxxxx number) to all Tyan boards.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1152 | hailfinger | 2010-09-05 01:37:40 +0200 (Sun, 05 Sep 2010) | 43 lines

Success report for Atmel AT26DF081A from
Oliver Schnatz <oliver.schnatz@mysys.de>
http://www.flashrom.org/pipermail/flashrom/2009-October/000760.html

Success report for Winbond W25Q32 from
David Hendricks <dhendrix@google.com>
http://www.flashrom.org/pipermail/flashrom/2010-April/002891.html

Success report for SST SST39VF512 from
Alec Wright <alecjw@member.fsf.org>
http://www.flashrom.org/pipermail/flashrom/2010-August/004549.html
http://www.flashrom.org/pipermail/flashrom/2010-August/004548.html

Success report for Silicon Image SiI 3512 and AMD Am29LV040B from
Michael Manulis <michael@manulis.com>
http://www.flashrom.org/pipermail/flashrom/2010-July/003944.html

Annotate listing with reporter/owner name for boards marked broken, flag
boards for which no reports exist.
- Abit IS-10
- ASRock K7VT4A+
- ASUS MEW-AM
- ASUS MEW-VM
- ASUS P3B-F
- ASUS P5BV-M
- Biostar M6TBA
- Boser HS-6637
- DFI 855GME-MGF
- FIC VA-502
- MSI MS-6178
- MSI MS-7260
- Soyo SY-5VD
- Sun Fire x4150
- Sun Fire x4200
- Sun Fire x4540
- Sun Fire x4600

Remove comments which are no longer appropriate:
- ASRock K8S8X

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1151 | uwe | 2010-09-03 20:21:21 +0200 (Fri, 03 Sep 2010) | 18 lines

Add Intel Gigabit NIC SPI flashing support.
Tested on a 82541PI (0x8086, 0x107c) using 32-bit hardware.

The last line in nicintel_request_spibus() could be changed so that FL_BUSY
is used instead.

Shortened sample log:
[...]
Found "Intel 82541PI Gigabit Ethernet Controller" (8086:107c, BDF 01:03.0).
Found chip "ST M25P10.RES" (128 KB, SPI) at physical address 0xfffe0000.
Multiple flash chips were detected: M25P05.RES M25P10.RES
Please specify which chip to use with the -c <chipname> option.
[...]

Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1150 | hailfinger | 2010-09-03 05:35:48 +0200 (Fri, 03 Sep 2010) | 6 lines

Add FEATURE_WRSR_WREN to feature_bits for all Macronix SPI flash chips
to indicate that spi_write_status_register() needs WREN instead of EWSR.

Signed-off-by: David Hendricks <dhendrix@google.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1149 | hailfinger | 2010-09-03 05:32:22 +0200 (Fri, 03 Sep 2010) | 6 lines

Add FEATURE_WRSR_WREN to feature_bits for some AMIC SPI flash chips
to indicate that spi_write_status_register() needs WREN instead of EWSR.

Signed-off-by: David Hendricks <dhendrix@google.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1148 | hailfinger | 2010-09-03 05:18:26 +0200 (Fri, 03 Sep 2010) | 6 lines

Add FEATURE_WRSR_WREN to feature_bits for many Eon SPI flash chips
to indicate that spi_write_status_register() needs WREN instead of EWSR.

Signed-off-by: David Hendricks <dhendrix@google.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1147 | hailfinger | 2010-09-03 05:06:07 +0200 (Fri, 03 Sep 2010) | 6 lines

Add FEATURE_WRSR_WREN to feature_bits for all Winbond SPI flash chips
to indicate that spi_write_status_register() needs WREN instead of EWSR.

Signed-off-by: David Hendricks <dhendrix@google.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1146 | mhm | 2010-09-01 03:21:34 +0200 (Wed, 01 Sep 2010) | 10 lines

Add board enable for Asus P2B-N.

Many thanks to Michael Karcher for reverse engineering this.

lspci/superio output:
http://www.flashrom.org/pipermail/flashrom/2010-August/004475.html

Signed-off-by: Mattias Mattsson <vitplister@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1145 | hailfinger | 2010-08-18 17:12:43 +0200 (Wed, 18 Aug 2010) | 18 lines

Add paranoid checks for correct values in essential registers in the
SB600/SB700/... SPI driver. If something else changes the values we
wrote, we will see severe read/write corruption.
sb600spi will now abort the access and return an error if it detects
this sort of corruption.

Note: This corruption can be caused by a few different events:
- IPMI/BMC/IMC accesses flash
- Other software accesses flash
The nature of flash access (read/write/ID/...) is irrelevant. Each such
access will cause corruption for all other accesses happening at the
same time.

Thanks to Matthias Kretz for testing this patch.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Matthias Kretz <kretz@kde.org>

------------------------------------------------------------------------
r1144 | mkarcher | 2010-08-17 00:12:39 +0200 (Tue, 17 Aug 2010) | 11 lines

SST49FL040B: add unlocking

The datasheet says there's a set of registers in the 4Mbit before the
flash memory.  The block locking registers are aligned on 64K
boundaries, plus 2.

Write/erase sucessful on a system it failed before:
  http://www.flashrom.org/pipermail/flashrom/2010-August/004432.html

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r1143 | mkarcher | 2010-08-16 00:43:23 +0200 (Mon, 16 Aug 2010) | 7 lines

Add board enable for Abit VA6

lspci/superiotool:
  http://www.coreboot.org/pipermail/flashrom/2010-August/004440.html

Signed-off-by: Mattias Mattsson <vitplister@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r1142 | mkarcher | 2010-08-16 00:35:31 +0200 (Mon, 16 Aug 2010) | 21 lines

Check availability of GPO lines on Intel PIIX4

This patch changes the intel_piix4_gpo_set() function to always check
the GENCFG and XBCS registers for the availability of the
requested GPO line before raising/lowering it and fails otherwise. It
makes no attempt to bypass the values in these configuration
registers.

The old flashrom code did consider it safe to reprogram (multiplexed)
GPO:s 22-26 without checking the value of the controlling register
(GENCFG). I do not really know why.

I have tested this patch on an Asus P2B-N (needs GPO18 low) and MSI
MS-6163 Pro (needs GPO14 high).

The information for these registers are from the Intel "82371AB
PCI-TO-ISA / IDE XCELERATOR (PIIX4)" datasheet available here:
http://www.intel.com/design/intarch/datashts/29056201.pdf

Signed-off-by: Mattias Mattsson <vitplister@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r1141 | uwe | 2010-08-15 17:26:30 +0200 (Sun, 15 Aug 2010) | 46 lines

Various board status updates and fixes (trivial).

- There are number of boards that have board-enables in board-enable.c but
  have no corresponding entry in print.c (with or without URL doesn't matter)
  and thus appear neither in the "flashrom -L" list of boards nor in the
  wiki output. Fix this by adding entries for them in print.c.

   - abit AN-M2
   - abit KN8 Ultra
   - ASUS A8Jm (laptop)
   - ASUS A8N (might need changing to "A8N-SLI Deluxe", see
     http://www.coreboot.org/pipermail/flashrom/2009-November/000878.html)
   - ASUS A8N-LA (Nagami-GL8E)
   - ASUS P4B533-E
   - ASUS P4S800-MX
   - HP ProLiant DL165 G6
   - IBASE MB899
   - Intel SE440BX-2 (marked as non-working for now though, due to
     http://www.coreboot.org/pipermail/flashrom/2010-July/003952.html)
   - MSI MS-6577 (Xenon)
   - MSI MS-7207 (K8NGM2-L)

- Fix / amend a few board names:

   - Add "ProLiant" name to the "DL145 G3" (and the new "DL165 G6"), we
     use such "series" names for various other boards (e.g. "Vectra" etc)
     and it also helps users googling for those names.

   - HP "Vectra VL400 PC" should be "Vectra VL400" really, I'm pretty sure
     the "PC" is not part of the board name but simply stands for
     "personal computer". Same for "Vectra VL420 SFF PC".

   - Change "ASUS A8JM" to "ASUS A8Jm" as per vendor website.

   - Add comments for boards which may be listed with incorrect names,
     I sent out clarification requests to the list, URLs listed as comment.

   - Add "Xenon" HP name to the "MSI MS-6577" OEM board.

   - Fix typo in "MS-7207 (K8N GM2-L)", should be "MS-7207 (K8NGM2-L)" as
     per vendor website.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1140 | uwe | 2010-08-15 16:36:18 +0200 (Sun, 15 Aug 2010) | 13 lines

Mark the board-enable for ASUS A8N-LA (HP OEM "Nagami-GL8E") as tested.

Change the DMI string to only match this exact board (DMI "NAGAMI2L")
as only this one is tested.

Similar HP OEM boards might also work using this board-enable but that's
not sure and not tested. Two of those boards have DMI strings "NAGAMI"
and "NAGAMI2".

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1139 | mkarcher | 2010-08-15 12:21:29 +0200 (Sun, 15 Aug 2010) | 9 lines

Board enable for MSI MS-7061 (KM4AM-V)

lspci/superiotool:
  http://www.coreboot.org/pipermail/flashrom/2010-August/004414.html

(URL added by Michael Karcher)

Signed-off-by: Mattias Mattsson <vitplister@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r1138 | mkarcher | 2010-08-13 14:49:01 +0200 (Fri, 13 Aug 2010) | 11 lines

Board enable for GA-8PE667 Ultra 2

I had to use the USB controller in the board enable because all other
subsystem IDs are having vendor: Gigabyte but mostly copy the Intel
product IDs.

lspci/superiotool:
  http://www.coreboot.org/pipermail/flashrom/2010-August/004420.html

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Thomas Kalka <thomas.kalka@googlemail.com>
------------------------------------------------------------------------
r1137 | mkarcher | 2010-08-11 23:06:10 +0200 (Wed, 11 Aug 2010) | 8 lines

Add support for Intel 5 Series / 3400 Series chipsets

(At least) for the QM57 which i have tested an additional patch was
needed as some reserved bits in the "Software Sequencing Flash Control
Register" (SSFC) needs to be programmed to 1 in the QM57.

Signed-off-by: Helge Wagner <helge.wagner@ge.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r1136 | mkarcher | 2010-08-08 23:56:52 +0200 (Sun, 08 Aug 2010) | 9 lines

Add dmidecode quirk workaround

dmidecode emits a warning message about unsupported SMBIOS versions
to stdout before the information asked for when using "-s". I consider
this behaviour broken, but we still need to workaround it as e.g. Fedora
currently distributes an dmidecode with this behaviour.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
------------------------------------------------------------------------
r1135 | uwe | 2010-08-08 19:04:21 +0200 (Sun, 08 Aug 2010) | 6 lines

Fix typo (s/Bit/Bits/) to clarify code comment.
 
Signed-off-by: David Borg <borg.db@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1134 | uwe | 2010-08-08 19:01:18 +0200 (Sun, 08 Aug 2010) | 20 lines

Various cosmetic and coding-style fixes (trivial).

 - Fix incorrect whitespace, indentation, and coding style in some places.

 - Drop '/**' Doxygen comments, we don't use Doxygen. Even if we would use
   it, the comments are useless as we don't have any Doxygen markup in there.

 - Use consistent vendor name spelling as per current website (NVIDIA,
   abit, GIGABYTE).

 - Use consistent / common format for "Suited for:" lines in board_enable.c.

 - Add some missing 'void's in functions taking no arguments.

 - Add missing fullstops in sentences, remove them from non-sentences (lists).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1133 | uwe | 2010-08-08 18:05:23 +0200 (Sun, 08 Aug 2010) | 10 lines

Add a board-enable for the ASRock 775i65G.

This was successfully tested by 'kai2343' on IRC.

Thanks to Michael Karcher for finding the board enable.

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1132 | uwe | 2010-08-08 17:52:07 +0200 (Sun, 08 Aug 2010) | 41 lines

Mark the following boards/chips as tested (trivial).

Boards:

 - ASUS M4A785TD-M EVO (reported by Mattias Mattsson <vitplister@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-August/004283.html

 - ASUS M2N32-SLI Deluxe (reported by Mattias Mattsson <vitplister@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-August/004287.html

 - ASUS P2E-M (reported by Mattias Mattsson <vitplister@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-July/004261.html

 - ASUS M2N-SLI Deluxe (reported by
   Kasper M. Nielsen <kasper.nielsen85@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-May/003015.html
   
 - iBASE MB899 (reported by Bernhard M. Wiedemann <bernhard@lsmod.de>)
   http://www.flashrom.org/pipermail/flashrom/2010-April/002953.html
   
   Board-enable is now marked as tested.

 - ASRock 939A785GMH/128M (reported by
   Lennart Sauerbeck <lists@lennart.sauerbeck.org>)
   http://www.flashrom.org/pipermail/flashrom/2010-August/004340.html

Chips:
 
 - ST M50FLW080A (reported by Mattias Mattsson <vitplister@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-August/004287.html
 
 - Winbond W29EE011 (reported by Mattias Mattsson <vitplister@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-July/004261.html
 
 - SST SST49LF040 (reported by Mattias Mattsson <vitplister@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-August/004296.html
 
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1131 | mkarcher | 2010-08-07 23:49:11 +0200 (Sat, 07 Aug 2010) | 9 lines

Board enable for MSI MS-6577

Thanks to "Putlinuxonit" <putlinuxonit@gmail.com> for reporting
and testing.
lspci/superiotool:
  http://www.coreboot.org/pipermail/flashrom/2010-August/004309.html

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r1130 | mkarcher | 2010-08-02 10:29:34 +0200 (Mon, 02 Aug 2010) | 7 lines

Board enable for Asus P4S800-MX

lspci/superiotool:
  http://www.coreboot.org/pipermail/flashrom/2010-July/004172.html

Signed-off-by: David Borg <borg.db@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r1129 | uwe | 2010-08-01 02:13:49 +0200 (Sun, 01 Aug 2010) | 55 lines

Further chip and board status updates (trivial).

Mark the following boards as supported:

 - Foxconn A6VMX (reported by Alec Wright <alecjw@member.fsf.org>)
   http://www.flashrom.org/pipermail/flashrom/2010-July/004186.html

 - GIGABYTE GA-8IRML (reported by Putlinuxonit <putlinuxonit@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-July/004175.html

   Marking the board-enable as tested now.

 - MSI MS-7253 (K9VGM-V) (reported by Alex <cerebro.alexiel@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-June/003411.html

 - Soyo SY-6BA+ III (reported by Andrew Morgan <ziltro@ziltro.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-June/003409.html

 - GIGABYTE GA-770TA-UD3 (reported by Hering <boerni@pakke.de>)
   http://www.flashrom.org/pipermail/flashrom/2010-May/003267.html

 - Shuttle AV11V30 (reported by
   "N?\195?\169stor a.k.a. DarkMan" <master_darkman@hotmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-May/003260.html

 - Tyan S3992 (reported by Alessandro Gervaso <gervaso@appliedgenomics.org>)
   http://www.flashrom.org/pipermail/flashrom/2010-May/003129.html

 - GIGABYTE GA-MA785GMT-UD2H (reported by
   Dominick Layfield <dom.layfield@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-May/003061.html

Mark the following chips as tested:

 - ST M25P10-A (reported by Joshua Blanton <jblanton@rldrake.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-June/003451.html

 - ST M50FLW080A (reported by Vincent Pelletier <plr.vincent@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-June/003410.html

   Marked PROBE and READ as tested.

 - SST SST39SF020A (reported by Andrew Morgan <ziltro@ziltro.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-June/003409.html

 - AMD Am29F010A/B (reported by Andrew Morgan <ziltro@ziltro.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-June/003335.html

 - SST SST39VF010 (reported by Tim Small <tim@buttersideup.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-May/003310.html

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1128 | hailfinger | 2010-08-01 01:16:09 +0200 (Sun, 01 Aug 2010) | 7 lines

Add support for SIS661 (SIS963).

Tested on Asus P4S800-MX.

Signed-off-by: David Borg <borg.db@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1127 | uwe | 2010-07-30 19:08:29 +0200 (Fri, 30 Jul 2010) | 10 lines

Mark the following boards as supported:

 - Elitegroup RS485M-M

 - Biostar TA780G M2+

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1126 | uwe | 2010-07-30 00:39:47 +0200 (Fri, 30 Jul 2010) | 65 lines

Mark the following chips/boards/PCI-cards as OK (trivial).

Chips:

 - Winbond W25x80 (reported by Michael Cole <michaelcole@michaelcole.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-July/004176.html

 - Winbond W25Q80 (reported by Jonathan A. Kollasch <jakllsch@kollasch.net>)
   http://www.flashrom.org/pipermail/flashrom/2010-July/003847.html

 - SST SST25VF080B (reported by Mattias Mattsson <vitplister@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-July/003807.html

   Also reported by Daniel Flinkmann <dflinkmann@gmx.de>)
   http://www.flashrom.org/pipermail/flashrom/2010-June/003659.html

 - Winbond W25x16 (reported by Michael Dunphy <mdunphy@uwaterloo.ca>)
   http://www.flashrom.org/pipermail/flashrom/2010-June/003631.html

 - Atmel AT25DF321 (reported by
   Ramakrishna Kvv <Ramakrishna.Koduri@emerson.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-June/003529.html

 - Winbond W25x40 (reported by Prakash J Kokkatt <pjkonweb@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-June/003502.html

 - Winbond W49V002A (reported by David <dung@aon.at>)
   http://www.flashrom.org/pipermail/flashrom/2010-June/003375.html

 - Macronix MX25L8005 (reported by Peter Lemenkov <lemenkov@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-June/003373.html

   Also reported by Alec Wright <alecjw@member.fsf.org>.
   http://www.flashrom.org/pipermail/flashrom/2010-July/004186.html
   http://www.flashrom.org/pipermail/flashrom/2010-July/004159.html

   Also reported by J?\195?\182rg Fischer <turboj@gmx.de>.
   http://www.flashrom.org/pipermail/flashrom/2010-July/004080.html

   Also reported by Kevin Malec <kevin.010@gmail.com>.
   http://www.flashrom.org/pipermail/flashrom/2010-June/003698.html

   Heck, also reported by myself (tested on hardware, never sent mail).

 - SST SST49LF002A/B (reported by Udu Ogah <putlinuxonit@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-July/004184.html

 - SST SST49LF160C (reported by Ed Swierk <eswierk@aristanetworks.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-June/003634.html

Mark the following boards as supported:

 - ASUS M3A76-CM (reported by Kevin Malec <kevin.010@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-June/003698.html

Mark the following PCI cards as supported:

 - "Silicon Image SiI 3124 PCI-X SATA Ctrl" (1095:3124)
   Reported by Max Kalashnikov <mmt@maxkalashnikov.com>
   http://www.flashrom.org/pipermail/flashrom/2010-July/004007.html

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1125 | uwe | 2010-07-29 23:15:45 +0200 (Thu, 29 Jul 2010) | 6 lines

Mark GIGABYTE GA-MA74GM-S2H (rev. 3.0) as supported.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1124 | hailfinger | 2010-07-29 22:01:13 +0200 (Thu, 29 Jul 2010) | 18 lines

Add definitions for the following chips:

Mosel Vitelic Corporation:
V29C51000B, V29C51000T, V29C51400B, V29C51400T, V29LC51000, V29LC51001,
V29LC51002

SyncMOS / Mosel Vitelic Corporation:
{F,S,V}29C51001B, {F,S,V}29C51001T, {F,S,V}29C51002B, {F,S,V}29C51002T,
{F,S,V}29C51004B, {F,S,V}29C51004T, {V,S}29C31004B, {V,S}29C31004T

Modify earlier definitions of
S29C31004T/S29C51001T/S29C51002T/S29C51004T to change name and correct
page size.

Signed-off-by: Mattias Mattsson <vitplister@gmail.com>
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1123 | uwe | 2010-07-29 21:57:55 +0200 (Thu, 29 Jul 2010) | 9 lines

ft2232_spi: Cosmetic fixes (trivial).

Various whitespace- and cosmetic fixes. Also, Use %04x:%04x for printing
the USB IDs (which are 4 hex digits long), not %02x:%02x.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1122 | uwe | 2010-07-29 21:26:15 +0200 (Thu, 29 Jul 2010) | 51 lines

Mark the following boards as tested OK (trivial).

 - ASUS M4A79T Deluxe (reported by Michael Cole <michaelcole@michaelcole.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-July/004176.html

 - Tyan S2915 (Thunder n6650W) (reported by
   Axel Bergerhoff <axelbergerhoff@compuserve.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-July/004140.html

 - ASRock ALiveNF6G-DVI (reported by Sven Lankes <sven@lank.es>)
   http://www.flashrom.org/pipermail/flashrom/2010-July/003951.html

 - ASUS M4A87TD/USB3 (reported by Jonathan A. Kollasch <jakllsch@kollasch.net>)
   http://www.flashrom.org/pipermail/flashrom/2010-July/003847.html

 - Fujitsu-Siemens ESPRIMO P5915 (reported by
   Mattias Mattsson <vitplister@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-July/003807.html

 - ASUS P6T SE (reported by Michael Dunphy <mdunphy@uwaterloo.ca>)
   http://www.flashrom.org/pipermail/flashrom/2010-June/003631.html

   Also reported by Sinisa Dukanovic <sinisa@dukanovic.com>.
   http://www.flashrom.org/pipermail/flashrom/2010-January/001799.html

 - Emerson ATCA-7360 (reported by
   Ramakrishna Kvv <Ramakrishna.Koduri@emerson.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-June/003529.html

 - ASUS P5GC-MX/1333 (reported by Prakash J Kokkatt <pjkonweb@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2010-June/003502.html

 - Elitegroup P6IWP-Fe (reported by Anders Jenbo <anders@jenbo.dk>)
   http://www.flashrom.org/pipermail/flashrom/2010-June/003419.html

 - Biostar M7NCD Pro (reported by David <dung@aon.at>)
   http://www.flashrom.org/pipermail/flashrom/2010-June/003375.html

Mark the "HP Compaq nx9005" laptop as non-supported for now.
Reported by Anders <mail@jagtogfiskerimagasinet.dk>.
http://www.flashrom.org/pipermail/flashrom/2010-May/003321.html

Fix "Samsung Polaris 32" URL entry from "" to NULL, otherwise the wiki
output is broken.

Also do some minor whitespace fixing in print.c.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1121 | hailfinger | 2010-07-29 18:32:24 +0200 (Thu, 29 Jul 2010) | 9 lines

The AAI code rewrite in r1052 introduced a bug: The writelen of AAI
continuation is 3 bytes, but the code incorrectly had 6 bytes there.
This causes all AAI writes (except the first two bytes of a chip) to
fail.
Thanks to den_m for reporting the bug and for testing the fix.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1120 | hailfinger | 2010-07-29 18:24:09 +0200 (Thu, 29 Jul 2010) | 13 lines

If we violate the raw SPI communication protocol requirements of the Bus
Pirate (namely, waiting for the completion of one command before sending
the next one), we can reduce the number of round trips by a factor of 3.
The FT2232 chip present in the Bus Pirate has a big enough buffer (at
least 128 bytes IIRC) to avoid overflows in the tiny buffer of the Bus
Pirate PIC.

Thanks to Daniel Flinkmann for sponsoring development of this patch.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Tested-by: Daniel Flinkmann <DFlinkmann@gmx.de>
Acked-by: Daniel Flinkmann <dflinkmann@gmx.de>

------------------------------------------------------------------------
r1119 | hailfinger | 2010-07-29 17:54:53 +0200 (Thu, 29 Jul 2010) | 18 lines

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

Signed-off-by: J?\195?\182rg Fischer <turboj@gmx.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1118 | hailfinger | 2010-07-29 17:00:40 +0200 (Thu, 29 Jul 2010) | 7 lines

Add support for
AMIC A25L512, A25L010, A25L020, A25L040, A25L080, A25L016, A25L032
AMIC A25LQ032 (quad-rate read)

Signed-off-by: Dan Lenski <dlenski@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1117 | hailfinger | 2010-07-29 16:41:46 +0200 (Thu, 29 Jul 2010) | 5 lines

Compile gfxnvidia by default, but disallow write/erase.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1116 | hailfinger | 2010-07-29 15:17:37 +0200 (Thu, 29 Jul 2010) | 7 lines

Allow compilation on all architectures even if direct hardware access
primitives are missing, if all you need is userspace access to the
serial port (serprog, buspirate) or no access at all (dummy).

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1115 | hailfinger | 2010-07-29 15:09:18 +0200 (Thu, 29 Jul 2010) | 13 lines

Add detailed status register printing and unlocking for all ATMEL AT25*
chips.

Add support for Atmel AT25DF081A and AT25DQ161.

Some chips require EWSR before WRSR, others require WREN before WRSR,
and some support both variants. Add feature_bits to select the correct
SPI command, and default to EWSR.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Tested-by: Steven Rosario
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1114 | hailfinger | 2010-07-29 00:20:20 +0200 (Thu, 29 Jul 2010) | 7 lines

Cosmetics.
Fix alphabetic sort order for manufacturers in flashchips.c.
Rename a few EON chips to Eon.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1113 | hailfinger | 2010-07-28 17:08:35 +0200 (Wed, 28 Jul 2010) | 28 lines

Add Nvidia nForce MCP61/MCP65/MCP67/MCP78S/MCP73/MCP79 SPI flashing
support.

Huge thanks go to Michael Karcher for reverse engineering the interface
and to Johannes Sj?\195?\182lund for testing the first iterations of my patch on
his hardware until it worked.

Thanks to the following testers of the patch:
* MCP61, 10de:03e0, LPC OK, ECS Geforce6100SM-M, Andrew Cleveland
* MCP61, 10de:03e0, LPC OK, Biostar NF520-A2 NF61D-A2, Vitaliy Buchynskyy
* MCP65, 10de:0441, SPI OK, MSI MS-7369 K9N Neo-F v2, Kjell Braden
* MCP65, 10de:0441, SPI OK, MSI MS-7369, Wolfgang Schnitker
* MCP65, 10de:0441, SPI OK, MSI MS-7369, Johannes Sj?\195?\182lund
* MCP65, 10de:0441, SPI OK, MSI MS-7369, Melchior Franz
* MCP78S, 10de:075c, SPI OK, Asus M3N78 PRO, Brad Rogers
* MCP78S, 10de:075c, SPI OK, Asus M3N78-VM, Marcel Partap
* MCP78S, 10de:075c, SPI OK, Asus M4N78 PRO, Kimmo Vuorinen
* MCP78S, 10de:075c, SPI OK, Asus M4N78 PRO, Vikram Ambrose
* MCP79, 10de:0aad, SPI OK, Acer Aspire R3600, Andrew Morgan
* MCP79, 10de:0aae, LPC ??, Lenovo Ideapad S12 laptop, Christian Schmitt
* MCP79, 10de:0aae, SPI OK, Apple iMac9,1 Mac-F2218EA9, David "dledson"

flashrom will refuse to write/erase for safety reasons if MCP6x/MCP7x
SPI is detected.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1112 | hailfinger | 2010-07-28 00:41:39 +0200 (Wed, 28 Jul 2010) | 18 lines

Split off programmer.h from flash.h.
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

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1111 | hailfinger | 2010-07-28 00:03:46 +0200 (Wed, 28 Jul 2010) | 27 lines

Convert all PCI-based external programmers to use special little-endian
accessors for all MMIO regions of PCI devices.
This patch does _not_ touch the internal programmer (which is PCI-based
as well).

Huge thanks go to Misha Manulis who worked with me to create a first
version of this patch for the satasii programmer based on modification
of generic code.

Huge thanks also go to Segher Boessenkool for suggesting the pci_mmio_
prefix for the abstraction layer.

NOTE to package maintainers:
With this patch, compilation and usage of flashrom should be safe on
x86, x86_64, MIPS (little and big endian) and PowerPC (big endian).

The internal programmer is disabled on non-x86/x86_64 (but it compiles).
The atahpt, nic3com, nicnatsemi, nicrealtek and rayer_spi can not be
compiled on non-x86/x86_64 because port space I/O is not (yet)
supported. Please compile with default settings on x86/x86_64 and with
the following settings on all other architectures:
make CONFIG_NIC3COM=no CONFIG_NICREALTEK=no CONFIG_NICNATSEMI=no
     CONFIG_RAYER_SPI=no

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Misha Manulis <misha@manulis.com>

------------------------------------------------------------------------
r1110 | uwe | 2010-07-28 00:00:42 +0200 (Wed, 28 Jul 2010) | 22 lines

Add a udev rules file for flashrom.

This allows USB-based external programmers to be used by non-root users
(which are in the 'plugdev' group). The file is to be installed by the
distros into the proper place (not sure if this is distro-specific). On
Debian the file will end up in /etc/udev/rules.d/z60_flashrom.rules.

On some systems the 'plugdev' group might have to adapted to whatever
the respective distro uses.

The following devices are listed so far:

 - Amontec JTAGkey(2)
 - Buspirate
 - Dediprog SF100
 - DLP Design DLP-USB1232H
 - FTDI FT4232H Mini-Module

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r1109 | mkarcher | 2010-07-25 00:50:54 +0200 (Sun, 25 Jul 2010) | 13 lines

Board enable for abit NF-M2 nView

To be safe, the onboard video of the nView edition of this board has
been included in the match. If other NF-M2 editions have the same board
enable, the match should be broadened

lspci/superiotool
  http://www.coreboot.org/pipermail/flashrom/2010-April/002909.html

No success report, thus committed as untested.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1108 | mkarcher | 2010-07-25 00:43:12 +0200 (Sun, 25 Jul 2010) | 14 lines

Detect IP35 by the SMBus bridge instead of the SATA controller

The SATA controller matched in the board enable is not always present
with that ID (that's the 2-port ICH9 SATA IDE controller), but (depending
on board revision/edition or BIOS settings an ICH9 SATA RAID controller
appears instead. This patches matches on the SMBus function in the
south bridge instead of the SATA controller.

Non-working board reported by: Gunter Keilholz <gunter.keilholz@googlemail.com>
lspci/superiotool:
  http://www.coreboot.org/pipermail/flashrom/2010-June/003591.html

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1107 | mkarcher | 2010-07-25 00:36:01 +0200 (Sun, 25 Jul 2010) | 8 lines

Board enable for Samsung Polaris 32

lspci/superiotool:
http://www.coreboot.org/pipermail/flashrom/2010-July/003889.html

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Tested-by: Alex Loktionoff <oxy-loktionoff@mail.ru>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1106 | mkarcher | 2010-07-25 00:27:29 +0200 (Sun, 25 Jul 2010) | 9 lines

Board enable for GA-8IRML

Non-working board reported by idlogin / Putlinuxonit <putlinuxonit@gmail.com>
lspci/superiotool:
  http://www.coreboot.org/pipermail/flashrom/2010-May/003330.html
No success report, so committed as untested.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1105 | mkarcher | 2010-07-25 00:18:14 +0200 (Sun, 25 Jul 2010) | 10 lines

board enable for Abit IC7

Non-working board reported by: Anders Jenbo <anders@jenbo.dk>
lspci/superiotool:
  http://www.coreboot.org/pipermail/flashrom/2010-June/003346.html

no success report, so committed as untested.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1104 | mkarcher | 2010-07-25 00:07:52 +0200 (Sun, 25 Jul 2010) | 6 lines

Fix compilation for CONFIG_INTERNAL=no

broken by r1098

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1103 | hailfinger | 2010-07-24 20:47:45 +0200 (Sat, 24 Jul 2010) | 5 lines

Fix compilation which was broken by r1101.

Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1102 | mkarcher | 2010-07-24 13:14:37 +0200 (Sat, 24 Jul 2010) | 7 lines

Board enable for HP Puffer2-UL8E

lspci/superiotool:
  http://www.coreboot.org/pipermail/flashrom/2010-July/003869.html

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Mattias Mattsson <vitplister@gmail.com>
------------------------------------------------------------------------
r1101 | mkarcher | 2010-07-24 13:03:48 +0200 (Sat, 24 Jul 2010) | 6 lines

Board enable for ASUS P4SD-LA (HP OEM)

No response from reporter - committed as "untested".

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1100 | mkarcher | 2010-07-24 12:41:42 +0200 (Sat, 24 Jul 2010) | 5 lines

Board enable for ASUS P5PE-VM

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Tested-by: Franti?\197?\161ek Ku?\196?\141era <linux@frantovo.cz>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1099 | mkarcher | 2010-07-22 20:04:19 +0200 (Thu, 22 Jul 2010) | 4 lines

Move SB600 SPI initialization to sb600spi.c

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1098 | mkarcher | 2010-07-22 20:04:15 +0200 (Thu, 22 Jul 2010) | 8 lines

Move Intel SPI initialisation to ichspi.c

Smarter version could decide whether SPI is vital or not depending on
straps. Straps are currently implemented for ICH7. EP80579 is in the comment,
PCH of 5 Series/3400 Series has "LPC, reserved, PCI, SPI".

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1097 | hailfinger | 2010-07-22 17:20:43 +0200 (Thu, 22 Jul 2010) | 5 lines

Add support for the Intel 28F002BC-T.

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1096 | hailfinger | 2010-07-22 13:44:38 +0200 (Thu, 22 Jul 2010) | 23 lines

Add support for the following AMIC SPI chips:
http://www.amictechnology.com/pdf/A25L20P.pdf covers:
AMIC A25L05PT
AMIC A25L05PU
AMIC A25L10PT
AMIC A25L10PU
AMIC A25L20PT
AMIC A25L20PU
http://www.amictechnology.com/pdf/A25L16P.pdf covers:
AMIC A25L16PT
AMIC A25L16PU

Clarify the situation surrounding the A25L40PT and A25L40PU chips which
share the same RDID values, despite the fact that their erase block
layouts are different.  Rudolf Marek tested and confirmed the distinct
erase block layouts of these chips.

Add a pretty-printer for the AMIC SPI chip status register
Add a generic AMIC chip type.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1095 | hailfinger | 2010-07-21 17:12:07 +0200 (Wed, 21 Jul 2010) | 7 lines

Add nicnatsemi to print.c and print_wiki.c.
Change the nicnatsemi address mask to use MA0-MA16 and set the maximum
decode size to 128KB.

Signed-off-by: Andrew Morgan <ziltro@ziltro.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1094 | hailfinger | 2010-07-21 17:02:22 +0200 (Wed, 21 Jul 2010) | 5 lines

Add support for the SST25VF064C SPI flash chip.

Signed-off-by: Ed Swierk <eswierk@aristanetworks.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1093 | hailfinger | 2010-07-21 12:26:01 +0200 (Wed, 21 Jul 2010) | 30 lines

Add support for RayeR SPIPGM hardware as described in
http://rayer.ic.cz/elektro/spipgm.htm

To use the RayeR driver, run
flashrom -p rayer_spi -V

Known bugs/limitations:
- Won't compile/work on non-x86 architectures.
- Will always use direct port I/O access.

Log follows:

flashrom v0.9.2-r1039 on MS-DOS 7 (i686), built with libpci 3.1.5, GCC 
4.3.2, little endian
Calibrating delay loop... OK.
Initializing rayer_bitbang_spi programmer
Using port 0x378 as I/O base for parallel port access.
...
Probing for Macronix MX25L1605, 2048 KB: probe_spi_rdid_generic: id1 
0xc2, id2 0x2015
...
Found chip "Macronix MX25L1605" (2048 KB, SPI) at physical address 
0xffe00000.
...
No operations were specified.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Martin Rehak <rayer@seznam.cz>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1092 | hailfinger | 2010-07-18 16:42:28 +0200 (Sun, 18 Jul 2010) | 6 lines

Check during SPI bitbang init that SPI bitbang master configuration is
correct.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1091 | mkarcher | 2010-07-18 01:27:47 +0200 (Sun, 18 Jul 2010) | 4 lines

Use struct pointer instead of enum to set bitbang adapter

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1090 | hailfinger | 2010-07-18 01:21:12 +0200 (Sun, 18 Jul 2010) | 9 lines

Print supported flash chips as narrow as possible.
Fix a bug where 4 GB of spaces would be printed per line if a vendor
name was longer than 10 chars.

This patch is needed to commit MoselVitelic chip support.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1089 | hailfinger | 2010-07-18 00:42:33 +0200 (Sun, 18 Jul 2010) | 10 lines

Use the BAR value returned by pcidev_init which automatically applies
the correct BAR mask for the drkaiser driver.
Truncate flash chip addresses to fit into the 128 kB memory window for
drkaiser and pick the same window size for gfxnvidia.

Uwe tested all operations successfully on a Dr. Kaiser card.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1088 | hailfinger | 2010-07-18 00:28:05 +0200 (Sun, 18 Jul 2010) | 6 lines

Add support for pciutils/libpci older than 2.2. Needed on the original
Xbox running Xebian and a few other ancient systems.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Alec Wright <alecjw@member.fsf.org>

------------------------------------------------------------------------
r1087 | hailfinger | 2010-07-17 16:49:30 +0200 (Sat, 17 Jul 2010) | 10 lines

Newer llvm/clang versions (since r102686) have a __clang_version__ macro
which can be used to print the exact clang version.

Fix a case where chip_to_probe was referenced twice via extern, once at
the function level and once in a global include file. Found by latest
clang.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1086 | hailfinger | 2010-07-17 15:45:42 +0200 (Sat, 17 Jul 2010) | 5 lines

Add Winbond W49F020 support. This chip is used on some Xbox versions.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Alec Wright <alecjw@member.fsf.org>

------------------------------------------------------------------------
r1085 | hailfinger | 2010-07-17 14:54:09 +0200 (Sat, 17 Jul 2010) | 12 lines

Change the SPI bitbanging core to fix a subtle bug (which had no effect
so far) and to make integration of the RayeR SPIPGM and Nvidia
MCP6x/MCP7x SPI patches easier.
Kill a few global variables and require explicit initialization of
bitbanging delay.

A big thank you to Johannes Sj?\195?\182lund for testing an earlier version of
the code as part of the Nvidia MCP6x/MCP7x SPI bitbanging patch.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1084 | mkarcher | 2010-07-17 12:42:34 +0200 (Sat, 17 Jul 2010) | 10 lines

remove temporary buffers from bitbanging

This removes the need of allocating an extra buffer, but also removes
the possibility of having the data read back during the initial write
phase for debugging purposes.

Compile tested, no functional testing.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1083 | hailfinger | 2010-07-17 00:07:20 +0200 (Sat, 17 Jul 2010) | 8 lines

Mark Fujitsu MBM29F400BC write as broken (implicit eraseblock layout in
write).
Use full-chip write function on Fujitsu MBM29F400TC and ST M29F400BT.
Add support for ST M29F400BB.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1082 | hailfinger | 2010-07-14 22:21:22 +0200 (Wed, 14 Jul 2010) | 6 lines

We have a generic unlocking infrastructure. Use it for SPI chips.
Actually check if the unlock worked instead of just assuming it worked.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1081 | hailfinger | 2010-07-14 21:57:52 +0200 (Wed, 14 Jul 2010) | 6 lines

Use the max_rom_decode infrastructure for wbsio_spi instead of
open-coding a variant which only aborts after it is too late.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1080 | hailfinger | 2010-07-14 18:19:05 +0200 (Wed, 14 Jul 2010) | 10 lines

Convert SPI chips to partial write, but wrap the write functions in a
compat layer to allow converting the rest of flashrom later.
I actually have patches for most of the remaining conversion, but I
wanted to get this out and reviewed first.

Tested on Intel NM10 by David Hendricks.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1079 | hailfinger | 2010-07-14 01:56:13 +0200 (Wed, 14 Jul 2010) | 16 lines

Print an error message on read errors and abort instead of proceeding
anyway.
Improve error checking in file write, chip read and chip verify.
Refactor the read routines a bit to split reading from file writing.

Log for a failed read:
[...]
Found chip "Winbond W25x16" (2048 KB, SPI) at physical address
0xffe00000.
Reading flash... Invalid OPCODE 0x03
Read operation failed!
FAILED.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-By: Stephen Kou <stephen@hyarros.com>

------------------------------------------------------------------------
r1078 | hailfinger | 2010-07-13 02:42:00 +0200 (Tue, 13 Jul 2010) | 5 lines

Wrap a line which was 156 columns wide.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1077 | hailfinger | 2010-07-13 02:37:19 +0200 (Tue, 13 Jul 2010) | 7 lines

Split erase region walking out of erase_flash.
That allows us to use erase region walking for a combined erase/write
action, and is a prerequisite for partial flashing,

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1076 | hailfinger | 2010-07-13 02:04:52 +0200 (Tue, 13 Jul 2010) | 11 lines

Fix out-of-bounds ICH FREG permission printing. A bit was masked, but
not shifted, and that led to worst-case accesses of index 24 in an array
with 4 members.

I've improved readability in the variable declaration block as well.

Thanks to Stephen Kou for reporting the bug.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stephen Kou <stephen@hyarros.com>

------------------------------------------------------------------------
r1075 | mkarcher | 2010-07-11 23:33:31 +0200 (Sun, 11 Jul 2010) | 12 lines

Add support for the AMIC A25L80P.  This is a 1 MB SPI
chip that seems to be straightforwardly related to the AMIC A25L40PU, which
has half the capacity but is otherwise identical.

Datasheet is at http://www.amictechnology.com/pdf/A25L80P.pdf

flashrom -VE, -Vr, and -Vw has been tested using the AMD SB7x0 interface.
Everything works fine...  at least, I used it to upgrade my BIOS and I've
been able to reboot.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r1074 | mkarcher | 2010-07-10 21:34:15 +0200 (Sat, 10 Jul 2010) | 8 lines

Fix read function for EMST F25L008A

SPI chips never should use read_memmapped. The SPI master code might
decide that read_memmapped is fine for this chip, though, in a lower
layer.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1073 | hailfinger | 2010-07-10 18:56:32 +0200 (Sat, 10 Jul 2010) | 14 lines

Autodetect the ITE IT8705 Super I/O and enable flash writes if it
performs LPC->Parallel translation.
Remove board enables which triggered the IT8705 write enable manually.
Change the IT87 SPI special case to cover IT87 LPC->SPI and
LPC->Parallel translation.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

Tested on Syntax SV266A.
Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>

Tested on Shuttle AK38N, all operations work fine.
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1072 | hailfinger | 2010-07-08 12:13:37 +0200 (Thu, 08 Jul 2010) | 8 lines

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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1071 | mkarcher | 2010-07-08 11:32:18 +0200 (Thu, 08 Jul 2010) | 9 lines

Fix ASUS A8N-VM CSM board enable entry

r1063 had several issues: The PCI IDs for this board are copy/pasted from
the A8N and plain wrong for this board and the board enable is marked as
tested although it isn't. Finally the board description was slightly
wrong and the URL missing.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1070 | hailfinger | 2010-07-06 11:55:48 +0200 (Tue, 06 Jul 2010) | 16 lines

Various places in the flashrom source feature custom parameter
extraction 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!

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1069 | hailfinger | 2010-07-03 14:14:25 +0200 (Sat, 03 Jul 2010) | 9 lines

If a programmer has untested or non-working write/erase code, but
probing/reading works, it makes sense to protect the user against
write/erase accidents.
This feature will be used by the Nvidia MCP SPI code, and it also might
make sense for the gfxnvidia driver which has non-working write/erase.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1068 | hailfinger | 2010-07-03 13:02:10 +0200 (Sat, 03 Jul 2010) | 20 lines

Kill global variables, constants and functions if local scope suffices.
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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1067 | hailfinger | 2010-07-02 19:12:50 +0200 (Fri, 02 Jul 2010) | 11 lines

Add OpenBSD support.
Add a requirements section to the man page which lists the needed access
permissions for each programmer.

This feature needs my pciutils/libpci 8/16-bit write emulation patch at
http://marc.info/?l=openbsd-ports&m=127780030728045 titled
[PATCH] Fix pciutils non-32bit PCI write on OpenBSD

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stuart Henderson <sthen@openbsd.org>

------------------------------------------------------------------------
r1066 | hailfinger | 2010-07-01 19:45:54 +0200 (Thu, 01 Jul 2010) | 5 lines

ICH9/10: display FRAP/FREGx access controls

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1065 | hailfinger | 2010-07-01 13:16:28 +0200 (Thu, 01 Jul 2010) | 6 lines

Add support for the HP DL165 G6.
Change the match for the HP DL145 G3 to avoid matching on the DL165 G6.

Signed-off-by: Arne Georg Gleditsch <arne.gleditsch@numascale.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1064 | mkarcher | 2010-06-29 16:44:40 +0200 (Tue, 29 Jun 2010) | 4 lines

Check that the expected winbond Super I/O was found

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1063 | mkarcher | 2010-06-27 17:07:52 +0200 (Sun, 27 Jun 2010) | 4 lines

Board enable for Asus A8N-VM CSM

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
------------------------------------------------------------------------
r1062 | mkarcher | 2010-06-27 17:07:49 +0200 (Sun, 27 Jun 2010) | 10 lines

W83627x code unification

This patch unifies the code for different Winbond W83627-family chips,
to be applied before I add another W83627 GPIO raise function.

After the Ack I added the check for unimplemented GPIO ports, but still
dared to reuse the ack.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
------------------------------------------------------------------------
r1061 | hailfinger | 2010-06-25 15:18:48 +0200 (Fri, 25 Jun 2010) | 7 lines

Work around shadowing warnings in libpci headers. This is needed for
warning-free compilation on older gcc versions (3.x and probably older).
Such a gcc version is the default on i386 OpenBSD.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stuart Henderson <sthen@openbsd.org>

------------------------------------------------------------------------
r1060 | hailfinger | 2010-06-24 13:51:12 +0200 (Thu, 24 Jun 2010) | 5 lines

SST39VF010 tested, works.

Signed-off-by: Guenter Knauf <lists@gknw.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1059 | hailfinger | 2010-06-24 13:39:57 +0200 (Thu, 24 Jun 2010) | 5 lines

Add Winbond W25Q64 support. Tested.

Signed-off-by: David Hendricks <dhendrix@google.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1058 | hailfinger | 2010-06-24 01:14:44 +0200 (Thu, 24 Jun 2010) | 9 lines

If flashrom is standalone and has no OS below, it can't call dmidecode.
Provide empty DMI stubs for that case until someone implements our own
dmidecode subset.

Tested by Patrick Georgi on top of libpayload.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>

------------------------------------------------------------------------
r1057 | hailfinger | 2010-06-22 01:20:15 +0200 (Tue, 22 Jun 2010) | 8 lines

Kill unneeded #include wherever possible.

Tested on Linux, FreeBSD, NetBSD, OpenBSD, DOS.
Thanks to Jonathan A. Kollasch and Idwer Vollering for testing.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Idwer Vollering <vidwer+lists.flashrom@gmail.com>

------------------------------------------------------------------------
r1056 | hailfinger | 2010-06-21 18:12:22 +0200 (Mon, 21 Jun 2010) | 5 lines

Add support for Hyundai HY29F002 and HY29F002B.

Signed-off-by: David Borg <borg.db@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1055 | hailfinger | 2010-06-20 13:04:26 +0200 (Sun, 20 Jun 2010) | 6 lines

Fill in buses_supported for remaining Intel chipsets (ICH0-ICH5,
Poulsbo).

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r1054 | hailfinger | 2010-06-20 13:02:33 +0200 (Sun, 20 Jun 2010) | 9 lines

The SPI opcode 0xd8 is not a chip erase opcode on any chip out there.
Besides that, the function as implemented just walks the chip and
ignores sector sizes.
Sector erase with SPI opcode 0xd8 is of course still supported.
Kill a declaration for a nonexisting function while we're at it.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r1053 | hailfinger | 2010-06-20 12:58:32 +0200 (Sun, 20 Jun 2010) | 6 lines

Add SPI chip read support to the dummy flasher. This allows using the
dummy flasher for SPI read debugging.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r1052 | hailfinger | 2010-06-20 12:41:35 +0200 (Sun, 20 Jun 2010) | 7 lines

Modernize SPI AAI code, blacklist IT87 SPI for AAI, allow AAI to run
without warnings on ICH/VIA SPI.
Add some code to make conversion to partial write possible for AAI.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r1051 | hailfinger | 2010-06-20 12:39:33 +0200 (Sun, 20 Jun 2010) | 7 lines

Fix message printing for SPI RES on spew level.
Use a blacklist instead of a whitelist for 4-byte SPI RDID.
Tell users where to report bugs.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r1050 | mkarcher | 2010-06-20 00:06:35 +0200 (Sun, 20 Jun 2010) | 4 lines

Add EMST F25L008A SPI chip

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
------------------------------------------------------------------------
r1049 | stuge | 2010-06-17 02:01:56 +0200 (Thu, 17 Jun 2010) | 7 lines

Set maximum flash size for 3Com NICs to 128kb = 1Mbit

This fact was already documented on http://flashrom.org/NIC3Com

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1048 | hailfinger | 2010-06-14 20:40:59 +0200 (Mon, 14 Jun 2010) | 10 lines

Detect incompatible CONFIG_FOO=yes for the specified target and refuse
to compile with a meaningful error message.
Set the default for incompatible CONFIG_FOO to no.

Just running "make" should result in a a build which compiles the common
subset of available and working features.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Idwer Vollering <vidwer+lists.flashrom@gmail.com>

------------------------------------------------------------------------
r1047 | hailfinger | 2010-06-14 16:44:08 +0200 (Mon, 14 Jun 2010) | 7 lines

Handle OS where executables have a hardcoded suffix, e.g. DOS with .exe
This ensures that any temp files in the configure/check step of the
Makefile are removed correctly.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Idwer Vollering <vidwer+flashrom@gmail.com>

------------------------------------------------------------------------
r1046 | hailfinger | 2010-06-14 16:18:37 +0200 (Mon, 14 Jun 2010) | 11 lines

The nicrealtek code uses magic constants, but they are not explained.
That's OK if you know the datasheet well, but for casual readers some
comments are really helpful.

I'm not sure whether we want to disable hardware flash access forever
without enabling it again on shutdown. A few other places made me wonder
as well. I've added FIXME comments in those places.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Andrew Morgan <ziltro@ziltro.com>

------------------------------------------------------------------------
r1045 | hailfinger | 2010-06-14 14:58:06 +0200 (Mon, 14 Jun 2010) | 7 lines

Add SST25LF040A support.
Checked against datasheets, should work.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
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>

------------------------------------------------------------------------
r1044 | hailfinger | 2010-06-14 14:42:05 +0200 (Mon, 14 Jun 2010) | 9 lines

We already have NEED_PCI in the Makefile to link in PCI support. Add
NEED_SERIAL and NEED_NET to decouple individual drivers from compilation
and linking decisions.
Move libgetopt from a DOS+PCI dependency to a DOS dependency to fix
linking on DOS if no driver requiring PCI is enabled.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1043 | mkarcher | 2010-06-13 12:16:12 +0200 (Sun, 13 Jun 2010) | 13 lines

VIA: disable byte merging

All mentioned north bridges have been checked against data sheet. That's
all north bridges google found a datasheet for with "byte merge" included.

Runs multiple chipset enables if the first one requests further enables to
be run.

VIA byte-merging logic tested: works.
multiple chipset logic: completely untested

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1042 | mkarcher | 2010-06-13 01:14:03 +0200 (Sun, 13 Jun 2010) | 6 lines

Unbreak flashrom - fix compiler error (trivial)

Fix compiler error (bad forward port in r1040).

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r1041 | mkarcher | 2010-06-13 01:07:26 +0200 (Sun, 13 Jun 2010) | 8 lines

Board-enable for MS-7025 (K8N Neo2 Platinum)

test report is
http://www.coreboot.org/pipermail/flashrom/2010-April/002967.html

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Tested-by: Valentine "Pegasus rider" Yatsenko <mr.qweo@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1040 | mkarcher | 2010-06-12 19:27:44 +0200 (Sat, 12 Jun 2010) | 7 lines

Board enable for EPIA EK (untested)

Reporter/owner of that board: oscar <oshikore@gmail.com>
http://www.coreboot.org/pipermail/flashrom/2010-April/002910.html

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1039 | hailfinger | 2010-06-08 00:37:54 +0200 (Tue, 08 Jun 2010) | 8 lines

National Semiconductor DP83815/DP83816 and DP83820 NIC programmer
support.
Some instability remains, but that may be due to hardware problems in
the specific card (Netgear FA311) used for testing.

Signed-off-by: Andrew Morgan <ziltro@ziltro.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1038 | uwe | 2010-06-07 21:41:25 +0200 (Mon, 07 Jun 2010) | 21 lines

Various manpage fixes and improvements.

 - Use [<vendor>:]<board>], not [<vendor>:]<part>], which is more clear.

 - Mention TSOP48 chips in the description.

 - Highlight various additional parts in the manpage which were missing
   so far (i.e., make them bold), including cmdline switches and others.

 - Mention that you can use -VV.

 - Fix name of the now-renamed 'Supported mainboards' section in -L output.

 - Mention that ft2232_spi and buspirate_spi only support SPI chips.

 - Readability and cosmetic improvements, add missing escapes, fix typos.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r1037 | uwe | 2010-06-07 21:06:26 +0200 (Mon, 07 Jun 2010) | 11 lines

board_enable.c: Remove useless 'name' parameter.

Every board-enable function is passed a 'const char *name' (board name)
which is totally useless as the board name was already printed by flashrom
at that point. Also, 95% or so of the board-enables don't use the
parameter anyway. So, drop it.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r1036 | hailfinger | 2010-06-07 16:10:55 +0200 (Mon, 07 Jun 2010) | 5 lines

Support Atmel AT49F020 256kB parallel flash.

Signed-off-by: Andrew Morgan <ziltro@ziltro.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1035 | hailfinger | 2010-06-07 13:10:43 +0200 (Mon, 07 Jun 2010) | 7 lines

Fix wiki board enable parameter printing. The logic was incorrect in one
place which had && instead of ||.
Move the board info #define B to the file where it is used.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1034 | hailfinger | 2010-06-07 13:08:07 +0200 (Mon, 07 Jun 2010) | 5 lines

Create dependencies on the fly rather than in a separate step.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1033 | hailfinger | 2010-06-05 01:24:57 +0200 (Sat, 05 Jun 2010) | 10 lines

NetBSD needs libpciutils (which is called libpci on pretty much every
other platform and lives in the pciutils package) and apparently the
libpciutils on NetBSD needs the NetBSD-native libpci (no equivalent on
other platforms).

Thanks to Jonathan A. Kollasch for reporting.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Jonathan A. Kollasch <jakllsch@kollasch.net>

------------------------------------------------------------------------
r1032 | hailfinger | 2010-06-05 01:20:21 +0200 (Sat, 05 Jun 2010) | 9 lines

gcc and clang can check format strings of printf-like functions. Since
we don't support any other compilers right now, enable that extension
unconditionally.

Fix the bugs found by format string checking.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r1031 | hailfinger | 2010-06-04 21:05:39 +0200 (Fri, 04 Jun 2010) | 10 lines

The internal programmer needs correct information about flash_base and
chip window top/bottom alignment on non-x86 before it can be used.
Abort any internal programmer action for now until the code is fixed.

Add the concept of a processor enable for systems where flashing is
impacted by processor settings or processor model.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1030 | uwe | 2010-06-04 19:07:39 +0200 (Fri, 04 Jun 2010) | 17 lines

Make the 'flashrom --help' output look a bit nicer.

Only print "flashrom" as the program name unconditionally, not the full path
and program name (e.g. "/home/foo/bar/baz/flashrom" or on Windows
"C:\Foo\Bar\Whatever\flashrom.exe"). The path or exact executable name is
not really useful to print here, if you managed to run --help you already
know it, and it just makes the output look ugly.

Also, add a missing newline to make the output look nicer.

Finally, revert the "CONFIG_PRINT_WIKI ?= yes" change which accidentally
slipped into r1029.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r1029 | uwe | 2010-06-04 18:39:35 +0200 (Fri, 04 Jun 2010) | 6 lines

Fix URLs for GIGABYTE motherboards.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1028 | hailfinger | 2010-06-03 23:48:13 +0200 (Thu, 03 Jun 2010) | 15 lines

Do not trust the OS at all and measure timer precision before
calibrating the delay loop and use that measurement to get reasonable
precision for our own delay code.

Print a measurement for a delay of 4x the OS timer resolution.

Be precise about how bad the deviation was if we had to recalculate.

Tested on Windows XP, 32 bit, built using MinGW by Uwe.
Tested on FreeDOS v1.0 Final, 32bit, built using DJGPP 4.3.2 by Idwer.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Idwer Vollering <vidwer+lists.flashrom@gmail.com>

------------------------------------------------------------------------
r1027 | uwe | 2010-06-03 18:35:51 +0200 (Thu, 03 Jun 2010) | 9 lines

Fix bug in wiki printing and whitespace (trivial).

The required "-m" options were not in the wiki output due to a mistake
that I think I introduced recently.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1026 | hailfinger | 2010-06-03 02:49:50 +0200 (Thu, 03 Jun 2010) | 6 lines

Fix fallout from r1021 which caused compile failures if only the dummy
programmer was selected.

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>

------------------------------------------------------------------------
r1025 | mkarcher | 2010-06-01 18:09:06 +0200 (Tue, 01 Jun 2010) | 8 lines

Add hp xw9400 board enable.

Also modifies nvidia_mcp_gpio_set to cope with multiple MCP55 chips on
the same board, like on the Tyan S2915-E.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Adis Salcin <crow@linux.org.ba>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1024 | uwe | 2010-06-01 12:13:17 +0200 (Tue, 01 Jun 2010) | 9 lines

Merge print.c and print_wiki.c board/URL tables.

Also, merge the tables in the output, i.e. there's only one table which
contains both known-good and known-bad/untested boards.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1023 | hailfinger | 2010-05-31 17:27:27 +0200 (Mon, 31 May 2010) | 18 lines

So far, we have up to 4 different names for the same thing (ignoring
capitalization):
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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1022 | hailfinger | 2010-05-31 00:35:14 +0200 (Mon, 31 May 2010) | 8 lines

Add flashrom.exe unconditionally to the list of files removed at make
clean. This allows users to run make clean without specifying the target
architecture.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1021 | hailfinger | 2010-05-31 00:24:40 +0200 (Mon, 31 May 2010) | 13 lines

Remove unneeded #include statements completely.

unistd.h was only used to get a definition of NULL in all files. Add our
own NULL #define and remove unistd.h from flash.h
stdio.h has no place in flash.h, it should be included only in files
which really need it.
Add #include statements in individual .c files where needed.

Replace a few printf with msg_* to eliminate the need for stdio.h.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1020 | uwe | 2010-05-30 19:50:16 +0200 (Sun, 30 May 2010) | 10 lines

Mark the following chip as supported:

 - Winbond W39V040FA (reported by Guenter <lists@gknw.net>)
   Read (thus also probe), write (thus also erase), and verify tested.
   http://www.flashrom.org/pipermail/flashrom/2010-May/003078.html

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1019 | uwe | 2010-05-30 19:00:19 +0200 (Sun, 30 May 2010) | 40 lines

Update the status for the following chips:

 - Eon EN25F80 (reported by oops66 <oops66@wanadoo.fr>)
   Probe and read tested.
   http://www.flashrom.org/pipermail/flashrom/2010-May/003183.html

 - AMIC A49LF040A (reported by Guenter <lists@gknw.net>)
   Read (thus also probe), write (thus also erase), and verify tested.
   http://www.flashrom.org/pipermail/flashrom/2010-May/003078.html
   Also reported by Robert Grasso <robert.grasso@modulonet.fr>.
   http://www.flashrom.org/pipermail/flashrom/2010-May/003006.html

 - SST SST49LF008A (reported by Marco Giacinti <marcogiacinti@hotmail.it>)
   Erase tested.
   http://www.flashrom.org/pipermail/flashrom/2010-May/003010.html

 - SST SST29EE020A (reported by Anders Jenbo <anders@jenbo.dk>)
   Write (and thus erase) tested.
   http://www.flashrom.org/pipermail/flashrom/2010-April/002961.html

 - SST SST49LF040 (reported by David Westberg <david@uarda.dlinkddns.com>)
   Probe and read tested.
   http://www.flashrom.org/pipermail/flashrom/2010-April/002862.html

 - Winbond W39V080FA (reported by Maciej ?\197?\187enczykowski <zenczykowski@gmail.com>)
   All operations tested.
   http://www.flashrom.org/pipermail/flashrom/2010-April/002863.html

 - Winbond W29C020C (reported by Urja Rannikko <urjaman@gmail.com>)
   Erase tested.
   http://www.flashrom.org/pipermail/flashrom/2010-April/002847.html

 - PMC Pm39LV010 (reported by Tim Small <tim@seoss.co.uk>)
   Write (and thus also erase) tested.
   http://www.flashrom.org/pipermail/flashrom/2010-March/002711.html

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1018 | mkarcher | 2010-05-30 18:55:18 +0200 (Sun, 30 May 2010) | 4 lines

Unlocking for W39V040FA

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
------------------------------------------------------------------------
r1017 | hailfinger | 2010-05-28 19:07:57 +0200 (Fri, 28 May 2010) | 8 lines

Some chips implement the RES (0xab) opcode, but they use a non-standard
two byte response instead of the usual one byte response.
A two-byte response has the accuracy of REMS and RDID, so don't check
for REMS/RDID availability before running a two-byte RES.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r1016 | hailfinger | 2010-05-28 17:53:08 +0200 (Fri, 28 May 2010) | 11 lines

ICH SPI can enforce address restrictions for all accesses which take an
address (well, it could if the chipset implementation was not broken).
Since exploiting the broken implementation is harder than conforming to
the address restrictions wherever possible, conform to the address
restrictions instead.
This patch eliminates a lot of transaction errors people were seeing
on chip probe.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r1015 | uwe | 2010-05-27 00:29:51 +0200 (Thu, 27 May 2010) | 9 lines

It seems that this board is actually a 'Pro' version. At least it's
addressed as 'Pro' in the list of boards, which requires board_enable.

See also: http://www.flashrom.org/pipermail/flashrom/2009-July/000003.html

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1014 | uwe | 2010-05-27 00:26:44 +0200 (Thu, 27 May 2010) | 6 lines

Sort boards in board-enable table alphabetically.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1013 | hailfinger | 2010-05-26 03:45:41 +0200 (Wed, 26 May 2010) | 39 lines

Handle the following architectures in generic flashrom code:
- x86/x86_64 (little endian)
- PowerPC (big endian)
- MIPS (big+little endian)

No changes to programmer specific code. This means any drivers with MMIO
access will _not_ suddenly start working on big endian systems, but with
this patch everything is in place to fix them.

Compilation should work on all architectures listed above for all
drivers except nic3com and nicrealtek which require PCI Port IO which is
x86-only for now.

To compile without nic3com and nicrealtek, run
make distclean
make CONFIG_NIC3COM=no CONFIG_NICREALTEK=no


Thanks to Misha Manulis for testing early versions of this patch on
PowerPC (big endian) with the satasii programmer.
Thanks to Segher Boessenkool for design review and for helping out with
compiler tricks and pointing out that we need eieio on PowerPC.
Thanks to Vladimir Serbinenko for compile testing on MIPS (little
endian) and PowerPC (big endian) and for runtime testing on MIPS (little
endian).
Thanks to David Daney for compile testing on MIPS (big endian).
Thanks to Uwe Hermann for compile and runtime testing on x86_64.

DO NOT RUN FLASHROM ON NON-X86 AFTER APPLYING THIS PATCH!
This patch only provides the infrastructure, but does not convert any
drivers, so flashrom will compile, but it won't do the right thing on
non-x86 platforms.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Misha Manulis <misha@manulis.com>
Acked-by: Vladimir 'phcoder/?\207?\134-coder' Serbinenko <phcoder@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Segher Boessenkool <segher@kernel.crashing.org>

------------------------------------------------------------------------
r1012 | uwe | 2010-05-26 01:27:44 +0200 (Wed, 26 May 2010) | 17 lines

Mark the following chips as OK:

 - PMC Pm49FL004
 - SST SST49LF020
 - SST SST49LF020A
 - SST SST49LF040B
 - SST SST49LF080A
 - Winbond W39V040B

I tested all operations on hardware using r997. Only on SST49LF040B
write/erase does not seem to work, will investigate later (probe/read
works, though).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r1011 | uwe | 2010-05-24 19:39:14 +0200 (Mon, 24 May 2010) | 12 lines

Various nicrealtek fixes:

 - Add missing entries for 'flashrom -L' output and wiki output.

 - Add missing entries in the manpage.

 - nicrealtek.c: Coding style fixes and cosmetics.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1010 | mkarcher | 2010-05-24 18:03:57 +0200 (Mon, 24 May 2010) | 4 lines

Board enable for IP530

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Marc Bertens <mbertens@xs4all.nl>
------------------------------------------------------------------------
r1009 | uwe | 2010-05-24 17:28:12 +0200 (Mon, 24 May 2010) | 18 lines

Various wiki output improvements as per IRC discussion (trivial).

 - Use '?3' wiki template (light greenish, not gray) for untested stuff.
 
 - Reduce page width a bit to improve readability on smaller screens.
 
 - Generalize some functions a bit (pass in how many columns to generate).
 
 - Mark untested board-enables as such (were incorrectly marked "OK" so far).
 
 - Drop some useless 'valign=top' entries.
 
 - Make a few more functions 'static' while we're at it.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r1008 | hailfinger | 2010-05-22 09:31:50 +0200 (Sat, 22 May 2010) | 8 lines

Add debug output of the exact matched chipset PCI ID to keep track of
tested PCI IDs for chipsets with one name and multiple IDs.
This will help avoid problems similar to the Tyan S2915 OEM undetected
flash in the future.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1007 | hailfinger | 2010-05-22 09:27:16 +0200 (Sat, 22 May 2010) | 13 lines

Fix Tyan S2915 OEM board by commenting out MCP55 LPC bridge PCI ID
10de:0361 which is the secondary LPC bridge. The same effect could be
achieved by refusing to run enable_flash_mcp55 if the device class is
not ISA bridge [0601].

Thanks to Alessandro Polverini, Joel Robertson, Nicolas Aveline,
Phil LoCascio and Nils-Helge Garli Hegvik for testing flashrom on
hardware and Michael Karcher for analyzing the factory BIOS for clues.
In the end, no board enable was needed and it was a pure chipset issue.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1006 | hailfinger | 2010-05-22 09:10:46 +0200 (Sat, 22 May 2010) | 6 lines

Initialize the internal delay function before running programmer init.
The programmer init may need a good host delay function.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r1005 | hailfinger | 2010-05-22 01:09:42 +0200 (Sat, 22 May 2010) | 12 lines

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

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>

------------------------------------------------------------------------
r1004 | hailfinger | 2010-05-22 01:00:56 +0200 (Sat, 22 May 2010) | 6 lines

libpci < 2.2.4 can not store class info in struct pci_dev.
Read class info manually and store it in a separate variable.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r1003 | hailfinger | 2010-05-22 00:28:19 +0200 (Sat, 22 May 2010) | 7 lines

Add missing nicrealtek.c which was missing from revision 1002 which was

Support for Realtek RTL8139 network card flashing.

Signed-off-by: Joerg Fischer <turboj@gmx.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1002 | hailfinger | 2010-05-21 23:54:07 +0200 (Fri, 21 May 2010) | 5 lines

Support for Realtek RTL8139 network card flashing.

Signed-off-by: Joerg Fischer <turboj@gmx.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1000 | hailfinger | 2010-05-19 18:46:52 +0200 (Wed, 19 May 2010) | 8 lines

Increase flashrom release number to 0.9.2.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r999 | mkarcher | 2010-05-18 01:19:22 +0200 (Tue, 18 May 2010) | 6 lines

msr_t memory layout may depend on compiler; with optimizations this
may lead to writing incorrect data to MSR.
Create a temporary buffer with correct layout to avoid this problem.

Signed-off-by: Anti Sullin <anti.sullin@artecdesign.ee>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r998 | hailfinger | 2010-05-15 17:04:37 +0200 (Sat, 15 May 2010) | 7 lines

Fix assorted documentation, frontend and printing bugs.
Change the command line interface to make file names positional.
Add more sanity checks to the command line parser.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r997 | snelson | 2010-05-07 22:09:04 +0200 (Fri, 07 May 2010) | 8 lines

convert programmer print messages to msg_p*
convert general print messages to msg_g*
a few fixes as suggested by Carl-Daniel

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r996 | hailfinger | 2010-04-28 17:22:14 +0200 (Wed, 28 Apr 2010) | 37 lines

--force may have been a good idea back when only developers were using
flashrom, but over the last few months we've seen too many people who
incorrectly believed that --force would solve anything.

One of the problems is that --force had multiple meanings:
- Force chip read by faking probe success.
- Force chip access even if the chip is bigger than max decode size for
  the flash bus.
- Force erase even if erase is known bad.
- Force write even if write is known bad.
- Force writing even if cbtable tells us that this is the wrong image
  for this board.

This patch cleans up --force usage:
- Remove any suggestions to use --force for probe/read from flashrom
  output.
- Don't talk about "success" or "Found chip" if the chip is forced.
- Add a new internal programmer parameter boardmismatch=force. This
  overrides any mismatch detection from cbtable/image comparisons.
- Add a new internal programmer parameter laptop=force_I_want_a_brick.
- Adjust the documentation for --force.
- Clean up the man page a bit whereever it talks about --force or
  laptops.

Additional changes in this patch:
- Add warnings about laptops to the documentation.
- Abort if a laptop is detected. Can be overridden with the programmer
parameter mentioned above.
- Add "Portable" to the list of DMI strings indicating laptops.
- Check if a chip specified with -c is known to flashrom.
- Programmer parameter reliability and consistency fixes.
- More paranoid self-checks.
- Improve documentation.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r995 | ruik | 2010-04-26 00:47:50 +0200 (Mon, 26 Apr 2010) | 9 lines


Fix the DOS port. Now the DS selector limit is set to 4GB and all mmio accesses goes through DS, 
the 1:1 mapping is fixed so the _DS base is taken onto account. Plus is that the hwaccess.c needs
no change and memcpy etc can be used on mmaped space.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz> 
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r994 | ruik | 2010-04-20 21:34:31 +0200 (Tue, 20 Apr 2010) | 9 lines


I added following Winbond chips:

W25Q80, W25Q16 and W25Q32. I tested read/write/probe with W25Q80.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz> 
Acked-by: David Hendricks <dhendrix@google.com>


------------------------------------------------------------------------
r993 | mkarcher | 2010-04-11 23:01:06 +0200 (Sun, 11 Apr 2010) | 5 lines

Add board enable for ABit NF7-S

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Tom Brand <worntreads@sbcglobal.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
------------------------------------------------------------------------
r992 | hailfinger | 2010-04-09 02:02:38 +0200 (Fri, 09 Apr 2010) | 6 lines

Reinitialize the delay loop upon recalibration.
Fix an unescaped % in a format specifier.

Signed-off-by: Urja Rannikko <urjaman@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r991 | mkarcher | 2010-04-03 12:27:08 +0200 (Sat, 03 Apr 2010) | 14 lines

Intel 28F004/28F400 support

Remove blockwise write for i82802ab chips. It will be reintroduced
in post-0.9.2 in a generic way. This is needed to fix
FWH-like chips with non-uniform sectors.

These are:
  Intel 28F001
  Sharp LHF00L04
  ST M50FW002
  ST M50LPW116

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r990 | hailfinger | 2010-04-01 01:55:06 +0200 (Thu, 01 Apr 2010) | 37 lines

The current delay loop calculation is still from revision 1 of flashrom,
and since then it had a logic bug which caused all delays to be twice as
long as intended. Fix the delay duration.

Protect against delay loop overflows.

Detect a non-working delay loop.

Change the delay loop itself to ensure clever compiler optimizers won't
eliminate it (as happens with clang/llvm in the current code). Some
people suggested machine-specific asm, but the empty asm statement with
the loop counter as register/memory input has the benefit of being
perfectly cross-platform and working in gcc and clang.

If time goes backwards (catastrophical NTP time difference, manual time
change), timing measurements were shot because the new-old time
subtraction yielded negative numbers which weren't handled correctly
because the variable is unsigned. Work around that issue (a fix is
mathematically impossible).

If time goes forward too fast, pick the biggest possible timing
measurement with a guaranteed overflow avoidance for all timing
calculations.

Check four times if the calculated timing is at most 10% too fast. This
addresses OS scheduler interactions, e.g. being scheduled out during
measurement which inflates measurements.

If the timing looks like garbage, recalculate the timer values up to
four times before giving up.

Avoid division by zero in rare cases where timing measurements for a 250
ms delay returned 0 us elapsed.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Maciej Pijanka <maciej.pijanka@gmail.com>

------------------------------------------------------------------------
r989 | hailfinger | 2010-03-30 04:45:18 +0200 (Tue, 30 Mar 2010) | 8 lines

Add ITE IT8720 SPI support.
Original patch by Vadim Girlin.
Message printing updated by Carl-Daniel Hailfinger.

Signed-off-by: Vadim Girlin <vadimgirlin@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>

------------------------------------------------------------------------
r988 | hailfinger | 2010-03-28 00:25:14 +0100 (Sun, 28 Mar 2010) | 5 lines

Add PMC Pm39LV020 and Pm39LV040.

Signed-off-by: Anders Juel Jensen <andersjjensen@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r987 | hailfinger | 2010-03-27 17:36:40 +0100 (Sat, 27 Mar 2010) | 40 lines

Add runtime and build environment info to the flashrom version message.
This patch uses code from Idwer Vollering and Maciej Pijanka.
I've added Makefile support and compiler version printing and
restructured the code heavily.
The code prints runtime system information and buildtime libpci
information (I couldn't find any runtime libpci version function). Due
to our ability to cross-compile flashrom, buildtime system information
from "uname -mrs" doesn't help diagnosing any problems. That's why only
libpci and gcc are buildtime info, and the rest is runtime info.

Examples:

openSUSE 10.3, i686, gcc 4.2.1, with PCI support:
flashrom v0.9.1-r971 on Linux 2.6.22.19-0.2-default (i686), built with
libpci 2.2.6, GCC 4.2.1 (SUSE Linux)

openSUSE 10.3, i686, llvm-clang-2.6.99svn97231, with PCI support:
flashrom v0.9.1-r971 on Linux 2.6.22.19-0.2-default (i686), built with
libpci 2.2.6, LLVM 1/clang 1

openSUSE 11.1, x86_64, gcc 4.3.2, with PCI support:
flashrom v0.9.1-r972 on Linux 2.6.27.29-0.1-default (x86_64), built with
libpci 3.0.1, GCC 4.3.2 [gcc-4_3-branch revision 141291]

openSUSE 10.3, i686, gcc 4.2.1, without PCI support:
flashrom v0.9.1-r971 on Linux 2.6.22.19-0.2-default (i686), built with
GCC 4.2.1 (SUSE Linux)

Windows/cygwin, i686, gcc 4.3.4, without PCI support:
flashrom v0.9.1-r973 on CYGWIN_NT-5.1 1.7.1(0.218/5/3) (i686), built
with GCC 4.3.4 20090804 (release) 1

FreeBSD 8.0, i386, gcc 4.2.1, with PCI support:
flashrom v0.9.1-r973 on FreeBSD 8.0-RELEASE-p2 (i386), built with libpci
3.1.7, GCC 4.2.1 20070719  [FreeBSD]

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Maciej Pijanka <maciej.pijanka@gmail.com>

------------------------------------------------------------------------
r986 | hailfinger | 2010-03-27 17:16:01 +0100 (Sat, 27 Mar 2010) | 7 lines

The delay loop is probably one of the oldest pieces of code in flashrom.
Clean up code duplication and measure timing of 10/100/1000/10000 us
delays.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Maciej Pijanka <maciej.pijanka@gmail.com>

------------------------------------------------------------------------
r985 | uwe | 2010-03-26 00:18:41 +0100 (Fri, 26 Mar 2010) | 10 lines

Polish the flashrom code comments and outputs a bit.

 - Fix a number of typos (found via ispell).

 - Use correct vendor names (as per their websites) consistently.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r984 | mkarcher | 2010-03-25 10:23:46 +0100 (Thu, 25 Mar 2010) | 41 lines

Add success reports

PMC Pm39LV010:
 See http://www.coreboot.org/pipermail/flashrom/2010-March/002711.html
 Thanks to Tim Small for reporting!

Supermicro X8DTT-F:
 See http://www.coreboot.org/pipermail/flashrom/2010-March/002707.html
 Thank to Taylan Develioglu for testing!

Gigabyte GA-965P-DS4:
 See http://www.coreboot.org/pipermail/flashrom/2010-March/002426.html
 Thanks to Michal Andrzejczak for reporting!

Tyan Tempest i5000PW:
 See http://www.coreboot.org/pipermail/flashrom/2010-February/002358.html
 Thanks to Rob Lazzurs for reporting!

PCEngines WRAP.2E:
 See http://www.coreboot.org/pipermail/flashrom/2010-February/002187.html
 Thanks to Vincenzo Caruso for testing!

Asus P5B:
 This board has been reporting as working (for r710/0.9.1) in:
 http://www.coreboot.org/pipermail/flashrom/2010-February/002170.html
 Thanks to Patrice Levesque for testing!

MSI 7312 (K9MM-V) + W39V040B:
 See http://www.coreboot.org/pipermail/flashrom/2010-February/002159.html
 Thanks to David Mears for testing!

Probe + Read on SST49LF080A:
 See http://www.coreboot.org/pipermail/flashrom/2010-February/002095.html
 Thanks to Peter Lemenkov for testing!

Finally:
 remove Asus A7V8X-X from "boards_ok", as this table is meant only for
 boards not needing a board enable.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r983 | hailfinger | 2010-03-25 03:50:40 +0100 (Thu, 25 Mar 2010) | 20 lines

Autodetect ITE IT87* LPC->SPI translation on all boards without the need
for a board enable.
Move boards which had an IT87* SPI board enable from the board enable
list to the OK list.

Mark the Gigabyte GA-MA78GPM-DS2H as OK.

Change the it87spi forced port parameter to it87spiport=...

Fix incorrect indentation in the man page.

Tested by Ward Vandewege on both variants of the Gigabyte GA-M57SLI-S4
http://www.flashrom.org/pipermail/flashrom/2010-March/002712.html

Tested by ?\230?\157?\142?\229?\189?\165?\229?\173?\184 (Ian-Xue Li) on the Gigabyte GA-MA78GPM-DS2H
http://www.flashrom.org/pipermail/flashrom/2010-March/002723.html

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ward Vandewege <ward@gnu.org>

------------------------------------------------------------------------
r982 | snelson | 2010-03-25 00:14:32 +0100 (Thu, 25 Mar 2010) | 7 lines

Convert chips' message printing to msg_c*
Fixed suggestions by Carl-Daniel.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r981 | mkarcher | 2010-03-25 00:10:01 +0100 (Thu, 25 Mar 2010) | 4 lines

Fix copy/paste error in print.c preventing compilation

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Idwer Vollering <vidwer@gmail.com>
------------------------------------------------------------------------
r980 | mkarcher | 2010-03-24 23:56:23 +0100 (Wed, 24 Mar 2010) | 8 lines

Flashrom works on Acer Aspire 1520 (Laptop) with W39V040A

See http://www.coreboot.org/pipermail/flashrom/2010-March/002451.html

Thanks to Pawe?\197?\130 Stawicki for reporting!

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r979 | mkarcher | 2010-03-24 23:56:19 +0100 (Wed, 24 Mar 2010) | 9 lines

Shuttle FD37 and MSI K9A2 Platinum are supported

FD37: http://www.coreboot.org/pipermail/flashrom/2010-March/002440.html
K9A2: http://www.coreboot.org/pipermail/flashrom/2010-March/002433.html

Thanks to Sylvain BERTRAND for reporting!

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r978 | mkarcher | 2010-03-24 23:56:14 +0100 (Wed, 24 Mar 2010) | 12 lines

MSI MS6330 tested with W49F002U and EN29F002

W49F002U: http://www.coreboot.org/pipermail/flashrom/2010-March/002469.html
EN29F002: http://www.coreboot.org/pipermail/flashrom/2010-March/002480.html

Block erase was broken, chip erase worked, block erase is fixed in r934 but
has not been tested since.

Thanks to Guy Lacroix for reporting!

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r977 | mkarcher | 2010-03-24 23:56:08 +0100 (Wed, 24 Mar 2010) | 7 lines

ASUS P6T Deluxe is OK

See http://www.coreboot.org/pipermail/flashrom/2010-March/002501.html
Thanks to Konstantin Matuschek for reporting.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r976 | mkarcher | 2010-03-24 23:56:02 +0100 (Wed, 24 Mar 2010) | 13 lines

Clean up manufacturer mainboard links.

The Asus A8NE-FM/S does exist, you find original ASUS pdf manuals in the
internet, but seems to be an OEM board that is not documented on the
Asus page.

A lot of MSI boards are OEM boards that have no page at the MSI site...

This patch also adds links in the Wiki for boards from the board enable
table.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r975 | mkarcher | 2010-03-24 23:55:56 +0100 (Wed, 24 Mar 2010) | 14 lines

Abit VT6X4 + Winbond W29C020C and Asus A7V133 + Atmel AT29C010A work

Abit VT6X4 / W29C020C: See
  http://www.coreboot.org/pipermail/flashrom/2010-March/002730.html
  Fixes typo in comment and marks board-enable as tested (the flashrom
  running on that machine was patched with the board enable that got
  in later).

Asus A7V133 / Atmel AT29C010A: See
  http://www.coreboot.org/pipermail/flashrom/2010-March/002729.html
  Adding "erase" to tested as there is only one erase function.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r974 | mkarcher | 2010-03-24 23:55:50 +0100 (Wed, 24 Mar 2010) | 7 lines

Probe/Read tested for SST29EE020A

http://www.flashrom.org/pipermail/flashrom/2010-February/002318.html
Thanks to Andre Robatino for reporting!

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r973 | mkarcher | 2010-03-24 18:55:04 +0100 (Wed, 24 Mar 2010) | 4 lines

Fix handling of empty dmidecode output

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r972 | snelson | 2010-03-23 18:10:28 +0100 (Tue, 23 Mar 2010) | 12 lines

Sst49lfxxxc chips are functionally the same as 82802ab chips.
Sst49lfxxxc software status register is functionally the same as the 
82802ab status register, "Block Protect Status"(49lfxxxc) can be treated 
the same as "Device Protect Status"(82802ab).
Erase_block_49lfxxxc is the same command sequence as erase_block_82802ab.
Add unlock_49lfxxxc to chips definitions.
Write_sector_49lfxxxc is the same as write_page_82802ab.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r971 | hailfinger | 2010-03-23 00:47:38 +0100 (Tue, 23 Mar 2010) | 18 lines

JEDEC ID probing checks the parity of the vendor ID and verifies that
the ID differs from the flash chip contents.
Add the same feature to 82802AB ID probing.

This should reduce the number of lines we have to look at to determine
if we're missing a chip definition or if we need a board enable. Just
use grep on the log:
grep -v "parity violation"
To narrow it down further, try:
grep -v "id1 is normal flash content, id2 is normal flash content"
And of course you want to ignore the skipped probes:
grep -v "skipped"
The remaining lines are worth examining, and if those look bogus as
well, you can bet that we just need a board enable.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r970 | hailfinger | 2010-03-23 00:43:51 +0100 (Tue, 23 Mar 2010) | 16 lines

Reduce message severity level for skipped chips.

Old verbose log excerpt:
Probing for Atmel AT25DF021, 256 KB: skipped. Host bus type Parallel and
chip bus type SPI are incompatible.

New verbose log excerpt:
Probing for Atmel AT25DF021, 256 KB: skipped.

This makes logs more readable and manageable. If someone really
desperately wants all the bus debugging stuff, he/she can switch to SPEW
mode instead of VERBOSE mode.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-By: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r969 | snelson | 2010-03-22 22:48:51 +0100 (Mon, 22 Mar 2010) | 6 lines

Clang complains loudly when there are duplicate printlock_sst_fwhub, gcc ignores them. Ack via IRC.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r968 | hailfinger | 2010-03-22 13:29:45 +0100 (Mon, 22 Mar 2010) | 13 lines

Idwer Vollering reported problems with the current libpci check on
FreeBSD 8.0-RELEASE i386
This is caused by a strict linker. Parsing linker error messages is an
exercise in futility, and library detection with
$CC --print-file-name
is totally useless for libraries outside the standard hardcoded builtin
gcc search path (probably the same for other compilers as well).

Look for libpciutils instead of libpci on NetBSD during the check.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Idwer Vollering <vidwer@gmail.com>

------------------------------------------------------------------------
r967 | snelson | 2010-03-22 08:03:26 +0100 (Mon, 22 Mar 2010) | 5 lines

in unlock_28f004s5, variable 'i' needs to be int...
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Sean Nelson <audiohacked@gmail.com>


------------------------------------------------------------------------
r966 | snelson | 2010-03-22 07:57:02 +0100 (Mon, 22 Mar 2010) | 5 lines

fix a few typos from the last commit.
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Sean Nelson <audiohacked@gmail.com>


------------------------------------------------------------------------
r965 | snelson | 2010-03-22 05:39:31 +0100 (Mon, 22 Mar 2010) | 10 lines

To access/read the lock bits, we use the same mode to read the chip id.

This patch looks into the write situation for the Intel 28F001BX-{B,T}. Looks like they're just a 82802ab page write.

Unlock_28f004s5 has been changed to read all the lock bits and if at least one of the block lock bits are set, clear them all. If the master lock bit is set, we can't do anything about it, so we return.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger<c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r964 | hailfinger | 2010-03-22 04:30:58 +0100 (Mon, 22 Mar 2010) | 4 lines

Multibyte SPI write for the Bus Pirate.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r963 | hailfinger | 2010-03-21 15:54:57 +0100 (Sun, 21 Mar 2010) | 6 lines

Add DOS cross-compilation support to the Makefile.
Add a README with build instructions.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Rudolf Marek <r.marek@assembler.cz>

------------------------------------------------------------------------
r962 | mkarcher | 2010-03-21 14:36:20 +0100 (Sun, 21 Mar 2010) | 4 lines

Adds board enable to Termtek TK-3370 thin client motherboard.

Signed-off-by: Daniel Brandt <dbr@mindglow.se>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r961 | snelson | 2010-03-20 16:15:36 +0100 (Sat, 20 Mar 2010) | 7 lines

unlock fixup

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>



------------------------------------------------------------------------
r960 | snelson | 2010-03-20 04:01:19 +0100 (Sat, 20 Mar 2010) | 7 lines

The Intel 28F001BX-T/B chips don't have block locks or mention of registers; chip is Old.
The Intel 28F004S5 mentions block locks which require a remapping registers.
Fixes problems brought up by carldani because of commit r948.
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Sean Nelson <audiohacked@gmail.com>


------------------------------------------------------------------------
r959 | snelson | 2010-03-20 00:01:34 +0100 (Sat, 20 Mar 2010) | 6 lines

Rebased Board Enable Patch: iBase MB899.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Sean Nelson <audiohacked@gmail.com>


------------------------------------------------------------------------
r958 | snelson | 2010-03-20 00:00:07 +0100 (Sat, 20 Mar 2010) | 8 lines

Rebased Board Enable Patch: Abit AN-M2.

Original patch by: Luc Verhaegen.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Sean Nelson <audiohacked@gmail.com>


------------------------------------------------------------------------
r957 | snelson | 2010-03-19 23:58:15 +0100 (Fri, 19 Mar 2010) | 11 lines

Reversed-engineered board enable for the ASUS A8N-LA.
Rebased.
IDs are ISA and SMBus.
Added dmi string to match 3 HP boards: Nagami, Nagami2, Nagami2L.

This could match any HP Nagami board. Needs testing.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Sean Nelson <audiohacked@gmail.com>


------------------------------------------------------------------------
r956 | snelson | 2010-03-19 23:55:48 +0100 (Fri, 19 Mar 2010) | 11 lines

Rebased Board Enable Patch: 2nd attempt to fix board detection on GA-MA74GM-S2H.

This board (GA-MA74GM-S2H) has the same list of pciids as the GA-MA78M-S2H,
so I narroved search conditions by populating corresponding board_pciid_enable
entry for GA-MA78M-S2H with DMI pattern.

Untested!

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r955 | snelson | 2010-03-19 23:52:00 +0100 (Fri, 19 Mar 2010) | 5 lines

Rebased Board Enable Patch: Asus P4B533-E
Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>


------------------------------------------------------------------------
r954 | snelson | 2010-03-19 23:49:09 +0100 (Fri, 19 Mar 2010) | 7 lines

Rebased Board Enable Patch: Factor out Via Apollo GPO setting
VT6X4 actually depended on this commit, blame snelson.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>


------------------------------------------------------------------------
r953 | snelson | 2010-03-19 23:39:24 +0100 (Fri, 19 Mar 2010) | 5 lines

Rebased Board Enable Patch: A8JM board_enable patch
Signed-off-by: James Lancaster <deathstalker@gmail.com>
Acked-by: Sean Nelson <audiohacked@gmail.com>


------------------------------------------------------------------------
r952 | snelson | 2010-03-19 23:37:29 +0100 (Fri, 19 Mar 2010) | 8 lines

Rebased Board Enable Patch: Abit KN8 Ultra

patch by Chris <zinx+flashrom@zenthought.org>

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Sean Nelson <audiohacked@gmail.com>


------------------------------------------------------------------------
r951 | snelson | 2010-03-19 23:35:21 +0100 (Fri, 19 Mar 2010) | 10 lines

Rebased Board Enable Patch: Intel SE440BX-2

This board has no subsystem IDs, but thankfully the DMI patch is in
now, which is a real life safer. There are *WAY* to many 440BX/PIIX4
boards out there to match this without DMI.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>


------------------------------------------------------------------------
r950 | snelson | 2010-03-19 23:30:49 +0100 (Fri, 19 Mar 2010) | 11 lines

Rebased Board Enable Patch: Abit VT6X4

This board has *no* usable IDs at all, neither DMI nor PCI
subsystem IDs. You have to force it using "-m abit:vt6x4"

Try 3: really correct polarity of the GPIO

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>


------------------------------------------------------------------------
r949 | snelson | 2010-03-19 23:26:44 +0100 (Fri, 19 Mar 2010) | 6 lines

Rebased Board Enable Patch: Add Asus A8N.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Sean Nelson <audiohacked@gmail.com>


------------------------------------------------------------------------
r948 | snelson | 2010-03-19 19:47:06 +0100 (Fri, 19 Mar 2010) | 18 lines

rename print_82802ab_status to print_status_82802ab
add unlock_82802ab
strip unlock code from erase_block_82802ab
rename erase_82802ab_block  to erase_block_80280ab
delete sharplhf00l04.o from Makefile
delete *_lhf00l04* from chipdrivers.h
add unlock_stm50flw0x0x
delete wait_stm50flw0x0x
delete write_page_stm50flw0x0x
convert erase_stm50flw0x0x to erase_chip_stm50flw0x0x
delete write_stm50flw0x0x
add unlock_82802ab to two Intel chips with TEST_BAD_WRITE
change the status of 82802AB, 82802AC, M50FW040, M50FW080 to TEST_OK_PR

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r947 | mkarcher | 2010-03-17 07:19:23 +0100 (Wed, 17 Mar 2010) | 7 lines

Add board enable for P4C800-E

lspci/flashrom/superiotool at
http://www.coreboot.org/pipermail/flashrom/2010-March/002579.html

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r946 | hailfinger | 2010-03-17 01:47:56 +0100 (Wed, 17 Mar 2010) | 10 lines

PCI device BARs of all types had only bits 1:0 cleared while reading the
address. That was correct for IO BARs, but failed to mask bit 3:2 for
MEM BARs, resulting in odd offsets for prefetchable MEM BARs and for
64-bit capable MEM BARs.
Mask the correct number of bits for all types of BARs and add some debug
printing about BAR type.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r945 | uwe | 2010-03-17 01:05:59 +0100 (Wed, 17 Mar 2010) | 11 lines

Mark a bunch of parallel chips I tested as TEST_OK_PRW.

All operations for these chips were tested on hardware. ERASE is not marked
as working yet, as there are multiple erase functions per chip and only one
was (successfully) tested. I'll redo the ERASE test when the respective
infrastructure in flashrom is there.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r944 | hailfinger | 2010-03-17 00:59:19 +0100 (Wed, 17 Mar 2010) | 6 lines

Add MS-DOS crosscompilation support to flashrom. Tested, works fine.
Part 1: Code changes.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r943 | snelson | 2010-03-16 04:09:10 +0100 (Tue, 16 Mar 2010) | 7 lines

convert _sst_fwhub functions to jedec
kill unused sst_fwhub.c functions
make unlock_* check if unlock was successful and only return 0 when fully successful
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r942 | snelson | 2010-03-16 02:00:50 +0100 (Tue, 16 Mar 2010) | 6 lines

remove function probe_28sf040
delete references to dead sharplhf00l04.c and sst29sf040.c functions from chipdrivers.h
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r941 | snelson | 2010-03-16 01:51:31 +0100 (Tue, 16 Mar 2010) | 6 lines

remove some copied functions (from 82802ab.c) and use the 82802ab equivalents
fix missing prototypes to _82802ab functions
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r940 | snelson | 2010-03-16 01:45:00 +0100 (Tue, 16 Mar 2010) | 5 lines

kill dead w39v080fa.c functions
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r939 | snelson | 2010-03-16 01:35:53 +0100 (Tue, 16 Mar 2010) | 5 lines

kill dead w39v040c.c functions
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r938 | snelson | 2010-03-16 01:32:30 +0100 (Tue, 16 Mar 2010) | 5 lines

kill dead pm49fl00x.c functions
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r937 | hailfinger | 2010-03-15 04:48:42 +0100 (Mon, 15 Mar 2010) | 16 lines

Add FEATURE_REGISTERMAP to
* Intel 82802AB, 82802AC
* Sharp LHF00L04
* SST SST49LF004C, SST49LF008C, SST49LF016C, SST49LF160C
* ST M50FLW040A, M50FLW040B, M50FLW080A, M50FLW080B, M50FW002, M50FW016
     M50FW040, M50FW080, M50LPW116

Make register mapping conditional on FEATURE_REGISTERMAP in 82802ab.c.
Replace probe_49lfxxxc with probe_82802ab.
Replace probe_28sf040 with probe_82802ab.
Replace probe_sst_fwhub with probe_jedec.
Add printlock_sst_fwhub to chips which used probe_sst_fwhub.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r936 | mkarcher | 2010-03-14 18:57:52 +0100 (Sun, 14 Mar 2010) | 6 lines

Skip DMI laptop check if DMI doesn't work

Also further removes dead code from dmi.c and adds a missing newline.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r935 | mkarcher | 2010-03-14 01:00:14 +0100 (Sun, 14 Mar 2010) | 7 lines

Enabling Gigabyte GA-MA69VM-S2

This board has a supported chipset and a supported bios, but it's
connected indirectly through IT8716 and not recognized.

Signed-off-by: Ra?\195?\186l Soriano <GatoLoko@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r934 | mkarcher | 2010-03-14 00:47:09 +0100 (Sun, 14 Mar 2010) | 8 lines

Fix EN29F002 Top/Bottom Boot Block

See http://www.coreboot.org/pipermail/flashrom/2010-March/002480.html
for effects of mixup: blockwise erase will fail, fallback to chip
erase works.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
------------------------------------------------------------------------
r933 | uwe | 2010-03-13 18:28:29 +0100 (Sat, 13 Mar 2010) | 12 lines

Various coding style and cosmetic changes (trivial).

 - Fix coding-style, whitespace, and indentation in a few places.

 - Consistently use the same spelling ("Super I/O") everywhere.

 - Make some flashrom stdout output look a bit nicer.
 
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r932 | mkarcher | 2010-03-13 15:47:48 +0100 (Sat, 13 Mar 2010) | 7 lines

Patch: Manpage: Move description of layout file into the right place

Move the description of the layout file out of the --chip option
into the --layout option.

Signed-off-by: Joerg Mayer <jmayer@loplof.de>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r931 | mkarcher | 2010-03-12 07:41:39 +0100 (Fri, 12 Mar 2010) | 4 lines

Tell users to probe/backup first

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r930 | mkarcher | 2010-03-12 00:04:16 +0100 (Fri, 12 Mar 2010) | 6 lines

Fix NULL pointer reference in board_flash_enable.

Was introduced in r926. Found by Henrik Kretzschmar <henne@nachtwindheim.de>.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Maciej Pijanka <maciej.pijanka@gmail.com>
------------------------------------------------------------------------
r929 | mkarcher | 2010-03-09 17:57:06 +0100 (Tue, 09 Mar 2010) | 7 lines

Add ASUS A7V8X-X write-enable.

I have an ASUS A7V8X-X, the BIOS programming requires a write-enable. It
has an IT8712F, just like the A7V600-X.

Signed-off-by: Russ Dill <Russ.Dill@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r928 | mkarcher | 2010-03-09 17:53:06 +0100 (Tue, 09 Mar 2010) | 6 lines

Mark PMC Pm49FL002 as tested.

This chip is on my ASUS A7V8X-X mainboard.

Signed-off-by: Russ Dill <Russ.Dill@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r927 | hailfinger | 2010-03-08 01:42:32 +0100 (Mon, 08 Mar 2010) | 21 lines

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.

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>

------------------------------------------------------------------------
r926 | mkarcher | 2010-03-07 23:29:28 +0100 (Sun, 07 Mar 2010) | 7 lines

Move untested board enable documentation to manpage

This also checks the testedness of boards in all cases, not just for
PCI/DMI detection.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r925 | mkarcher | 2010-03-07 17:52:59 +0100 (Sun, 07 Mar 2010) | 6 lines

Board enable for MS-7202 (K8N GM2-L)

Board enable code is untested, marked as such.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
------------------------------------------------------------------------
r924 | mkarcher | 2010-03-07 17:42:55 +0100 (Sun, 07 Mar 2010) | 6 lines

Board enable for Asus M2NBP-VM CSM

Board info: http://www.coreboot.org/pipermail/flashrom/2009-December/001373.html

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
------------------------------------------------------------------------
r923 | mkarcher | 2010-03-07 17:32:32 +0100 (Sun, 07 Mar 2010) | 10 lines

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

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
------------------------------------------------------------------------
r922 | mkarcher | 2010-03-07 13:11:08 +0100 (Sun, 07 Mar 2010) | 16 lines

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.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r921 | snelson | 2010-03-05 09:44:11 +0100 (Fri, 05 Mar 2010) | 9 lines

Add support for Eon EN29F010.
Tested by Russ Dill.
Checked against datasheet by Sean Nelson.
Datasheet: http://www.essi.com.tw/upfile/p2008929171446.pdf

Signed-off-by: Russ Dill <Russ.Dill@gmail.com>
Acked-by: Sean Nelson <audiohacked@gmail.com>


------------------------------------------------------------------------
r920 | mkarcher | 2010-03-03 17:15:12 +0100 (Wed, 03 Mar 2010) | 6 lines

Board enable for Abit IP35 Pro

This board is like the IP35. Just changed the IDs to match.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Timothy Lepre <Klavious@gmail.com>
------------------------------------------------------------------------
r919 | mkarcher | 2010-02-28 02:33:48 +0100 (Sun, 28 Feb 2010) | 12 lines

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.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
------------------------------------------------------------------------
r918 | mkarcher | 2010-02-27 19:35:54 +0100 (Sat, 27 Feb 2010) | 7 lines

Board enable for HP Vectra VL400

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>
------------------------------------------------------------------------
r917 | snelson | 2010-02-27 19:01:15 +0100 (Sat, 27 Feb 2010) | 9 lines

Since we have a unlock interface for chips, I think we can convert the remaining references to *_49fl00x. Now the only remaining and used function in pm49fl00x.c is unlock_49fl00x.

Added missing unlock to AMIC A49LF040A.
Added lock_49fl00x function; Trivial change.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r916 | mkarcher | 2010-02-26 10:51:20 +0100 (Fri, 26 Feb 2010) | 4 lines

Warn if running on laptops

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r915 | mkarcher | 2010-02-26 10:51:16 +0100 (Fri, 26 Feb 2010) | 4 lines

Factor out DMI string reading into subfunction

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r914 | snelson | 2010-02-26 06:48:29 +0100 (Fri, 26 Feb 2010) | 17 lines

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

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>



------------------------------------------------------------------------
r913 | mkarcher | 2010-02-25 12:38:23 +0100 (Thu, 25 Feb 2010) | 9 lines

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.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r912 | mkarcher | 2010-02-24 23:43:44 +0100 (Wed, 24 Feb 2010) | 7 lines

Remove unused short IDs

This also replaces the meaningless numbers in the DMI debug printout
with the parameter names.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r911 | mkarcher | 2010-02-24 01:04:40 +0100 (Wed, 24 Feb 2010) | 7 lines

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).

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
------------------------------------------------------------------------
r910 | mkarcher | 2010-02-24 01:00:21 +0100 (Wed, 24 Feb 2010) | 7 lines

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.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Luc Verhaegen <libv@skynet.be>
------------------------------------------------------------------------
r909 | snelson | 2010-02-22 16:52:57 +0100 (Mon, 22 Feb 2010) | 14 lines

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

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r908 | uwe | 2010-02-21 22:17:00 +0100 (Sun, 21 Feb 2010) | 9 lines

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

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r907 | snelson | 2010-02-19 01:52:10 +0100 (Fri, 19 Feb 2010) | 22 lines

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


Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>


------------------------------------------------------------------------
r906 | hailfinger | 2010-02-18 13:24:38 +0100 (Thu, 18 Feb 2010) | 9 lines

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

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r905 | mkarcher | 2010-02-16 01:49:50 +0100 (Tue, 16 Feb 2010) | 10 lines

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.

Signed-off-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r904 | hailfinger | 2010-02-14 02:20:28 +0100 (Sun, 14 Feb 2010) | 28 lines

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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r903 | hailfinger | 2010-02-14 02:00:36 +0100 (Sun, 14 Feb 2010) | 6 lines

Use uname -p instead of -m on NetBSD so we get the right
architecture library name.

Signed-off-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r902 | hailfinger | 2010-02-14 00:41:01 +0100 (Sun, 14 Feb 2010) | 29 lines

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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>

------------------------------------------------------------------------
r901 | hailfinger | 2010-02-13 20:22:11 +0100 (Sat, 13 Feb 2010) | 5 lines

Kill an erroneous .erase introduced in r900.

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>

------------------------------------------------------------------------
r900 | snelson | 2010-02-13 19:41:53 +0100 (Sat, 13 Feb 2010) | 5 lines

Adds support for the Intel E28F004S5 flash chip.
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r899 | hailfinger | 2010-02-12 20:37:25 +0100 (Fri, 12 Feb 2010) | 14 lines

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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r898 | hailfinger | 2010-02-12 20:35:25 +0100 (Fri, 12 Feb 2010) | 11 lines

Linking in support for the internal programmer doesn't make sense if you
only need hardware (ioport, memory) access.
Split internal.c into internal.c and hwaccess.c.

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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r897 | snelson | 2010-02-12 19:40:27 +0100 (Fri, 12 Feb 2010) | 6 lines

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.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: David Hendricks <dhendrix@google.com>


------------------------------------------------------------------------
r896 | mkarcher | 2010-02-12 06:44:18 +0100 (Fri, 12 Feb 2010) | 6 lines

Fix DMI match logic

This bug slipped in on changing back match-specific to match-any

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r895 | hailfinger | 2010-02-12 00:03:53 +0100 (Fri, 12 Feb 2010) | 12 lines

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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r894 | hailfinger | 2010-02-11 12:28:37 +0100 (Thu, 11 Feb 2010) | 31 lines

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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: David Hendricks <dhendrix@google.com>

------------------------------------------------------------------------
r893 | hailfinger | 2010-02-04 12:12:04 +0100 (Thu, 04 Feb 2010) | 8 lines

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.

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>

------------------------------------------------------------------------
r892 | mkarcher | 2010-02-04 11:58:50 +0100 (Thu, 04 Feb 2010) | 6 lines

Allow DMI supported board enables with subsystem ID zero.

This is needed for the Intel SE440BX-2 as well as the Asus P5A.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r891 | oxygene | 2010-02-04 09:29:18 +0100 (Thu, 04 Feb 2010) | 7 lines

Properly initialize USB device in dediprog driver.
That's necessary to use bulk transfers, and just the
right thing in any case.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r890 | uwe | 2010-02-04 03:40:16 +0100 (Thu, 04 Feb 2010) | 8 lines

Add a second set of PCI IDs for the Tekram P6Pro-A5 (trivial).

(Re-)tested on hardware, detection works OK.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r889 | hailfinger | 2010-02-02 12:09:03 +0100 (Tue, 02 Feb 2010) | 20 lines

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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Vincent Pelletier <plr.vincent@gmail.com>

------------------------------------------------------------------------
r888 | snelson | 2010-02-01 06:49:46 +0100 (Mon, 01 Feb 2010) | 6 lines

Adds support for ST M29W512B. Tested and works for me.

Signed-off-by: Jeffrey A. Kent <jakent@gmail.com>
Acked-by: Sean Nelson <audiohacked@gmail.com>


------------------------------------------------------------------------
r887 | uwe | 2010-01-31 21:13:06 +0100 (Sun, 31 Jan 2010) | 12 lines

Add the Tekram P6Pro-A5 board as supported (trivial).

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.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r886 | snelson | 2010-01-29 00:55:12 +0100 (Fri, 29 Jan 2010) | 32 lines

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

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>


------------------------------------------------------------------------
r885 | uwe | 2010-01-28 20:02:36 +0100 (Thu, 28 Jan 2010) | 16 lines

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.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>


------------------------------------------------------------------------
r884 | mkarcher | 2010-01-27 11:08:33 +0100 (Wed, 27 Jan 2010) | 9 lines

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.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Andrew Morgan <ziltro@ziltro.com>
------------------------------------------------------------------------
r883 | oxygene | 2010-01-26 21:58:40 +0100 (Tue, 26 Jan 2010) | 9 lines

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.


Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r882 | oxygene | 2010-01-25 23:55:33 +0100 (Mon, 25 Jan 2010) | 6 lines

Open binary files in binary mode. No change on UNIX (or Mac OS,
according to its documentation), but fixes operation on Windows.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r881 | uwe | 2010-01-23 16:15:19 +0100 (Sat, 23 Jan 2010) | 8 lines

Add support for the SST39SF512 chip.

All operations tested by me, works fine.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>


------------------------------------------------------------------------
r880 | stepan | 2010-01-22 11:49:33 +0100 (Fri, 22 Jan 2010) | 6 lines

backout unintentional chunk.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r879 | hailfinger | 2010-01-22 03:53:30 +0100 (Fri, 22 Jan 2010) | 8 lines

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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r878 | stepan | 2010-01-21 21:26:30 +0100 (Thu, 21 Jan 2010) | 6 lines

This patch fixes the use of CFLAGS and CPPFLAGS in the flashrom makefile

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Sean Nelson <audiohacked@gmail.com> 


------------------------------------------------------------------------
r877 | snelson | 2010-01-20 21:55:53 +0100 (Wed, 20 Jan 2010) | 41 lines

Convert the following chips to block_erasers: 
SST28SF040A 
SST29EE010 
SST29LE010 
SST29EE020A 
SST29LE020 
SST39SF010A 
SST39SF020A 
SST39SF040 
SST39VF512 
SST39VF010 
SST39VF020 
SST39VF040 
SST39VF080 
SST49LF002A/B 
SST49LF003A/B 
SST49LF004C 
SST49LF008A 
SST49LF008C 
SST49LF016C 
SST49LF020 
SST49LF020A 
SST49LF040 
SST49LF040B 
SST49LF080A 
SST49LF160C 

Extend sst28sf040 to include chip and sector functions for block_eraser.
Extend sst49lfxxxc to include chip, sector, block erasers functions for block_erasers.
Extend sst_fwhub to include chip and sector functions for block_erasers.
Add copyrights to changed files.
Killed erase_sst_fwhub.
Killed erase_49lfxxxc.
NULL A/A mux mode full chip erasers.
Ignore block locks in erase/write.
Change comments from "PP mode" to "A/A mux mode"

Signed-off-by: Sean Nelson <audiohacked@gmail.com> 
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>


------------------------------------------------------------------------
r876 | libv | 2010-01-20 15:45:07 +0100 (Wed, 20 Jan 2010) | 6 lines

Boards: Remove it8705_rom_write_enable.

Should be functionally the same as it8705f_write_enable_2e.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
------------------------------------------------------------------------
r875 | libv | 2010-01-20 15:45:03 +0100 (Wed, 20 Jan 2010) | 6 lines

Boards: Add max_rom_decode_parallel entry to board enable table.

This is a quick fix for board specific parallel addressing limits.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Sean Nelson <audiohacked@gmail.com>
------------------------------------------------------------------------
r874 | mkarcher | 2010-01-20 15:14:11 +0100 (Wed, 20 Jan 2010) | 33 lines

Matching board via DMI

If a board is not uniquely identifiable by PCI device/subsystem IDs, a
string can be specified to be looked for (case-sensitive, substring or
anchored) for now in one of the following DMI items in addition to matching
the PCI IDs:
 - System Manufacturer
 - System Product Name
 - System Version
 - Baseboard Manufacturer
 - Baseboard Product Name
 - Baseboard Version

Strings are anchored re-like (^ at the beginning, $ at the end), but
there are no plans to support full regular expressions and matched to any
of the mentioned fields.

The match is only made if DMI info is available and the string matches.
If no DMI info is available and the PCI IDs match, a warning is printed
as the board can not be autodetected.

It's still open to discussion whether we add an DMI override switch to
specify a string that will definitely match, and whether this switch is
only used if no DMI is available or whether it overrides or augments DMI
data.

DMI data is currently read using dmidecode. This tool is available for
all major platforms except MacOS X. I heard that there also is a MacOS X
version of dmidecode, but didn't investigate that.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r873 | snelson | 2010-01-19 21:23:26 +0100 (Tue, 19 Jan 2010) | 5 lines

Fix SyncMOS S29C51004T, which has 512 uniform 1k sectors.
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Sean Nelson <audiohacked@gmail.com>


------------------------------------------------------------------------
r872 | snelson | 2010-01-19 17:39:19 +0100 (Tue, 19 Jan 2010) | 41 lines

Convert ST to block erasers:
ST M25P05-A
ST M25P05.RES
ST M25P10-A
ST M25P10.RES
ST M25P20
ST M25P40
ST M25P40-old
ST M25P80
ST M25P16
ST M25P32
ST M25P64
ST M25P128
ST M29F002B
ST M29F002T/NT
ST M29F040B
ST M29F400BT
ST M29W010B
ST M29W040B
ST M50FLW040A
ST M50FLW040B
ST M50FLW080A
ST M50FLW080B
ST M50FW002
ST M50FW016
ST M50FW040
ST M50FW080
ST M50LPW116

Add erase_chip_stm50flw0x0x to stm50flw0x0x.c
Add copyright to stm50flw0x0x.c
Fix block sizes and counts
Omit M50FLW0x0x mixed sector/block eraser
Convert the used 82802ab functions to their stm50flw0x0x equivalents
Fix incorrect sizes as found by Carl-Daniel.
Add back M50FLW0x0x mixed sector/block eraser sans function pointer.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r871 | snelson | 2010-01-19 17:08:51 +0100 (Tue, 19 Jan 2010) | 15 lines

Convert chips to block_erasers:

SyncMOS S29C31004T
SyncMOS S29C51001T
SyncMOS S29C51002T
SyncMOS S29C51004T
TI TMS29F002RT
TI TMS29F002RB

SyncMOS chips have Uniform sector; boot blocks on chips are made up of uniform sectors but have locking.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r870 | hailfinger | 2010-01-19 12:15:48 +0100 (Tue, 19 Jan 2010) | 21 lines

Dediprog SF100 support.

Reverse engineered from USB logs. I never touched that programmer nor
did I ever see the associated software.
Disabled by default until it is complete. The driver needs to be hooked
up to the SPI core before it will do anything besides init and
diagnostics.

I successfully reverse engineered all commands, but some are still
somewhat magic.
Logs from "flashrom -p dediprog -V" are appreciated.

Probe and read should work, erase/write is expected to explode.
The programmer will set voltage to 0 on exit.

Thanks a lot to Stefan Reinauer and Patrick Georgi for providing USB
logs and for testing the result.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r869 | hailfinger | 2010-01-19 07:42:46 +0100 (Tue, 19 Jan 2010) | 8 lines

Add eraseblock functions to self-check. It doesn't make sense to have
different layouts for the same function on one chip.
Keep going if an error is found, we want all errors to be reported in
one fell swoop.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r868 | snelson | 2010-01-19 04:24:55 +0100 (Tue, 19 Jan 2010) | 27 lines

Converted chips to block_erasers:
W_25X10
W_25X20
W_25X40
W_25X80
W_25X16
W_25X32
W_25X64
W_29C011
W_29C020C
W_29C040P
W_29EE011
W_39V040A
W_39V040B
W_39V040C
W_39V040FA
W_39V080A
W_49F002U
W_49V002A
W_49V002FA
W_39V080FA
W_39V080FA_DM

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r867 | snelson | 2010-01-19 04:23:07 +0100 (Tue, 19 Jan 2010) | 24 lines

Convert chips to block_erasers:
ST_M25PE10
ST_M25PE20
ST_M25PE40
ST_M25PE80
ST_M25PE16
PMC_25LV010
PMC_25LV016B
PMC_25LV020
PMC_25LV040
PMC_25LV080B
PMC_25LV512
PMC_39F010
PMC_49FL002
PMC_49FL004
SANYO_LE25FW203A
SPANSION_S25FL016A

Added spi_block_erase_d7 for PMC chips.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r866 | hailfinger | 2010-01-19 03:19:27 +0100 (Tue, 19 Jan 2010) | 10 lines

Add Intel NM10 chipset enable.
Public chipset documentation available at
http://www.intel.com/Assets/PDF/datasheet/322896.pdf

Tested on NM10-based customer reference board from Intel.

Signed-off-by: David Hendricks <dhendrix@google.com>
Acked-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r865 | snelson | 2010-01-18 09:24:02 +0100 (Mon, 18 Jan 2010) | 6 lines

Fix A25L40PU and A2540PT due to incorrect full-chip block size is incorrect.
Thanks to hailfinger's self-check-erase routine for catching this.
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r864 | hailfinger | 2010-01-18 09:14:43 +0100 (Mon, 18 Jan 2010) | 10 lines

Flashrom performs a self-check on every startup before it even starts to
initialize any programmer. That way, compiler errors and code errors
will be caught before they can do any harm.
This patch adds an eraseblock structure self-check.
It also modifies the self-check code to consistently run all checks even
if one check failed.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r863 | hailfinger | 2010-01-18 08:02:19 +0100 (Mon, 18 Jan 2010) | 6 lines

The write and erase column in the --list-supported-wiki output were
swapped. Thanks to Michael Karcher for noticing.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r862 | mkarcher | 2010-01-13 00:29:30 +0100 (Wed, 13 Jan 2010) | 7 lines

Support for Spansion S25FL008A

Tested with read/erase/write (including verify). I only wrote the image
that was read before - don't want to brick my laptop.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r861 | mkarcher | 2010-01-13 00:29:26 +0100 (Wed, 13 Jan 2010) | 7 lines

Don't use "byte" as identifier.

Some mingw declares a global identifier "byte", causing -Werror -Wshadow
to break compilation. This patch renames all identifiers called "byte".

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r860 | mkarcher | 2010-01-12 16:36:24 +0100 (Tue, 12 Jan 2010) | 11 lines

Enable -Wshadow, clean code for that

This is not just for fun. We hit a real bug on BSD with the outl macros.
The macro variable tmp collided with the tmp from outer scope.

second revision, now also taking care of inb/inw/inl. While that shadowing
did not introduce bugs (yet), of course it breaks the build on BSD when
-Wshadow is enabled.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Luc Verhaegen <libv@skynet.be>
------------------------------------------------------------------------
r859 | libv | 2010-01-10 16:01:08 +0100 (Sun, 10 Jan 2010) | 8 lines

Chipset: Fix sis5x0 register write verification.

Also remove separate sis 5596 routine: superio code will be handled
separately, which then turns this routine into the sis 5511 chipset
enable.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r858 | hailfinger | 2010-01-10 14:28:48 +0100 (Sun, 10 Jan 2010) | 11 lines

If neither internal (old default) nor dummy (safe default) programmer
are selected, we must pick a sensible default programmer. Since there is
no reason to prefer a particular external programmer, we abort
compilation if more than one of them is selected. If only one is
selected, it is clear that the user wants that one to become the
default.
This fixes single-programmer compilation.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r857 | hailfinger | 2010-01-10 02:59:50 +0100 (Sun, 10 Jan 2010) | 5 lines

Convert all messages in sb600spi.c to the new message infrastructure.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r856 | hailfinger | 2010-01-10 02:34:00 +0100 (Sun, 10 Jan 2010) | 7 lines

Change a few probe timings to TIMING_FIXME. They previously had
TIMING_IGNORED, but now they use probe_jedec directly or indirectly and
that function does not ignore probe timing.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r855 | snelson | 2010-01-10 02:09:58 +0100 (Sun, 10 Jan 2010) | 7 lines

Convert all messages in it87spi.c to the new message infrastructure.
Change one msg_pdbg to msg_pinfo, change 7 msg_pinfo to msg_pdbg.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r854 | snelson | 2010-01-10 02:08:37 +0100 (Sun, 10 Jan 2010) | 7 lines

Convert all messages in ft2232_spi.c to the new message infrastructure. 
Fix one pinfo message to be pdbg.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r853 | snelson | 2010-01-10 02:06:23 +0100 (Sun, 10 Jan 2010) | 7 lines

Convert all messages in serprog.c to the new message infrastructure.
Rename some msg_pdbg to msg_pspew.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r852 | snelson | 2010-01-10 00:58:37 +0100 (Sun, 10 Jan 2010) | 6 lines

Convert all messages in bitbang_spi.c to the new message infrastructure.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r851 | snelson | 2010-01-10 00:56:41 +0100 (Sun, 10 Jan 2010) | 6 lines

Convert all messages in buspirate_spi.c to the new message infrastructure.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r850 | snelson | 2010-01-10 00:54:05 +0100 (Sun, 10 Jan 2010) | 5 lines

Convert all messages in gfxnvidia.c to the new message infrastructure.
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r849 | snelson | 2010-01-10 00:50:27 +0100 (Sun, 10 Jan 2010) | 6 lines

Convert all messages in satasii.c to the new message infrastructure.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r848 | snelson | 2010-01-10 00:46:39 +0100 (Sun, 10 Jan 2010) | 4 lines

Convert all messages in serial.c to the new message infrastructure.
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r847 | snelson | 2010-01-10 00:34:45 +0100 (Sun, 10 Jan 2010) | 6 lines

Convert all messages in wbsio_spi.c to the new message infrastructure.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r846 | mkarcher | 2010-01-10 00:31:13 +0100 (Sun, 10 Jan 2010) | 10 lines

commit 845 is wrong, as I deleted a wrong line when I wanted to remove
debugging print code. This (hopefully obviously correct) patch fixes the
issue. As a previous version (before adding the debugging statement) was
already executed on the board, the missing OUTW was executed on the
testers machine on an earlier flashrom run.

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


------------------------------------------------------------------------
r845 | mkarcher | 2010-01-09 18:36:06 +0100 (Sat, 09 Jan 2010) | 6 lines

Enable flashing on MSI 651M-L.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sergey Lichack <shadowpilot34@gmail.com>


------------------------------------------------------------------------
r844 | hailfinger | 2010-01-09 15:18:01 +0100 (Sat, 09 Jan 2010) | 7 lines

Fix Makefile dependencies if FT2232SPI is not selected.
.features was always regenerated in that case, triggering whole-project
recompiles even if nothing changed.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r843 | snelson | 2010-01-09 06:30:14 +0100 (Sat, 09 Jan 2010) | 49 lines

Convert chips to block_erasers:
ASD AE49F2008
AMIC A25L40P(T/U)
AMIC A49LF040A
EMST F49B002UA
Eon EN25B05
Eon EN25B10
Eon EN25B20
Eon EN25B40
Eon EN25B80
Eon EN25B16
Eon EN25B32
Eon EN25B64
Eon EN25D16
Eon EN25F05
Eon EN25F10
Eon EN25F20
Eon EN25F40
Eon EN25F80
Eon EN25F16
Eon EN25F32
Intel 28F001BX-B
Intel 28F001BX-T
Intel 82802AB
Intel 82802AC
Macronix MX25L1635D
Macronix MX25L3235D
Macronix MX25L6405
Macronix MX25L12805
Macronix MX29F001B
Macronix MX29F001T
Macronix MX29LV040

Added new chips (according to datasheets):
Eon EN25B05T
Eon EN25B10T
Eon EN25B20T
Eon EN25B40T
Eon EN25B80T
Eon EN25B16T
Eon EN25B32T
Eon EN25B64T

Added minor Device IDs for Eon EN25Bxx{T,B} chips.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r842 | hailfinger | 2010-01-09 05:32:23 +0100 (Sat, 09 Jan 2010) | 12 lines

Convert dummyflasher to msg_* and make good use of msg_pspew.
Rule of thumb: Diagnostic programmer init messages are msg_pdbg, all
other debug stuff (except warnings, which should be pmsg_pinfo or
msg_perr) is msg_pspew.

This makes "flashrom -p dummy -V" output a whole lot more readable
(try it!). In case someone wants the full barfed output, it is
possible to specify -VV instead of -V.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r841 | hailfinger | 2010-01-09 04:22:31 +0100 (Sat, 09 Jan 2010) | 11 lines

The msg_* macros won't compile as is if you use more than one parameter
(i.e. have a format string and a variable).
There are two alternative styles: GNU or C99 variadic macros. While C99
has limitations compared to the GNU extensions, these limitations do not
affect our macros, so I decided to go with the standard way.

I adjusted whitespace a bit to have aligned values (cosmetic change).

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r840 | hailfinger | 2010-01-09 04:15:50 +0100 (Sat, 09 Jan 2010) | 9 lines

Use address mask in probe_jedec. 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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r839 | hailfinger | 2010-01-09 03:24:17 +0100 (Sat, 09 Jan 2010) | 16 lines

Use the register mapping feature bit.
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.

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>

------------------------------------------------------------------------
r838 | hailfinger | 2010-01-08 22:18:08 +0100 (Fri, 08 Jan 2010) | 5 lines

Add support for NetBSD.

Signed-off-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r837 | hailfinger | 2010-01-07 22:23:45 +0100 (Thu, 07 Jan 2010) | 12 lines

Fix Sharp LHF00L04.
- Add eraseblock definitions
- Use correct eraseblock sizes (the datasheet is a bit ambiguous)
- Use correct probe function
- Fill in probe timing

There is a lot more stuff left to clean up, but at least probe and erase
should work now.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r836 | snelson | 2010-01-07 21:21:58 +0100 (Thu, 07 Jan 2010) | 12 lines

Converting fprintf(stderr), printf, and printf_debug into a common
print interface for flashrom. It also changes so -VV will spit out
highly verbose messages for debugging. This is a minimal patch to
lessen impact a later patch will convert current printf messages to
the new interface.

Add file that was suppose to be committed with r835.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r835 | snelson | 2010-01-07 21:09:33 +0100 (Thu, 07 Jan 2010) | 9 lines

Converting fprintf(stderr), printf, and printf_debug into a common print
interface for flashrom. It also changes so -VV will spit out highly verbose
messages for debugging. This is a minimal patch to lessen impact a later patch
will convert current printf messages to the new interface.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r834 | hailfinger | 2010-01-07 04:32:17 +0100 (Thu, 07 Jan 2010) | 24 lines

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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audioahcked@gmail.com>

------------------------------------------------------------------------
r833 | hailfinger | 2010-01-07 04:24:05 +0100 (Thu, 07 Jan 2010) | 15 lines

Move the CLI related functions main() and cli_usage() to cli_classic.c
and rename them accordingly. For now, main() just calls cli_classic(),
but alternative frontends can be switched in main().
Annotate remaining help texts with CLI dependency inside flashrom.c with
a FIXME comment.

Now people can go and create different frontends and be happy. Please
note that any other frontend will have to sort of duplicate the probing
code in cli_classic.c. Refactoring that part of the code is possible,
but not easy because we still want to print instructive help messages
for users.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r832 | oxygene | 2010-01-06 23:14:39 +0100 (Wed, 06 Jan 2010) | 5 lines

buspiratespi support on mingw

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r831 | oxygene | 2010-01-06 20:09:40 +0100 (Wed, 06 Jan 2010) | 11 lines

- replace the hand written serial input flush routine with the termios one.
- serialport_discard_read isn't necessary anymore - it just wrapped
  sp_flush_incoming with no extra value.
- serialport_read and serialport_write would misbehave if read or write
  didn't process everything in one go.
- sp_flush_incoming should be #define'd out for FAKE_COMMUNICATION like
  serialport_discard_read was

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r830 | hailfinger | 2010-01-06 17:09:10 +0100 (Wed, 06 Jan 2010) | 7 lines

Move OS-dependent serial code from buspirate_spi.c to serial.c and
rename a few functions to make it obvious that they are generic and not
specific to the Bus Pirate.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>

------------------------------------------------------------------------
r829 | hailfinger | 2010-01-06 11:21:00 +0100 (Wed, 06 Jan 2010) | 9 lines

Some programmers (most notably FT2232SPI) use fallback_* and noop_*, but
those functions lived inside internal.c and were unavailable if no
PCI-based programmers were compiled in. Move those functions to the new
file programmer.c.
Thanks to Patrick Georgi for finding this.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>

------------------------------------------------------------------------
r828 | snelson | 2010-01-04 18:15:23 +0100 (Mon, 04 Jan 2010) | 12 lines

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.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r827 | stepan | 2010-01-04 00:50:28 +0100 (Mon, 04 Jan 2010) | 7 lines

Drop multiple forwards to man page and add a single one more prominently.
Drop usage information that is already mentioned in the man page.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r826 | mkarcher | 2010-01-03 16:09:17 +0100 (Sun, 03 Jan 2010) | 6 lines

Fix Intel FWH decode size

Fixes wrong detection of area decoded to the FWH interfaces.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r825 | stepan | 2010-01-03 15:40:30 +0100 (Sun, 03 Jan 2010) | 6 lines

drop known broken email addresses.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r824 | snelson | 2009-12-24 17:54:21 +0100 (Thu, 24 Dec 2009) | 9 lines

This patch shouldn't affect anything else in patchwork. It just splits
$(OBJS) in Makefile into separate lists for Programmer, Chip, and CLI
related files/objects. This should help later on figuring out where
files may go for a libflashrom library.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r823 | hailfinger | 2009-12-24 04:33:11 +0100 (Thu, 24 Dec 2009) | 13 lines

Only check for requested features in the Makefile.
libpci is no longer required to build flashrom and will not be checked
for if no PCI code is needed for the selected programmers.
libftdi is no longer checked for if FT2232 support is not selected.

With this patch, it is possible to build on pretty much every OS out
there (including Windows) without altering the Makefile.
Some gcc versions may need a CFLAGS override for a warning in
dummyflasher.c, though.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Idwer Vollering <vidwer@gmail.com>

------------------------------------------------------------------------
r822 | hailfinger | 2009-12-24 04:11:55 +0100 (Thu, 24 Dec 2009) | 9 lines

internal.c was always compiled in because it hosted the function
internal_delay(). Move that function to udelay.c and compile internal.c
only if really needed.
physmap.c is only needed if the programmer is internal or a PCI card.
Make its compilation conditional.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Idwer Vollering <vidwer@gmail.com>

------------------------------------------------------------------------
r821 | hailfinger | 2009-12-24 03:15:55 +0100 (Thu, 24 Dec 2009) | 11 lines

Factor out CLI code by moving generic stuff out of main(). Add a generic
programmer list output function to be used by alternative frontends.
The interface between main() and doit is a hack and should get a clean
design, but for now it serves the purpose of shortening main() by 120
lines.
The rest of main() needs to be refactored a bit more before moving
main() away.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r820 | hailfinger | 2009-12-23 22:29:18 +0100 (Wed, 23 Dec 2009) | 5 lines

Add VIA VT8233A identification, mark as tested.

Signed-off-by: Ra?\195?\186l Soriano <GatoLoko@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r819 | snelson | 2009-12-23 18:05:59 +0100 (Wed, 23 Dec 2009) | 22 lines

Convert the following chips to use struct eraseblock:
AMIC_A29002B
AMIC_A29002T
EN_29F002B
EN_29F002T
MBM29F004BC
MBM29F004TC
MBM29F400BC
MBM29F400TC
MX_25L3205
MX_25L6405
MX_29F002B
MX_29F002T


Add block erasers for m29f400bt and mx29f002.
Change programmer delays from 2 seconds to 10us in mx29f002 and am29f040b.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r818 | hailfinger | 2009-12-23 13:16:47 +0100 (Wed, 23 Dec 2009) | 7 lines

Add blockwise erase to all supported chips of the SST25 family:
SST25VF040.REMS, SST25VF040B, SST25VF040B.REMS, SST25VF080B,
SST25VF016B, SST25VF032B

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r817 | hailfinger | 2009-12-23 13:02:55 +0100 (Wed, 23 Dec 2009) | 12 lines

Convert the following chips to use struct eraseblock:
AT25DF021, AT25DF041A, AT25DF081, AT25DF161, AT25DF321, AT25DF321A,
AT25DF641, AT25F512B, AT25FS010, AT25FS040, AT26DF041, AT26DF081A,
AT26DF161, AT26DF161A, AT26F004, AT29C512, AT29C010A, AT29C020,
AT29C040A, AT49BV512, AT49F002(N), AT49F002(N)T

A possible future patch would to add spi_block_erase_d7 to spi.c as an 
alternate to spi_block_erase_20. Only some SPI chips support d7.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r816 | libv | 2009-12-23 04:01:36 +0100 (Wed, 23 Dec 2009) | 4 lines

Board: Add MSI K8N Neo4-F

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Fraser Hanson <fraser.hanson@gmail.com>
------------------------------------------------------------------------
r815 | libv | 2009-12-23 01:54:26 +0100 (Wed, 23 Dec 2009) | 20 lines

Chipset/Board: vt8237: Set All mem cycles to LPC in chipset enable.

Only done for VT8237R (possibly needed for VT8237 too), VT8235 does
not need this (even if the original bios does so: Asus A7V8X-MX SE,
MSI KT4V were verified).

This then opens a floodgate of cleanups in the board enables.
* EPIA SP board enable vanishes, taking EPIA CN match with it.
* Asus A7V8X-MX/Tyan S2498 board enable then equals
  w836xx_memw_enable_2e
* AOpen vKM400Am-S board enable then equals it8705_rom_write_enable
* Epia M board enable becomes via_vt823x_gpio15_raise
* Epia N board enable becomes via_vt823x_gpio9_raise
* Asus M2V-MX board enable becomes via_vt823x_gpio5_raise
* vt823x_gpio_set becomes via_vt823x_gpio_set, and now detects ISA
  bridge itself, in concordance with intel ich and nvidia mcp gpio.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r814 | hailfinger | 2009-12-23 00:54:10 +0100 (Wed, 23 Dec 2009) | 5 lines

Add a few FIXME comments to the generic SPI code.

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>

------------------------------------------------------------------------
r813 | hailfinger | 2009-12-23 00:42:04 +0100 (Wed, 23 Dec 2009) | 16 lines

SuperI/O detection now happens unconditionally and before the chipset
enable. We could run it after chipset enable, but it definitely has to
happen before board enable because the board enable usually accesses the
SuperI/O.
With this patch, it is possible to add a struct superio to the board
enable table for more accurate matching in case subsystem IDs are
ambiguous.
This patch focuses on the generic infrastructure aspect and on support
for IT8712F/IT8716F.

Thanks go to Adrian Glaubitz and Ward Vandewege for testing.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Adrian Glaubitz <glaubitz@physik.fu-berlin.de>

------------------------------------------------------------------------
r812 | hailfinger | 2009-12-22 23:15:33 +0100 (Tue, 22 Dec 2009) | 19 lines

Convert the following chips to use struct eraseblock:
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.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r811 | hailfinger | 2009-12-22 14:04:53 +0100 (Tue, 22 Dec 2009) | 7 lines

Clarify comment about how to enter chip erase functions in
struct block_eraser.
Reported by Sean Nelson.

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>

------------------------------------------------------------------------
r810 | libv | 2009-12-22 14:04:13 +0100 (Tue, 22 Dec 2009) | 9 lines

Boards: Fix several issues with nvidia_mcp_gpio_set.

- CK804, MCP04, MCP2 use the isa bridges..
- Newer nvidia mcp's do use the smbus controllers (Found by
  Michael Karcher).
- gpio line check breaks EPoX EP-8RDA3+, and should be wider.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
------------------------------------------------------------------------
r809 | libv | 2009-12-21 16:30:46 +0100 (Mon, 21 Dec 2009) | 4 lines

Chipset: Add support for Intel Poulsbo chipset.

Signed-off-by: Adam Jurkowski <adam.jurkowski@kontron.pl>
Acked-by: Luc Verhaegen <libv@skynet.be>
------------------------------------------------------------------------
r808 | libv | 2009-12-18 09:37:55 +0100 (Fri, 18 Dec 2009) | 7 lines

Boards: Add ECS K7S6A.

The nulled second set of subsystem ids is correct, and this seems
to be a unique match.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: spirals <spirals@eircom.net>
------------------------------------------------------------------------
r807 | hailfinger | 2009-12-17 17:20:26 +0100 (Thu, 17 Dec 2009) | 20 lines

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).

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>

------------------------------------------------------------------------
r806 | hailfinger | 2009-12-17 16:20:01 +0100 (Thu, 17 Dec 2009) | 15 lines

Use the maximum decode size infrastructure.
- Detect max FWH size for Intel
  631xESB/632xESB/3100/ICH6/ICH7/ICH8/ICH9/ICH10.
- Move IDSEL override before decode size checking for the chipsets
  listed above or flashrom will complain based on old values.
- Adjust supported flash buses for the chipsets listed above (none of
  them supports LPC or Parallel).
- Detect max parallel size for AMD/National Semiconductor CS5530.
- Adjust supported flash buses for CS5530/CS5530A.
- Set board-specific max decode size for Elitegroup K7VTA3.
- Set board-specific max decode size for Shuttle AK38N.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r805 | hailfinger | 2009-12-17 05:22:40 +0100 (Thu, 17 Dec 2009) | 8 lines

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.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r804 | hailfinger | 2009-12-17 05:21:12 +0100 (Thu, 17 Dec 2009) | 5 lines

Remove nonexisting functions from chipdrivers.h

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>

------------------------------------------------------------------------
r803 | libv | 2009-12-14 11:41:58 +0100 (Mon, 14 Dec 2009) | 15 lines

Boards: Formalize intel piix4 gpo setting.

The function intel_piix4_gpo_set includes proper gpo pin checking, and
gpo pin enables when necessary.

This is a leftover from soyo SY-6BA+III code that turned out to be
unnecessary, but still used for the epox ep-bx3 board enable which it
cleans up and clarifies.

Difference to old code:
* typical bios delay io port 0xEB now never gets touched.
* pci config byte 0xB0 was not altered before.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r802 | hailfinger | 2009-12-14 05:24:42 +0100 (Mon, 14 Dec 2009) | 6 lines

Use pci_fill_info() so device_class is valid.  This is needed on NetBSD
and probably other non-Linux platforms.

Signed-off-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r801 | hailfinger | 2009-12-14 05:11:12 +0100 (Mon, 14 Dec 2009) | 5 lines

Mark ASRock M3A790GXH/128M as supported, no board enable needed.

Signed-off-by: Zachary O Dillard <teathief@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r800 | hailfinger | 2009-12-14 05:04:18 +0100 (Mon, 14 Dec 2009) | 7 lines

Fix eraseblock walking and add a few more checks to make sure such bugs
get caught in the future. I found this bug during a code review.
A consistency check for eraseblock definitions has been merged as well.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r799 | hailfinger | 2009-12-14 04:32:24 +0100 (Mon, 14 Dec 2009) | 14 lines

Split hardware access, OS abstraction and chip drivers out of flash.h to
get a better overview of what belongs where.

This patch is only the first step, but it hopefully will make working
with the code and especially porting to new platforms easier.

Subsequent patches should move #includes for the newly created files
hwaccess.h and chipdrivers.h from flash.h to the files which need them.
Programmers should live in a separate header file as well.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
Tested-by: Idwer Vollering <vidwer@gmail.com>

------------------------------------------------------------------------
r798 | hailfinger | 2009-12-14 04:07:31 +0100 (Mon, 14 Dec 2009) | 6 lines

Don't print out supported PCI devices header if all following lines are
excluded from build.

Signed-off-by: Adam Jurkowski <adam.jurkowski@kontron.pl>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r797 | hailfinger | 2009-12-13 23:28:00 +0100 (Sun, 13 Dec 2009) | 25 lines

Internal (onboard) programming was the only feature which could not be
disabled.
Make various pieces of code conditional on support for internal
programming. Code shared between PCI device programmers and onboard
programming is now conditional as well.

It is now possible to build only with dummy support:
make CONFIG_INTERNAL=no CONFIG_NIC3COM=no CONFIG_SATASII=no
CONFIG_DRKAISER=no CONFIG_SERPROG=no CONFIG_FT2232SPI=no

This allows building for a specific use case only, and it also
facilitates porting to a new architecture because it is possible to
focus on highlevel code only.

Note: Either internal or dummy programmer needs to be compiled in due to
the current behaviour of always picking a default programmer if -p is
not specified. Picking an arbitrary external programmer as default  
wouldn't make sense.

Build and runtime tested in all 1024 possible build combinations. The
only failures are by design as mentioned above.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r796 | libv | 2009-12-09 12:39:02 +0100 (Wed, 09 Dec 2009) | 33 lines

Boards: Tighten up ID match list.

Tighten up board id match table in preparation of upcoming matching
changes.

Some boards are deliberately broken so that we will receive reports
or can remove support later (for instance, for agami aruma, which,
probably is no longer available in the wild).

* Acorp 6A815EPD: make autodetectable.
* Agami Aruma: remove bogus subsystem ids. Due to lacking secondary
  main id, this match will break soon.
* GIGABYTE GA-2761GXDK: Add secondary main id. Subsystem ids are not
  possible as they are all copies of the main ids. Will still require
  -m.
* GIGABYTE GA-M57SLI-S4: add full set of subsystem ids. Will keep
  match name for coreboot name matching.
* GIGABYTE GA-M61P-S3: Add secondary main id. Remove name match.
  Probably has good subsystem ids, but no info was found. So
  deliberately broken match.
* GIGABYTE GA-MA790FX-DQ6: pointless name match.
* IBM x3455: add full ids, remove name match.
* Kontron 986LCD-M: remove full id match as it is bogus. Kontron is
  an embedded vendor and does not bother with subsystem ids, so
  make this board name match only.
* MSI MS-6590 (KT4 Ultra): remove name match.
* MSI MS-7135 (K8N Neo3): add full id set, keep name match for
  coreboot.
* VIA EPIA-N/NL: remove name match.
* VIA PC3500G: remove name match.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Sean Nelson <audiohacked@gmail.com>
------------------------------------------------------------------------
r795 | libv | 2009-12-09 08:53:01 +0100 (Wed, 09 Dec 2009) | 6 lines

Boards: Add Asus M2V-MX.

Expands via vt823x gpio support to also accept gpio5.

Signed-off-by: David Bartley <dtbartle@csclub.uwaterloo.ca>
Acked-by: Luc Verhaegen <libv@skynet.be>
------------------------------------------------------------------------
r794 | libv | 2009-12-09 08:43:13 +0100 (Wed, 09 Dec 2009) | 10 lines

Chipset: remove sis630 chipset enable for sis540.

SiS630 chipset enable is equal to sis540 plus superio "poking".

Superio poking equals IT8705F flash write enable, which is currently
dealt with on a board by board basis in board_enable.c. Not all
630 and newer based boards come with it8705/sis950 superios.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Sean Nelson <audiohacked@gmail.com>
------------------------------------------------------------------------
r793 | uwe | 2009-12-08 18:26:24 +0100 (Tue, 08 Dec 2009) | 6 lines

Intel PIIX* chipsets only support parallel flash (no LPC/FWH/SPI).

Signed-off-by: Maciej Pijanka <maciej.pijanka@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r792 | libv | 2009-12-03 13:25:34 +0100 (Thu, 03 Dec 2009) | 7 lines

Boards: Add general nVidia MCP gpio routine.

Turns out that the AMD 8111 datasheet describes this bit of the MCP
perfectly.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r791 | uwe | 2009-12-01 13:55:18 +0100 (Tue, 01 Dec 2009) | 15 lines

Mark the following boards as OK (no board-enable needed):

 - AsRock K8S8X (reported by Adrian Glaubitz <adrian.glaubitz@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2009-November/000937.html

 - ASUS K8V-X SE (reported by Adrian Glaubitz <adrian.glaubitz@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2009-November/000965.html

 - DFI Blood-Iron P35 T2RL (reported by Erno Vaurio <ernovaur@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2009-November/001059.html

Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r790 | libv | 2009-11-29 02:19:25 +0100 (Sun, 29 Nov 2009) | 11 lines

Board enable for Shuttle AK31.

All AK31 versions, 1.x, 2.x and 3.x are supported by this board enable.
Sadly this board can not be autodetected.

Re-uses the epox ep 8k5a2 board enable, which now lost its check for
the VT8235 ISA bridge and got renamed to w836xx_memw_enable_2e.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Mateusz Murawski <matowy@tlen.pl>
------------------------------------------------------------------------
r789 | libv | 2009-11-28 22:12:58 +0100 (Sat, 28 Nov 2009) | 7 lines

Boards: Fix up MSI KT4V board enable.

* Add autodetection and remove match strings.
* Make use of vt823x_set_all_writes_to_lpc.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Sean Nelson <audiohacked@gmail.com>
------------------------------------------------------------------------
r788 | libv | 2009-11-28 19:26:21 +0100 (Sat, 28 Nov 2009) | 4 lines

Boards: Add Asus P4B266LM (Sony Vaio PCV-RX650).

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Allan Bjorklund <abjork@speakeasy.net>
------------------------------------------------------------------------
r787 | libv | 2009-11-28 19:16:31 +0100 (Sat, 28 Nov 2009) | 4 lines

Boards: Add board match for Asrock P4i65GV.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Idwer Vollering <vidwer@gmail.com>
------------------------------------------------------------------------
r786 | libv | 2009-11-28 19:07:51 +0100 (Sat, 28 Nov 2009) | 7 lines

Boards: provide enormous intel_ich_gpio_set function.

This code sets gpio lines on random intel ichs. Detects all currently
known intel ICHs, checks gpio lines, and then sets them accordingly.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Idwer Vollering <vidwer@gmail.com>
------------------------------------------------------------------------
r785 | hailfinger | 2009-11-27 18:49:42 +0100 (Fri, 27 Nov 2009) | 31 lines

Use common jedec functionality where appropriate. 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.

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>

------------------------------------------------------------------------
r784 | hailfinger | 2009-11-26 17:51:39 +0100 (Thu, 26 Nov 2009) | 12 lines

Add support for Intel 3400 series / 5 series chipset.
Found in Intel document 322170 (Intel 5 Series Chipset and Intel 3400
Series Chipset Specification Update).
According to http://pciids.sourceforge.net/ we probably should match all
IDs from 0x3b00-0x3b1f, but so far I didn't find an Intel doc saying the
same.
If anybody has contacts at Intel and can check, I'd be happy to add the
rest of the IDs.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r783 | hailfinger | 2009-11-26 15:50:52 +0100 (Thu, 26 Nov 2009) | 28 lines

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.

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>

------------------------------------------------------------------------
r782 | hailfinger | 2009-11-26 12:05:01 +0100 (Thu, 26 Nov 2009) | 9 lines

Add entries of W25x32 and W25x64. The model_ids are already in the
header.

W25x32 has been successfully probed.
W25x64 is not available, the entry is based on the datasheet.

Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r781 | hailfinger | 2009-11-25 18:05:52 +0100 (Wed, 25 Nov 2009) | 5 lines

Clarify a comment about verification routine usage.

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>

------------------------------------------------------------------------
r780 | hailfinger | 2009-11-25 17:58:17 +0100 (Wed, 25 Nov 2009) | 10 lines

Reduce realloc syscall overhead for FT2232 and bitbang.

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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r779 | hailfinger | 2009-11-25 17:41:50 +0100 (Wed, 25 Nov 2009) | 7 lines

jedec.c was missing error handling in a few cases. Fix.
jedec.c error handling used double negation in too many places for no
good reason. Clean up.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r778 | hailfinger | 2009-11-25 16:04:28 +0100 (Wed, 25 Nov 2009) | 7 lines

Optimized write_sst_fwhub for safety and speed:
Now uses block erase instead of chip erase. Also introduced auto skip
feature.

Signed-off-by: Adam Jurkowski <adam.jurkowski@kontron.pl>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r777 | hailfinger | 2009-11-25 03:07:30 +0100 (Wed, 25 Nov 2009) | 9 lines

Kill hardcoded block erase on ICH SPI.
The existing code does not work for all SPI chips, and it just was a
band-aid to cope with locked down chipsets back in a time when there was
no eraseblock infrastructure.
Basically, this unbreaks a few SPI chips on ICH.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Maciej Pijanka <maciej.pijanka@gmail.com>

------------------------------------------------------------------------
r776 | hailfinger | 2009-11-24 19:27:10 +0100 (Tue, 24 Nov 2009) | 19 lines

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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
Tested-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r775 | hailfinger | 2009-11-24 03:11:08 +0100 (Tue, 24 Nov 2009) | 6 lines

Add Sanyo LF25FW203A support.
This chip is sometimes labeled as 25FW203T.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r774 | hailfinger | 2009-11-24 03:08:11 +0100 (Tue, 24 Nov 2009) | 5 lines

Add Generic SPI RDID detection for Sanyo chips.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r773 | hailfinger | 2009-11-24 01:23:33 +0100 (Tue, 24 Nov 2009) | 5 lines

Revert debug compilation which was committed in r772 by accident.

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>

------------------------------------------------------------------------
r772 | hailfinger | 2009-11-24 01:20:03 +0100 (Tue, 24 Nov 2009) | 16 lines

Add Bus Pirate SPI support to flashrom.

The code should work on Linux/*BSD/MacOSX and relies on the serial code
implementation in serial.c. Support for additional platforms (Windows)
will have to be added to serial.c for this to work. For tests without a
Bus Pirate (or with non-functional serial code) it is possible to
#define FAKE_COMMUNICATION in buspirate_spi.c.
Thanks to Sean Nelson for the SPI mode settings code. I tweaked it a bit
to make configuration from a commandline easier should anybody want that
feature.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
Tested-by: Sean Nelson <audiohacked@gmail.com>

------------------------------------------------------------------------
r771 | hailfinger | 2009-11-23 20:20:11 +0100 (Mon, 23 Nov 2009) | 10 lines

Move serial handling from serprog.c to serial.c.
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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r770 | hailfinger | 2009-11-23 13:55:31 +0100 (Mon, 23 Nov 2009) | 15 lines

Add the ability to generate test patterns for write testing. This will
be useful once we create a --test function for flashrom.

The test patterns make it easy to find skipped and duplicated bytes, are
human readable, and the first 8 of them have block numbers to detect
aliasing or wraparounds. Current size limit for aliasing detection
is 16 MByte, but since neither LPC nor FWH nor SPI chips exist with
bigger sizes, this is reasonably safe.

Detailed documentation is available as source code comments above the
new function generate_testpattern().

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Maciej Pijanka <maciej.pijanka@gmail.com>

------------------------------------------------------------------------
r769 | hailfinger | 2009-11-22 02:33:40 +0100 (Sun, 22 Nov 2009) | 17 lines

Pretty much everybody who used the FT2232 SPI driver in flashrom 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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Paul Fox <pgf@laptop.org>

------------------------------------------------------------------------
r768 | hailfinger | 2009-11-21 12:02:48 +0100 (Sat, 21 Nov 2009) | 9 lines

Bus Pirate support needs serial communication. 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).

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r767 | hailfinger | 2009-11-20 02:12:45 +0100 (Fri, 20 Nov 2009) | 11 lines

If a chip is not on the RDID generic vendor list nor on the REMS
specific ID list, flashrom will claim that no chip is there. Handle
these cases gracefully. flashrom will ignore generic matches if a
specific chip was found, so this will have no impact on supported chips,
but help a lot for a first quick analysis by the user or developer. The
only drawback is that unknown chips may be recognized multiple times
until they are added to flashchips.[ch].

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Marc Jones <marcj303@gmail.com>

------------------------------------------------------------------------
r766 | hailfinger | 2009-11-17 10:57:34 +0100 (Tue, 17 Nov 2009) | 12 lines

To prepare for libflashrom I wanted to make the main loop more readable
and more correct and factor out stuff which can be useful in
libflashrom.

- Factor out printing of supported devices to print.c.
- Adjust name of wiki printing function to fit the pattern.
- Abort if the user specified --verify and --noverify at the same time.
- Check for extra parameters which don't fit commandline syntax.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r765 | hailfinger | 2009-11-16 22:22:24 +0100 (Mon, 16 Nov 2009) | 7 lines

Fix incorrect comment about wiki printing in Makefile.

Spotted by Benjamin BELLEC <b.bellec@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>

------------------------------------------------------------------------
r764 | hailfinger | 2009-11-16 16:03:35 +0100 (Mon, 16 Nov 2009) | 9 lines

If a SPI command taking an address does fail, we want to know the
address for easier debugging.

Vincent wrote: This patch provided help to debug the partial write on
ICH in descriptor mode.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Vincent S. Cojot <openlook@cojot.name> 

------------------------------------------------------------------------
r763 | hailfinger | 2009-11-16 15:13:09 +0100 (Mon, 16 Nov 2009) | 9 lines

Add URLs for boards ASUS K8V, ASUS K8V SE Deluxe, Elitegroup K7S5A.
Add a note for ASUS M2N-E.
Change "iff" to "if". Most people don't understand what "iff" means and
the meaning of both words is close enough to hopefully give users the
right idea.

Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r762 | hailfinger | 2009-11-16 15:05:13 +0100 (Mon, 16 Nov 2009) | 13 lines

Retrieve the proper linker flags for libftdi via pkg-config and fall
back if pkg-config isn't available or if it doesn't know libftdi.

Fix $LIBS and $FEATURE_LIBS to honor dependency order.

The original patch is from J?\195?\182rg, it has been updated by Carl-Daniel to
work on the current tree and to have a fallback in case pkg-config is
not available or not working.

Signed-off-by: J?\195?\182rg Mayer <jmayer@loplof.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: J?\195?\182rg Mayer <jmayer@loplof.de>

------------------------------------------------------------------------
r761 | hailfinger | 2009-11-15 18:23:59 +0100 (Sun, 15 Nov 2009) | 5 lines

svn:ignore .libdeps

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>

------------------------------------------------------------------------
r760 | hailfinger | 2009-11-15 18:20:21 +0100 (Sun, 15 Nov 2009) | 10 lines

Mark Elitegroup K7S5A as supported.
Mark SiS 735 as supported.

Remove "SiS" from the model number to avoid printing it twice.

Reported by Adrian Glaubitz.

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>

------------------------------------------------------------------------
r759 | hailfinger | 2009-11-15 18:13:29 +0100 (Sun, 15 Nov 2009) | 18 lines

Add support for every single SiS chipset out there.
The two existing SiS chipset enables (compared to the 28 in this patch)
were refactored, and one of them was fixed.

A function to match PCI vendor/class combinations was added to generic
code.

Tested on the "Elitegroup K7S5A". Results are somewhat unexpected (some
PCI settings seem to be inaccessible, but it still works).

This is not based on any docs, but rather on detailed analysis
of existing opensource code for some of the chipsets.

Thanks to for Adrian Glaubitz testing.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Adrian Glaubitz <glaubitz@physik.fu-berlin.de>

------------------------------------------------------------------------
r758 | hailfinger | 2009-11-14 04:58:58 +0100 (Sat, 14 Nov 2009) | 9 lines

Mark "Asus K8V" as supported. Reported by
martin f krafft <madduck@madduck.net>

Mark "Asus K8V SE Deluxe" as supported. Reported by
Luke Dashjr <luke_coreboot@dashjr.org>

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>

------------------------------------------------------------------------
r757 | hailfinger | 2009-11-14 04:48:33 +0100 (Sat, 14 Nov 2009) | 11 lines

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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Luke Dashjr <luke_coreboot@dashjr.org>

------------------------------------------------------------------------
r756 | hailfinger | 2009-11-06 19:09:42 +0100 (Fri, 06 Nov 2009) | 5 lines

Fix incorrect comment in SST49LF004A/B description.

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>

------------------------------------------------------------------------
r755 | hailfinger | 2009-10-31 02:53:09 +0100 (Sat, 31 Oct 2009) | 30 lines

Add infrastructure to check and report to the user the maximum supported
decode size for chipsets and tested mainboards.

The rationale is to warn users when they, for example, try to flash
a 512KB parallel flash chip but their chipset only supports 256KB,
or they try to flash 512KB and the chipset _does_ theoretically
support 512KB but their special board doesn't wire all address lines
and thus supports only 256 KB ROM chips at maximum.

This has cost Uwe hours of debugging on some board already, until he
figured out what was going on. We should try warn our users where
possible about this.

The chipset and the chip may have more than one bus in common (e.g.
SB600 and Pm49* can both speak LPC+FWH) and on SB600/SB7x0/SB8x0 there
are different limits for LPC and FWH. The only way to tell the user
about the exact circumstances is to spew error messages per bus.

The code will issue a warning during probe (which does fail for some
chips if the size is too big) and abort before the first real
read/write/erase action. If no action is specified, the warning is
printed anyway.
That way, a user can find out why probe might not have worked, and will
be stopped before he/she gets incorrect results.

Add a bitcount function to the infrastructure.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r754 | hailfinger | 2009-10-30 22:12:39 +0100 (Fri, 30 Oct 2009) | 6 lines

Adjust a help text for external PCI programmers to the new parameter
scheme. Pointed out by Maciej Pijanka.

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>

------------------------------------------------------------------------
r753 | hailfinger | 2009-10-22 17:07:30 +0200 (Thu, 22 Oct 2009) | 12 lines

Since we don't have any debug level printing infrastructure yet, I
propose to kill the obnoxious debug message in ichspi.c which was added
to check for correct PREOP handling. We know the code works fine (after
getting a few reports over 100 MB long) and there's no point in keeping
it around anymore.
If there is any desire, we can reinstate it as print_spew or whatever
once the debug level infrastructure is merged, but at that point we
probably just are happy that the debug output isn't there anymore.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Luc Verhaegen <libv@skynet.be>

------------------------------------------------------------------------
r752 | libv | 2009-10-21 14:05:50 +0200 (Wed, 21 Oct 2009) | 13 lines

Board enable for Shuttle FN25 (SN25P).

Shuttle SFF PC is SN25P, board FN25, AMD socket 939 with an nForce4
chipset.

Config register 0x92 on the ISA bridge needs to be cleared for TBL#
to be raised. No information about individual bits of this register
is currently available.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Ulf Mehlig <ulf@ufpa.br>


------------------------------------------------------------------------
r751 | hailfinger | 2009-10-19 20:15:36 +0200 (Mon, 19 Oct 2009) | 5 lines

Remove confusing out-of-date comment.

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>

------------------------------------------------------------------------
r750 | uwe | 2009-10-06 22:25:48 +0200 (Tue, 06 Oct 2009) | 6 lines

Add missing NVIDIA PCI IDs to wiki output.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r749 | uwe | 2009-10-06 22:23:29 +0200 (Tue, 06 Oct 2009) | 14 lines

Mark the following boards as supported (no board-enable needed):

 - MSI MS-6153 (reported by Uwe Hermann <uwe@hermann-uwe.de>)
   Tested by me on hardware. The board decodes max. 256 KB.

 - MSI MS-6156 (reported by Uwe Hermann <uwe@hermann-uwe.de>)
   Tested by me on hardware. The board decodes max. 256 KB.

Also, fix Dell PowerEdge 1850 name and add some more board URLs.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r748 | uwe | 2009-10-06 15:00:00 +0200 (Tue, 06 Oct 2009) | 6 lines

Upon popular request, move board support tables to print.c.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r747 | libv | 2009-10-06 13:32:21 +0200 (Tue, 06 Oct 2009) | 7 lines

Mark NVIDIA Nforce4/MCP04 as tested.

Oops.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Luc Verhaegen <libv@skynet.be>

------------------------------------------------------------------------
r746 | libv | 2009-10-05 20:46:35 +0200 (Mon, 05 Oct 2009) | 11 lines

Board enable for EPoX EP-8RDA3+.

SocketA + nForce2 + MCP2.

Motherboard includes a second ethernet controller and an Agere
firewire controller with valid subsystem ids, so these are used for
matching the board.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Eddie Vanhove <moonraket@hotmail.com>

------------------------------------------------------------------------
r745 | libv | 2009-10-05 18:07:00 +0200 (Mon, 05 Oct 2009) | 12 lines

Board enable for ASUS P5ND2-SLI Deluxe.

This patch reorganises the board_ga_k8n_sli to create
nvidia_mcp_gpio_raise, a more general routine to set these bits.
Without docs, i can only assume that these memory area are gpio
lines.

Then it becomes easy to add support for this nForce4 SLI board.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Martin Szulecki <opensuse@sukimashita.com>

------------------------------------------------------------------------
r744 | libv | 2009-10-05 18:04:47 +0200 (Mon, 05 Oct 2009) | 8 lines

Chipset support for the nVidia nForce 4.

Add pciids for the new isa bridge, and hook it to the nforce2
chipset enable.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Martin Szulecki <opensuse@sukimashita.com>

------------------------------------------------------------------------
r743 | hailfinger | 2009-10-03 19:08:02 +0200 (Sat, 03 Oct 2009) | 13 lines

There is no need to tell people to install libz if flashrom doesn't need
libz. So far, the only case where libz is needed is when a library
(libpci) pulls in libz and even then it only happens if libpci is
available in a static version only and said static version has libz
requirements.

Check for libpci separately and don't require libz if it isn't needed.

Clarify the README.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r742 | uwe | 2009-10-01 20:40:02 +0200 (Thu, 01 Oct 2009) | 8 lines

Cosmetics and small coding style fixes (trivial).

Also, introduce BITMODE_BITBANG_SPI to eliminate a magic value.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r741 | hailfinger | 2009-10-01 16:51:25 +0200 (Thu, 01 Oct 2009) | 5 lines

Make bitbang_spi naming consistent.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r740 | uwe | 2009-10-01 16:11:43 +0200 (Thu, 01 Oct 2009) | 8 lines

Disable NVIDIA flashing support for now, erase/write is not properly
working, yet. This needs more testing and investigation (partly timing
related, it seems). Reads did work in multiple cases, though.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r739 | hailfinger | 2009-10-01 15:16:32 +0200 (Thu, 01 Oct 2009) | 5 lines

Introduce proper error checking for SPI programming.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r738 | hailfinger | 2009-10-01 15:15:01 +0200 (Thu, 01 Oct 2009) | 12 lines

Add comments about the meaning of block erase related struct flashchip
members.
Cosmetics: Place curly brackets on a common line.
Add MX25V512 as alias name to MX25L512.
Add MX25V8005 as alias name to MX25L8005.
Add erase block definitions for
MX25L2005, MX25L4005, MX25L8005, MX25L1605
and change their status to TEST_OK_PRW where applicable.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r737 | uwe | 2009-09-30 20:29:55 +0200 (Wed, 30 Sep 2009) | 19 lines

Add initial support for flashing some NVIDIA graphics cards.

The new option is '-p gfxnvidia', rest of the interface is as usual.

I tested a successful identify and read on a "RIVA TNT2 Model 64/Model 64 Pro"
card for now, erase and write did NOT work properly so far!

Please do not attempt to write/erase cards yet, unless you can recover!

In addition to the NVIDIA handling code it was required to call
programmer_shutdown() in a lot more places, otherwise the graphics card
will be disabled in the init function, but never enabled again as the
shutdown function is not called.
The shutdown handling may be changed to use atexit() later.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Luc Verhaegen <libv@skynet.be>


------------------------------------------------------------------------
r736 | hailfinger | 2009-09-28 15:15:16 +0200 (Mon, 28 Sep 2009) | 11 lines

This is the bitbanging SPI driver infrastructure.

If you want support for a particular piece of hardware, just fill in
a few functions in spi_bitbang_master_table. That's it.
On top of this, the RayeR SPI flasher should be supportable in ~20 LOC.

Tested, trace looks OK.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r735 | uwe | 2009-09-25 03:31:51 +0200 (Fri, 25 Sep 2009) | 6 lines

Enable drkaiser programmer support in wiki output (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r734 | uwe | 2009-09-25 03:22:42 +0200 (Fri, 25 Sep 2009) | 21 lines

Mark the following boards as OK:

 - ASUS M3A78-EM (reported by Christian Heinz <christian.ch.heinz@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2009-September/000629.html
 
 - MSI MS-7368 (K9AG Neo2-Digital) (reported by Joshua Roys <roysjosh@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2009-September/000632.html

 - GIGABYTE GA-MA770T-UD3P (reported by Kevin Sopp <baraclese@googlemail.com>)
   http://www.flashrom.org/pipermail/flashrom/2009-September/000529.html
   
 - Elitegroup P6VAP-A+
   Tested by Uwe Hermann <uwe@hermann-uwe.de> on hardware. Maximum supported
   chip size in this board is 256 KB.
   
Small changes in print.c were required to adjust for longer board names.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r733 | uwe | 2009-09-25 03:09:18 +0200 (Fri, 25 Sep 2009) | 8 lines

Mark the SST SST49LF003A/B as read-tested.

See http://www.coreboot.org/pipermail/coreboot/2009-July/050675.html.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r732 | uwe | 2009-09-25 03:05:06 +0200 (Fri, 25 Sep 2009) | 8 lines

Add chipset support for VIA VT82C596 by adding a PCI ID (trivial).

This is successfully tested by me on the Elitegroup P6VAP-A+ board.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r731 | hailfinger | 2009-09-24 00:01:33 +0200 (Thu, 24 Sep 2009) | 13 lines

Switch SST49LF004A/B to block erase, remove the hack which simulated
(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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Luc Verhaegen <libv@skynet.be>

------------------------------------------------------------------------
r730 | hailfinger | 2009-09-23 23:58:34 +0200 (Wed, 23 Sep 2009) | 6 lines

Change the status of the SST49LF020A to TEST_OK_PREW.
I tested it on the Wyse Winterm S50 see attached test results.

Signed-off-by: Nils Jacobs <njacobs8@hetnet.nl>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r729 | hailfinger | 2009-09-23 04:09:23 +0200 (Wed, 23 Sep 2009) | 10 lines

Enable flashrom on Wyse Winterm S50.

On the Wyse Winterm S50 lspci doesn`t show the cs5536 hostbridge and so 
flashrom doesn`t detect the cs5536.

This patch is adding the cs5536 isa id [1022:2090] for chip detect.

Signed-off-by: Nils Jacobs <njacobs8@hetnet.nl>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r728 | hailfinger | 2009-09-23 04:05:12 +0200 (Wed, 23 Sep 2009) | 6 lines

This enables flashing the Dell S1850 under Linux. 
This code has been tested. 

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>

------------------------------------------------------------------------
r727 | hailfinger | 2009-09-18 17:50:56 +0200 (Fri, 18 Sep 2009) | 14 lines

The current ICH SPI preop handling is a hack which spews lots of
warnings, but still yields correct results.
With the multicommand infrastructure I introduced in r645, it became
possible to integrate ICH SPI preopcodes cleanly into the flashrom
design.

The new code checks for every opcode in a multicommand array if it is a
preopcode. If yes, it checks if the next opcode is associated with that
preopcode and in that case it simply runs the opcode because the correct
preopcode will be run automatically before the opcode.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: FENG Yu Ning <fengyuning1984@gmail.com>

------------------------------------------------------------------------
r726 | uwe | 2009-09-18 15:38:14 +0200 (Fri, 18 Sep 2009) | 8 lines

Fix copy-paste errors by s/CONFIG_PRINT_WIKI/PRINT_WIKI_SUPPORT/.

Trivial, and build-tested.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r725 | hailfinger | 2009-09-16 14:19:03 +0200 (Wed, 16 Sep 2009) | 11 lines

Compile out wiki output on request and move wiki stuff into a separate
file.
This is useful for libflashrom (you don't need wiki output in a coreboot
payload).

Wiki output is now disabled by default. If you want to enable it, run
make CONFIG_PRINT_WIKI=yes

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r724 | hailfinger | 2009-09-16 12:09:21 +0200 (Wed, 16 Sep 2009) | 14 lines

Allow to exclude each of the external programmer drivers from being
compiled in.

Example make commandline if you want only internal programmers:
make CONFIG_FT2232SPI=no CONFIG_SERPROG=no CONFIG_NIC3COM=no
CONFIG_SATASII=no CONFIG_DRKAISER=no CONFIG_DUMMY=no

Of course, all of the CONFIG_* symbols can be mixed and matched as
needed. CONFIG_FT2232SPI is special because even if it is enabled, make
will check if the headers are available and skip it otherwise.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r723 | stepan | 2009-09-16 10:26:59 +0200 (Wed, 16 Sep 2009) | 7 lines

This patch cleans up flashrom so that it passes LLVM/clang's scan-build
without warnings.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>


------------------------------------------------------------------------
r722 | stepan | 2009-09-16 10:18:08 +0200 (Wed, 16 Sep 2009) | 8 lines

this patch fixes all 27 flashrom source code issues reported by
LLVM/clang's scan-build (r79326, new build on the way).

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>

------------------------------------------------------------------------
r721 | uwe | 2009-09-09 02:58:19 +0200 (Wed, 09 Sep 2009) | 6 lines

Mark Macronix MX29F001B as OK, tested by me on hardware.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r720 | uwe | 2009-09-09 02:55:13 +0200 (Wed, 09 Sep 2009) | 6 lines

Replace pseudonym in drkaiser.c with real name.

Signed-off-by: Joerg Fischer <turboj@gmx.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r719 | hailfinger | 2009-09-05 04:30:58 +0200 (Sat, 05 Sep 2009) | 66 lines

This is a patch which stores eraseblock sizes and corresponding block
erase functions in struct flashchip. I decided to fill in the info for a
few chips to illustrate how this works both for uniform and non-uniform
sector sizes.

struct eraseblock{
int size; /* Eraseblock size */
int count; /* Number of contiguous blocks with that size */
};

struct eraseblock doesn't correspond with a single erase block, but with
a group of contiguous erase blocks having the same size.
Given a (top boot block) flash chip with the following weird, but
real-life structure:

top
16384
8192
8192
32768
65536
65536
65536
65536
65536
65536
65536
bottom

we get the following encoding:
{65536,7},{32768,1},{8192,2},{16384,1}

Although the number of blocks is bigger than 4, the number of block
groups is only 4. If you ever add some flash chips with more than 4
contiguous block groups, the definition will not fit into the 4-member
array anymore and gcc will recognize that and error out. No undetected
overflow possible. In that case, you simply increase array size a bit.
For modern flash chips with uniform erase block size, you only need one
array member anyway.

Of course data types will need to be changed if you ever get flash chips
with more than 2^30 erase blocks, but even with the lowest known erase
granularity of 256 bytes, these flash chips will have to have a size of
a quarter Terabyte. I'm pretty confident we won't see such big EEPROMs
in the near future (or at least not attached in a way that makes
flashrom usable). For SPI chips, we even have a guaranteed safety factor
of 4096 over the maximum SPI chip size (which is 2^24). And if such a
big flash chip has uniform erase block size, you could even split it
among the 4 array members. If you change int count to unsigned int
count, the storable size doubles. So with a split and a slight change of
data type, the maximum ROM chip size is 2 Terabytes.

Since many chips have multiple block erase functions where the
eraseblock layout depends on the block erase function, this patch
couples the block erase functions with their eraseblock layouts.
struct block_eraser {
  struct eraseblock{
    unsigned int size; /* Eraseblock size */
    unsigned int count; /* Number of contiguous blocks with that size */
  } eraseblocks[NUM_ERASEREGIONS];
  int (*block_erase) (struct flashchip *flash, unsigned int blockaddr, unsigned int blocklen);
} block_erasers[NUM_ERASEFUNCTIONS];

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r718 | hailfinger | 2009-09-05 03:31:32 +0200 (Sat, 05 Sep 2009) | 6 lines

Update probe timings for dozens of flash chips.

Signed-off-by: Udu Ogah <putlinuxonit@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r717 | hailfinger | 2009-09-05 03:16:30 +0200 (Sat, 05 Sep 2009) | 22 lines

Quite a few probe functions in flashrom are copies of probe_jedec with
additional lock bit printing or other glue. Make them call probe_jedec
instead.

Use the correct reset sequence for 82802AB. Detailed explanation:
The reset sequence before ID reading was correct, so ID always
worked. But the reset sequence after ID reading was a copy-paste
leftover from probe_jedec and didn't have any effect. I dug up
flash_and_burn from the freebios-v1 tree and found out that 82802ab.c
was indeed a copy of jedec.c with lots of experimental unannotated #if 0
and #if 1.
About the wait_82802ab change:
Before the patch, wait_82802ab entered read status mode, switched to ID
mode, then tried an incorrect and unsupported JEDEC command to exit ID
mode. Nobody ever saw that this failed because all subsequent function
calls had the correct reset sequence at the beginning.
With the patch, wait_82802ab enters read status mode, then switches back
to read mode with the official reset command.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r716 | hailfinger | 2009-09-05 03:12:07 +0200 (Sat, 05 Sep 2009) | 6 lines

Not all systems have svnversion installed. Fall back to svn info if
svnversion fails.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r715 | hailfinger | 2009-09-05 03:10:23 +0200 (Sat, 05 Sep 2009) | 7 lines

Fix strict aliasing in serprog.
Initialize the sockaddr,sockaddr_in union directly instead of running
memset later.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r714 | stepan | 2009-09-04 15:57:07 +0200 (Fri, 04 Sep 2009) | 6 lines

fix for gcc 4.4 strict aliasing rules.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r713 | uwe | 2009-09-03 01:27:45 +0200 (Thu, 03 Sep 2009) | 6 lines

Add drkaiser.c which was accidentally omitted in the last commit.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r712 | uwe | 2009-09-03 01:00:46 +0200 (Thu, 03 Sep 2009) | 13 lines

Add support for parallel flash on Dr. Kaiser PC-Waechter PCI devices.

The vendor sold different designs under that name, the patch works with
the one that has an Actel FPGA as PCI-to-Flash bridge.

The Flash chip is a "Macronix MX29F001B" (128 KB, parallel) soldered
directly to the PCB.
Flash operations (PROBE, READ, ERASE, WRITE) work as expected.

Signed-off-by: TURBO J <turboj@gmx.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r711 | uwe | 2009-09-03 00:09:00 +0200 (Thu, 03 Sep 2009) | 14 lines

Standardize on using __func__ instead of __FUNCTION__.

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.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r709 | hailfinger | 2009-09-02 15:47:36 +0200 (Wed, 02 Sep 2009) | 9 lines

flashrom 0.9.1

Please refer to the release notes for a high-level overview of all the
amazing changes and added features since 0.9.0.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r708 | hailfinger | 2009-09-02 15:43:56 +0200 (Wed, 02 Sep 2009) | 8 lines

Don't abort if chipset init failed because the failing init may have
been a warning only.
Even a failing chipset init (maybe due to unknown chipset) could still
get us reasonable probe results or at least forced reads.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r707 | hailfinger | 2009-09-02 02:24:26 +0200 (Wed, 02 Sep 2009) | 6 lines

Move the Asus A7V600-X out of the unsupported list. This is a followup
to r705.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Luc Verhaegen <libv@skynet.be>

------------------------------------------------------------------------
r706 | hailfinger | 2009-09-02 00:13:42 +0200 (Wed, 02 Sep 2009) | 5 lines

Use correct name for SB700/SB710/SB750 instead of calling them SB700.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Luc Verhaegen <libv@skynet.be>

------------------------------------------------------------------------
r705 | libv | 2009-09-01 23:22:23 +0200 (Tue, 01 Sep 2009) | 8 lines

Board enable for Asus A7V600-X.

Raises GP32 on IT8712F, and comes with a more general routine to set
io lines on the IT8712F.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Udu Ogah <putlinuxonit@gmail.com>

------------------------------------------------------------------------
r704 | hailfinger | 2009-08-31 18:25:08 +0200 (Mon, 31 Aug 2009) | 10 lines

With this patch, make tarball and make export still work as expected,
but if you specify RELEASENAME=foo, then the directories and tarballs
are named flashrom-foo instead of flashrom-0.9.0-r703.
This makes release creation a lot easier. As an example, look at
creating the 0.9.1 tarball:
# make tarball RELEASENAME=0.9.1

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r703 | hailfinger | 2009-08-31 13:53:35 +0200 (Mon, 31 Aug 2009) | 7 lines

Update bad board list and remove boards where either the chipset is not
supported (not a board issue) or where we have no report in the
archives.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r702 | uwe | 2009-08-30 16:14:59 +0200 (Sun, 30 Aug 2009) | 30 lines

Board status updates.

Marked as OK:

 - ASUS A8V Deluxe (reported by Joachim Ernst <Joachim.Ernst@web.de>)
   http://www.flashrom.org/pipermail/flashrom/2009-August/000448.html
   Tested with r701.

 - ASUS P5L-MX (reported by Vasiliy Vylegzhanin <6vasia@gmail.com>)
   http://www.flashrom.org/pipermail/flashrom/2009-August/000446.html
   Tested with v0.9.0.

 - Abit Fatal1ty F-I90HD (reported by Joachim Ernst <joachim.ernst@web.de>)
   http://www.flashrom.org/pipermail/flashrom/2009-August/000435.html

 - Trigem Lomita (reported by Udu Ogah <putlinuxonit@gmail.com>)
   Tested with r695.

 - GIGABYTE GA-MA790GP-DS4H (reported by Ralph Loader <suckfish@ihug.co.nz>)
   http://www.flashrom.org/pipermail/flashrom/2009-August/000414.html
   http://www.flashrom.org/pipermail/flashrom/2009-August/000417.html

 - GIGABYTE GA-MA78GPM-DS2H (reported by
                             Erik Haugen Bakke <erik_hb_mlist@yahoo.com.au>)
   http://www.flashrom.org/pipermail/flashrom/2009-August/000329.html

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r701 | hailfinger | 2009-08-24 15:29:25 +0200 (Mon, 24 Aug 2009) | 5 lines

Update svn:ignore

Signed-off-by: Joerg Mayer <jmayer@loplof.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r700 | hailfinger | 2009-08-24 15:24:52 +0200 (Mon, 24 Aug 2009) | 5 lines

Update contact info.

Signed-off-by: Joerg Mayer <jmayer@loplof.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r699 | hailfinger | 2009-08-24 03:47:33 +0200 (Mon, 24 Aug 2009) | 6 lines

"3COM 3C90xB: PCI 10BASE-T (TPO)" (10b7:9004) works fine.
Reported by Mark Panajotovic <panajotovic.marko@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>

------------------------------------------------------------------------
r698 | hailfinger | 2009-08-24 03:42:24 +0200 (Mon, 24 Aug 2009) | 5 lines

Add support for MX29F001T and MX29F001B flash chips.

Signed-off-by: Mark Panajotovic <panajotovic.marko@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r697 | hailfinger | 2009-08-24 03:34:48 +0200 (Mon, 24 Aug 2009) | 6 lines

ASD AE29F2008 and Winbond W29C020C have the same ID. Reported by
Mark Panajotovic <panajotovic.marko@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>

------------------------------------------------------------------------
r696 | hailfinger | 2009-08-21 19:26:13 +0200 (Fri, 21 Aug 2009) | 10 lines

Anne Le Coq <annyvonne.le_coq@alcatel-lucent.fr> reported that flashrom
didn't recognize her ICH9 LPC controller on the Green City
Intel Customer Reference Board with ICH9 + Tylersburg Chipset.
According to
http://pci-ids.ucw.cz/read/PC/8086/2910 the ID 0x8086/0x2910 was used
for engineering samples. No intel doc mentions this ID at all.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Anne Le Coq <annyvonne.le_coq@alcatel-lucent.fr>

------------------------------------------------------------------------
r695 | uwe | 2009-08-20 20:45:18 +0200 (Thu, 20 Aug 2009) | 24 lines

Various board status updates (trivial).

Mark the following boards as OK (no board-enable needed):

 - Tyan S2466 (reported by Oliver Niesner <oli@servebbs.net>)
   http://www.flashrom.org/pipermail/flashrom/2009-August/000211.html

Mark the following boards as non-working for now:

 - ASRock K7VT4A+ (reported by Udu Ogah <putlinuxonit@gmail.com>)
   Chipset detect, but no chip.
 
 - ASUS M2N68 (reported by Udu Ogah <putlinuxonit@gmail.com>)
   Chipset detect, but no chip.
 
 - ASUS A7V600-X (reported by Udu Ogah <putlinuxonit@gmail.com>)
   Chipset and chip detected, writes don't work. Board-enable required.

Also, add some missing board URLs and fix incorrect board names.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r694 | hailfinger | 2009-08-19 17:19:18 +0200 (Wed, 19 Aug 2009) | 10 lines

Flashrom has the ability to use layout files with romentries, but this
feature was not adapted to the programmer infrastructure and had
undefined behaviour for flasher!=internal.
The romentry handling had an off-by-one error which caused all copies to
end up one byte short.
Fix these issues.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r693 | hailfinger | 2009-08-19 17:03:28 +0200 (Wed, 19 Aug 2009) | 16 lines

Current programmer parameter syntax is
-p programmer=parameter
Unfortunately, many parameters are of the form variable=val, so we get
commandlines like this:
flashrom -p it87spi=port=0x820
and this looks horrible.

Using : instead of = would make such parameters look better:
flashrom -p it87spi:port=0x820

As a side benefit, this patch mentions the programmer name in the error
message if it is unknown.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r692 | hailfinger | 2009-08-19 15:55:34 +0200 (Wed, 19 Aug 2009) | 16 lines

Disallow erase/write for known bad chips so people won't try without a
clear understanding. Allow override with --force.

If write/erase failed, warn the user to get help and not shutdown/reboot
the computer.

Warn that the result of a forced read is often garbage. Too many users
believed that a forced read meant that everything was fine.

Wait 1 second between erase and verify. This fixes a few reports where
verify directly after erase had unpleasant side effects like corrupting
flash or at least getting incorrect verify results.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r691 | hailfinger | 2009-08-19 15:27:58 +0200 (Wed, 19 Aug 2009) | 8 lines

If FT2232H SPI is not enabled, it should be compiled out completely. We
can't remove ft2232_spi.o from unconditional OBJS yet due to our
makefile structure (make features), but this patch adds #ifdefs around
all FT2232H code, so the net effect is the same.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r690 | hailfinger | 2009-08-19 12:46:23 +0200 (Wed, 19 Aug 2009) | 10 lines

Support rdmsr/wrmsr operations on FreeBSD.

So far, AMD Geode LX is the only user of this infrastructure. It needs
/dev/cpu0 from ports/sysutils on FreeBSD during runtime on Geode LX.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: <putlinuxonit@gmail.com>

------------------------------------------------------------------------
r689 | hailfinger | 2009-08-19 01:51:22 +0200 (Wed, 19 Aug 2009) | 5 lines

Add serprog documentation to the manpage.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r688 | hailfinger | 2009-08-19 01:50:14 +0200 (Wed, 19 Aug 2009) | 5 lines

Tidy up docs before release. Don't mention coreboot.org without context.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r686 | hailfinger | 2009-08-17 18:30:53 +0200 (Mon, 17 Aug 2009) | 5 lines

Fix compilation on Nexenta which is Ubuntu with a Solaris kernel.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r685 | hailfinger | 2009-08-14 01:23:37 +0200 (Fri, 14 Aug 2009) | 21 lines

Allow the user to override FWH IDSEL on ICH6 and later.
Usage:
flashrom -p internal=fwh_idsel=0

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

Log:
flashrom v0.9.0-r670
coreboot table found at 0xcf7f3c00.
Vendor ID: KONTRON, part ID: 986LCD-M
Found chipset "Intel ICH7/ICH7R", enabling flash write...
Setting IDSEL=0 for top 8 MBOK.
This chipset supports the following protocols: LPC,FWH.
Disabling flash write protection for board "Kontron 986LCD-M"... OK.
Calibrating delay loop... OK.
Found chip "SST SST49LF016C" (2048 KB, FWH) at physical address
0xffe00000.
No operations were specified.

Acked-by: Chris Kinney <cmkinne@sandia.gov>

------------------------------------------------------------------------
r684 | hailfinger | 2009-08-13 13:38:44 +0200 (Thu, 13 Aug 2009) | 8 lines

Generate the usage message by walking the list of available programmers.
This makes sure compiled out programmers are not listed.

Tested, usage output is identical to the hardcoded variant.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r683 | stepan | 2009-08-12 20:25:24 +0200 (Wed, 12 Aug 2009) | 6 lines

oops. MSR accesses in board specific code. I missed those.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r682 | libv | 2009-08-12 18:58:11 +0200 (Wed, 12 Aug 2009) | 10 lines

Board enable for Asus P4P800-E Deluxe.

Raises what seems to be gpio21.

Uses host controller and Promise Raid Controller for a unique match.

Signed-off-by:  Luc Verhaegen <libv@skynet.be>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Tested-by: Bojan Radakovic <crnibojan@gmail.com>

------------------------------------------------------------------------
r681 | hailfinger | 2009-08-12 18:17:41 +0200 (Wed, 12 Aug 2009) | 12 lines

Allow to compile out serprog completely. 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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r680 | hailfinger | 2009-08-12 16:34:35 +0200 (Wed, 12 Aug 2009) | 8 lines

Use programmer.name to match the --programmer parameter instead of
hardcoding the name of every single programmer in main().

-p dummyfoo won't be mistaken for -p dummy anymore.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r679 | hailfinger | 2009-08-12 15:32:56 +0200 (Wed, 12 Aug 2009) | 7 lines

Use a common parameter variable for all programmers. This allows us to
reduce #ifdef clauses a lot if we compile out some programmers
completely.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r678 | hailfinger | 2009-08-12 13:39:29 +0200 (Wed, 12 Aug 2009) | 12 lines

FT2232 and IT87 programmers used functions of the dummy programmer
instead of fallback functions. The dummy programmer is a "real"
programmer with possible side effects and its functions should not be
abused by other programmers. Make FT2232 and IT87 use official fallback
functions instead.
Create fallback_shutdown().
Create fallback_chip_writeb().
Convert the programmer #defines to an enum.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r677 | stepan | 2009-08-12 11:27:45 +0200 (Wed, 12 Aug 2009) | 4 lines

Fix up MSR handling in flashrom to support more OSes than Linux. 
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r676 | stepan | 2009-08-11 14:15:39 +0200 (Tue, 11 Aug 2009) | 6 lines

Make debug messages printf_debug(). 

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r675 | hailfinger | 2009-08-11 01:30:45 +0200 (Tue, 11 Aug 2009) | 8 lines

Add ICH6,ICH7,ICH8,ICH9,ICH10 FWH IDSEL settings and flash decode
settings to the debug output. This can help debug cases where the BIOS
does not set up a correct flash decode for the given flash size.
The Intel docs state that the decode applies to FWH and SPI flash.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Chris Kinney <cmkinne@sandia.gov>

------------------------------------------------------------------------
r674 | hailfinger | 2009-08-10 12:14:23 +0200 (Mon, 10 Aug 2009) | 15 lines

Add IDs for 25 AMD chips, 11 Hynix chips, 8 Sharp chips, and their
variants.
AM29DL400BB, AM29DL400BT, AM29DL800BB, AM29DL800BT, AM29F004BB
AM29F004BT, AM29F200BB, AM29F200BT, AM29F400BB, AM29F400BT
AM29F800BB, AM29F800BT, AM29LV002BB, AM29LV002BT, AM29LV004BB
AM29LV004BT, AM29LV008BB, AM29LV008BT, AM29LV080B, AM29LV200BB
AM29LV200BT, AM29LV400BB, AM29LV400BT, AM29LV800BB, AM29LV800BT
HY29F002, HY29F040A, HY29F080, HY29F400B, HY29F400T, HY29F800B
HY29F800T, HY29LV400B, HY29LV400T, HY29LV800B, HY29LV800T
LH28F008BJxxPB, LH28F008BJxxPT, LH28F008SA, LH28F008SC, LH28F800BVxxBTL
LH28F800BVxxBV, LH28F800BVxxTV, LHF00L02

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r673 | hailfinger | 2009-08-10 04:29:21 +0200 (Mon, 10 Aug 2009) | 8 lines

Some SPI chip drivers and the generic 1-byte SPI chip write functions
didn't include the automatic erase present in other chip drivers. Since
the majority is definitely auto-erase, change the remaining
explicit-erase cases to be auto-erase as well.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carlos Arnau Perez <cemede@gmail.com>

------------------------------------------------------------------------
r672 | hailfinger | 2009-08-09 23:50:24 +0200 (Sun, 09 Aug 2009) | 7 lines

Releasing IO permissions was done by hand everywhere. Use a proper
abstraction.
Kill unneeded #include statements.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r671 | hailfinger | 2009-08-09 14:44:08 +0200 (Sun, 09 Aug 2009) | 7 lines

Remove unnecessary #include files.
Serprog compilation is now controlled by a Makefile variable.
Replace munmap with physunmap where appropriate.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r670 | hailfinger | 2009-08-03 11:35:20 +0200 (Mon, 03 Aug 2009) | 5 lines

Fix SPI multicommand endless loop in default_spi_send_multicommand.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r669 | stepan | 2009-07-30 15:32:26 +0200 (Thu, 30 Jul 2009) | 7 lines

The project's new home is flashrom.org now. Change all occurences in the
source code and documentation accordingly.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r668 | stepan | 2009-07-30 15:30:17 +0200 (Thu, 30 Jul 2009) | 10 lines

Boards with coreboot have a cbtable containing vendor and board name.
flashrom tries to match these with board enable entries in its database.
If no such board enable entry exists because the board doesn't need one,
flashrom complains. Silence that complaint.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Slightly updated and
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r667 | hailfinger | 2009-07-24 15:59:27 +0200 (Fri, 24 Jul 2009) | 60 lines

Add IDs for 51 new flash chips:

AMIC A29400T
AMIC A29400U
AMIC A29800T
AMIC A29800U
AMIC A29L004T
AMIC A29L004U
AMIC A29L008T
AMIC A29L008U
AMIC A29L040
Macronix MX29F004B
Macronix MX29F004T
Macronix MX29F022T
Macronix MX29F080
Macronix MX29F800B
Macronix MX29F800T
Macronix MX29LV081
Spansion MBM29DL400BC
Spansion MBM29DL400TC
Spansion MBM29DL800BA
Spansion MBM29DL800TA
Spansion MBM29F002BC
Spansion MBM29F002TC
Spansion MBM29F040C
Spansion MBM29F080A
Spansion MBM29F200BC
Spansion MBM29F200TC
Spansion MBM29F800BA
Spansion MBM29F800TA
Spansion MBM29LV002BC
Spansion MBM29LV002TC
Spansion MBM29LV004BC
Spansion MBM29LV004TC
Spansion MBM29LV008BA
Spansion MBM29LV008TA
Spansion MBM29LV080A
Spansion MBM29LV200BC
Spansion MBM29LV200TC
Spansion MBM29LV400BC
Spansion MBM29LV400TC
Spansion MBM29LV800BA
Spansion MBM29LV800TA
SST 49LF030A
ST M29F080
ST M29F200BB
ST M29F200BT
ST M29F400BB
ST M29F800DB
ST M29F800DT
Winbond W39L020
Winbond W39L040
Winbond W49F020

These still need to be added to flashchips.c, but if we ever encounter
them in real life, the ID->name lookup will be a lot easier.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r666 | hailfinger | 2009-07-24 14:18:54 +0200 (Fri, 24 Jul 2009) | 5 lines

If writing failed, verifying is pointless. Abort instead.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Oliver Niesner <oli@rhce.servebbs.net>

------------------------------------------------------------------------
r665 | hailfinger | 2009-07-23 14:42:01 +0200 (Thu, 23 Jul 2009) | 5 lines

Improve flashchip comments to be more readable and precise.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Luc Verhaegen <libv@skynet.be>

------------------------------------------------------------------------
r664 | hailfinger | 2009-07-23 03:44:38 +0200 (Thu, 23 Jul 2009) | 6 lines

Fix erase for SST49LF020A. The chip supports multiple erase functions,
but the function we use has an eraseblock size of 4k.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r663 | hailfinger | 2009-07-23 03:42:56 +0200 (Thu, 23 Jul 2009) | 8 lines

Continue erase/write verification after the first error.
The first error is printed in detail and all subsequent errors are
listed in statistics. This allows users to check if there was just one
error or if the failure was widespread.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r662 | hailfinger | 2009-07-23 03:40:20 +0200 (Thu, 23 Jul 2009) | 9 lines

Add support for old ST M25P05/M25P10 chips which only respond to the RES
command and not the RDID command.

Unfortunately, either the datasheets are wrong or both chips have
exactly the same ID.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r661 | hailfinger | 2009-07-23 03:36:08 +0200 (Thu, 23 Jul 2009) | 26 lines

This is a workaround for a bug in SB600 and SB700. If we only send an
opcode and no additional data/address, the SPI controller will read one
byte too few from the chip. Basically, the last byte of the chip
response is discarded and will not end up in the FIFO. It is unclear if
the CS# line is set high too early as well.
That hardware bug is undocumented as of now, but I'm working with AMD to
add a detailed description of it to the errata.

Add loads of additional debugging to SB600/SB700 init.

Add explanatory comments for unintuitive code flow.

Thanks go to Uwe for testing quite a few iterations of the patch.

Kill the SB600 flash chip status register special case, which was a
somewhat misguided workaround for that hardware erratum.

Note for future added features in the SB600 SPI driver: It may be
possible to read up to 15 bytes of command response with overlapping
reads due to the ring buffer design of the FIFO if the command can be
repeated without ill effects. Same for skipping up to 7 bytes between
command and response.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r660 | hailfinger | 2009-07-23 03:33:43 +0200 (Thu, 23 Jul 2009) | 12 lines

Verbose probe output is split across multiple lines for some probe
functions. 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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r659 | hailfinger | 2009-07-22 22:13:00 +0200 (Wed, 22 Jul 2009) | 5 lines

Eliminate version string duplication.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r658 | hailfinger | 2009-07-22 22:09:28 +0200 (Wed, 22 Jul 2009) | 5 lines

Convert SPI write status register to multicommand infrastructure.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r657 | hailfinger | 2009-07-22 17:36:50 +0200 (Wed, 22 Jul 2009) | 12 lines

Replace most of the switch cases in the spi code with lookup on a struct
instead. This brings the SPI code in line with the generic programmer
infrastructure.

This patch is a reworked version of a patch by Jakob Bornecrantz.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Signed-off-by: Jakob Bornecrantz <wallbraker@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Jakob Bornecrantz <wallbraker@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r656 | hailfinger | 2009-07-21 15:02:59 +0200 (Tue, 21 Jul 2009) | 11 lines

Support for an external serial flasher protocol.
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.

Signed-off-by: Urja Rannikko <urjaman@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r655 | libv | 2009-07-21 03:44:45 +0200 (Tue, 21 Jul 2009) | 7 lines

Board enable for Aopen VKM400 AM-S.

This board is a VIA KM400 and VT8237 and IT8705F superio.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by:  Scott Johnson <scott@gnuveau.net>

------------------------------------------------------------------------
r654 | hailfinger | 2009-07-20 17:21:18 +0200 (Mon, 20 Jul 2009) | 10 lines

Reset SST49LF016C after erase to exit the read status register mode.
Without this, all reads after erase will return 0x80 instead of the real
memory contents.

Thanks to Michael Melcher for testing.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Michael Melcher <Michael.Melcher82@googlemail.com>

------------------------------------------------------------------------
r653 | hailfinger | 2009-07-14 12:26:56 +0200 (Tue, 14 Jul 2009) | 9 lines

Use a distinct return code for SPI commands with unsupported/invalid
length.
Some drivers support only a few combinations of read/write length and
return error otherwise. Having a distinct return code for this error
means we can handle it in upper layers.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r652 | libv | 2009-07-13 14:40:17 +0200 (Mon, 13 Jul 2009) | 10 lines

Board enable for Asus A7V8X.

GP51 is attached to both WP# and TBL#.

Made possible by the quick response of ITE when asked for information,
and the tenacious testing of Glenn Mueller.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Glenn Mueller <mechwarrior5@hotmail.com>

------------------------------------------------------------------------
r651 | hailfinger | 2009-07-12 14:06:18 +0200 (Sun, 12 Jul 2009) | 7 lines

Convert SPI byte program to use the multicommand infrastructure.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Tested it on Epia-m700 worked okay.
Acked-by: Jakob Bornecrantz <wallbraker@gmail.com>
Tested-by: Jakob Bornecrantz <wallbraker@gmail.com>

------------------------------------------------------------------------
r650 | hailfinger | 2009-07-12 00:26:52 +0200 (Sun, 12 Jul 2009) | 10 lines

Convert SPI block erase to use the multicommand infrastructure.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

Jakob writes:
Tested it on my EPIA-m700 and it worked nice. Also double checked that
one of the changed functions actually ran.
Acked-by: Jakob Bornecrantz <wallbraker@gmail.com>
Tested-by: Jakob Bornecrantz <wallbraker@gmail.com>

------------------------------------------------------------------------
r649 | uwe | 2009-07-12 00:17:28 +0200 (Sun, 12 Jul 2009) | 23 lines

Fix incorrect manpage (trivial).

The flashrom manpage currently says "-w, --write: Write file into flash
ROM (default when <file> is specified)". This is no longer true for recent
flashrom versions, which only write if you explicitly use the -w option.

Proof:

$ flashrom coreboot.rom
flashrom v0.9.0-r631
No coreboot table found.
Found chipset "Intel ICH7/ICH7R", enabling flash write... OK.
Found board "Kontron 986LCD-M", enabling flash write... OK.
Calibrating delay loop... OK.
Found chip "PMC Pm49FL004" (512 KB) at physical address 0xfff80000.
No operations were specified.

Thus, fix manpage accordingly.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r648 | hailfinger | 2009-07-11 21:39:11 +0200 (Sat, 11 Jul 2009) | 7 lines

Add Winbond W25X16.
Tested probing and reading only. The chip ID was already
in flashchips.h.

Signed-off-by: Hector Martin <hector@marcansoft.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r647 | hailfinger | 2009-07-11 21:28:36 +0200 (Sat, 11 Jul 2009) | 9 lines

Convert SPI chip erase to use the multicommand infrastructure.

Once the ICH/VIA SPI driver is converted to multicommand, a lot of hacks
can disappear.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Tested-by: Jakob Bornecrantz <wallbraker@gmail.com>
Acked-by: Jakob Bornecrantz <wallbraker@gmail.com>

------------------------------------------------------------------------
r646 | hailfinger | 2009-07-11 20:05:42 +0200 (Sat, 11 Jul 2009) | 10 lines

Add an optional flash port parameter for IT87* SPI controllers in
standalone programmer mode. If the parameter is set, the IT87* SPI
driver will set the I/O base port of the IT87* SPI controller interface
to the port specified in the parameter.
Usage:
flashrom -p it87spi=port=0x820

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r645 | hailfinger | 2009-07-10 23:08:55 +0200 (Fri, 10 Jul 2009) | 24 lines

Add SPI multicommand infrastructure.

Some SPI opcodes need to be sent in direct succession after each other
without any chip deselect happening in between. A prominent example is
WREN (Write Enable) directly before PP (Page Program). Intel calls the
first opcode in such a row "preopcode".

Right now, we ignore the direct succession requirement completely and it
works pretty well because most onboard SPI masters have a timing or
heuristics which make the problem disappear.
The FT2232 SPI flasher is different. Since it is an external flasher,
timing is very different to what we can expect from onboard flashers and
this leads to failure at slow speeds.

This patch allows any function to submit multiple SPI commands in a
stream to any flasher. Support in the individual flashers isn't
implemented yet, so there is one generic function which passes the each
command in the stream one-by-one to the command functions of the
selected SPI flash driver.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Jakob Bornecrantz <wallbraker@gmail.com>
Tested-by: Jakob Bornecrantz <wallbraker@gmail.com>

------------------------------------------------------------------------
r644 | hailfinger | 2009-07-10 22:19:48 +0200 (Fri, 10 Jul 2009) | 11 lines

Change tarball compression from gzip to bzip2.

Set the user and group of all files to root for tar versions which
support it. Add explanatory comments for supporting that feature with
other tar versions.

Use LC_ALL instead of LANG everywhere.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r643 | libv | 2009-07-08 16:50:36 +0200 (Wed, 08 Jul 2009) | 13 lines

W39V040B: Flag Erase/Write as bad.

Chip has now been properly tested in both my Jetway J7F5M and my EPIA-SP
(known good board). Erase and write fail. Mark these operations as bad
until i or someone else have time to fix this.

Reported by Arvid Brodin <arvidb@kth.se>.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

M    flashchips.c

------------------------------------------------------------------------
r642 | libv | 2009-07-07 00:58:46 +0200 (Tue, 07 Jul 2009) | 7 lines

Board enable for Abit IP35.

Raise GPIO 16 on ICH9R LPC Interface.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Richie Ward <RichieS@GMail.com>

------------------------------------------------------------------------
r641 | uwe | 2009-07-04 17:10:41 +0200 (Sat, 04 Jul 2009) | 6 lines

Add more URLs and board notes, fix a typo (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r640 | uwe | 2009-07-04 01:51:19 +0200 (Sat, 04 Jul 2009) | 12 lines

Some flashrom printing changes:
 
 - Also print URLs of boards with board-enables.
 
 - Mark known-bad operations for chips red in the wiki.
 
 - Clarifiy a wiki message a bit.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r639 | uwe | 2009-07-03 19:12:05 +0200 (Fri, 03 Jul 2009) | 37 lines

Mark the following boards as working:

 - VIA EPIA-M700 (reported by Jakob Bornecrantz <wallbraker@gmail.com>)
   http://www.coreboot.org/pipermail/coreboot/2009-July/050416.html

 - GIGABYTE GA-EX58-UD4P (reported by Warren Turkal <wt@penguintechs.org>)
   http://www.coreboot.org/pipermail/coreboot/2009-June/050199.html

Mark as non-working:

 - ASUS Eee PC 701 4G (reported by Uwe Hermann <uwe@hermann-uwe.de>)
   There seems to be some SPI flash translation layer, likey done by the
   embedded controller on the laptop (ENE KB3310).
   The BIOS chip in this Eee PC model is Winbond 25X40VSIG btw.
   More info: http://beta.ivancover.com/wiki/index.php/Eee_PC_Research

Mark this chip as tested:

 - ST M25P40 (reported by Jakob Bornecrantz <wallbraker@gmail.com>)
   http://www.coreboot.org/pipermail/coreboot/2009-July/050416.html

Other:

 - Make the "Albatron PM266A" board detection print "Albatron PM266A*" as this
   enable will actually work for other PM266A* boards according to libv.
   However, the code was actually tested on "Albatron PM266A Pro".

 - Add some more board URLs / notes.

 - s/BioStar/Biostar/ as per vendor website.

 - Fix typo in print.c: s/A7V8-MX SE/A7V8X-MX SE/.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r638 | hailfinger | 2009-07-01 02:02:23 +0200 (Wed, 01 Jul 2009) | 7 lines

ft2232_spi: Allow runtime selection of FT2232H vs. FT4232H and
interface A vs. B.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Tested-by: Jakob Bornecrantz <wallbraker@gmail.com>
Acked-by: Jakob Bornecrantz <wallbraker@gmail.com>

------------------------------------------------------------------------
r637 | hailfinger | 2009-06-30 14:41:00 +0200 (Tue, 30 Jun 2009) | 7 lines

Add changelog for make export and make tarball.

Thanks to Uwe for the suggestion.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r636 | uwe | 2009-06-29 01:26:37 +0200 (Mon, 29 Jun 2009) | 14 lines

Random minor flashrom fixes:

 - Properly escape '-' chars in manpage.
 
 - Fix typo in chipset_enable.c.

 - Drop useless 'return' in chip_readn().

 - Random other whitespace or cosmetic fixes.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r635 | uwe | 2009-06-28 23:47:57 +0200 (Sun, 28 Jun 2009) | 7 lines

Print the bus type(s) of both chipset and chip in the flashrom
output (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r634 | hailfinger | 2009-06-28 21:19:25 +0200 (Sun, 28 Jun 2009) | 6 lines

Fix all NONSPI bustypes in flashchips.c.
Also noted as a comment if an FWH/LPC chip supports A/A Mux mode.

Signed-off-by: Urja Rannikko <urjaman@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r633 | hailfinger | 2009-06-28 12:57:58 +0200 (Sun, 28 Jun 2009) | 10 lines

Handle programmer init errors and abort. If the programmer didn't
initialize correctly, it is pointless to continue.

Fix standalone IT87* SPI init to set flashbus to NONE if no IT87* SPI
communication is possible.
Print the I/O port detected by the IT87* SPI code.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ward Vandewege <ward@gnu.org>

------------------------------------------------------------------------
r632 | hailfinger | 2009-06-25 15:57:31 +0200 (Thu, 25 Jun 2009) | 11 lines

Change chip_readb in loop to use verify_range in
write_page_write_jedec (jedec.c).

Tested by Urja Rannikko with external flasher.
Tested by Uwe Hermann with onboard flash.

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>

------------------------------------------------------------------------
r631 | uwe | 2009-06-24 19:31:08 +0200 (Wed, 24 Jun 2009) | 10 lines

Always verify write operations automatically.

Should this be undesireable because of speed reasons, --noverify can be
used to suppress an auto-verify.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Harald Gutmann <harald.gutmann@gmx.net>


------------------------------------------------------------------------
r630 | hailfinger | 2009-06-24 10:28:39 +0200 (Wed, 24 Jun 2009) | 11 lines

Check result of all SPI erase functions.
Since block erase functions do not know the block length (it's not
specified in any standard), block erase functions now get an additional
parameter blocklen. This enables flashrom to verify the erase result for
block erase functions at correct boundaries.

Tested by Uwe on SB600.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r629 | hailfinger | 2009-06-24 10:20:45 +0200 (Wed, 24 Jun 2009) | 12 lines

Use correct abstraction for verify_range(). The new abstraction can
handle out-of-band chip communication protocols as well.
The old abstraction caused spurious false positives for erase on SPI and
spurious false negatives for verify on SPI.

Make verify_flash() use verify_range().

Tested by Uwe on SB600.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r628 | hailfinger | 2009-06-24 10:18:38 +0200 (Wed, 24 Jun 2009) | 6 lines

Remove duplicated [file] from usage help. A file is already specified
directly in conjunction for -r/-w/-v.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r627 | uwe | 2009-06-23 22:27:33 +0200 (Tue, 23 Jun 2009) | 12 lines

Mark the following boards as working OK:

 - ASUS P5KC (reported by Andrei Pavlov <pavlov.andrei@rambler.ru>)
 
 - GIGABYTE GA-EP35-DS3L (reported by Alexander Gordeev <lasaine@lvk.cs.msu.su>)
 
Add a few more URLs.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r626 | hailfinger | 2009-06-23 13:48:37 +0200 (Tue, 23 Jun 2009) | 6 lines

The makefile rules for %.o and flashrom.o are identical. Let %.o handle
flashrom.o as well.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Luc Verhaegen <libv@skynet.be>

------------------------------------------------------------------------
r625 | hailfinger | 2009-06-23 13:33:43 +0200 (Tue, 23 Jun 2009) | 11 lines

Initial commit of an external serial flasher protocol.
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.

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>

------------------------------------------------------------------------
r624 | stepan | 2009-06-23 12:44:36 +0200 (Tue, 23 Jun 2009) | 7 lines

There are some non-C99 compilers out there used to compile flashrom.
This fixes compilation for them.

Signed-off-by: Stephan Guilloux <stephan.guilloux@free.fr>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r623 | hailfinger | 2009-06-23 02:47:26 +0200 (Tue, 23 Jun 2009) | 7 lines

SB600 SPI: Kill unused variable.

Make a few local functions in sb600spi.c static.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Luc Verhaegen <libv@skynet.be>

------------------------------------------------------------------------
r622 | hailfinger | 2009-06-22 13:14:43 +0200 (Mon, 22 Jun 2009) | 7 lines

Mark MX25L6405 as PROBE supported.

Thanks to Michael Stapelberg for the report.

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>

------------------------------------------------------------------------
r621 | hailfinger | 2009-06-22 13:07:44 +0200 (Mon, 22 Jun 2009) | 7 lines

Mark the SST49LF003A as PROBE supported.

Thanks to Simon Brown for the report.

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>

------------------------------------------------------------------------
r620 | hailfinger | 2009-06-22 12:09:07 +0200 (Mon, 22 Jun 2009) | 7 lines

Mark ST M25P80 as completely supported.

Thanks to Harald Gutmann for testing.

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>

------------------------------------------------------------------------
r619 | hailfinger | 2009-06-22 12:06:28 +0200 (Mon, 22 Jun 2009) | 8 lines

Eon EN25F40: Probe is tested.

Thanks to Wangji for testing and pointing out that EN25* chips were
unsupported, which was handled in r580 and r592.

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>

------------------------------------------------------------------------
r618 | uwe | 2009-06-22 03:37:06 +0200 (Mon, 22 Jun 2009) | 10 lines

Turns out that the GIGABYTE GA-7ZM _does_ work fine if you disable
the BIOS flash protection option _and_ remove jumper JP9 on the
board (d'oh!).

This board can decode 512 KB chips just fine (not just 256 KB).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r617 | uwe | 2009-06-21 22:50:22 +0200 (Sun, 21 Jun 2009) | 8 lines

Add board-enable for Elitegroup K7VTA3 (trivial, tested on hardware).

The board can decode 256 KB only (i.e., not 512 KB) it seems.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r616 | uwe | 2009-06-21 17:45:34 +0200 (Sun, 21 Jun 2009) | 13 lines

Add board-enable code for the Shuttle AK38N.

FYI, this board can only decode 256 KB chips (not 512 KB ones) unfortunately.
The highest address line (A18) is not connected on this board.

The it8705f_write_enable() is kept generic enough so it can be reused for other
board-enables, possibly in the board_biostar_p4m80_m4() for example, but that
shouldn't be touched for now, unless someone can test the code.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Luc Verhaegen <libv@skynet.be>


------------------------------------------------------------------------
r615 | uwe | 2009-06-20 03:21:38 +0200 (Sat, 20 Jun 2009) | 25 lines

Various wiki output changes:

 - Move board_info_url struct to print.c, doesn't have to be global.

 - Simplify flashrom.c a bit by moving stuff to print.c.
   Eliminate two now-useless mini-functions in print.c.

 - Add a note that the wiki page contents are semi-automatically generated.

 - Mention date of last wiki page update as well as the flashrom revision
   that was used to generate the wiki output.

 - Also generate list of supported laptops in -z output now.

 - Add some more board URLs.

 - Add a boards_notes[] table to allow for arbitrary footnotes/comments for
   each board in the table. All notes will automatically be turned into
   wiki footnotes with correct numbers and will appear at the end of the
   respective table.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r614 | uwe | 2009-06-19 21:00:48 +0200 (Fri, 19 Jun 2009) | 21 lines

Random bunch of wiki output and board status changes (trivial).

 - Convert #defines for strings in print.c to 'const char *'s.

 - Add missing entries in the board URL tables.

 - Add a few more board URLs, partly contributed by 'Alien' at
   http://www.coreboot.org/index.php?title=Flashrom&curid=1765&diff=8626&oldid=8625&rcid=3586

 - Fix sort order of board lists.

 - Add laptops to URL list (not yet used).

 - Fix typo.

 - Fix EPIA-EX15000/NX15000 names (append "G").

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r613 | uwe | 2009-06-19 17:54:39 +0200 (Fri, 19 Jun 2009) | 11 lines

Add support for the AMD Am29F010A/B chips.

Also, add support for the Silicon Image 3112(A) SATA controller.

Both have been tested by Andrew Morgan <ziltro@ziltro.com> on hardware
and work fine.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Andrew Morgan <ziltro@ziltro.com>


------------------------------------------------------------------------
r612 | uwe | 2009-06-19 16:22:16 +0200 (Fri, 19 Jun 2009) | 8 lines

Mark VIA EPIA-EX15000 and VIA EPIA-NX15000 as working (trivial).

Thanks Clark Rawlins <clark@bit63.org> for the report!

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r611 | hailfinger | 2009-06-19 16:20:34 +0200 (Fri, 19 Jun 2009) | 8 lines

Prevent spurious runs of make features introduced by the FT2232 patch.
The new makefile structure uses indirection (.features->features) to
work around a gmake bug which resulted in immediate premature evaluation
of variable definitions with deferred evaluation.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r610 | libv | 2009-06-19 15:53:59 +0200 (Fri, 19 Jun 2009) | 5 lines

Board enable for EPIA-N(L).

Signed-off-by: Jon Harrison <bothlyn@blueyonder.co.uk>
Acked-by: Luc Verhaegen <libv@skynet.be>

------------------------------------------------------------------------
r609 | libv | 2009-06-19 15:00:24 +0200 (Fri, 19 Jun 2009) | 8 lines

Board enable for Mitac 6513WU (Compaq OEM)

ATX board for P3; Intel 82810e GMCHe, Intel 82801AA ICH and SMSC
LPC47U332 super I/O.

Signed-off-by: Michael Gold <mgold@ncf.ca>
Acked-by: Luc Verhaegen <libv@skynet.be>

------------------------------------------------------------------------
r608 | hailfinger | 2009-06-19 13:23:57 +0200 (Fri, 19 Jun 2009) | 7 lines

Kill obsolete exclude range feature. It is ignored by almost every chip
and does not work for external flashers. Plus, it gives the user a false
sense of security in some corner cases.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r607 | uwe | 2009-06-19 12:42:43 +0200 (Fri, 19 Jun 2009) | 16 lines

Add a --list-supported-wiki / -z option which outputs the currently
supported flash chips (and their status, size, and type), chipsets
(plus status), mainboards (plus status), and external PCI devices
usable as programmer to stdout.

This allows for very easy pasting into the http://coreboot.org/Flashrom
page, so we can keep that page up-to-date without much hassle.

The list of boards is mostly new (known good ones which don't need
write-enable code, and known-bad ones) and also lists URLs to the
vendor's mainboard pages.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r606 | hailfinger | 2009-06-19 06:50:58 +0200 (Fri, 19 Jun 2009) | 6 lines

Kill dead code which has been disabled since the very first commit of
flashrom.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>

------------------------------------------------------------------------
r605 | uwe | 2009-06-18 20:25:39 +0200 (Thu, 18 Jun 2009) | 22 lines

Some more board status updates:

Mark as OK:

 - ASRock A770CrossFire (reported by RIVANVX on IRC, no email available).
   User verified read and write with -wv, which VERIFIED OK.

Mark as non-working for now:

 - HP/Compaq nx9010 (laptop, reported by Murawski Mateusz <matowy@tlen.pl>).
   Hangs upon 'flashrom -V' (needs hard power-cycle then).

 - Elitegroup K7VTA3 (reported by Uwe Hermann <uwe@hermann-uwe.de>).
   Needs board-enable.

 - GIGABYTE GA-7ZM (reported by Uwe Hermann <uwe@hermann-uwe.de>).
   Needs board-enable.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r604 | uwe | 2009-06-18 16:04:44 +0200 (Thu, 18 Jun 2009) | 8 lines

Also print the supported/nonsupported laptops in -L output (trivial).

Content taken from current wiki page.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r603 | hailfinger | 2009-06-18 14:42:46 +0200 (Thu, 18 Jun 2009) | 5 lines

Chipset enable for VIA VT8233.

Signed-off-by: Mateusz Murawski <matowy@tlen.pl>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r602 | libv | 2009-06-17 16:43:24 +0200 (Wed, 17 Jun 2009) | 5 lines

Board enable for Soyo SY-7VCA.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Andrew Morgan <ziltro@ziltro.com>

------------------------------------------------------------------------
r601 | uwe | 2009-06-17 14:07:12 +0200 (Wed, 17 Jun 2009) | 8 lines

Move all printing code to print.c.

Drop no longer needed MAX macro, we have a max() function.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r600 | hailfinger | 2009-06-17 12:13:42 +0200 (Wed, 17 Jun 2009) | 6 lines

Use spi_nbyte_program in ichspi.c.
This shortens the code a lot and makes it more readable.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>

------------------------------------------------------------------------
r599 | uwe | 2009-06-17 01:15:10 +0200 (Wed, 17 Jun 2009) | 8 lines

List the size (in KB) and type of supported flash chips in 'flashrom -L'.

Also, list how many chips/chipsets/boards we support in 'flashrom -L'.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r598 | hailfinger | 2009-06-16 23:08:06 +0200 (Tue, 16 Jun 2009) | 21 lines

This patch adds support for a new SPI programmer, based on the
FT2232H/4232H chip from FTDI.

FTDI support is autodetected during compilation.

Paul writes:
There are certainly possible improvements: The code has hard-coded
values for which interface of the ftdi chip to use (interface B was
chosen because libftdi seems to have trouble with A right now), what
clock rate use for the SPI interface (I've been running at 30Mhz, but
the patch sets it to 10Mhz), and possibly others. I think this means
that per-programmer options might be a good idea at some point.

Carl-Daniel writes:
There is one additional FIXME comment in the code, but AFAICS that
problem is not solvable with current libftdi.

Signed-off-by: Paul Fox <pgf@laptop.org>
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r597 | hailfinger | 2009-06-16 11:31:51 +0200 (Tue, 16 Jun 2009) | 5 lines

Check for a working C compiler.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Joseph Smith <joe@settoplinux.org>

------------------------------------------------------------------------
r596 | hailfinger | 2009-06-16 10:55:44 +0200 (Tue, 16 Jun 2009) | 10 lines

This patch gives us arbitrary range reads at byte boundaries for every
single chip supported by flashrom.
That means you can tell flashrom to read exactly bytes 12345-56789
(start 12345, length 44445) and it will not fetch a single byte more.

Uwe tested this on one LPC, one SPI, and one parallel flash board.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r595 | hailfinger | 2009-06-15 19:23:36 +0200 (Mon, 15 Jun 2009) | 16 lines

flashrom only checks for very few chips if the erase worked.
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.

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>

------------------------------------------------------------------------
r594 | hailfinger | 2009-06-15 16:14:48 +0200 (Mon, 15 Jun 2009) | 10 lines

flash.h not only contains function prototypes and general settings, it
also has a huge chunk of chip and vendor IDs in the middle.

Split them out into a separate flashchips.h and adjust
#include wherever needed.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Urja Rannikko <urjaman@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r593 | uwe | 2009-06-15 15:27:49 +0200 (Mon, 15 Jun 2009) | 11 lines

Fix typo in Makefile (trivial).

This strangely breaks with gmake on FreeBSD, but seems to work with make
on Linux.

Thanks Idwer Vollering <vidwer@gmail.com> for noticing and testing.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r592 | hailfinger | 2009-06-15 14:10:57 +0200 (Mon, 15 Jun 2009) | 12 lines

Fix the vendor ID of
EN25B05, EN25B10, EN25B20, EN25B40, EN25B80, EN25B16, EN25B32, EN25B64
EN25F40, EN25F80, EN25F16

Add support for
EN25P05, EN25P10, EN25P20, EN25P40, EN25P80, EN25P16, EN25P32, EN25P64
EN25D16
EN25F05, EN25F10, EN25F20, EN25F32

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r591 | uwe | 2009-06-15 02:03:37 +0200 (Mon, 15 Jun 2009) | 8 lines

The VIA VX800 chipset works with the VT8237S code after adding an
entry for the VX800 PCI ID.

Signed-off-by: Arjan Koers <0h3q2rmn2bdb@list.nospam.xutrox.com>
Acked-by: Bari Ari <bari@onelabs.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r590 | uwe | 2009-06-14 23:53:26 +0200 (Sun, 14 Jun 2009) | 9 lines

Add support for the PMC Pm29F002T/B chips.

I sucessfully tested all operations on a Pm29F002T chip. The Pm29F002B is
untested but I assume it should also work.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r589 | hailfinger | 2009-06-13 14:04:03 +0200 (Sat, 13 Jun 2009) | 19 lines

Every SPI host controller implemented its own way to read flash chips.
This was partly due to a design problem in the abstraction layer.

There should be exactly two different functions for reading SPI chips:
- memory mapped reads
- SPI command reads.

Each of them should be contained in a separate function, optionally
taking parameters where needed.

This patch solves the problems mentioned above, shortens the code and
makes the code logic a lot more obvious.

Since open-coding the min() function leads to errors, include it in this
patch as well.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>

------------------------------------------------------------------------
r588 | hailfinger | 2009-06-12 23:29:36 +0200 (Fri, 12 Jun 2009) | 5 lines

Add bus type and timing info for some flash chips.

Signed-off-by: Mateusz Murawski <matowy@tlen.pl>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r587 | hailfinger | 2009-06-12 16:49:10 +0200 (Fri, 12 Jun 2009) | 31 lines

This patch introduces two new targets which are designed to make the
life of packagers easier.
In particular, it should no longer be necessary to patch the makefile
for hassle-free compilation.

The targets are:
make export
make tarball
Both preserve svn revisions and the exported tree does not depend on
subversion in any way or shape.

Documentation for this feature has been added to README.

We need this for five reasons:
1. Packagers currently have to patch flashrom source to compile it on
systems without subversion. We should make it easier for them.
2. Snapshot tarballs currently have a .svn 1.5 directory included but
this will cause errors for users with older svn 1.4. Not requiring
subversion for snapshot compilation is best.
3. Since packagers seldom the svn revision in their fixup patches, some
packages out there have incorrect or no revision, only major version
numbers.
4. Releasing a new version of flashrom needs too many changes to the
makefile which have to be reverted instantly after the release. That is
unnecessary churn.
5. Making a release is easy with the change. Update the major version,
then run "make tarball".

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>  
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r586 | uwe | 2009-06-12 16:05:25 +0200 (Fri, 12 Jun 2009) | 7 lines

Add missing GPL headers to two files. Please complain in case there are
errors here, but I'm pretty sure the headers are correct.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r585 | hailfinger | 2009-06-12 16:02:07 +0200 (Fri, 12 Jun 2009) | 10 lines

flashrom does not honor argument ordering for operations. Not only does
this violate the principle of least surprise, it also caused one bug
where -Ewv was specified and the flash ended up being empty.

Support only one operation at a time.
As a side benefit, this allows us to clean up main() quite a bit.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r584 | hailfinger | 2009-06-12 13:45:10 +0200 (Fri, 12 Jun 2009) | 6 lines

Add #defines for some flash chips.
Add timing info to some flash chips.

Signed-off-by: Mateusz Murawski <matowy@tlen.pl>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r583 | hailfinger | 2009-06-12 10:10:33 +0200 (Fri, 12 Jun 2009) | 5 lines

Add spi_nbyte_program as generic function to the SPI layer.

Signed-off-by: Paul Fox <pgf@laptop.org>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r582 | hailfinger | 2009-06-12 10:04:08 +0200 (Fri, 12 Jun 2009) | 5 lines

Tell the user about the beginning and end of the write operation.

Signed-off-by: Paul Fox <pgf@laptop.org>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r581 | libv | 2009-06-09 20:29:30 +0200 (Tue, 09 Jun 2009) | 13 lines

Add board enable for Albatron PM266A boards.

There are multiple albatron pm266a boards which all share the same bios
image. This means that both the board enable and the subsystem ids are
exactly the same.

The board enable is the same as the epox EP-8K5A2, namely only raising
memw on the superio.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Mateusz Murawski <matowy@tlen.pl>

------------------------------------------------------------------------
r580 | hailfinger | 2009-06-05 22:53:07 +0200 (Fri, 05 Jun 2009) | 18 lines

Add all Eon EN25* SPI chips. Some IDs were already in flash.h.
EN25B05
EN25B10
EN25B20
EN25B40
EN25B80
EN25B16
EN25B32
EN25B64
EN25F40
EN25F80
EN25F16

EN25P* are supported as well, but they seem to be identical to EN25B.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>

------------------------------------------------------------------------
r579 | hailfinger | 2009-06-05 20:32:07 +0200 (Fri, 05 Jun 2009) | 18 lines

Sometimes we want to read/write more than 4 bytes of chip content at
once.
Add chip_{read,write}n to the external flasher infrastructure which
read/write n bytes at once.

Fix a few places where the code used memcpy/memcmp although that is
strictly impossible with external flashers.
Place a FIXME in the layout.c code because usage is not totally clear
and needs to be fixed to support external flashers.

As a nice side benefit, we get a noticeable speedup for builtin flash
reading which is now a memcpy() of the full flash area instead of a
series of single-byte reads.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Urja Rannikko <urjaman@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r578 | hailfinger | 2009-06-05 19:48:08 +0200 (Fri, 05 Jun 2009) | 7 lines

Add external programmer delay functions so external programmers can
handle the delay on their own if needed.

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>

------------------------------------------------------------------------
r577 | hailfinger | 2009-06-05 19:04:37 +0200 (Fri, 05 Jun 2009) | 6 lines

Fix a bug in dummyflasher.c special case where no type parameter is
given.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r576 | hailfinger | 2009-06-05 15:46:17 +0200 (Fri, 05 Jun 2009) | 5 lines

Add probe timings forgotten in r569.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>

------------------------------------------------------------------------
r575 | hailfinger | 2009-06-05 15:30:49 +0200 (Fri, 05 Jun 2009) | 6 lines

Use flash->virtual_registers for what they were meant for instead of
recalculating them every time.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r574 | hailfinger | 2009-06-05 10:47:37 +0200 (Fri, 05 Jun 2009) | 9 lines

Exact bustypes for Atmel AT29C010A, AT29C020, AT29C040A, AT49BV512,
AT49F002, AMIC A29040B, A49LF040A,
EMST F49B002UA, EON EN29F002, Intel 28F001BX-B, 28F001BX-T, Winbond
W29C020C and W29C040P.
Checked from datasheets. A49LF040A is LPC, others parallel.

Signed-off-by: Urja Rannikko <urjaman@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r573 | uwe | 2009-06-05 02:42:18 +0200 (Fri, 05 Jun 2009) | 7 lines

Actually enable the protection register debug output on
SST49LF160C and similar chips if -V is supplied.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Myles Watson<mylesgw@gmail.com>


------------------------------------------------------------------------
r572 | uwe | 2009-06-04 21:25:54 +0200 (Thu, 04 Jun 2009) | 7 lines

Let's actually sort the board lists alphabetically, and not just pretend
we do (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r571 | uwe | 2009-06-04 20:53:03 +0200 (Thu, 04 Jun 2009) | 10 lines

Mark the ASUS A7N8X-E Deluxe as working.

I finally found the machine (doesn't belong to me) where I originally tested
this board as non-working and I can confirm that all operations work fine now
(since the nForce2 patch in r548).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r570 | hailfinger | 2009-06-03 18:41:11 +0200 (Wed, 03 Jun 2009) | 6 lines

Use macros for inb and outb which were forgotten in r568.
This makes FreeBSD happy.

Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r569 | hailfinger | 2009-06-03 16:46:22 +0200 (Wed, 03 Jun 2009) | 7 lines

Add probe_timing information (int uS value). This eliminates the
conflicting delay requirements for old and new chips with the same
probing sequence.

Signed-Off-by: Maciej Pijanka <maciej.pijanka@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r568 | libv | 2009-06-03 09:50:39 +0200 (Wed, 03 Jun 2009) | 9 lines

Board enable: Gigabyte GA K8N SLI.

Raises bits 0 and 2 on offset 0xE1 in the system control area of the
nvidia ck804 lpc.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Alexander Gordeev <lasaine@lvk.cs.msu.su>

------------------------------------------------------------------------
r567 | uwe | 2009-06-02 21:54:22 +0200 (Tue, 02 Jun 2009) | 7 lines

Mark the 10b7:9058 3COM card (3C905B: Cyclone 10/100/BNC) as "OK", forgot
this in the last commit. Also do some random cleanups while I'm at it.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r566 | uwe | 2009-06-02 18:45:59 +0200 (Tue, 02 Jun 2009) | 9 lines

Add support for the 10b7:9058 3COM NIC (3C905B: Cyclone 10/100/BNC).
Also, add Atmel AT29C512 support.

Both are tested on hardware by Maciej Pijanka.

Signed-off-by: Maciej Pijanka <maciej.pijanka@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r565 | uwe | 2009-06-02 15:39:42 +0200 (Tue, 02 Jun 2009) | 10 lines

Add two more boards supported by flashrom:

 - ASUS A8N-SLI (reported by Ryan McLean <pvtryan100@googlemail.com>)

 - MSI/Medion MS-7255 (P4M890M) (reported by J?\195?\182rg Schirottke <master@kanotix.com>)

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r564 | hailfinger | 2009-06-02 02:38:14 +0200 (Tue, 02 Jun 2009) | 5 lines

Unify AMD manufacture_id and model_id

Signed-off-by: Mateusz Murawski <matowy@tlen.pl>
Acked-by: FENG Yu Ning <fengyuning1984@gmail.com>

------------------------------------------------------------------------
r563 | hailfinger | 2009-06-02 00:07:52 +0200 (Tue, 02 Jun 2009) | 5 lines

Use read_flash() when flash chip probe is forced.

Signed-off-by: Stephan Guilloux <stephan.guilloux@free.fr>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r562 | hailfinger | 2009-06-01 23:37:00 +0200 (Mon, 01 Jun 2009) | 5 lines

Add a missing free() in read_flash().

Signed-off-by: Stephan Guilloux <stephan.guilloux@free.fr>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r561 | hailfinger | 2009-06-01 23:30:42 +0200 (Mon, 01 Jun 2009) | 7 lines

Refactor HT-1000 GPIO setting to use sio_mask. Although the HT-1000
GPIOs are not SuperIO related, the share the same index/data register
access method.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r560 | hailfinger | 2009-06-01 04:08:58 +0200 (Mon, 01 Jun 2009) | 15 lines

Only probe for chips with compatible bus protocols.
It doesn't make sense to probe for SPI chips on a LPC host, nor does it
make sense to probe for LPC chips on a Parallel host.

This change is backwards compatible, but adding host protocol info to
chipset init functions will speed up probing.

Once all chipset init functions are updated and the Winbond W29EE011 and
AMIC A49LF040A chip definitions are updated, the W29EE011 workaround can
be deleted as the W29/A49 conflict magically disappears.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Tested on real hardware and
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r559 | hailfinger | 2009-06-01 02:02:11 +0200 (Mon, 01 Jun 2009) | 13 lines

Add bus type support to the dummy external programmer.

The syntax is explained in the man page.
Example: flashrom -p dummy=lpc,fwh

Tested, works perfectly. ;-)

As a nice benefit, it allows easy testing of the "probe only compatible
flashes" patch.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r558 | uwe | 2009-05-31 23:35:10 +0200 (Sun, 31 May 2009) | 6 lines

Fix warning in satasii.c when compiling with gcc 4.4.0.

Signed-off-by: Urja Rannikko <urjaman@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r557 | hailfinger | 2009-05-31 20:00:57 +0200 (Sun, 31 May 2009) | 7 lines

Add IT87xx SPI as external flasher option.
This is a fast way to test if a IT87xx board_enable() would work.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Tested-by: Harald Gutmann <harald.gutmann@gmx.net>
Acked-by: Harald Gutmann <harald.gutmann@gmx.net>

------------------------------------------------------------------------
r556 | hailfinger | 2009-05-31 19:57:34 +0200 (Sun, 31 May 2009) | 16 lines

Add bus type annotation to struct flashchips. Right now, the annotation
only differentiates between SPI and non-SPI. Anyone who knows more about
a specific flash chip should feel free to update it.

The existing flashbus variable was abused to denote the SPI controller
type. Use an aptly named variable for that purpose.

Once this patch is merged, the chipset/programmer init functions can set
supported flash chip types and flashrom can automatically select only
matching probe/read/erase/write functions.
A side benefit of that will be the elimination of the Winbond W29EE011
vs. AMIC A49LF040A conflict.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r555 | hailfinger | 2009-05-29 14:55:31 +0200 (Fri, 29 May 2009) | 9 lines

Add support for probe and read of Intel 28F001BX-T and BX-B.

Erase & write support wont be this easy - the chips need 12V Vpp
(needs a hardware hack or a supporting mb) and they have a very weird
layout and are old.

Signed-off-by: Urja Rannikko <urjaman@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r554 | uwe | 2009-05-28 17:07:42 +0200 (Thu, 28 May 2009) | 19 lines

Random flashrom updates:

 - Add explicit installation instructions in the README.

 - Code cleanups, coding style fixes, drop dead code.

 - Drop duplicate board listings from -L output (some boards were explicitly
   recorded in boards_ok[] _and_ implicitly via the board-enables table.

 - Add MS-xxxx numbers to MSI boards where we can find that info.

 - Fix typo, "K8T Neo2" should have been "K8T Neo2-F" actually, at least
   according to the comment of w83627thf_gpio4_4_raise_2e() which says
   "Suited for: MSI K8T Neo2-F".

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r553 | uwe | 2009-05-28 02:00:23 +0200 (Thu, 28 May 2009) | 40 lines

A bunch of flashrom board updates:

Marked as OK:

 - ASUS M2V (reported by Henri Valta <henri.valta@kemi.fi>)
   http://www.coreboot.org/pipermail/coreboot/2009-May/048674.html

 - Jetway J7F4K1G5D-PB (reported by Kevin O'Connor <kevin@koconnor.net>)

 - PC Engines Alix.3d3 (reported by Tobias M?\195?\188ller <Tobias_Mueller@twam.info>)
   http://www.coreboot.org/pipermail/coreboot/2009-May/048549.html

 - MSI K7N2 (reported by Maciej Pijanka <maciej.pijanka@gmail.com>)
   http://www.coreboot.org/pipermail/coreboot/2009-May/048777.html

Marked as (so far) non-working:

 - DFI 855GME-MGF (reported by Tobias M?\195?\188ller <Tobias_Mueller@twam.info>)
   http://www.coreboot.org/pipermail/coreboot/2009-May/048549.html

 - ASUS M3N78 Pro (reported by Piotr Esden-Tempski <esden@esden.net>)
   As discussed on IRC this is an MCP78 chipset with SPI translation apparently
   done in the southbridge, and we have no NVIDIA datasheets, of course. So the
   situation for this board will probably not change anytime soon.

 - MSI MS-6178 (reported by Uwe Hermann <uwe@hermann-uwe.de>)
   I tested write/erase will not work on this board, so a write-enable is
   needed. In _addition_, the board immediately powers off if you hot-unplug
   the PLCC chip, so I guess there's some SMI interference.

 - GIGABYTE GA-K8N-SLI (reported by Alexander Gordeev <lasaine@lvk.cs.msu.su>)
   This is currently being discussed on the mailing list (see
   http://www.coreboot.org/pipermail/coreboot/2009-May/048717.html) and it's
   very likely that we'll be able to add a board-enable, so this board can be
   maked as OK soonish.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r552 | uwe | 2009-05-28 01:17:40 +0200 (Thu, 28 May 2009) | 9 lines

Change 'Texas Instruments' to 'TI' in the flash chip table, as this is
a very long name and currently even breaks -L output. We could of course
fix that, but we already use short / abbreviated names for other vendors
(AMD, ST, SST, PMC) so do it for TI also.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r551 | hailfinger | 2009-05-27 13:40:08 +0200 (Wed, 27 May 2009) | 9 lines

Use consistent naming for local chip ID variables. Every chip besides
SPI and w39v080fa uses id1/id2 as local variable names to store ID
responses from the flash chip.
This eases grepping a lot. As a bonus, it also frees up some names to be
used as parameters.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>

------------------------------------------------------------------------
r550 | hailfinger | 2009-05-26 23:26:23 +0200 (Tue, 26 May 2009) | 5 lines

Add TI TMS29F002RT and TMS29F002RB probe and read support to flashrom.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>

------------------------------------------------------------------------
r549 | hailfinger | 2009-05-26 23:25:08 +0200 (Tue, 26 May 2009) | 28 lines

Use REMS instead of RES in the ICH SPI default opcode table.

RES is Read Electronic Signature (1 Byte, identical for different chips)
REMS is Read Electronic Manufacturer Signature (2 Bytes, mostly unique)
RDID is Read JEDEC ID (3 bytes, unique)

Of the chips which don't support RDID, a sizable portion supports REMS
which gives us both a manufacturer ID and a device ID. This is clearly
superior to having only a device ID (the RES case) which has multiple
documented collisions.

The RES/REMS problem is aggravated by inconsistent naming in vendor data
sheets. What's in a name? Considering that we have 1-byte IDs, 2-byte
IDs and 3+byte IDs with varying names but mostly consistent opcodes, it
makes sense to set our own standard about how the opcodes are called.

The best way forward would be to have the ICH SPI driver reprogram the
opcode menu on the fly if the opcode menu doesn't contain the requested
opcode and the opcode menu is not locked. Until that happens, this patch
improves detection accuracy by a factor of 256 for some chips.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

Tested-by: Uwe Hermann
with the flash chip "SST SST25VF040.REMS".

Acked-by: Ronald G. Minnich <rminnich@gmail.com>

------------------------------------------------------------------------
r548 | libv | 2009-05-26 11:48:28 +0200 (Tue, 26 May 2009) | 11 lines

Add NForce2 chipset enable.

While the other chipset enables for nvidia could potentially also work,
this one, by not touching other bits, seems like the safest solution.

Uwe tested this on his Asus A7N8X Deluxe, so hopefully the A7N8X-E
(reporter unknown) is now no longer an issue.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r547 | hailfinger | 2009-05-26 01:26:50 +0200 (Tue, 26 May 2009) | 12 lines

Refactor SuperIO accesses. We had duplicated code under different names
and even open-coded some functions in some places.

wbsio_read/regval -> sio_read
wbsio_write/regwrite -> sio_write
wbsio_mask -> sio_mask

board_biostar_p4m80_m4 now uses existing IT87 functions.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Luc Verhaegen <libv@skynet.be>

------------------------------------------------------------------------
r546 | libv | 2009-05-25 13:35:25 +0200 (Mon, 25 May 2009) | 7 lines

Biostar p4m80 board enable typo.

Obvious typo due to inb/outb versus wbsio_ argument ordering confusion.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r545 | uwe | 2009-05-23 02:56:49 +0200 (Sat, 23 May 2009) | 10 lines

Autodetection support and write-enable for the MSI KT4 Ultra.

Thanks Christian Ruppert <spooky85@gmail.com> for testing on hardware.

(also: Fix a typo and some whitespace while I'm at it)

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r544 | uwe | 2009-05-22 15:18:38 +0200 (Fri, 22 May 2009) | 6 lines

Add website section (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r543 | oxygene | 2009-05-22 13:37:27 +0200 (Fri, 22 May 2009) | 22 lines

A bunch of output beautifications and improvements, as well as doc
fixes:

 - Update manpage, we now report supported boards via -L.
 
 - Add some missing escaping for '-' characters in the manpage.

 - Shorten some of the really long device names, so that -L output looks
   nicer.
   
 - Display a "table header" for all entries/columns in -L output.
 
 - Make -L output tabular for all lists for better readability.
 
 - Do not print "unknown XXXX SPI chip" entries in -L output.
 
 - And random other cosmetics...
 
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>

------------------------------------------------------------------------
r542 | uwe | 2009-05-21 19:11:25 +0200 (Thu, 21 May 2009) | 23 lines

Mark the following boards as 'known-good' (write/erase works):

 - ASUS P5B-Deluxe (reported by Andrew Paprocki)
 - ASUS P6T Deluxe V2 (reported by Aldrik Dunbar)
 - GIGABYTE GA-6ZMA (reported by Urja Rannikko)
 - Intel EP80759 (reported by Stephan GUILLOUX)
 - MSI MS-7345 (P35 Neo2-FIR) (reported by Onno)
 - MSI MS-7168 (Orion) (reported by ubuntosaure)
 - Supermicro H8QC8 (reported by Victor Zele)
 
Mark the following boards as 'known-bad' (they likely require a write-enable):

 - Abit IS-10 (reported by deejkuba)
 - ASUS P5B (reported by Henning Fleddermann)
 - ASUS P5BV-M (reported by Bernhard M. Wiedemann)
 - Boser HS-6637 (reported by Mark Robinson)
 
Also, mark the Winbond W39V040A as fully tested (report by ubuntosaure).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r541 | uwe | 2009-05-21 17:59:58 +0200 (Thu, 21 May 2009) | 8 lines

Make an extra MANDIR variable for easier overriding (trivial).

Thanks Heinz Wiesinger <HMWiesinger@liwjatan.at> for the report.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r540 | uwe | 2009-05-21 17:55:46 +0200 (Thu, 21 May 2009) | 11 lines

Improve flashrom test report text a bit:

 - Mention that we'd like to have -V output for all operations
   which were tested by the user.

 - Mention that we'd like to know the exact mainboard vendor/name.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r539 | uwe | 2009-05-21 02:29:50 +0200 (Thu, 21 May 2009) | 6 lines

Fix typo (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r538 | uwe | 2009-05-21 01:27:16 +0200 (Thu, 21 May 2009) | 8 lines

Mark the Macronix MX29F002T as working (trivial).

I tested all operations on hardware.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r537 | uwe | 2009-05-20 19:09:43 +0200 (Wed, 20 May 2009) | 6 lines

The Silicon Image PCI0680 has bit 26 marked as reserved, so don't use it.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r536 | uwe | 2009-05-19 23:03:31 +0200 (Tue, 19 May 2009) | 22 lines

Mark the Silicon Image PCI0680 Ultra ATA-133 controller as working.

I tested identify, read, write, erase, verify successfully, HOWEVER,
this will only work (at least on my card) after de-soldering the
soldered-on PLCC32 one-time programmable (OTP) chip (Holtek HT27C010)
and soldering on a (re-)programmable flash ROM chip or a socket.

Example:

http://www.coreboot.org/File:Sii_controller1.jpg
http://www.coreboot.org/File:Sii_controller2.jpg

The OTP chip which came on my card does not react to the standard JEDEC
identify/read/write/erase commands anymore, so if all other such PCI0680
controllers which are around also have the same OTP chip (that's not
necessarily the case), they cannot be used as "external programmer" in
flashrom without the above mentioned modifications.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r535 | uwe | 2009-05-19 16:14:21 +0200 (Tue, 19 May 2009) | 6 lines

Documentation improvements and small code/whitespace fixes (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r534 | uwe | 2009-05-19 00:27:53 +0200 (Tue, 19 May 2009) | 13 lines

Add detection support and write-enable for the GIGABYTE GA-MA78GM-S2H.
Thanks Michael Heimann for reporting.

The board was misidentified as a GIGABYTE GA-MA78G-DS3H though, as the
old PCI IDs and subsystem IDs of match. Thus, use differing ones for
both boards, which is not so easy. The only usable-looking difference
is in the SATA controller subsystem IDs. This should allow us to
properly detect both boards.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r533 | uwe | 2009-05-18 23:56:16 +0200 (Mon, 18 May 2009) | 6 lines

Drop duplicate Tyan S2498 (Tomcat K7M) entry in the board list (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r532 | uwe | 2009-05-18 17:31:10 +0200 (Mon, 18 May 2009) | 7 lines

Add Tyan S2891/S2892/S2895 as supported without special write-enables
being required. Thanks Myles Watson <mylesgw@gmail.com> for the report.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r531 | uwe | 2009-05-18 01:12:17 +0200 (Mon, 18 May 2009) | 7 lines

Factor out fallback_map/unmap, most external programmers don't need
and special handling here (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r530 | uwe | 2009-05-18 00:58:41 +0200 (Mon, 18 May 2009) | 6 lines

Rename sata_sii.c to satasii.c for consistency (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r529 | uwe | 2009-05-18 00:57:34 +0200 (Mon, 18 May 2009) | 17 lines

Various smaller flashrom improvements:

 - Document new 'satasii' programmer in -L output and manpage.

 - Drop PCI_IO_BASE_ADDRESS, pci.h has such #defines already.

 - Beautify flashrom output and make it more consistent.
 
 - Same for the 'make' output (reordered some $CC parameters).
   Build-tested on i386, shouldn't break any builds, I think.

 - Some variable renaming and other cosmetic fixes.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r528 | ruik | 2009-05-17 21:46:43 +0200 (Sun, 17 May 2009) | 12 lines

This patch adds support for BIOS flashing on the all SiliconImage SATA
controllers. It was easy because

1) flashrom has now nice API
2) documentation is public on the web site

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

Don't forget to add a files. Because I do.


------------------------------------------------------------------------
r527 | ruik | 2009-05-17 21:39:27 +0200 (Sun, 17 May 2009) | 10 lines

This patch adds support for BIOS flashing on the all SiliconImage SATA
controllers. It was easy because

1) flashrom has now nice API
2) documentation is public on the web site

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r526 | ruik | 2009-05-17 20:24:24 +0200 (Sun, 17 May 2009) | 5 lines

Fix a quilt introduced bug in patch.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Self-acked-by: Rudolf Marek <r.marek@assembler.cz>

------------------------------------------------------------------------
r525 | ruik | 2009-05-17 19:02:07 +0200 (Sun, 17 May 2009) | 16 lines

[PATCH] flashrom add PMC 39F010

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Peter Stuge <peter@stuge.se>


[PATCH] tested SST39VF010

Self-ack is fine for test reports.

Rudolf Marek wrote:
> > Signed-off-by: Rudolf Marek <r.marek@assembler.cz>

Acked-by: Peter Stuge <peter@stuge.se>


------------------------------------------------------------------------
r524 | hailfinger | 2009-05-17 17:49:24 +0200 (Sun, 17 May 2009) | 56 lines

Use accessor functions for MMIO. Some MMIO accesses used volatile,
others didn't (and risked non-execution of side effects) and even with
volatile, some accesses looked dubious.

Since the MMIO accessor functions and the onboard flash accessor
functions are functionally identical (but have different signatures),
make the flash accessors wrappers for the MMIO accessors.

For some of the conversions, I used Coccinelle. Semantic patch follows:

@@
typedef uint8_t;
expression a;
volatile uint8_t *b;
@@
- b[a]
+ *(b + a)
@@
expression a;
volatile uint8_t *b;
@@
- *(b) |= (a);
+ *(b) = *(b) | (a);
@@
expression a;
volatile uint8_t *b;
@@
- *(b) = (a);
+ mmio_writeb(a, b);
@@
volatile uint8_t *b;
@@
- *(b)
+ mmio_readb(b)
@@
type T;
T b;
@@
(
 mmio_readb
|
 mmio_writeb
)
 (...,
- (T)
- (b)
+ b
 )

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

Uwe tested read, write, erase with this patch on a random board to make
sure nothing breaks.

Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r523 | uwe | 2009-05-17 01:42:17 +0200 (Sun, 17 May 2009) | 13 lines

List all boards which are:

 - Supported out of the box (no flash enables required)

 - Verifiably not yet working (unknown flash enable)

Also, move some structs to flash.h in preparation for later wiki
output support.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r522 | uwe | 2009-05-17 00:36:00 +0200 (Sun, 17 May 2009) | 9 lines

Eliminate all 'inline's from the flashrom code. They serve pretty
much no purpose, compilers can optimize pretty much all of what we
might mark as inline anyway, _and_ inlines are not enforced in any
way by the compiler either. They're totally unneeded. Kill them.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r521 | uwe | 2009-05-17 00:05:42 +0200 (Sun, 17 May 2009) | 8 lines

Drop unused/duplicated #includes and some dead code (trivial).

Build-tested on 32bit x86.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r520 | uwe | 2009-05-16 23:39:19 +0200 (Sat, 16 May 2009) | 12 lines

Add proper workaround for 3COM 3C90xB cards, which need special fixups
(the 3C90xC ones don't). This is tested on hardware.

Also, add initial support for the Atmel AT29C010A chip (which I inserted
in a 3COM 3C90xB card for testing). It can be detected, read works, erase
works, but write will need some additional code (will post in another
patch later).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r519 | hailfinger | 2009-05-16 23:22:56 +0200 (Sat, 16 May 2009) | 17 lines

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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r518 | uwe | 2009-05-16 03:30:48 +0200 (Sat, 16 May 2009) | 11 lines

Older libpci versions (e.g. 2.2.8, as it's default on current FreeBSD 7.2)
don't properly fill the base_addr[0] struct member, so revert back to
an explicit pci_read_long() call, otherwise detection of PCI devices and
their base address will fail with strange error messages.

Thanks Idwer Vollering <vidwer@gmail.com> for reporting and testing.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r517 | hailfinger | 2009-05-16 03:23:55 +0200 (Sat, 16 May 2009) | 9 lines

Add generic 16 bit and 32 bit chip read/write emulation to the external
flasher infrastructure. The emulation works by splitting 32 bit accesses
into 16 bit accesses and 16 bit accesses into to 8 bit accesses.
That way, external flashers can mix and match the amount of emulation
they need.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r516 | hailfinger | 2009-05-16 01:36:23 +0200 (Sat, 16 May 2009) | 9 lines

Uwe tested the recent SB600 SPI commit and notified me of one unexpected
problem. It seems some boards do not use SPI_HOLD at all. Take that into
account when trying to figure out if SPI is available.

Print the SB600 ROM strap override register status for better debugging.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r515 | uwe | 2009-05-15 19:02:34 +0200 (Fri, 15 May 2009) | 14 lines

Refactor parts of the 3COM NIC code.

Move the reusable PCI specific parts into pcidev.c, they'll be usable
for other NIC code (Realtek, VIA, ...) and also for SATA/IDE controller
cards as external programmers (for every PCI device which can program
EEPROMs basically).

Also add print_supported_pcidevs() to show the supported PCI devices
(currently only NICs, soon more) in the 'flashrom -L' output.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r514 | hailfinger | 2009-05-15 02:56:22 +0200 (Fri, 15 May 2009) | 17 lines

Until the ICH SPI driver can handle preopcodes as standalone opcodes, we
should handle such special opcode failure gracefully on ICH and
compatible chipsets.

This fixes status register writes on almost all ICH+VIA SPI masters.

The fix is almost identical to r484, but this time it affects the EWSR
(Enable Write Status Register) opcode instead of the WREN (Write Enable)
opcode.

With the differentiated return codes introduced in r500, the workaround
is more precise this time. The old WREN workaround was updated as well.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: FENG Yu Ning <fengyuning1984@gmail.com>
Acked-by: Cristi Magherusan <cristi.magherusan@net.utcluj.ro>

------------------------------------------------------------------------
r513 | uwe | 2009-05-15 00:58:21 +0200 (Fri, 15 May 2009) | 40 lines

Make the nic3com code check how many supported NICs are found. If we find
multiple ones, abort with a message to the user, suggesting to use the

  flashrom -p nic3com=bb:dd.f

syntax. If exactly one supported NIC is found, use it. If none is found,
abort with an error.

Print the bb:dd.f numbers for all supported NICs we find, so the user
doesn't have to poke around in lspci output to find the desired bb:dd.f.

Also, drop one pci_read_long() in favor of using the already existing
base_addr[0] struct field.

Drop the BAR in user messages, it's not really useful for us. Instead,
explain the BDF syntax a bit more verbosely.

While I'm at it, update the manpage some more to mention and fully document
the external programmer support we have (or will have soon).

The patch is tested on hardware:

$ flashrom -p nic3com
flashrom v0.9.0-r512
Found NIC "3COM 3C905C: EtherLink 10/100 PCI (TX)" (10b7:9200, BDF 05:04.0)
Found NIC "3COM 3C905C: EtherLink 10/100 PCI (TX)" (10b7:9200, BDF 05:03.0)
Error: Multiple supported NICs found. Please use 'flashrom -p nic3com=bb:dd.f'
to explicitly select the card with the given BDF (PCI bus, device, function).

$ flashrom -p nic3com=05:04.0
flashrom v0.9.0-r512
Found NIC "3COM 3C905C: EtherLink 10/100 PCI (TX)" (10b7:9200, BDF 05:04.0)
Calibrating delay loop... OK.
Found chip "Atmel AT49BV512" (64 KB) at physical address 0xffff0000.
No operations were specified.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r512 | hailfinger | 2009-05-14 23:41:10 +0200 (Thu, 14 May 2009) | 5 lines

Fix compilation of nic3com on 64bit.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r511 | uwe | 2009-05-14 22:41:57 +0200 (Thu, 14 May 2009) | 7 lines

Factor out portable iopl()-style code into a global function
which all programmers can use, add missing close() call (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r510 | uwe | 2009-05-14 20:57:26 +0200 (Thu, 14 May 2009) | 9 lines

3COM: Add support for users to specify a certain NIC via PCI bus:slot.func
notation, in case there are multiple NICs in one system.

Usage: flashrom -p nic3com=bb:ss.f

Signed-off-by: Christian Ruppert <spooky85@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r509 | uwe | 2009-05-14 16:51:14 +0200 (Thu, 14 May 2009) | 8 lines

Cosmetics and eliminate unneeded vars as per IRC discussion (trivial).

Build-tested and 'make PREFIX=/tmp/foo install' tested by me.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r508 | hailfinger | 2009-05-14 16:17:07 +0200 (Thu, 14 May 2009) | 5 lines

Improve makefile structure a bit.

Signed-off-by: Christian Ruppert <spooky85@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r507 | hailfinger | 2009-05-14 14:59:36 +0200 (Thu, 14 May 2009) | 13 lines

Add a dummy SPI controller driver, similar to the dummy LPC/FWH/Parallel
flasher driver.
Does not support reading or writing the fake chip yet.

flashrom --programmer dummy
also enables the dummy SPI controller driver.

Testing the dummy SPI driver revealed a RDID debug printing bug in the
SPI core. Fix that as well.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r506 | stuge | 2009-05-14 14:41:00 +0200 (Thu, 14 May 2009) | 7 lines

Fix spelling error in comment

Author: raijin

Signed-off-by: Daniel McLellan <daniel.mclellan@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r505 | hailfinger | 2009-05-14 00:51:27 +0200 (Thu, 14 May 2009) | 24 lines

Generic status register prettyprinting for SST25*. Even if we don't tell
the user about the areas the block locking bits correspond to, printing
a detailed list of which lock bits are set is a definite improvement.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

Sample output:
[...]
Probing for SST SST25VF032B, 4096 KB: RDID returned bf 25 4a.
probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Chip status register is 1c
Chip status register: Block Protect Write Disable (BPL) is not set
Chip status register: Auto Address Increment Programming (AAI) is not
set
Chip status register: Bit 5 / Block Protect 3 (BP3) is not set
Chip status register: Bit 4 / Block Protect 2 (BP2) is set
Chip status register: Bit 3 / Block Protect 1 (BP1) is set
Chip status register: Bit 2 / Block Protect 0 (BP0) is set
Chip status register: Write Enable Latch (WEL) is not set
Chip status register: Write In Progress (WIP/BUSY) is not set
Found chip "SST SST25VF032B" (4096 KB) at physical address 0xffc00000.

Acked-by: Cristi Magherusan <cristi.magherusan@net.utcluj.ro>

------------------------------------------------------------------------
r504 | hailfinger | 2009-05-14 00:19:12 +0200 (Thu, 14 May 2009) | 8 lines

SST25 chips do not support page program, only byte program.

Downgrade the chips from 256-byte writes to 1-byte writes. This fixes
writing to them on ICH/VIA SPI masters.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: FENG Yu Ning <fengyuning1984@gmail.com>

------------------------------------------------------------------------
r503 | stuge | 2009-05-14 00:18:35 +0200 (Thu, 14 May 2009) | 7 lines

Winbond W39V040A TEST_OK_ PROBE READ

Thanks to Mateusz for testing and reporting!

Signed-off-by: Mateusz Murawski <matowy@tlen.pl>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r502 | uwe | 2009-05-13 17:57:38 +0200 (Wed, 13 May 2009) | 9 lines

Mark SST 39VF512 as fully tested.

Tested with 3COM 3C905C: EtherLink 10/100 PCI (TX)
http://www.coreboot.org/pipermail/coreboot/2009-May/048163.html

Signed-off-by: Mateusz Murawski <matowy@tlen.pl>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r501 | uwe | 2009-05-13 14:01:57 +0200 (Wed, 13 May 2009) | 6 lines

Fix nic3com.c build issues on *BSD (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r500 | hailfinger | 2009-05-13 13:40:08 +0200 (Wed, 13 May 2009) | 19 lines

There are various reasons why a SPI command can fail. Among others, I
have seen the following problems:
- The SPI opcode is not supported by the controller. ICH-style
controllers exhibit this if SPI config is locked down.
- The address in in a prohibited area. This can happen on ICH for any
access (BBAR) and for writes in chipset write protected areas.
- There is no SPI controller.

Introduce separate error codes for unsupported opcode and prohibited
address.

Add the ability to adjust REMS and RES addresses to the minium supported
read address with the help of spi_get_valid_read_addr(). That function
needs to call SPI controller specific functions like reading BBAR on
ICH.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r499 | uwe | 2009-05-13 13:36:06 +0200 (Wed, 13 May 2009) | 54 lines

Add support for 3COM NICs as "external programmer" and Atmel AT49BV512.

This allows flashrom to identify, read, write, erase and verify flash chips
on (some) 3COM network cards. The patch uses the external programmer
infrastructure, the network card is basically treated as an external
flash programmer.

Usage:

$ ./flashrom -p nic3com
flashrom v0.9.0-r498
Found NIC "3COM 3C905C: EtherLink 10/100 PCI (TX)" (10b7:9200), addr = 0xa400
Calibrating delay loop... OK.
Found chip "Atmel AT49BV512" (64 KB) at physical address 0xffff0000.
No operations were specified.

$ ./flashrom -p nic3com -E
flashrom v0.9.0-r498
Found NIC "3COM 3C905C: EtherLink 10/100 PCI (TX)" (10b7:9200), addr = 0xa400
Calibrating delay loop... OK.
Found chip "Atmel AT49BV512" (64 KB) at physical address 0xffff0000.
Erasing flash chip... SUCCESS.

$ ./flashrom -p nic3com -wv backup.bin
flashrom v0.9.0-r498
Found NIC "3COM 3C905C: EtherLink 10/100 PCI (TX)" (10b7:9200), addr = 0xa400
Calibrating delay loop... OK.
Found chip "Atmel AT49BV512" (64 KB) at physical address 0xffff0000.
Flash image seems to be a legacy BIOS. Disabling checks.
Programming page: 1023 at address: 0x0000ffc0
Verifying flash... VERIFIED.

$ ./flashrom -p nic3com -r backup.bin
flashrom v0.9.0-r498
Found NIC "3COM 3C905C: EtherLink 10/100 PCI (TX)" (10b7:9200), addr = 0xa400
Calibrating delay loop... OK.
Found chip "Atmel AT49BV512" (64 KB) at physical address 0xffff0000.
Reading flash... done.

I have tested this on actual hardware (see PCI IDs above) and all
operations worked fine.

Support for other 3COM cards will follow (I added some more which should
be supportable by this code, but they're untested so far), as well as
support for NICs from other vendors.

The patch also adds support for the Atmel AT49BV512 which is soldered
onto the 3COM NIC I used for testing.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Mateusz Murawski <matowy@tlen.pl>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r498 | hailfinger | 2009-05-12 17:38:55 +0200 (Tue, 12 May 2009) | 44 lines

Use helper functions chip_{read,write}[bwl] to access flash chips.

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
 )

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r497 | uwe | 2009-05-12 16:06:04 +0200 (Tue, 12 May 2009) | 7 lines

The write_39sf020() and write_49f002() functions are identical except
for whitespace differences, so drop one of them.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r496 | hailfinger | 2009-05-11 22:04:30 +0200 (Mon, 11 May 2009) | 8 lines

Rename the STM50FLW register variable flash_addr used for block write
protect handling. All other chips call it wrprotect which is less
confusing.
As a side benefit, flash_addr is now a name usable for other stuff.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>

------------------------------------------------------------------------
r495 | hailfinger | 2009-05-11 17:46:43 +0200 (Mon, 11 May 2009) | 9 lines

Print dummy programmer messages only if verbose mode is selected.
Print the return value of dummy_chip_read[bwl].
Align entries in programmer_table.

This is a cosmetic patch and has no effect on code flow.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>

------------------------------------------------------------------------
r494 | hailfinger | 2009-05-11 16:40:31 +0200 (Mon, 11 May 2009) | 19 lines

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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: FENG Yu Ning <fengyuning1984@gmail.com>

------------------------------------------------------------------------
r493 | hailfinger | 2009-05-11 16:13:25 +0200 (Mon, 11 May 2009) | 12 lines

Flash mapping/unmapping was performed without an abstraction layer, so
even the dummy flasher caused memory mappings to be set up.
Add map/unmap functions to the external flasher abstraction.

Fix a possible scribble-over-low-memory corner case which fortunately
never triggered so far.

With this patch, --programmer dummy works fine as non-root.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r492 | hailfinger | 2009-05-11 16:01:17 +0200 (Mon, 11 May 2009) | 12 lines

Add lock bit handling (printing, setting and checking) to SST FWH chips
and abort any writes to locked sectors.
Verbose mode gives you all the info. Normal mode only tells you of
unlocking failed, but gives enough details to debug.

Add a comment about flash register placement to flashrom.c.

Thanks to Uwe for testing multiple iterations of this patch.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r491 | hailfinger | 2009-05-10 16:11:07 +0200 (Sun, 10 May 2009) | 25 lines

Create a SB600 SPI detection heuristic.

I know that the data sheets say we can't read the ROM straps, but
creative interpretation of the data sheets yielded a heuristic which
should work pretty well.

NOTE: If you test this, make sure you power down and _unplug_ the
machine for a few minutes before you boot and run flashrom with this
patch.
If the machine is not unplugged for some time, the test will yield
incorrect results.
If you run a slightly older flashrom version than svn HEAD, the test
will yield incorrect results.
If you run any flashrom version (except svn HEAD plus this patch) after
poweron, the test will yield incorrect results.

Explanation:
Older flashrom versions unconditionally write to registers which are
used for this heuristic. These registers are in the S5 power domain, so
even powering down does not clear them, you really have to unplug the
machine and remove the battery if this is a laptop.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r490 | uwe | 2009-05-09 16:26:04 +0200 (Sat, 09 May 2009) | 6 lines

Add support for EPoX EP-8K5A2 and separate out common VT823x board enable code.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r489 | hailfinger | 2009-05-09 09:32:30 +0200 (Sat, 09 May 2009) | 5 lines

Kill one superfluous variable and improve code readability.

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>

------------------------------------------------------------------------
r488 | hailfinger | 2009-05-09 09:27:23 +0200 (Sat, 09 May 2009) | 16 lines

Fix Elan SC520 handling.

flashbase is a variable which should never be set outside chipset code.
It is only used to calculate the base address of the flash space at
exactly one location in the code.

Setting flashbase during probe caused subsequent probes to fail unless
special handling code was used. We had such code and it caused every
probe except the first to fail on Elan SC520.

Remove the superfluous flashbase assignment and simplify the rest of the
code.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>

------------------------------------------------------------------------
r487 | hailfinger | 2009-05-09 09:24:23 +0200 (Sat, 09 May 2009) | 13 lines

Trim default ICH SPI delay from 1000 to 10 microseconds. Since many
commands take around 10 microseconds to complete, it is totally
pointless to wait for 1000 microseconds before checking the status
again.

This patch is tested and reduced write time on ICH7 with SST25VF080B
from over one hour to 62 seconds.

Thanks to Ali Nadalizadeh for testing!

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Myles Watson <mylesgw@gmail.com>

------------------------------------------------------------------------
r486 | hailfinger | 2009-05-09 04:34:18 +0200 (Sat, 09 May 2009) | 10 lines

Convert all flashchips.c entries with SPI programing to the 256-byte
version by default.

Change the flashchips entry for SST SST25VF080B to 1-byte writing.

Tested-by: Ali Nadalizadeh.

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>

------------------------------------------------------------------------
r485 | hailfinger | 2009-05-09 04:30:21 +0200 (Sat, 09 May 2009) | 15 lines

Chips like the SST SST25VF080B can only handle single byte writes
outside AAI mode.

Change SPI architecture to handle 1-byte chunk chip writing differently
from 256-byte chunk chip writing.

Annotate SPI chip write functions with _256 or _1 suffix denoting the
number of bytes they write at maximum.

The 1-byte chunk writing is cut-n-pasted to different SPI drivers right
now. A later patch can move them to the generic spi_chip_write_1.

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>

------------------------------------------------------------------------
r484 | hailfinger | 2009-05-09 04:09:45 +0200 (Sat, 09 May 2009) | 11 lines

Until the ICH SPI driver can handle preopcodes as standalone opcodes, we
should handle such special opcode failure gracefully on ICH and
compatible chipsets.

This fixes chip erase on almost all ICH+VIA SPI masters.

Thanks to Ali Nadalizadeh for helping track down this bug!

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>

------------------------------------------------------------------------
r483 | hailfinger | 2009-05-09 02:54:55 +0200 (Sat, 09 May 2009) | 10 lines

Add a dummy external flasher which just prints each operation.

Usage:
flashrom --programmer dummy

This is a great way to test flashrom without root access.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r482 | uwe | 2009-05-09 02:47:04 +0200 (Sat, 09 May 2009) | 7 lines

Split vendor name and board name into two fields as preparation
for wiki output of supported stuff.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r481 | hailfinger | 2009-05-09 02:27:07 +0200 (Sat, 09 May 2009) | 5 lines

Add --programmer to help text and man page.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r477 | uwe | 2009-05-08 19:50:51 +0200 (Fri, 08 May 2009) | 6 lines

Make chipset list alphabetically ordered as the other lists.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r476 | hailfinger | 2009-05-08 19:43:22 +0200 (Fri, 08 May 2009) | 14 lines

Add external flasher support:
- Read/write accesses through function pointers
- Command line parameter for internal/external flasher
- Board and chipset setup moved to internal init function
- Shutdown stuff moved to internal shutdown function

As a side benefit, this will allow us to undo chipset write enable
during shutdown.

Tested by Uwe on real hardware.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r475 | hailfinger | 2009-05-08 19:15:15 +0200 (Fri, 08 May 2009) | 5 lines

Re-add a line which got deleted in r473 by accident.

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>

------------------------------------------------------------------------
r474 | uwe | 2009-05-08 18:23:34 +0200 (Fri, 08 May 2009) | 8 lines

Keep list of boards alphabetically sorted. This is (among other things)
useful/required for the -L output and the upcoming wiki-syntax output of
supported boards.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r473 | hailfinger | 2009-05-08 14:49:03 +0200 (Fri, 08 May 2009) | 11 lines

Flashrom assumes that the flash chip contents are available via mmap if
no read function is defined. This special case is handled in lots of
places all over the code.

Remove the special case and use the read_memmapped function. Not only
does this allow us to fix a read bug in flashrom I recently uncovered on
ICH SPI, it also allows us to add support for Paraflasher to flashrom.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r472 | uwe | 2009-05-07 15:24:49 +0200 (Thu, 07 May 2009) | 10 lines

Store and display chipset test status (not only chip status).
The list of tested chipsets is synced from the wiki.

Also, split the chipset vendor and name into two fields for easier
wiki-syntax output later.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r471 | hailfinger | 2009-05-07 02:59:53 +0200 (Thu, 07 May 2009) | 7 lines

Always print the flashrom version as first output line.

Suggested by Peter Stuge.

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>

------------------------------------------------------------------------
r470 | hailfinger | 2009-05-06 23:54:22 +0200 (Wed, 06 May 2009) | 8 lines

ASD chips may exist, but all available docs suggest they are just
rebranded Winbond chips with Winbond IDs.
The ASD vendor/chip IDs in flash.h are very likely just misinterpreted
LHA headers.

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>

------------------------------------------------------------------------
r469 | stuge | 2009-05-06 17:05:39 +0200 (Wed, 06 May 2009) | 5 lines

Clarify error message in enable_flash_sb600() a little.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r468 | hailfinger | 2009-05-06 15:59:44 +0200 (Wed, 06 May 2009) | 9 lines

Improve SST25 status register routines:
- Using a 4-bit index into an array with 8 elements leads to
out-of-bounds accesses. Use proper bit masking to fix this.
- Factor out common SST25 status register printing.
- Use the common SST25 status register printing for SST25VF080B.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r467 | hailfinger | 2009-05-06 15:51:44 +0200 (Wed, 06 May 2009) | 6 lines

Revert r466 because it introduced a bug:
If unprotect succeeded, it will print "SB600 unprotect failed".

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>

------------------------------------------------------------------------
r466 | stuge | 2009-05-06 15:43:26 +0200 (Wed, 06 May 2009) | 5 lines

Cleanup redundant condition and clarify message a little.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r465 | stuge | 2009-05-06 15:38:55 +0200 (Wed, 06 May 2009) | 5 lines

Touch up some error messages in enable_flash_cs5536().

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r464 | hailfinger | 2009-05-06 02:35:31 +0200 (Wed, 06 May 2009) | 6 lines

Clean up the SB400 chipset enable code. Use pci_dev_find() instead of
setting up a filter and iterating over PCI devices.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r463 | hailfinger | 2009-05-06 00:50:07 +0200 (Wed, 06 May 2009) | 13 lines

Rewrite the SB600 chipset enable function:
- Check for read/write protected regions first.
- Region protection is write-once according to the data sheets. Check if
the write succeeded. Don't write if the region is not protected.
- Verbose region protection dumping.
- Improve readability of BAR mapping code.
- Align BAR mapping to a page boundary (4k) instead of a 16k boundary.

This patch prepares the code for a SPI detection heuristic.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r462 | myles | 2009-05-05 23:08:36 +0200 (Tue, 05 May 2009) | 6 lines

Here is a fix for chipset_enable.c when there is not /dev/cpu. Open
fails so there is no reason to lseek in. Actually this is a trivial fix
for a bad return value from open.

Signed-off-by: Bertrand Jacquin <beber@meleeweb.net>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
------------------------------------------------------------------------
r461 | stuge | 2009-05-05 18:34:53 +0200 (Tue, 05 May 2009) | 7 lines

SST25VF080B TEST_OK_ ERASE WRITE

As reported by A. Spamlover. Thanks!

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r460 | uwe | 2009-05-05 18:15:46 +0200 (Tue, 05 May 2009) | 7 lines

Some cosmetics in README and manpage. Also, move more stuff to the manpage
where it belongs (this also eliminates some duplicated contents).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r459 | hailfinger | 2009-05-05 00:33:50 +0200 (Tue, 05 May 2009) | 10 lines

Force enabling SPI mode for SB600 is a bad idea and leads to hangs.

Only access LPC ROM if we boot via LPC ROM. Only access SPI ROM if we
boot via SPI ROM.
The code to force enable SPI is commented out in case someone wants to
reenable it for a particular board with LPC and SPI flash.

Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r458 | stuge | 2009-05-04 23:03:59 +0200 (Mon, 04 May 2009) | 7 lines

SST25VF080B TEST_OK_READ

Per report from from Henning Fleddermann. Thanks!

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r457 | hailfinger | 2009-05-04 14:29:59 +0200 (Mon, 04 May 2009) | 5 lines

Onwards with development. Re-add the svn revision to the version string.

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>

------------------------------------------------------------------------
r454 | hailfinger | 2009-05-04 14:18:10 +0200 (Mon, 04 May 2009) | 5 lines

flashrom 0.9.0

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r453 | stuge | 2009-05-04 01:33:05 +0200 (Mon, 04 May 2009) | 6 lines

Complement the README file with build instructions for the platforms it
currently compiles on.

Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r452 | hailfinger | 2009-05-01 18:34:32 +0200 (Fri, 01 May 2009) | 8 lines

Fix compilation on Solaris and tell people how to compile flashrom on
Solaris, Darwin/Mac OS X and DragonFly BSD.

Thanks to Joerg Schilling and Patrick Georgi for the Solaris part.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r451 | stuge | 2009-05-01 16:52:50 +0200 (Fri, 01 May 2009) | 5 lines

Mention that flashrom can also verify flash contents.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r450 | stuge | 2009-05-01 16:49:49 +0200 (Fri, 01 May 2009) | 5 lines

Fix usage to show that vendor: is optional in the -m parameter.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r449 | hailfinger | 2009-05-01 14:22:17 +0200 (Fri, 01 May 2009) | 7 lines

Some functions take no arguments. Make that explicit in the associated
prototypes.
This avoids a warning on some compilers and is a correctness issue.

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>

------------------------------------------------------------------------
r448 | hailfinger | 2009-05-01 13:00:39 +0200 (Fri, 01 May 2009) | 8 lines

Add Li-Ta (Ollie) Lo to the author list.
He started flashrom back in 2000.

Thanks to Ron for pointing this out.

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>

------------------------------------------------------------------------
r447 | hailfinger | 2009-05-01 12:53:49 +0200 (Fri, 01 May 2009) | 7 lines

Since the command line interface for flashrom will change for 1.0
(all-caps or no-caps for short options, exclude range syntax, etc.) we
should tell users in the man page and the usage message about this.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r446 | stuge | 2009-04-30 01:22:33 +0200 (Thu, 30 Apr 2009) | 7 lines

flashrom: Macronix MX25L1605 TEST_OK_ PROBE READ ERASE WRITE

Per report from Aldrik Dunbar. Thanks!

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r445 | hailfinger | 2009-04-28 14:56:04 +0200 (Tue, 28 Apr 2009) | 7 lines

There are still some tweaks necessary to get Flashrom to build on
DragonFly, but this helps a lot.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r444 | oxygene | 2009-04-26 21:47:23 +0200 (Sun, 26 Apr 2009) | 5 lines

Enable scan-build for flashrom.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>

------------------------------------------------------------------------
r443 | hailfinger | 2009-04-26 00:07:28 +0200 (Sun, 26 Apr 2009) | 19 lines

Original v2 revision: 4211

The flashrom makefile wants to redirect both stdout and stderr to
/dev/null for one compile test.
The old variant of using &>/dev/null works on bash and zsh, but not on
dash and tcsh. dash and tcsh interpret it as "background command and
truncate /dev/null" which is not what we want. >& works on tcsh and
bash, but it is not POSIX compliant.
Since make uses /bin/sh and /bin/sh has to be POSIX compliant, we can
use the POSIX variant of stderr and stdout redirection.

>/dev/null 2>&1
is POSIX compliant. This is specified in SuSv3, Shell Command Language,
sections 2.7.2 and 2.7.6.

Signed-off-by: Stephan Guilloux <stephan.guilloux@free.fr>
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ward Vandewege <ward@gnu.org>

------------------------------------------------------------------------
r442 | uwe | 2009-04-24 18:17:41 +0200 (Fri, 24 Apr 2009) | 8 lines

Original v2 revision: 4205

MAX may already be defined. Also, fix smaller cosmetics (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r441 | stuge | 2009-04-24 00:51:56 +0200 (Fri, 24 Apr 2009) | 7 lines

Original v2 revision: 4200

flashrom: Support MX25L3235D

Signed-off-by: Stephan Guilloux <stephan.guilloux@free.fr>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r440 | uwe | 2009-04-23 16:57:55 +0200 (Thu, 23 Apr 2009) | 9 lines

Original v2 revision: 4196

Don't duplicate option description in README, the manpage already has
that info. Also, additional small cosmetic fix.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r439 | hailfinger | 2009-04-22 15:33:43 +0200 (Wed, 22 Apr 2009) | 23 lines

Original v2 revision: 4177

All "unknown xy SPI chip" entries claim to have status UNTESTED for
probe/read/erase/write. That is incorrect.

A bit of confusion comes from how the #defines are named. We call them
TEST_BAD_*, but the message printed by flashrom says:
"This flash part has status NOT WORKING for operations:"

Something that is unimplemented is definitely not working.

Neither of the chip entries mentioned above has erase or write functions
implemented, so erase and write are not working.
Since their size is unknown, we can't read them in. That means read is
not working as well.
Probing is a different matter. If a chip-specific probe function had
matched, we wouldn't have to handle the chip with the "unknown xy SPI
chip" fallback. I'm tempted to call that "not working" as well, but I'm
open to discussion on this point.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r438 | hailfinger | 2009-04-22 01:03:20 +0200 (Wed, 22 Apr 2009) | 10 lines

Original v2 revision: 4161

flashrom: Add support for Gigabyte GA-MA790FX-DQ6. This board uses
IT8718F LPC->SPI translation for the flash chip.

Tested by Mateusz Murawski.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Mateusz Murawski <matowy@tlen.pl>

------------------------------------------------------------------------
r437 | stuge | 2009-04-21 03:47:16 +0200 (Tue, 21 Apr 2009) | 7 lines

Original v2 revision: 4150

flashrom: Support Macronix MX2512805D flash chip

Signed-off-by: Stephan Guilloux <stephan.guilloux@free.fr>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r436 | stuge | 2009-04-21 03:46:07 +0200 (Tue, 21 Apr 2009) | 7 lines

Original v2 revision: 4149

flashrom: Trivial indent fix

Signed-off-by: Stephan Guilloux <stephan.guilloux@free.fr>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r435 | hailfinger | 2009-04-21 00:54:13 +0200 (Tue, 21 Apr 2009) | 8 lines

Original v2 revision: 4146

After verification in datasheets, all MX25 accept the same opcodes
0x60 and 0xC7 for Chip Erase.

Signed-off-by: Stephan Guilloux <stephan.guilloux@free.fr>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r434 | stuge | 2009-04-20 14:38:17 +0200 (Mon, 20 Apr 2009) | 13 lines

Original v2 revision: 4142

flashrom: board_enables: reconstruct table.

This patch restores the pciid based board matching table. It makes this
table readable and hackable again, and the only disadvantage is that the
right margin is way beyond the rather dogmatic 80. All 0x0000 pci ids have
been string replaced by 0 to more easily spot missing ids, and extra
comments have been added to explain how the various entries are used.

Signed-Off-By: Luc Verhaegen <libv@skynet.be>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r433 | stuge | 2009-04-20 14:34:30 +0200 (Mon, 20 Apr 2009) | 7 lines

Original v2 revision: 4141

flashrom: Trivial README change Flashrom->flashrom

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r432 | stuge | 2009-04-20 01:24:26 +0200 (Mon, 20 Apr 2009) | 7 lines

Original v2 revision: 4139

flashrom: MX25L1605 and 1635 accept Chip Erase opcodes 60 and C7

Signed-off-by: Stephan Guilloux <stephan.guilloux@free.fr>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r431 | hailfinger | 2009-04-20 01:04:00 +0200 (Mon, 20 Apr 2009) | 7 lines

Original v2 revision: 4138

Add MX25L1635D support, as discussed on #coreboot.

Signed-off-by: Stephan Guilloux <stephan.guilloux@free.fr>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r430 | stuge | 2009-04-18 01:01:45 +0200 (Sat, 18 Apr 2009) | 7 lines

Original v2 revision: 4132

flashrom: Add VIA PC3500G board. It has SPI flash behind ITE8716 on LPC.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: illdred <illdred@gmail.com>

------------------------------------------------------------------------
r429 | uwe | 2009-04-15 12:52:49 +0200 (Wed, 15 Apr 2009) | 8 lines

Original v2 revision: 4117

Some coding style and consistency fixes (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r428 | uwe | 2009-04-13 23:35:49 +0200 (Mon, 13 Apr 2009) | 8 lines

Original v2 revision: 4107

Fix typo. Add missing copyright year.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r427 | uwe | 2009-04-11 15:59:00 +0200 (Sat, 11 Apr 2009) | 8 lines

Original v2 revision: 4092

Mention a few more flash chip packages in README/manpage.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r426 | uwe | 2009-04-10 16:49:14 +0200 (Fri, 10 Apr 2009) | 8 lines

Original v2 revision: 4089

Fix typo.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r425 | uwe | 2009-04-10 16:41:29 +0200 (Fri, 10 Apr 2009) | 15 lines

Original v2 revision: 4088

Various manpage / README fixes:

 - Improve description a bit, especially wrt chip packages and
   protocols.

 - Add some missing parameters to manpage option descriptions.

 - Remove long obsolete DoC support note.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r424 | rminnich | 2009-04-09 16:28:36 +0200 (Thu, 09 Apr 2009) | 9 lines

Original v2 revision: 4086

Fixed the typo should indeed be a 0x2e.
Tested on an iWILL DK8-HTX board.

Signed-off-by: Mondrian nuessle <nuessle@uni-hd.de>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>


------------------------------------------------------------------------
r423 | stuge | 2009-03-30 15:20:01 +0200 (Mon, 30 Mar 2009) | 11 lines

Original v2 revision: 4031

flashrom: Board enable support for HP DL145 G3.

This is a BCM5785 based machine, WP# and TLB# need to be deasserted using
GPIO 2 and 5 from the PM registers of the southbridge.
This is very similar to the x3455 implementation.

Signed-off-by: Mondrian Nuessle <nuessle@uni-hd.de>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r422 | hailfinger | 2009-03-19 13:18:13 +0100 (Thu, 19 Mar 2009) | 8 lines

Original v2 revision: 4020

Move the Atmel AT45 comments about block and page sizes from the end of
the struct to the individual struct members to improve readability.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r421 | stepan | 2009-03-17 15:39:25 +0100 (Tue, 17 Mar 2009) | 21 lines

Original v2 revision: 4012

This patch adds "high coreboot table support" to coreboot version 2.

Some bootloaders seem to overwrite memory starting at 0x600, thus destroying
the coreboot table integrity, rendering the table useless.

By moving the table to the high tables area (if it's activated), this problem
is fixed.

In order to move the table, a 40 bytes mini coreboot table with a single sub
table is placed at 0x500/0x530 that points to the real coreboot table. This is
comparable to the ACPI RSDT or the MP floating table.

This patch also adds "table forward" support to flashrom and nvramtool.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Peter Stuge <peter@stuge.se>



------------------------------------------------------------------------
r420 | hailfinger | 2009-03-06 23:26:00 +0100 (Fri, 06 Mar 2009) | 11 lines

Original v2 revision: 3984

FreeBSD definitions of (read|write)[bwl] collide with our own. Before we
attempt trickery, we can simply rename the accessor functions.

Patch created with the help of Coccinelle.

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>

------------------------------------------------------------------------
r419 | hailfinger | 2009-03-06 01:40:25 +0100 (Fri, 06 Mar 2009) | 112 lines

Original v2 revision: 3973

During the conversion of flash chip accesses to helper functions, I
spotted assignments to volatile variables which were neither placed
inside the mmapped ROM area nor were they counters.
Due to the use of accessor functions, volatile usage can be reduced
significantly because the accessor functions take care of actually
performing the reads/writes correctly.

The following semantic patch spotted them (linebreak in python string
for readability reasons, please remove before usage):
@r exists@
expression b;
typedef uint8_t;
volatile uint8_t a;
position p1;
@@
 a@p1 = readb(b);

@script:python@
p1 << r.p1;
a << r.a;
b << r.b;
@@
print "* file: %s line %s has assignment to unnecessarily volatile
variable: %s = readb(%s);" % (p1[0].file, p1[0].line, a, b)

Result was:
HANDLING: sst28sf040.c
* file: sst28sf040.c line 44 has assignment to unnecessarily volatile
variable: tmp = readb(TODO: Binary);
* file: sst28sf040.c line 43 has assignment to unnecessarily volatile
variable: tmp = readb(TODO: Binary);
* file: sst28sf040.c line 42 has assignment to unnecessarily volatile
variable: tmp = readb(TODO: Binary);
* file: sst28sf040.c line 41 has assignment to unnecessarily volatile
variable: tmp = readb(TODO: Binary);
* file: sst28sf040.c line 40 has assignment to unnecessarily volatile
variable: tmp = readb(TODO: Binary);
* file: sst28sf040.c line 39 has assignment to unnecessarily volatile
variable: tmp = readb(TODO: Binary);
* file: sst28sf040.c line 38 has assignment to unnecessarily volatile
variable: tmp = readb(TODO: Binary);
* file: sst28sf040.c line 58 has assignment to unnecessarily volatile
variable: tmp = readb(TODO: Binary);
* file: sst28sf040.c line 57 has assignment to unnecessarily volatile
variable: tmp = readb(TODO: Binary);
* file: sst28sf040.c line 56 has assignment to unnecessarily volatile
variable: tmp = readb(TODO: Binary);
* file: sst28sf040.c line 55 has assignment to unnecessarily volatile
variable: tmp = readb(TODO: Binary);
* file: sst28sf040.c line 54 has assignment to unnecessarily volatile
variable: tmp = readb(TODO: Binary);
* file: sst28sf040.c line 53 has assignment to unnecessarily volatile
variable: tmp = readb(TODO: Binary);
* file: sst28sf040.c line 52 has assignment to unnecessarily volatile
variable: tmp = readb(TODO: Binary);

The following semantic patch uses the spatch builtin match printing
functionality by prepending a "*" to the line with the pattern:
@@
expression b;
typedef uint8_t;
volatile uint8_t a;
@@
* a = readb(b);

Result is:
HANDLING: sst28sf040.c
diff =
--- sst28sf040.c        2009-03-06 01:04:49.000000000 +0100
@@ -35,13 +35,6 @@ static __inline__ void protect_28sf040(v
        /* ask compiler not to optimize this */
        volatile uint8_t tmp;
 
-       tmp = readb(bios + 0x1823);
-       tmp = readb(bios + 0x1820);
-       tmp = readb(bios + 0x1822);
-       tmp = readb(bios + 0x0418);
-       tmp = readb(bios + 0x041B);
-       tmp = readb(bios + 0x0419);
-       tmp = readb(bios + 0x040A);
 }
 
 static __inline__ void unprotect_28sf040(volatile uint8_t *bios)
@@ -49,13 +42,6 @@ static __inline__ void unprotect_28sf040
        /* ask compiler not to optimize this */
        volatile uint8_t tmp;
 
-       tmp = readb(bios + 0x1823);
-       tmp = readb(bios + 0x1820);
-       tmp = readb(bios + 0x1822);
-       tmp = readb(bios + 0x0418);
-       tmp = readb(bios + 0x041B);
-       tmp = readb(bios + 0x0419);
-       tmp = readb(bios + 0x041A);
 }
 
 static __inline__ int erase_sector_28sf040(volatile uint8_t *bios,

It's arguably a bit easier to read if you get used to the leading "-"
for matching lines.

This patch was enabled by Coccinelle:
http://www.emn.fr/x-info/coccinelle/


Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Joseph Smith <joe@settoplinux.org>
-- 
http://www.hailfinger.org/

------------------------------------------------------------------------
r418 | hailfinger | 2009-03-05 20:24:22 +0100 (Thu, 05 Mar 2009) | 52 lines

Original v2 revision: 3971

flashrom: Use helper functions to access flash chips.

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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: FENG Yu Ning <fengyuning1984@gmail.com>
Tested-by: Joe Julian

------------------------------------------------------------------------
r417 | stuge | 2009-02-25 09:07:33 +0100 (Wed, 25 Feb 2009) | 7 lines

Original v2 revision: 3958

flashrom: Add SST25VF040.REMS with TEST_OK_ PROBE READ

Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r416 | stuge | 2009-02-22 22:07:28 +0100 (Sun, 22 Feb 2009) | 9 lines

Original v2 revision: 3956

flashrom: SST29EE020A TEST_OK_ PROBE READ ERASE WRITE

Report by Holger Mickler. Thanks!

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r415 | stuge | 2009-02-09 21:26:14 +0100 (Mon, 09 Feb 2009) | 13 lines

Original v2 revision: 3932

flashrom: Fix broken flash chip base address logic

Elan SC520 requries us to deal with flash chip base addresses at locations
other than top of 4GB. The logic for that was incorrectly triggered also when
a board had more than one flash chip. This patch will honor flashbase only when
probing for the first flash chip on the board, and look at top of 4GB for later
chips.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Myles Watson <mylesgw@gmail.com>

------------------------------------------------------------------------
r414 | stuge | 2009-02-02 23:55:26 +0100 (Mon, 02 Feb 2009) | 7 lines

Original v2 revision: 3927

flashrom: MSI MS-7046 board enable

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: David Tiemann <davidtiemann@gmail.com>

------------------------------------------------------------------------
r413 | ruik | 2009-02-01 19:40:50 +0100 (Sun, 01 Feb 2009) | 9 lines

Original v2 revision: 3926

 Following patch fixes VIA SPI (VT8237S). It needs to have opcodes
 initialized same way as ICH7.

 Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
 Acked-by: Peter Stuge <peter@stuge.se>


------------------------------------------------------------------------
r412 | hailfinger | 2009-01-28 01:27:54 +0100 (Wed, 28 Jan 2009) | 7 lines

Original v2 revision: 3923

Factor out read and erase functions from flashrom main().

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r411 | stuge | 2009-01-26 16:29:27 +0100 (Mon, 26 Jan 2009) | 7 lines

Original v2 revision: 3919

flashrom: Add VT8237A PCI ID

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r410 | stuge | 2009-01-26 16:19:43 +0100 (Mon, 26 Jan 2009) | 9 lines

Original v2 revision: 3918

flashrom: Fix one dead increment and one dead assignment as found by clang.

Thanks Patrick!

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r409 | stuge | 2009-01-26 07:42:02 +0100 (Mon, 26 Jan 2009) | 9 lines

Original v2 revision: 3917

flashrom: Driver for ST M29F002T/NT/B. T/NT TEST_OK_ PROBE READ ERASE WRITE

Test report from Julia. Thanks!

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Julia Longtin <juri@solarnetone.org>

------------------------------------------------------------------------
r408 | stuge | 2009-01-26 05:48:01 +0100 (Mon, 26 Jan 2009) | 7 lines

Original v2 revision: 3916

flashrom: Fix copypaste error in r3913.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r407 | stuge | 2009-01-26 04:37:40 +0100 (Mon, 26 Jan 2009) | 13 lines

Original v2 revision: 3913

flashrom: SST25VF040B using 0x90 identification and AAI write.

SST AAI is Auto Address Increment writing, a streamed write to the flash chip
where the first write command sets a starting address and following commands
simply append data. Unfortunately not supported by Winbond SPI masters.

From July 2008.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r406 | stuge | 2009-01-26 04:23:50 +0100 (Mon, 26 Jan 2009) | 7 lines

Original v2 revision: 3912

flashrom: Decode SST25VF040B status register, also from July 2008.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r405 | stuge | 2009-01-26 04:12:44 +0100 (Mon, 26 Jan 2009) | 7 lines

Original v2 revision: 3911

flashrom: Intel Desktop Board D201GLY

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r404 | stuge | 2009-01-26 04:08:45 +0100 (Mon, 26 Jan 2009) | 10 lines

Original v2 revision: 3910

flashrom: Winbond SuperIO SPI driver.

Developed and tested to work on Intel D201GLY in July 2008.
Tested by a helpful person on IRC whose name I've since forgotten. Sorry!

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Ward Vandewege <ward@gnu.org>

------------------------------------------------------------------------
r403 | stuge | 2009-01-26 03:34:51 +0100 (Mon, 26 Jan 2009) | 7 lines

Original v2 revision: 3909

flashrom: Export Winbond SuperIO register access functions in board_enable.c.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r402 | stuge | 2009-01-26 03:20:56 +0100 (Mon, 26 Jan 2009) | 7 lines

Original v2 revision: 3908

flashrom: Document exit() codes introduced in r3907.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Ward Vandewege <ward@gnu.org>

------------------------------------------------------------------------
r401 | stuge | 2009-01-26 03:04:19 +0100 (Mon, 26 Jan 2009) | 7 lines

Original v2 revision: 3907

flashrom: exit(2) on /dev/mem open() failure and exit(3) on mmap() failure.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Ward Vandewege <ward@gnu.org>

------------------------------------------------------------------------
r400 | stuge | 2009-01-26 02:33:02 +0100 (Mon, 26 Jan 2009) | 7 lines

Original v2 revision: 3906

flashrom: Add license header to physmap.c so everyone is happy. :)

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r399 | stuge | 2009-01-26 02:23:31 +0100 (Mon, 26 Jan 2009) | 11 lines

Original v2 revision: 3905

flashrom: Darwin / Mac OS X

Through DirectIO from coresystems GmbH we now support Darwin/Mac OS X.
DirectIO is available at http://www.coresystems.de/en/directio

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r398 | stuge | 2009-01-26 02:16:09 +0100 (Mon, 26 Jan 2009) | 7 lines

Original v2 revision: 3904

flashrom: Small cleanup in Makefile.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r397 | stuge | 2009-01-26 02:10:48 +0100 (Mon, 26 Jan 2009) | 8 lines

Original v2 revision: 3903

flashrom: Abstract mmap() in physmap.c and only open /dev/mem on the first physmap() call.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r396 | stuge | 2009-01-26 01:39:57 +0100 (Mon, 26 Jan 2009) | 9 lines

Original v2 revision: 3901

flashrom: Change flashrom.c:map_flash_registers() from int to void.

The function exit()s on failure, and no callers check the return value.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r395 | stuge | 2009-01-26 01:19:36 +0100 (Mon, 26 Jan 2009) | 7 lines

Original v2 revision: 3900

flashrom: Forgot some things in r3899.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r394 | stuge | 2009-01-26 01:15:56 +0100 (Mon, 26 Jan 2009) | 7 lines

Original v2 revision: 3899

flashrom: Little readability improvement in cbtable.c:coreboot_init()

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r393 | stuge | 2009-01-26 01:07:25 +0100 (Mon, 26 Jan 2009) | 7 lines

Original v2 revision: 3898

flashrom: Change FreeBSD #ifdef into #if defined()

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r392 | stuge | 2009-01-26 00:59:30 +0100 (Mon, 26 Jan 2009) | 7 lines

Original v2 revision: 3897

flashrom: Make Makefile a bit more portable. Shell echo doesn't always know -n.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r391 | stuge | 2009-01-26 00:55:12 +0100 (Mon, 26 Jan 2009) | 7 lines

Original v2 revision: 3896

flashrom: Add dry Am29F080B Am29LV081B SST39VF080 definitions per data sheets.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r390 | stuge | 2009-01-26 00:52:45 +0100 (Mon, 26 Jan 2009) | 7 lines

Original v2 revision: 3895

flashrom: Beautify flash chip ID verbose printout a little, always use %02x.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r389 | stuge | 2009-01-25 21:41:51 +0100 (Sun, 25 Jan 2009) | 9 lines

Original v2 revision: 3894

flashrom: Fix stupid off-by-one error in erase verification.

As reported by Jody McIntyre. Thanks!

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r388 | stuge | 2009-01-25 00:01:08 +0100 (Sun, 25 Jan 2009) | 9 lines

Original v2 revision: 3893

flashrom: ST M50FW080 TEST_OK_ PROBE READ ERASE WRITE

Report by Jody McIntyre. Thanks!

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r387 | stuge | 2009-01-24 02:32:40 +0100 (Sat, 24 Jan 2009) | 9 lines

Original v2 revision: 3892

flashrom: SST25VF080B TEST_OK_PROBE

Report by Scaldov M.V. Thanks!

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r386 | stuge | 2009-01-23 06:23:06 +0100 (Fri, 23 Jan 2009) | 7 lines

Original v2 revision: 3890

flashrom: Check all mmap() calls and print helpful Linux error message.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r385 | stuge | 2009-01-22 23:53:59 +0100 (Thu, 22 Jan 2009) | 9 lines

Original v2 revision: 3889

flashrom: Provide some hints for the user in case /dev/mem mmap fails.

resolves #121

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r384 | stuge | 2009-01-18 07:39:32 +0100 (Sun, 18 Jan 2009) | 8 lines

Original v2 revision: 3869

flashrom: Fix ICH9 locking register address and add important debug output.

Signed-off-by: FENG yu ning <fengyuning1984@gmail.com>
Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: FENG yu ning <fengyuning1984@gmail.com>

------------------------------------------------------------------------
r383 | stuge | 2009-01-15 03:13:18 +0100 (Thu, 15 Jan 2009) | 7 lines

Original v2 revision: 3862

flashrom: Add ICH opcode debugging.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r382 | hailfinger | 2009-01-15 01:48:24 +0100 (Thu, 15 Jan 2009) | 18 lines

Original v2 revision: 3861

Similarly to flashchips array, this patch intends to make the table
board_pciid_enables more readable.

Signed-off-by: Stephan Guilloux <stephan.guilloux@free.fr>

> What real problem does this solve?

1. Next time someone adds a new struct member, we avoid mistakes of
ordering of initializers
2. we avoid mistakes in the first place.

The .x = y stuff was added for a (good) reason, I think this is an
improvement.
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r381 | stuge | 2009-01-13 15:32:27 +0100 (Tue, 13 Jan 2009) | 7 lines

Original v2 revision: 3860

flashrom: Always print address when verification fails, not only with -V.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r380 | stuge | 2009-01-12 22:31:14 +0100 (Mon, 12 Jan 2009) | 11 lines

Original v2 revision: 3859

flashrom: Board enable for GIGABYTE GA-MA78G-DS3H

This board has 2x MX25L8005 flash chips behind an IT8718F LPC->SPI bridge.
The board uses GIGABYTE's patented BIOS failover technology, and at this point
we do not know how to control which of the two chips flashrom actually hits.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Yul Rottmann <yulrottmann@bitel.net>

------------------------------------------------------------------------
r379 | stuge | 2009-01-12 22:28:03 +0100 (Mon, 12 Jan 2009) | 7 lines

Original v2 revision: 3858

flashrom: IT8718F works just like IT8716F.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Yul Rottmann <yulrottmann@bitel.net>

------------------------------------------------------------------------
r378 | stuge | 2009-01-12 22:00:35 +0100 (Mon, 12 Jan 2009) | 9 lines

Original v2 revision: 3857

flashrom: Check return value of fscanf()/fwrite()/fread()

Fix build error on distros with warn_unused_result attributes in glibc.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Yul Rottmann <yulrottmann@bitel.net>

------------------------------------------------------------------------
r377 | stuge | 2009-01-11 04:31:02 +0100 (Sun, 11 Jan 2009) | 9 lines

Original v2 revision: 3855

flashrom: Update usage in README

Mimicked from flashrom.c

Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r376 | hailfinger | 2009-01-08 17:53:13 +0100 (Thu, 08 Jan 2009) | 13 lines

Original v2 revision: 3853

Add erase and write functions to the following chip definitions:

AT25DF021 AT25DF041A AT25DF081 AT25DF161 AT25DF321 AT25DF321A AT25DF641
AT25F512B AT25FS010 AT25FS040 AT26DF081A AT26DF161 AT26DF161A AT26DF321
AT26F004

Straight from the data sheets, untested because I lack the hardware.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r375 | hailfinger | 2009-01-08 05:56:59 +0100 (Thu, 08 Jan 2009) | 14 lines

Original v2 revision: 3852

The flashrom man page has incomplete author/copyright sections and an
incorrect license section.
- Remove the copyright listings and refer the reader to the source
  files.
- Update the author list to those which have copyright messages in the
source files.
- Correct the license from GPL v2+ to (GPL v2, with some files under
  later versions as well)

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r374 | hailfinger | 2009-01-08 04:40:17 +0100 (Thu, 08 Jan 2009) | 11 lines

Original v2 revision: 3851

This patch improves machine parseability and human readability of
flashchips.c over what's currently in flashrom HEAD.
The explicit initialization makes sure any future struct flashchip
reordering is not needed. (Except for the case where we need arrays
of some of the struct members.)

Signed-off-by: Stephan Guilloux <mailto:stephan.guilloux@free.fr>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r373 | uwe | 2009-01-07 13:35:09 +0100 (Wed, 07 Jan 2009) | 8 lines

Original v2 revision: 3850

Add SST49LF020 support.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r372 | uwe | 2009-01-07 13:15:46 +0100 (Wed, 07 Jan 2009) | 8 lines

Original v2 revision: 3849

Add AMD-768 chipset support.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r371 | uwe | 2009-01-07 13:11:13 +0100 (Wed, 07 Jan 2009) | 8 lines

Original v2 revision: 3848

Add i631x LPC support.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r370 | uwe | 2008-12-22 17:42:59 +0100 (Mon, 22 Dec 2008) | 10 lines

Original v2 revision: 3834

If you pass a bogus layout file to the -l option flashrom will segfault.
Fix that by throwing an error instead.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>


------------------------------------------------------------------------
r369 | uwe | 2008-12-22 17:40:45 +0100 (Mon, 22 Dec 2008) | 13 lines

Original v2 revision: 3833

Add another board-enable line for the Kontron 986LCD-M/mITX.

There seem to be at least two versions of the board out there, and the
subsystem IDs changed between the versions.

Patch successfully tested on hardware.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Peter Stuge <peter@stuge.se>


------------------------------------------------------------------------
r368 | stuge | 2008-12-22 15:12:08 +0100 (Mon, 22 Dec 2008) | 7 lines

Original v2 revision: 3830

flashrom: Initialize ICH SPI opcodes also for ICH9 and later.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r367 | stuge | 2008-12-15 03:32:11 +0100 (Mon, 15 Dec 2008) | 18 lines

Original v2 revision: 3814

* add a generic preop-opcode-pair table.

* rename ich_check_opcodes to ich_init_opcodes.

* let ich_init_opcodes do not need to access flashchip structure:
  . move the definition of struct preop_opcode_pair to a better place
  . remove preop_opcode_pairs from 'struct flashchip'
  . modify ich_init_opcodes and generate_opcodes so that they do not access the flashchip structure

* call ich_init_opcodes during chipset enable. Now OPCODES generation mechanism works.

* fix a coding style mistake.

Signed-off-by: FENG yu ning <fengyuning1984@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r366 | hailfinger | 2008-12-10 11:32:05 +0100 (Wed, 10 Dec 2008) | 10 lines

Original v2 revision: 3809

Add 28 flash chips of the MX29 series to the flashrom ID table and
support the MX29LV040C.

MX29LV040C probe and read support tested by khetzal on IRC.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r365 | hailfinger | 2008-12-09 00:51:45 +0100 (Tue, 09 Dec 2008) | 7 lines

Original v2 revision: 3806

Kill obsolete and misplaced comment.

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>

------------------------------------------------------------------------
r364 | stepan | 2008-12-08 19:16:58 +0100 (Mon, 08 Dec 2008) | 9 lines

Original v2 revision: 3805

Generates OPCODES struct from the ICH7/ICH9/VIA chipset if its SPI
configuration is locked down.

Signed-off-by: FENG yu ning <fengyuning1984@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r363 | stepan | 2008-12-08 19:15:10 +0100 (Mon, 08 Dec 2008) | 8 lines

Original v2 revision: 3804

Breaks chip info into multiple lines.

Signed-off-by: FENG yu ning <fengyuning1984@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r362 | stuge | 2008-12-06 02:37:09 +0100 (Sat, 06 Dec 2008) | 18 lines

Original v2 revision: 3803

flashrom: Display test status in -L chip listing

Looks like this:

Supported flash chips:          Tested OK operations:   Known BAD operations:

AMD Am29F002(N)BB                                       
AMD Am29F002(N)BT               PROBE READ ERASE WRITE  
AMD Am29F016D                                           
AMD Am29F040B                   PROBE READ ERASE WRITE  
AMD Am29LV040B                                          
Atmel AT45CS1282                                        READ 

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r361 | stuge | 2008-12-05 12:58:43 +0100 (Fri, 05 Dec 2008) | 11 lines

Original v2 revision: 3799

flashrom: Add AMD SB700 flash enable

This patch adds SB700 support to flashrom. The code for enabling the flash
rom is the same as for SB600. It was tested (read, write, verify) with an
ASUS M3A-H/HDMI which contains a Macronix MX25L8005.

Signed-off-by: Niels Ole Salscheider <niels_ole@salscheider-online.de>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r360 | stuge | 2008-12-05 12:56:57 +0100 (Fri, 05 Dec 2008) | 9 lines

Original v2 revision: 3798

flashrom: Fix compilation of r3797 with gcc-4.3.2

Thanks to Niels Ole Salscheider for the problem report.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r359 | stuge | 2008-12-05 03:22:30 +0100 (Fri, 05 Dec 2008) | 9 lines

Original v2 revision: 3797

flashrom: Check if erase succeeds and exit with error on failure.

flashrom used to exit 0 even if erase failed. Not anymore.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r358 | hailfinger | 2008-12-04 01:58:10 +0100 (Thu, 04 Dec 2008) | 30 lines

Original v2 revision: 3793

Add RDID/REMS IDs for the following flash chips:

SST_25VF512A_REMS
SST_25VF010_REMS
SST_25VF020_REMS
SST_25VF040_REMS
SST_25VF040B_REMS
SST_25VF080_REMS
SST_25VF080B_REMS
SST_25VF032B_REMS
SST_26VF016
SST_26VF032
W_25X16
W_25X32
W_25X64

Straight from the data sheets.

The REMS IDs help in case the RDID opcode is unavailable (due to opcode
lockdown) or unsupported by the chip.

Some day, we need to pair probe functions together with IDs. Multiple
pairs can exist per chip and duplicating chip definitions does not
really make sense.

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>

------------------------------------------------------------------------
r357 | stuge | 2008-12-04 00:36:48 +0100 (Thu, 04 Dec 2008) | 9 lines

Original v2 revision: 3792

flashrom: gcc thinks base could be used uninitialized, so shut it up.

Bug from r3791.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r356 | stuge | 2008-12-03 22:39:56 +0100 (Wed, 03 Dec 2008) | 10 lines

Original v2 revision: 3791

flashrom: Fix bug in r3790

If flashbase was set before probe_flash() it would only ever be used once, for
the very first flash chip probe.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r355 | stuge | 2008-12-03 22:24:40 +0100 (Wed, 03 Dec 2008) | 10 lines

Original v2 revision: 3790

Replace #ifdefs for sc520 systems by run time probing.

fixes #109

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r354 | stepan | 2008-11-29 16:07:15 +0100 (Sat, 29 Nov 2008) | 9 lines

Original v2 revision: 3782

Copyright update by Jason Wang for freshly written sb600 code.

Signed-off-by:  Jason Wang<Qingpei.wang@amd.com>
Reviewed-by:    Joe, Bao <Zheng.Bao@amd.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r353 | hailfinger | 2008-11-29 00:47:55 +0100 (Sat, 29 Nov 2008) | 7 lines

Original v2 revision: 3781

Declare special commands to support the Atmel AT25F512A.

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>

------------------------------------------------------------------------
r352 | hailfinger | 2008-11-29 00:45:27 +0100 (Sat, 29 Nov 2008) | 9 lines

Original v2 revision: 3780

If a chip has any TEST_BAD_* flag set, we don't even list the
unsupported functions, giving the user the impression that the
unsupported functions are tested.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r351 | uwe | 2008-11-28 22:36:51 +0100 (Fri, 28 Nov 2008) | 11 lines

Original v2 revision: 3779

Add support for the AMD/ATI SB600 southbridge SPI functionality.

This has been tested by Uwe Hermann on an RS690/SB600 board.

Signed-off-by: Jason Wang <Qingpei.Wang@amd.com>
Reviewed-by: Joe Bao <zheng.bao@amd.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r350 | hailfinger | 2008-11-28 06:40:27 +0100 (Fri, 28 Nov 2008) | 10 lines

Original v2 revision: 3776

Add SST25VF080B flash chip support.
This is the first chip which uses the infrastructure for alternative
erase commands, namely spi_chip_erase_60_c7().

Signed-off-by:  Jason Wang <Qingpei.Wang@amd.com>
Reviewed-by:   Joe Bao <zheng.bao@amd.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r349 | hailfinger | 2008-11-28 02:25:00 +0100 (Fri, 28 Nov 2008) | 24 lines

Original v2 revision: 3775

Flashrom already has the following probe functions:
- probe_spi_rdid with opcode 0x9f, usually 3 bytes ID
- probe_spi_res with opcode 0xab, usually 1 byte ID
We are missing the following probe function:
- probe_spi_rems with opcode 0x90, usually 2 bytes ID

RDID provides best specifity (manufacturer, device class and device) and
RES is supported by quite a few old chips. However, RES only returns one
byte and there are multiple flash chips with different sizes on the
market and all of them have the same RES ID.
REMS is from the same age as RES, but it provides a manufacturer and a
device ID. It is therefore on par with the probing for parallel flash
chips and specific enough.

The order in which chips should be detected is as follows:
1. RDID
2. REMS
3. RES

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r348 | hailfinger | 2008-11-27 23:48:48 +0100 (Thu, 27 Nov 2008) | 18 lines

Original v2 revision: 3774

The existing check in probe_spi_res() was right for SPI controllers
which support all commands, but may not exist.
For controllers which support only a subset of commands, it will fail in
unexpected ways. Even if a command is supported by the controller, it
may be unavailable if the controller is locked down.

The new logic checks if RDID could be issued and its return values made
sense (not 0xff 0xff 0xff). In that case, RES probing is not performed.
Otherwise, we try RES.
There is one drawback: If RDID returned unexpected values, we don't
issue a RES probe. However, in that case we should try to match RDID
anyway.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: FENG yu ning <fengyuning1984@gmail.com>

------------------------------------------------------------------------
r347 | stuge | 2008-11-24 21:23:23 +0100 (Mon, 24 Nov 2008) | 9 lines

Original v2 revision: 3769

Add support for 32Mbit SPI flash SST25VF032B. Tested on gigabyte m57sli.

File util/flashrom/flash.h already had correct ID for that part.

Signed-off-by: Tero O Peippola <xeropp@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r346 | hailfinger | 2008-11-18 01:43:14 +0100 (Tue, 18 Nov 2008) | 11 lines

Original v2 revision: 3758

Currently flashrom assumes every vendor BIOS shares our view about which
SPI opcodes should be placed in which location. Move to a less
optimistic implementation and actually use the generic SPI read
functions. They're useful for abstracting exactly this stuff and that
makes them the preferred choice.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r345 | hailfinger | 2008-11-18 01:41:02 +0100 (Tue, 18 Nov 2008) | 22 lines

Original v2 revision: 3757

Check for failed SPI command execution in flashrom. Although SPI itself
does not have a mechanism to signal command failure, the SPI host may be
unable to send a given command over the wire due to security or hardware
limitations. The current code ignores these mechanisms completely and
simply assumes almost every command succeeds. Complain if SPI command
execution fails.

Since locked down Intel chipsets (like the one we had problems with
earlier) only allow a small subset of commands, find the common subset
of commands between the chipset and the ROM in the chip erase case. That
is accomplished by the new spi_chip_erase_60_c7() which can be used for
chips supporting both 0x60 and 0xc7 chip erase commands.

Both parts of the patch address problems seen in the real world. The
increased verbosity for the error case will help us diagnose and address
problems better.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Otherwise: Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r344 | hailfinger | 2008-11-18 01:36:26 +0100 (Tue, 18 Nov 2008) | 24 lines

Original v2 revision: 3756

Implement read support for the following Atmel chips:
AT25DF021
AT25DF041A
AT25DF081
AT25DF161
AT25DF321A
AT25DF641
AT25F512B
AT25FS010
AT25FS040
AT26DF041
AT26DF081A
AT26DF161
AT26DF161A
AT26DF321
AT26F004

I double-checked the data sheets and am confident this will work.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r343 | mraudsepp | 2008-11-17 16:31:56 +0100 (Mon, 17 Nov 2008) | 8 lines

Original v2 revision: 3755

flashrom: SST39VF020 TEST_OK_ PROBE READ ERASE WRITE

Tested fully on a ThinCan DBE61A

Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Acked-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
------------------------------------------------------------------------
r342 | hailfinger | 2008-11-15 14:55:43 +0100 (Sat, 15 Nov 2008) | 60 lines

Original v2 revision: 3754

The AT25 and AT26 series SPI chips from Atmel are plain EEPROMs.
The AT45 series SPI chips are DataFlash EEPROMs which means they have
odd (non-power-of-two) sector sizes, but some of the DataFlash chips can
be configured or ordered with power-of-two sector sizes.

Add probe support for the following Atmel SPI chips:
AT25DF021
AT25DF041A
AT25DF081
AT25DF161
AT25DF321A
AT25DF641
AT25F512B
AT25FS010
AT25FS040
AT26DF041
AT26DF081A
AT26DF161
AT26DF161A
AT26DF321
AT26F004
AT45CS1282
AT45DB011D
AT45DB021D
AT45DB041D
AT45DB081D
AT45DB161D
AT45DB321C
AT45DB321D
AT45DB642D

Add an explanation why the following chips can't be probed:
AT45BR3214B
AT45D011
AT45D021A
AT45D041A
AT45D081A
AT45D161
AT45DB011
AT45DB011B
AT45DB021A
AT45DB021B
AT45DB041A
AT45DB081A
AT45DB161
AT45DB161B
AT45DB321
AT45DB321B
AT45DB642

Add the ID, but no probing function for this chip:
AT25F512A

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Tested-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Andriy Gapon <avg@icyb.net.ua>
Acked-by: Myles Watson <mylesgw@gmail.com>

------------------------------------------------------------------------
r341 | stuge | 2008-11-08 02:39:12 +0100 (Sat, 08 Nov 2008) | 9 lines

Original v2 revision: 3736

flashrom: SST39SF040 TEST_OK_ PROBE READ ERASE WRITE

Per report from Mario Rogen. Thanks!

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r340 | hailfinger | 2008-11-05 23:54:36 +0100 (Wed, 05 Nov 2008) | 8 lines

Original v2 revision: 3731

The ST M25P16 chip has been confirmed to work fine for probe, read,
erase and write by St?\195?\169phan Guilloux.

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>

------------------------------------------------------------------------
r339 | hailfinger | 2008-11-04 13:11:12 +0100 (Tue, 04 Nov 2008) | 25 lines

Original v2 revision: 3730

Add support for 8 new chips to flashrom and fix up 2 existing chips
as well.
Replace age-old TODO comments with real explanations.

Fixed chips:
Fujitsu MBM29F400TC (ID definition)
Macronix MX29F002T (chip name)

New chips:
Fujitsu MBM29F004BC
Fujitsu MBM29F004TC
Fujitsu MBM29F400BC
Macronix MX25L512
Macronix MX25L1005
Macronix MX25L2005
Macronix MX25L6405
Macronix MX29F002B

Straight from the data sheets, compile tested only.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r338 | hailfinger | 2008-11-03 01:20:22 +0100 (Mon, 03 Nov 2008) | 8 lines

Original v2 revision: 3723

Dump ICH8/ICH9/ICH10 SPI registers in flashrom.
This helps a lot if we have to track down configuration weirdnesses.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r337 | hailfinger | 2008-11-03 01:02:11 +0100 (Mon, 03 Nov 2008) | 21 lines

Original v2 revision: 3722

Add additional SPI sector erase and chip erase command functions to
flashrom. Not all chips support all commands, so allow the implementer
to select the matching function.
Fix a layering violation in ICH SPI code to be less bad. Still not
perfect, but the new code is shorter, more generic and
architecturally
more sound.

TODO (in a separate patch):
- move the generic sector erase code to spi.c
- decide which erase command to use based on info about the chip
- create a generic spi_erase_all_sectors function which calls the
generic sector erase function
  
Thanks to Stefan for reviewing and commenting.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r336 | stepan | 2008-11-02 20:51:50 +0100 (Sun, 02 Nov 2008) | 9 lines

Original v2 revision: 3721

Drop nr/opcode_index parameter from run_opcode and search the opmenu for the opcode instead.
This is slightly slower (ha, ha), but works on boards with a locked opmenu. Tested on ICH7 and works.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r335 | hailfinger | 2008-11-02 15:25:11 +0100 (Sun, 02 Nov 2008) | 10 lines

Original v2 revision: 3717

Add support for the ST M50FW002 chip to flashrom. Identification only,
erase/write are not implemented.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

tested and
Acked-by: Elia Yehuda <z4ziggy@gmail.com>

------------------------------------------------------------------------
r334 | uwe | 2008-10-30 04:10:17 +0100 (Thu, 30 Oct 2008) | 13 lines

Original v2 revision: 3708

Mark two more chips as fully tested (trivial).

 - SST SST39SF010A
 - Winbond W29C011

Tested by me on actual hardware, all operations.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r333 | stepan | 2008-10-29 23:13:20 +0100 (Wed, 29 Oct 2008) | 10 lines

Original v2 revision: 3707

Flashrom support for some Numonyx parts (M25PE)

using block erase d8 as discussed with Peter Stuge

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r332 | eswierk | 2008-10-29 15:54:36 +0100 (Wed, 29 Oct 2008) | 8 lines

Original v2 revision: 3706

Enable SPI boot flash support on EP80579, which has the ICH7 register set
(trivial).

Signed-off-by: Ed Swierk <eswierk@aristanetworks.com>
Acked-by: Ed Swierk <eswierk@aristanetworks.com>

------------------------------------------------------------------------
r331 | uwe | 2008-10-28 13:00:59 +0100 (Tue, 28 Oct 2008) | 12 lines

Original v2 revision: 3697

Mark Winbond W39V040FA" (512 KB) as fully supported, tested by
Martin Stecklum <stecky@gmx.net> (both write and erase).

The tests were done on an MSI MS-7065 board, so that's supported now
too (wiki page will be updated).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r330 | uwe | 2008-10-28 12:50:05 +0100 (Tue, 28 Oct 2008) | 11 lines

Original v2 revision: 3696

Add support for the Intel 82371MX (MPIIX) southbridge (trivial).

Untested, but should work just as well as the other *PIIX* southbridges
according to the datasheets.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r329 | uwe | 2008-10-26 19:40:42 +0100 (Sun, 26 Oct 2008) | 10 lines

Original v2 revision: 3694

Add support for the Intel 82371FB PIIX and 82371SB (PIIX3) southbridges.

Tested on PIIX3 hardware.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Corey Osgood <corey.osgood@gmail.com>


------------------------------------------------------------------------
r328 | uwe | 2008-10-25 20:03:50 +0200 (Sat, 25 Oct 2008) | 8 lines

Original v2 revision: 3693

Add support for the VIA VT82C586A/B chipset, improve documentation.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r327 | uwe | 2008-10-22 00:09:02 +0200 (Wed, 22 Oct 2008) | 10 lines

Original v2 revision: 3682

Reduce serial output, otherwise flashing will fail very often (trivial).

This has been tested on hardware by me.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r326 | uwe | 2008-10-18 23:14:13 +0200 (Sat, 18 Oct 2008) | 8 lines

Original v2 revision: 3669

Coding-style fixes for flashrom, partly indent-aided (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r325 | stuge | 2008-10-18 15:54:30 +0200 (Sat, 18 Oct 2008) | 10 lines

Original v2 revision: 3668

flashrom: Allow the SiS 620 chipset to detect and read at least 256kb chips.

Based on the 5595 datasheet and uniflash 1.40 sources, only looking for info
about SiS620.

Signed-off-by: Urja Rannikko <urjaman@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r324 | mjones | 2008-10-15 19:50:29 +0200 (Wed, 15 Oct 2008) | 11 lines

Original v2 revision: 3659

SB600 has four write once LPC ROM protect areas. It is not possible to write
enable that area once the register is set so print a warning.

Signed-off-by: Marc Jones <marcj.jones@amd.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r323 | hailfinger | 2008-10-10 22:54:41 +0200 (Fri, 10 Oct 2008) | 10 lines

Original v2 revision: 3648

Add ICH10 support to flashrom.

The ICH9 and ICH10 data sheets are identical regarding FWH/SPI flash
interfaces, so this just adds the required PCI IDs.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r322 | stuge | 2008-10-10 22:43:17 +0200 (Fri, 10 Oct 2008) | 7 lines

Original v2 revision: 3647

flashrom: Check that a filename was specified also when using force read

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r321 | uwe | 2008-10-07 14:21:12 +0200 (Tue, 07 Oct 2008) | 12 lines

Original v2 revision: 3639

Support for AM29F002(N)B[BT]. Fully tested on AM29F002NBT.

Probing, reading, and erasing use the Jedec-routines,
whereas writing resort to the recent write_en29f002a(),
since also these chips use a byte wise algorithm.

Signed-off-by: Mats Erik Andersson <mats.andersson@gisladisker.se>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r320 | stuge | 2008-09-30 06:13:32 +0200 (Tue, 30 Sep 2008) | 14 lines

Original v2 revision: 3619

This patch fixes support for the AT49F002N(T) chip in the flashrom tool.

It replaces the write function to one based on write_byte_program_jedec()
instead of write_page_write_jedec(), as this part does not support page
programming.
I have verified the NT variant to fully work now, and adjusted the test
status accordingly. The N variant *should* also work with this patch, but
remains untested.

Signed-off-by: Tim ter Laak <timl@scintilla.utwente.nl>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r319 | stuge | 2008-09-30 06:00:23 +0200 (Tue, 30 Sep 2008) | 9 lines

Original v2 revision: 3618

flashrom: ST M29F040B status TEST_OK_ PROBE READ ERASE WRITE

Per report from Daniel Lindenaar. Thanks!

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r318 | stuge | 2008-09-29 23:21:36 +0200 (Mon, 29 Sep 2008) | 7 lines

Original v2 revision: 3616

flashrom: Fix typo in r3615 (TEST_PREW -> TEST_OK_PREW)

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r317 | uwe | 2008-09-29 20:48:23 +0200 (Mon, 29 Sep 2008) | 10 lines

Original v2 revision: 3615

Mark the SyncMOS S29C51002T as working (trivial).

All operations tested by me on hardware.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r316 | uwe | 2008-09-26 15:19:02 +0200 (Fri, 26 Sep 2008) | 13 lines

Original v2 revision: 3602

Activate proper support for EN29F002(A)(N)[BT].

Fully tested for Probe/Read/Erase/Write on EN29F002NT.
Jedec subroutines 'probe_jedec()' and 'erase_chip_jedec()'
are still in use, but a tailored 'write_en29f002a()' is
needed due to a byte wise writing mechanism for this chip.

Signed-off-by: Mats Erik Andersson <mats.andersson@gisladisker.se>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r315 | stuge | 2008-09-10 11:55:10 +0200 (Wed, 10 Sep 2008) | 9 lines

Original v2 revision: 3570

flashrom: Winbond W49V002A TEST_OK_ PROBE READ ERASE WRITE

Per report from Kevin O'Connor. Thanks Kevin!

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r314 | stuge | 2008-09-07 05:14:27 +0200 (Sun, 07 Sep 2008) | 7 lines

Original v2 revision: 3569

flashrom: Debug print actual time base calculated by myusec_calibrate_delay()

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r313 | stuge | 2008-09-04 01:10:05 +0200 (Thu, 04 Sep 2008) | 13 lines

Original v2 revision: 3562

flashrom: Only find "unknown .. SPI chip" if no other chip was found

This removes the false positive matches we've been seeing, and also removes
the true positive match in case there is more than one flash chip and the 2nd
or 3rd are unknown - but I think that case is uncommon enough to warrant the
improvement in the common case. Use flashrom -frc forced read if you have the
uncommon case, and/or please add the flash chip to the flashchips array.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r312 | stuge | 2008-09-02 02:26:11 +0200 (Tue, 02 Sep 2008) | 9 lines

Original v2 revision: 3557

flashrom: SST49LF016C TEST_OK_ PROBE READ ERASE WRITE

Per test report from Bari Ari. Thanks!

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r311 | stuge | 2008-08-27 23:28:41 +0200 (Wed, 27 Aug 2008) | 9 lines

Original v2 revision: 3541

flashrom: SST25VF016B TEST_OK_ PROBE READ ERASE WRITE

Per test report from Ward.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r310 | hailfinger | 2008-08-20 22:31:41 +0200 (Wed, 20 Aug 2008) | 7 lines

Original v2 revision: 3532

flashrom: Recognize the Intel EP80579 LPC flash interface.

Signed-off-by: Ed Swierk <eswierk@arastra.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r309 | uwe | 2008-08-19 23:51:39 +0200 (Tue, 19 Aug 2008) | 9 lines

Original v2 revision: 3528

Add support for MSI KT4V to flashrom. The KT4V is autodetected and supports
the KT3 Ultra 2 with "-m msi:kt4v" (but is not autodetected, yet).

Signed-off-by: Sean Nelson <snelson@nmt.edu>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r308 | segher | 2008-08-12 13:58:00 +0200 (Tue, 12 Aug 2008) | 13 lines

Original v2 revision: 3502

flashrom: Fix error -EINVAL on mmap()

Don't calculate "flash_baseaddr" until the final value of "size"
is known, otherwise we end up trying to map a page right after
the end of memory.

Fixes #112.

Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r307 | stuge | 2008-08-08 12:55:57 +0200 (Fri, 08 Aug 2008) | 9 lines

Original v2 revision: 3485

flashrom: ST M50FW040 TEST_OK PROBE READ ERASE WRITE

Per test report from Marcel Konrad. Thanks!

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r306 | stepan | 2008-08-02 17:13:58 +0200 (Sat, 02 Aug 2008) | 8 lines

Original v2 revision: 3464

update copyright year (trivial)

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r305 | stepan | 2008-08-02 16:58:49 +0200 (Sat, 02 Aug 2008) | 8 lines

Original v2 revision: 3462

tested another intel chip (trivial)

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r304 | stuge | 2008-07-21 19:48:40 +0200 (Mon, 21 Jul 2008) | 15 lines

Original v2 revision: 3431

flashrom: Winbond W39V040C and MSI K8T Neo2-F

W39V040C does standard JEDEC commands except chip erase so add a small driver.
probe_w39v040c() prints the block lock pin status when a chip is found.

The Neo2 board enable matches on 8237-internal IDE and onboard NIC PCI IDs.

Many thanks to Daniel McLellan for testing all of this on hardware!
Build tested by Uwe.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r303 | hailfinger | 2008-07-11 02:06:38 +0200 (Fri, 11 Jul 2008) | 8 lines

Original v2 revision: 3420

Fix and clean up coreboot image detection heuristic.
Additional compile fix for NetBSD.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r302 | stuge | 2008-07-07 08:38:51 +0200 (Mon, 07 Jul 2008) | 17 lines

Original v2 revision: 3418

flashrom: Trivial SPI cleanups

While writing a new SPI driver I fixed some things in the SPI code:
All calls to spi_command() had unneccessary #define duplications, and in some
cases the read count define could theoretically become harmful because NULL was
passed for the read buffer. Avoid a crash, should someone change the #defines.

I also noticed that the only caller of spi_page_program() was the it87 driver,
and spi_page_program() could only call back into the it87 driver. Removed the
function for easier-to-follow code and made it8716f_spi_page_program() static.
The ichspi driver's static page functions are already static.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r301 | stuge | 2008-07-07 07:14:06 +0200 (Mon, 07 Jul 2008) | 7 lines

Original v2 revision: 3417

flashrom: Trivial indent fix in ichspi.c

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r300 | hailfinger | 2008-07-07 01:04:01 +0200 (Mon, 07 Jul 2008) | 11 lines

Original v2 revision: 3416

r3415 removed symbolic constants for device IDs by accident.
flash.h is a database of known IDs, whereas flashchips.c is a database
of chips for which support has been implemented. Keep it that way.

Trivial.

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>

------------------------------------------------------------------------
r299 | stuge | 2008-07-06 19:35:30 +0200 (Sun, 06 Jul 2008) | 19 lines

Original v2 revision: 3415

flashrom: Add AMIC A29002

This patch adds support to the AMIC A29002 chip in its top and bottom
configuration to flashrom. Additionally, the alphabetic order of the
AMIC chips was fixed.

The datasheet is at <http://www.amictechnology.com/pdf/A29002.pdf>.

A29002T PREW functionality was tested and works.

This flash chip has asymmetric sector layout so it is important to use the
mx29f002 driver, which does chip erase before writing, rather than am29f040b,
which uses sector erase.

Signed-off-by: Andreas Thienemann <andreas@bawue.net>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r298 | stepan | 2008-07-05 11:48:30 +0200 (Sat, 05 Jul 2008) | 8 lines

Original v2 revision: 3414

Adding support for flashing system with Nvidia MCP67

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r297 | stuge | 2008-07-05 06:12:37 +0200 (Sat, 05 Jul 2008) | 10 lines

Original v2 revision: 3413

flashrom: Add PCI IDs for EPIA-CN

Uses the 0.0 Host bridge CN700/VN800/P4M800CE/Pro and 11.0 ISA bridge devices
with their 1106:aa08 subsystem id:s for autodetection.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r296 | uwe | 2008-07-03 21:26:44 +0200 (Thu, 03 Jul 2008) | 8 lines

Original v2 revision: 3412

Minor cosmetics, e.g. make stuff fit in 80 chars/line etc. (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r295 | hailfinger | 2008-07-03 21:08:52 +0200 (Thu, 03 Jul 2008) | 8 lines

Original v2 revision: 3411

Mark SST49LF040B as tested.
Thanks to Paul Seidler and Ward Vandewege for testing.

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>

------------------------------------------------------------------------
r294 | uwe | 2008-07-03 20:58:58 +0200 (Thu, 03 Jul 2008) | 8 lines

Original v2 revision: 3410

Mark the SST SST49LF040 as OK (tested by me), all operations (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r293 | stuge | 2008-07-03 18:54:05 +0200 (Thu, 03 Jul 2008) | 9 lines

Original v2 revision: 3409

flashrom: Winbond W25x80 TEST_OK PROBE READ ERASE WRITE

Per test report from Bj?\195?\182rn Gerhart. Thanks!

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r292 | hailfinger | 2008-07-03 16:40:06 +0200 (Thu, 03 Jul 2008) | 9 lines

Original v2 revision: 3408

Improve coreboot image detection heuristic in flashrom. It's not
absolutely perfect, but the likelihood of this check to fail is
0.000000000000000000000000013 (1.3*10^-26) which is good enough for me.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de> 

------------------------------------------------------------------------
r291 | stuge | 2008-07-02 19:15:47 +0200 (Wed, 02 Jul 2008) | 7 lines

Original v2 revision: 3407

flashrom: probe_flash() cleanup for better code readability

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r290 | stepan | 2008-07-02 15:33:09 +0200 (Wed, 02 Jul 2008) | 12 lines

Original v2 revision: 3406

set w39v080fa to fully supported. I'm am flashing this chip several times a
day.
Also enable unlocking which is only needed when running coreboot, that slipped
in the original commit and through the original review ;-) So it must be
trivial enough.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r289 | stuge | 2008-07-02 05:07:46 +0200 (Wed, 02 Jul 2008) | 9 lines

Original v2 revision: 3405

flashrom: Update to TEST_OK for Winbond W39V040FA PROBE READ

Thanks to Jake for the test report!

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r288 | stuge | 2008-07-02 05:03:58 +0200 (Wed, 02 Jul 2008) | 7 lines

Original v2 revision: 3404

flashrom: Don't rm *~ in make clean, who knows what files that could be

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r287 | stuge | 2008-07-02 02:59:29 +0200 (Wed, 02 Jul 2008) | 9 lines

Original v2 revision: 3403

flashrom: Unknown vendor:board message can be triggered by -m too

Thanks to Stefan for pointing this one out.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r286 | stuge | 2008-07-02 02:47:30 +0200 (Wed, 02 Jul 2008) | 10 lines

Original v2 revision: 3402

flashrom: Case insensitive matching of vendor:board strings in coreboot table

Needed at least for GIGABYTE:m57sli in coreboot to match gigabyte:m57sli in
flashrom.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r285 | stepan | 2008-07-01 01:45:22 +0200 (Tue, 01 Jul 2008) | 18 lines

Original v2 revision: 3401

First attempt to clean up SPI probing and create a common
construct: the flash bus.

At some point the flash bus will be part of struct flashchip.

Pardon me for pushing this in, but I think it is important to beware of further
decay and it will improve things for other developers in the short run.

Carl-Daniel, I will consider your suggestions in another patch. I want to keep
things from getting too much for now. The patch includes Rudolf's VIA SPI
changes though.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r284 | ruik | 2008-06-30 23:48:54 +0200 (Mon, 30 Jun 2008) | 8 lines

Original v2 revision: 3400

Mine AMIC flash chip needs 4 bytes RDID. This enables to use the new probing code.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Peter Stuge <peter@stuge.se>


------------------------------------------------------------------------
r283 | ruik | 2008-06-30 23:45:17 +0200 (Mon, 30 Jun 2008) | 8 lines

Original v2 revision: 3399

Mine AMIC flash chip needs 4 bytes RDID. Following patch adds support for that.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Peter Stuge <peter@stuge.se>


------------------------------------------------------------------------
r282 | ruik | 2008-06-30 23:38:30 +0200 (Mon, 30 Jun 2008) | 9 lines

Original v2 revision: 3398

This patch adds support for VIA SPI controller on VT8237S. It is similar with
few documented exceptions to ICH7 SPI controller.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Peter Stuge <peter@stuge.se>


------------------------------------------------------------------------
r281 | hailfinger | 2008-06-29 12:57:13 +0200 (Sun, 29 Jun 2008) | 7 lines

Original v2 revision: 3397

Add a debug marker after ICH SPI opcode programming.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r280 | stuge | 2008-06-29 03:30:41 +0200 (Sun, 29 Jun 2008) | 12 lines

Original v2 revision: 3395

flashrom: Fix ICH7 non-SPI that broke in r3393

r3393 assumed that ICH7 always used SPI. This patch resets ich7_detected back
to 0 when BOOT BIOS Straps indicate something else than SPI.

Also fixes a build error in ichspi.c with gcc 4.2.2.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r279 | hailfinger | 2008-06-29 01:02:22 +0200 (Sun, 29 Jun 2008) | 7 lines

Original v2 revision: 3394

Use symbolic constants for PCI subsystem probing in flashrom.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r278 | stepan | 2008-06-27 18:28:34 +0200 (Fri, 27 Jun 2008) | 11 lines

Original v2 revision: 3393

* ICH7 SPI support
* fix some variable names in ichspi.c (Offset -> offset)
* Dump ICH7 SPI bar with -V
* Improve error message in case IOPL goes wrong. (It might not even be an IOPL)

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Peter Stuge <peter@stuge.se>


------------------------------------------------------------------------
r277 | stepan | 2008-06-27 17:18:20 +0200 (Fri, 27 Jun 2008) | 6 lines

Original v2 revision: 3392

indent according to development guidelines (trivial)
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r276 | uwe | 2008-06-26 13:57:27 +0200 (Thu, 26 Jun 2008) | 8 lines

Original v2 revision: 3390

Winbond W39V080FA: Probe and Read are OK.

Signed-off-by: Jens K?\195?\188hnel <coreboot@jens.kuehnel.org>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r275 | stuge | 2008-06-24 10:18:13 +0200 (Tue, 24 Jun 2008) | 9 lines

Original v2 revision: 3389

flashrom: Test status OK for ST M50FW040 PROBE READ

Per test report from Alex Perez. Thanks Alex!

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r274 | stuge | 2008-06-24 06:17:14 +0200 (Tue, 24 Jun 2008) | 9 lines

Original v2 revision: 3388

flashrom: Test status OK for Macronix MX25L8005 PROBE READ ERASE WRITE

Per test report from Andrew Paprocki. Thanks Andrew!

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r273 | stuge | 2008-06-24 04:09:09 +0200 (Tue, 24 Jun 2008) | 10 lines

Original v2 revision: 3387

flashrom: Increase delay in probe_jedec() after Product ID Entry to 10ms

We should follow data sheet timing, even if chips have been tested to answer
faster in the field.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r272 | stuge | 2008-06-24 03:22:03 +0200 (Tue, 24 Jun 2008) | 16 lines

Original v2 revision: 3386

flashrom: Slight restructure of SPI probe_ functions

Preparation for a probe optimization patch. This patch does not change any
functionality. spi_probe_rdid was tested to still work on my M57SLI rev 2.

The idea is to have error checks return error immediately when something
fails, rather than having code inside an if block where the condition
tests for success.

This means: Less indentation, more clear what the code is checking.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Ward Vandewege <ward@gnu.org>

------------------------------------------------------------------------
r271 | uwe | 2008-06-22 20:50:25 +0200 (Sun, 22 Jun 2008) | 8 lines

Original v2 revision: 3385

Some flashrom documentation fixes, and removal of duplicated info (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r270 | stuge | 2008-06-22 19:54:03 +0200 (Sun, 22 Jun 2008) | 7 lines

Original v2 revision: 3384

flashrom: A few changes were committed before the DoC remove, update README.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r269 | stepan | 2008-06-22 19:06:41 +0200 (Sun, 22 Jun 2008) | 15 lines

Original v2 revision: 3382

flashrom: Remove dead M-Systems Disk on Chip code

DOC support has been disabled by default for many years. The write function
does nothing but print text. It has a call to write_page_md2802() commented
out, but that function does not exist. This is dead code with ugly #ifdefs.

Updates README to reflect that there was a time when there was code, but it
didn't work. Removes M-Systems #defines and also includes svn rm msys_doc.*

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r268 | stuge | 2008-06-22 04:04:49 +0200 (Sun, 22 Jun 2008) | 9 lines

Original v2 revision: 3379

flashrom: Update test status to TEST_OK_PREW for ST M50FLW080A and SST49LF008A

Many thanks to Julio Cesar Costa for the test report!

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r267 | stuge | 2008-06-22 04:00:39 +0200 (Sun, 22 Jun 2008) | 7 lines

Original v2 revision: 3378

flashrom: Some Makefile cleaning

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r266 | stuge | 2008-06-21 06:39:17 +0200 (Sat, 21 Jun 2008) | 7 lines

Original v2 revision: 3377

flashrom: Fix OBJS in Makefile to compile stm50flw0x0x.c like the others

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r265 | stuge | 2008-06-21 06:23:10 +0200 (Sat, 21 Jun 2008) | 7 lines

Original v2 revision: 3376

flashrom: Uppercase AMIC since that's what they write in datasheets.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r264 | stuge | 2008-06-21 03:02:20 +0200 (Sat, 21 Jun 2008) | 7 lines

Original v2 revision: 3375

flashrom: Update comment to match delay change in probe_jedec() r3373

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r263 | stuge | 2008-06-21 02:21:22 +0200 (Sat, 21 Jun 2008) | 9 lines

Original v2 revision: 3374

flashrom: Update test status for Atmel AT29C020 and SST29EE010

Thanks to Urja Rannikko for reporting test results with these flash chips.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r262 | stuge | 2008-06-21 02:19:52 +0200 (Sat, 21 Jun 2008) | 10 lines

Original v2 revision: 3373

flashrom: Increase delay in probe_jedec() to 2ms to reliably detect AT29C020

Run time is increased a few 100ms but this is needed for reliability.
I consider this trivial.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r261 | stuge | 2008-06-20 04:58:42 +0200 (Fri, 20 Jun 2008) | 7 lines

Original v2 revision: 3372

flashrom: Show expected and read byte on verify failure. Trivial.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r260 | stuge | 2008-06-18 15:36:34 +0200 (Wed, 18 Jun 2008) | 24 lines

Original v2 revision: 3368

flashrom: Add support for AMIC Technology A49LF040A and do not probe W29EE011 anymore

Jens sent the first patch that added A49LF040A to flash.h and flashchips.c
using _jedec and _49lf040 functions.

An issue was found with probe_w29ee011() for the Winbond W29EE011, which
caused the A49LF040A to no longer respond to any commands.

Ward made a patch to disable probing by default for the W29EE011 following
some discussion. Using -c W29EE011 will make flashrom probe for the chip.

Peter did some more datasheet diving and found that the Pm49FL00x functions
suited this chip quite well because of the block locking registers in
A49LF040A, and finally tested PROBE READ ERASE WRITE to work on ALIX.3c3.

Ward confirmed that this works on alix.2c3 too.

Signed-off-by: Jens Kuehnel <coreboot@jens.kuehnel.org>
Signed-off-by: Ward Vandewege <ward@gnu.org>
Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Ward Vandewege <ward@gnu.org>

------------------------------------------------------------------------
r259 | stuge | 2008-06-18 04:08:40 +0200 (Wed, 18 Jun 2008) | 19 lines

Original v2 revision: 3367

flashrom: Force read unknown flash chips

When flash chip detection fails, it is still useful and possible to read the
flash chip contents. If no flash chip is found in normal probes and the
-f -r -c CHIPNAME options are given, a successful probe for the specified
chip is forced, and then flashrom reads the flash chip using either the read
function for the specified chip, or if there is none, a simple memcpy().

The patch also moves the global variable int force in flashrom.c into main()
and passes it as a parameter to layout.c:show_id(), which was the only other
function that used the variable. This is needed to avoid confusion with the
new parameter int force which is added to flashrom.c:probe_flash() and used
to force probe success for the chip named in char *chip_to_probe.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Ward Vandewege <ward@gnu.org>

------------------------------------------------------------------------
r258 | stuge | 2008-06-13 03:39:45 +0200 (Fri, 13 Jun 2008) | 10 lines

Original v2 revision: 3366

flashrom: Board enable and autodetection for GIGABYTE GA-7VT600

Uses the VT8237 ISA bridge with mainboard subsystem ID and Realtek 8139 with
mainboard subsystem ID for board detection.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Lyos Gemini Norezel <lyos.gemininorezel@gmail.com>

------------------------------------------------------------------------
r257 | stuge | 2008-06-11 04:24:15 +0200 (Wed, 11 Jun 2008) | 9 lines

Original v2 revision: 3365

flashrom: Add support for Amic Technology A29040B flash chip.

PROBE READ tested by Lyos Gemini Norezel on BioStar P4M80-M4.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Lyos Gemini Norezel <lyos.gemininorezel@gmail.com>

------------------------------------------------------------------------
r256 | stuge | 2008-06-11 04:22:42 +0200 (Wed, 11 Jun 2008) | 13 lines

Original v2 revision: 3364

flashrom: Board enable and autodetection for BioStar P4M80-M4.

Thanks to Reinder for clean room reverse engineering and data sheet diving!

This board is autodetected because there are some good BioStar subsystem IDs.
Matching uses onboard VT6420 SATA RAID with subsystem BioStar 3206 and
onboard UniChrome Pro IGP graphics with subsystem BioStar 1202.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Lyos Gemini Norezel <lyos.gemininorezel@gmail.com>

------------------------------------------------------------------------
r255 | stuge | 2008-06-03 02:22:00 +0200 (Tue, 03 Jun 2008) | 14 lines

Original v2 revision: 3360

Ward writes:

SST SST49LF160C is confirmed to work for PROBE READ ERASE WRITE, at least on
2 MCP55-based boards (gigabyte m57sli v1 and supermicro h8dmr).

On the m57sli board, it only works > 512K when booted into coreboot; the
proprietary bios seems to do something weird where it locks rom access down
to the first 512K of the chip.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r254 | mraudsepp | 2008-05-28 01:51:55 +0200 (Wed, 28 May 2008) | 7 lines

Original v2 revision: 3358

Revert r3357 and fix it as intended to (forgotten header commit instead of typo)

Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Acked-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>

------------------------------------------------------------------------
r253 | mraudsepp | 2008-05-28 00:20:30 +0200 (Wed, 28 May 2008) | 7 lines

Original v2 revision: 3357

Fix typo introduced in r3356 that breaks build (trivial).

Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Acked-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>

------------------------------------------------------------------------
r252 | stuge | 2008-05-27 22:54:09 +0200 (Tue, 27 May 2008) | 13 lines

Original v2 revision: 3356

flashrom: MX25L4005, S25FL016A, W39V040B, W39V080A, SST49LF008A tests.

I have tested MX25L4005, S25FL016A and W39V080A myself.

Thanks also to the following testers:
SST49LF008A Bernhard M. Wiedemann
W39V040B Dan Lenski

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r251 | mraudsepp | 2008-05-27 11:10:52 +0200 (Tue, 27 May 2008) | 9 lines

Original v2 revision: 3350

Mark SST49LF004A/B as tested (trivial).

Tested by me on actual hardware (all operations) - Artec Group DBE62 with SST 49LF004B

Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Acked-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>

------------------------------------------------------------------------
r250 | uwe | 2008-05-27 01:12:25 +0200 (Tue, 27 May 2008) | 16 lines

Original v2 revision: 3349

Mark the following chips as tested (trivial).

  - AMD Am29F040B
  - SST SST39SF020A
  - Winbond W29C020C
  - Winbond W29EE011
  - Winbond W49F002U

All of them tested by me on actual hardware (all operations).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r249 | uwe | 2008-05-23 00:47:04 +0200 (Fri, 23 May 2008) | 12 lines

Original v2 revision: 3348

A bunch of cosmetic improvements (trivial).

 - Fix typos and inconsistencies.
 - Drop duplicate line which tells us the chip name twice.
 - Also print the chip vendor, not only the name.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r248 | uwe | 2008-05-22 23:26:42 +0200 (Thu, 22 May 2008) | 8 lines

Original v2 revision: 3347

Mark more chips as tested (all operations), tested on ASUS P4B266 (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r247 | uwe | 2008-05-22 23:19:38 +0200 (Thu, 22 May 2008) | 16 lines

Original v2 revision: 3346

Add support for the ASUS P4B266 board.

Tested on actual hardware.

This patch add an ich_gpio_raise() function which can be re-used by other
board-specific funtions which need to raise GPIOs on ICHx southbridges.

This also fixes bug #7, see http://tracker.coreboot.org/trac/coreboot/ticket/7,
as it turned out the ICH2 (and other ICHx) code works fine.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Peter Stuge <peter@stuge.se>


------------------------------------------------------------------------
r246 | hailfinger | 2008-05-22 15:42:23 +0200 (Thu, 22 May 2008) | 7 lines

Original v2 revision: 3345

Add support for Amic A25L40P SPI flash.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r245 | hailfinger | 2008-05-22 15:22:45 +0200 (Thu, 22 May 2008) | 11 lines

Original v2 revision: 3344

Changes to make flashrom compile (and work) on FreeBSD.
This patch addresses different argument order of outX() calls,
FreeBSD-specific headers, difference in certain type names and system
interface names, and also FreeBSD-specific way of gaining IO port
access.

Signed-off-by: Andriy Gapon <avg@icyb.net.ua>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r244 | stuge | 2008-05-21 09:10:15 +0200 (Wed, 21 May 2008) | 7 lines

Original v2 revision: 3341

Myles reported SST49LF080A status -> TESTED_PREW

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r243 | stuge | 2008-05-17 03:08:58 +0200 (Sat, 17 May 2008) | 18 lines

Original v2 revision: 3332

flashrom: Support Pm49FL004/2 Block Locking Registers

The PMC chips understand both LPC and FWH flash commands. When in FWH mode
(MSR_DIVIL_BALL_OPT(0x51400015) = 0x00000f7d on 5536 boards) the Block
Locking Registers by default lock the flash chip for write and erase - in
addition to any chipset write protection.

This patch adds unlock operations before Pm49FL004/2 write and erase, and
it includes an svn mv pm49fl004.c pm49fl00x.c

Thanks go to Nikolay for this patch.

Signed-off-by: Nikolay Petukhov <nikolay.petukhov@gmail.com>
Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Bari Ari <bari@onelabs.com>

------------------------------------------------------------------------
r242 | hailfinger | 2008-05-16 23:11:53 +0200 (Fri, 16 May 2008) | 13 lines

Original v2 revision: 3331

I looked at the datasheet and erase_sector_39sf020() is totally and
completely wrong. It was a straight cut'n'paste from SST 28SF040 code
and the person doing the cut'n'paste didn't even bother to check the
data sheet. The SST 39SF020 is completely incompatible with the 28SF040.

No need for replacement. According to the data sheet, standard JEDEC
commands will work and we have those commands in the tree already.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Joseph Smith <joe@settoplinux.org>

------------------------------------------------------------------------
r241 | hailfinger | 2008-05-16 16:39:39 +0200 (Fri, 16 May 2008) | 8 lines

Original v2 revision: 3327

ICH8 and ICH9 have an almost identical SPI interface, only the location
of the SPIBAR differs. Add ICH8 support to the ICH9 code.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r240 | hailfinger | 2008-05-16 15:00:28 +0200 (Fri, 16 May 2008) | 8 lines

Original v2 revision: 3326

Add support for the Atmel AT25DF321 SPI flash (tested).
Change ST M25P32 status to tested.

Signed-off-by: Dominik Geyer <dominik.geyer@kontron.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r239 | hailfinger | 2008-05-16 14:55:55 +0200 (Fri, 16 May 2008) | 8 lines

Original v2 revision: 3325

Add support for SPI chips on ICH9. This is done by using the generic SPI
interface.

Signed-off-by: Dominik Geyer <dominik.geyer@kontron.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r238 | hailfinger | 2008-05-16 02:19:52 +0200 (Fri, 16 May 2008) | 8 lines

Original v2 revision: 3324

Enable IT8716F LPC-to-SPI write cycle translation in flashrom if the
IT8716F decodes any address to the attached SPI ROM.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r237 | hailfinger | 2008-05-16 00:32:08 +0200 (Fri, 16 May 2008) | 7 lines

Original v2 revision: 3323

Print detailed status register information for SST25VF series flash.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r236 | hailfinger | 2008-05-15 05:24:43 +0200 (Thu, 15 May 2008) | 9 lines

Original v2 revision: 3321

Lots of new SST flash chip IDs. Only a subset has been added to
flashchips.c, but the IDs in flash.h will make lookups easier if anybody
wants to add support for them.

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>

------------------------------------------------------------------------
r235 | hailfinger | 2008-05-15 05:19:49 +0200 (Thu, 15 May 2008) | 14 lines

Original v2 revision: 3320

Add support for the JEDEC RES (Read Electronic Signature and Resume from
Powerdown) SPI command to flashrom to identify older SPI chips which
can't handle JEDEC RDID. Since RES gives a one-byte identifier which is
shared among many different vendors and even different sizes, we want to
match RES as a last resort if RDID returns 0xff 0xff 0xff.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>

This is a heavily reworked version of a patch by Fredrik Tolf, which was
Signed-off-by: Fredrik Tolf <fredrik@dolda2000.com>

------------------------------------------------------------------------
r234 | hailfinger | 2008-05-14 16:51:22 +0200 (Wed, 14 May 2008) | 7 lines

Original v2 revision: 3314

Add more infrastructure for flashrom ICH9 support.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r233 | hailfinger | 2008-05-14 14:22:38 +0200 (Wed, 14 May 2008) | 7 lines

Original v2 revision: 3310

Add the Intel 6300ESB as known chipset to the chipset struct enables.

Signed-off-by: Claus Gindhart <claus.gindhart@kontron.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r232 | hailfinger | 2008-05-14 14:09:31 +0200 (Wed, 14 May 2008) | 7 lines

Original v2 revision: 3309

Fix crash caused by division by zero for unknown flash chips.

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>

------------------------------------------------------------------------
r231 | hailfinger | 2008-05-14 14:03:06 +0200 (Wed, 14 May 2008) | 11 lines

Original v2 revision: 3308

Check the JEDEC vendor ID for correct parity. 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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r230 | hailfinger | 2008-05-14 06:27:02 +0200 (Wed, 14 May 2008) | 8 lines

Original v2 revision: 3306

Add lots of ATMEL SPI flash chips to flash.h.
Add a few flashchips already mentioned in flash.h to flashchips.c

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>

------------------------------------------------------------------------
r229 | hailfinger | 2008-05-14 01:03:12 +0200 (Wed, 14 May 2008) | 9 lines

Original v2 revision: 3305

flashrom: Move all IT87xx specific SPI routines from spi.c to a separate
file it87spi.c.
No behavioural changes, but greatly improved SPI abstraction.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r228 | hailfinger | 2008-05-13 16:58:23 +0200 (Tue, 13 May 2008) | 8 lines

Original v2 revision: 3302

flashrom: Move the SPI #defines from spi.c to spi.h
This patch has no code changes.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r227 | hailfinger | 2008-05-13 16:01:22 +0200 (Tue, 13 May 2008) | 8 lines

Original v2 revision: 3301

Change the SPI parts of flashrom to prepare for a merge of
ICH9 SPI support. In theory, this patch has no behaviour changes.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r226 | hailfinger | 2008-05-12 23:19:53 +0200 (Mon, 12 May 2008) | 9 lines

Original v2 revision: 3300

MX25L3205 and W25x40 have been confirmed to probe/read/erase/write OK
by Harald Gutmann.
SST39VF040 has been confirmed to probe OK by misi e.

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>

------------------------------------------------------------------------
r225 | hailfinger | 2008-05-12 16:25:31 +0200 (Mon, 12 May 2008) | 9 lines

Original v2 revision: 3299

Add SST39VF512, SST39VF010, SST39VF040 support to flashrom. The SST39LF
series has the same IDs.
Add short AMIC vendor ID to flashrom.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r224 | hailfinger | 2008-05-11 01:40:51 +0200 (Sun, 11 May 2008) | 12 lines

Original v2 revision: 3296

Improve flashrom SPI abstraction, second step.
This paves the way to have a fully generic generic_spi_command without
knowledge about any SPI controller.

The third step would be calling SPI controller functions via a function
pointer.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r223 | stuge | 2008-05-11 01:07:52 +0200 (Sun, 11 May 2008) | 9 lines

Original v2 revision: 3295

flashrom: Rename generic_spi_*() functions to spi_*()

This is a very early step toward cleaning up SPI code in flashrom.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r222 | stuge | 2008-05-08 02:31:44 +0200 (Thu, 08 May 2008) | 19 lines

Original v2 revision: 3291

flashrom: Probe for up to 3 flash chips.

Currently there is an ongoing technology migration from LPC/FWH to SPI chips.
For this reason some boards have multiple chips of different technologies
onboard. This patch makes flashrom probe for up to 3 chips and if more than
one chip is found flashrom exits, asking the user to specify -c.

[root@localhost src]# ./flashrom
...
Multiple flash chips were detected: SST49LF008A M25P16@ICH9
Please specify which chip to use with the -c <chipname> option.
[root@localhost src]# 

Signed-off-by: Claus Gindhart <claus.gindhart@kontron.com>
Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Claus Gindhart <claus.gindhart@kontron.com>

------------------------------------------------------------------------
r221 | stuge | 2008-05-03 06:34:37 +0200 (Sat, 03 May 2008) | 15 lines

Original v2 revision: 3277

flashrom: Add a tested bitmap field to the flash chip table.

Two bits indicate OK and BAD for each operation PROBE READ ERASE WRITE.
8 bits out of 32 are in use now. No bits set means nothing has been tested.
For chips with at least one operation that is not tested or not working, the
user is asked to email a report to a special email adress so that the table
can be updated.

All chips are TEST_UNTESTED for now.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r220 | stepan | 2008-04-29 15:46:38 +0200 (Tue, 29 Apr 2008) | 8 lines

Original v2 revision: 3275

flashrom: Enable ROM decode range to 1MB for vt8237r

Signed-off-by: Bari Ari <bari@onelabs.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r219 | stepan | 2008-04-28 19:51:09 +0200 (Mon, 28 Apr 2008) | 17 lines

Original v2 revision: 3274

The generic jedec.c does not work for the ST M50FLW flash
devices, because they need an unlock command first.
For this reason, ST M50FLW support is moved to a
new HW support module, because any change in jedec.c
would bear the risk to cause problems with the already
supported devices.

It's already tested with ST M50FLW080A; the other
chips of this family i dont have available, so i couldnt
test it.

Signed-off-by: Claus Gindhart <claus.gindhart@kontron.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r218 | stuge | 2008-04-28 16:47:30 +0200 (Mon, 28 Apr 2008) | 8 lines

Original v2 revision: 3273

flashrom: Handle NULL probe, erase and write function pointers in the
flashchips table. The read pointer was already checked properly.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r217 | stepan | 2008-04-24 11:07:57 +0200 (Thu, 24 Apr 2008) | 14 lines

Original v2 revision: 3260

Flash pages, which where excluded from updating using the exclude or the
layout option, as well as areas, whose flash contents already contain the
desired data, will be skipped.
These ensures absolute data security of critical areas (BIOS boot block), 
e.g. against a sudden power off or a CPU hangup during flashing. As a
nice side effect, it speeds up the flash process, if the BIOS to be flashed
is very similar to the version in flash. 

Signed-off-by: Claus Gindhart <claus.gindhart@kontron.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r216 | eswierk | 2008-04-08 00:33:33 +0200 (Tue, 08 Apr 2008) | 8 lines

Original v2 revision: 3221

ST M50FW016 and ST M50FW040 support the 82802ab command set, not jedec.

Signed-off-by: Ed Swierk <eswierk@arastra.com>
Acked-by: Joseph Smith <joe@smittys.pointclark.net>


------------------------------------------------------------------------
r215 | hailfinger | 2008-03-18 01:54:10 +0100 (Tue, 18 Mar 2008) | 7 lines

Original v2 revision: 3167

Add ICH9 detection to flashrom. Straight from the datasheet, untested.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r214 | stepan | 2008-03-18 01:36:18 +0100 (Tue, 18 Mar 2008) | 11 lines

Original v2 revision: 3166

oops. forgot to add the file.

Support for the Winbond W39V080FA series of chips.
Support for flashing on the Kontron 986LCD-M board.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r213 | stepan | 2008-03-17 23:59:40 +0100 (Mon, 17 Mar 2008) | 9 lines

Original v2 revision: 3165

Support for the Winbond W39V080FA series of chips.
Support for flashing on the Kontron 986LCD-M board.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r212 | stepan | 2008-03-16 20:44:13 +0100 (Sun, 16 Mar 2008) | 9 lines

Original v2 revision: 3153

check whether SST FWH chip was successfully erased on flashchip -E, too
(trivial)

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r211 | uwe | 2008-03-16 03:06:25 +0100 (Sun, 16 Mar 2008) | 8 lines

Original v2 revision: 3152

Sort list of flash chips alphabetically, add comment (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r210 | stepan | 2008-03-16 00:41:19 +0100 (Sun, 16 Mar 2008) | 7 lines

Original v2 revision: 3151

remove nasty warning that happened due to our vendor detection
mechanism.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r209 | uwe | 2008-03-15 00:55:58 +0100 (Sat, 15 Mar 2008) | 8 lines

Original v2 revision: 3146

Re-add code erroneously removed in r3140.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r208 | linux_junkie | 2008-03-15 00:32:03 +0100 (Sat, 15 Mar 2008) | 6 lines

Original v2 revision: 3145

Changes M50FW080 to use 82802ab.c instead of jedec.c. This fixes the problem of not being able to erase the chip.

Signed-off-by: Joseph Smith <joe@smittys.pointclark.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r207 | hailfinger | 2008-03-14 18:20:59 +0100 (Fri, 14 Mar 2008) | 13 lines

Original v2 revision: 3144

Prepare for ICH7/ICH8 SPI support by adding some debugging for all
ICH* chipsets. Functionality (except printing) should be unchanged.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

Ward says:
This code detects the ICH8 chipset on my laptop, and it appears to use
SPI.

Acked-by: Ward Vandewege <ward@gnu.org>

------------------------------------------------------------------------
r206 | uwe | 2008-03-14 02:24:39 +0100 (Fri, 14 Mar 2008) | 8 lines

Original v2 revision: 3142

Fix broken flashrom build.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r205 | hailfinger | 2008-03-14 01:33:42 +0100 (Fri, 14 Mar 2008) | 7 lines

Original v2 revision: 3141

Fix up one forgotten revert in r3140.

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>

------------------------------------------------------------------------
r204 | hailfinger | 2008-03-14 01:02:25 +0100 (Fri, 14 Mar 2008) | 7 lines

Original v2 revision: 3140

Revert the delete of 82802ab.c in r3137.

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>

------------------------------------------------------------------------
r203 | uwe | 2008-03-13 19:52:51 +0100 (Thu, 13 Mar 2008) | 13 lines

Original v2 revision: 3139

Also print the chip vendor name in --list-supported output (trivial).

Cosmetic changes in some files, partly bending the 80-characters-per-line
rule in this special case, as the 80-character-limited version looks
equally crappy even in an 80x25 console/xterm, so let's make it at least
look good in a high-resolution xterm.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r202 | uwe | 2008-03-13 19:41:07 +0100 (Thu, 13 Mar 2008) | 8 lines

Original v2 revision: 3138

Also print the required -m option in --list-supported output (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r201 | hailfinger | 2008-03-13 13:43:31 +0100 (Thu, 13 Mar 2008) | 7 lines

Original v2 revision: 3137

Drop 82802ab.c as it is identical to sharplhf00l04.c.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r200 | uwe | 2008-03-12 13:28:40 +0100 (Wed, 12 Mar 2008) | 10 lines

Original v2 revision: 3134

Drop the useless rom.layout file. It's just an example, likely never
been used in the last few years, and the contents are available in
the README already anyway.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Ward Vandewege <ward@gnu.org>


------------------------------------------------------------------------
r199 | uwe | 2008-03-12 12:54:51 +0100 (Wed, 12 Mar 2008) | 9 lines

Original v2 revision: 3133

Add --list-supported option to flashrom which lists the supported
ROM chips, chipsets, and mainboards (Closes #90).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Ward Vandewege <ward@gnu.org>


------------------------------------------------------------------------
r198 | uwe | 2008-03-04 17:29:54 +0100 (Tue, 04 Mar 2008) | 9 lines

Original v2 revision: 3126

Add missing license header to layout.c. The file was written by
Stefan Reinauer for coresystems GmbH in 2005, as confirmed on IRC.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r197 | stepan | 2008-02-20 12:11:18 +0100 (Wed, 20 Feb 2008) | 12 lines

Original v2 revision: 3110

flashrom: Add board_enable for Artec Group DBE61 and DBE62

Also add a comment about NULL subsystem IDs leaving the board entry out
of auto-detection logic.

Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Acked-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r196 | uwe | 2008-02-15 00:22:20 +0100 (Fri, 15 Feb 2008) | 15 lines

Original v2 revision: 3102

With this small change it is possible to build flashrom again when
specifying custom CFLAGS/LDFLAGS from the make command line like:

  make CFLAGS="..." LDFLAGS="..."

I need to do this when building flashrom in a cross compiler environment
like buildroot for a foreign target.

Signed-off-by: Clark Rawlins <clark@bit63.org>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r195 | uwe | 2008-02-11 15:32:45 +0100 (Mon, 11 Feb 2008) | 17 lines

Original v2 revision: 3101

flashrom: further cleanups to enable_flash_cs5536

 - Remove the "enable write to flash" message, as the caller appears to
   already report that.

 - Move the 'modprobe msr' suggestions to the first lseek64 error handling, as
   we get an error there already.

 - Rename a perror string from "read" to "read msr", as we use the latter
   already in this function for another read.

Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r194 | hailfinger | 2008-02-09 03:03:06 +0100 (Sat, 09 Feb 2008) | 8 lines

Original v2 revision: 3099

Flashrom: Add board enable for VIA EPIA SP.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Corey Osgood <corey.osgood@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r193 | uwe | 2008-02-08 11:10:57 +0100 (Fri, 08 Feb 2008) | 9 lines

Original v2 revision: 3098

Improve error handling and make RCONF_DEFAULT_MSR address be a constant.
Also, move a big code comment to the top of enable_flash_cs5536().

Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r192 | uwe | 2008-02-08 10:59:58 +0100 (Fri, 08 Feb 2008) | 15 lines

Original v2 revision: 3097

This implements support for devices using AMD Geode companion chip
CS5536 that have the Boot ROM on NOR flash that is directly connected to
FLASH_CS3 (Boot Flash Chip Select).
We need to write enable it in the NORF_CTL MSR register for flashrom to
be able to write to it, including JEDEC probe commands.

This patch allows us to stop using AMD gx_utils.ko for BIOS flashing on
the DBE61.

Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r191 | hailfinger | 2008-02-06 23:07:58 +0100 (Wed, 06 Feb 2008) | 12 lines

Original v2 revision: 3091

Handle JEDEC JEP106W continuation codes in SPI RDID. Some vendors like
Programmable Micro Corp (PMC) need this.
Both the serial and parallel flash JEDEC detection routines would
benefit from a parity/sanity check of the vendor ID. Will do this later.

Add support for the PMC Pm25LV family of SPI flash chips.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Chris Lingard  <chris@stockwith.co.uk>

------------------------------------------------------------------------
r190 | stuge | 2008-01-27 17:21:21 +0100 (Sun, 27 Jan 2008) | 9 lines

Original v2 revision: 3082

Make the vendor name optional in the -m flashrom parameter when there's only
one board name that matches. The full syntax still works, and is required
when two vendors have boards with the same names.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r189 | stuge | 2008-01-27 08:17:14 +0100 (Sun, 27 Jan 2008) | 7 lines

Original v2 revision: 3080

Forgot to add Spansion S25FL016A to README, trivial.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r188 | rminnich | 2008-01-26 08:35:47 +0100 (Sat, 26 Jan 2008) | 11 lines

Original v2 revision: 3078

Correctly disable the ROM area Write Protect bit in the Geode LX.

Signed-off-by: Marc Jones <marc.jones@amd.com>
Acked-by: Peter Stuge <peter@stuge.se>

Tested on the pcengines alix1c and works fine.
Acked-by: Ronald G. Minnich <rminnich@gmail.com>


------------------------------------------------------------------------
r187 | hailfinger | 2008-01-25 02:52:45 +0100 (Fri, 25 Jan 2008) | 8 lines

Original v2 revision: 3074

Add ids and chip entry for Spansion S25FL016A to flashrom, tested,
working.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r186 | hailfinger | 2008-01-22 17:03:19 +0100 (Tue, 22 Jan 2008) | 29 lines

Original v2 revision: 3072

Here is just a little and simple patch to get the MX25L3205D working.
I've tested and verified the chip myself, and it seems to work
everything like supposted, since Carl-Daniel has patched flashrom to
use the read funktion on verifying. 

"benchvice flashrom # ./flashrom -m gigabyte:m57sli -v test.4mb
Calibrating delay loop... OK.
No coreboot table found.
Found chipset "NVIDIA MCP55", enabling flash write... OK.
Found board "GIGABYTE GA-M57SLI-S4": enabling flash write... 
Serial flash segment 0xfffe0000-0xffffffff enabled
Serial flash segment 0x000e0000-0x000fffff enabled
Serial flash segment 0xffee0000-0xffefffff disabled
Serial flash segment 0xfff80000-0xfffeffff enabled
LPC write to serial flash enabled
serial flash pin 29
OK.
MX25L3205 found at physical address 0xffc00000.
Flash part is MX25L3205 (4096 KB).
Flash image seems to be a legacy BIOS. Disabling checks.
Verifying flash... VERIFIED.
benchvice flashrom # ls -l test.4mb
-rw-r--r-- 1 root root 4194304 22. Jan 16:27 test.4mb

Signed-off-by: Harald Gutmann <harald.gutmann@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r185 | hailfinger | 2008-01-22 16:19:01 +0100 (Tue, 22 Jan 2008) | 18 lines

Original v2 revision: 3070

Flashrom did not use the read function for verifying, it used direct memory
access instead. That fails if the flash chip is not mapped completely.
If the read function is set in struct flashchip, use it for verification
as well.

This fixes verification of all SPI flash chips >512 kByte behind an
IT8716F flash translation chip.

"MX25L8005 found at physical address 0xfff00000.
Flash part is MX25L8005 (1024 KB).
Flash image seems to be a legacy BIOS. Disabling checks.
Verifying flash... VERIFIED."

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Harald Gutmann <harald.gutmann@gmx.net>

------------------------------------------------------------------------
r184 | hailfinger | 2008-01-22 15:37:31 +0100 (Tue, 22 Jan 2008) | 9 lines

Original v2 revision: 3069

Make sure we delay writing the next byte long enough in SPI byte
programming.
Minor formatting changes.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Harald Gutmann <harald.gutmann@gmx.net>

------------------------------------------------------------------------
r183 | hailfinger | 2008-01-22 00:55:08 +0100 (Tue, 22 Jan 2008) | 9 lines

Original v2 revision: 3068

Omitting the wait for SPI ready when there is no data to be read, e.g.
readcnt==0 saves 10 seconds with the unconditional 10us delay, reducing
programming time for SST25VF016B to 40-45 secs.

Signed-off-by: Ronald Hoogenboom <hoogenboom30@zonnet.nl>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r182 | uwe | 2008-01-21 16:24:22 +0100 (Mon, 21 Jan 2008) | 11 lines

Original v2 revision: 3067

This patch adds version information to flashrom. Because 'v' and 'V'
are already in use, the patch uses 'R' (for release) and, of course,
'--version'.

Signed-off-by: Bernhard Walle <bernhard.walle@gmx.de>
Acked-by: Ulf Jordan <jordan@chalmers.se>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r181 | hailfinger | 2008-01-19 01:04:46 +0100 (Sat, 19 Jan 2008) | 9 lines

Original v2 revision: 3061

Support SPI flash chips bigger than 512 kByte sitting behind IT8716F
Super I/O performing LPC-to-SPI flash translation.

Signed-off-by: Ronald Hoogenboom <hoogenboom30@zonnet.nl>
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>

------------------------------------------------------------------------
r180 | uwe | 2008-01-18 18:48:51 +0100 (Fri, 18 Jan 2008) | 8 lines

Original v2 revision: 3059

Minor documentation improvements/fixes in the README and manpage (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r179 | stepan | 2008-01-18 17:17:44 +0100 (Fri, 18 Jan 2008) | 7 lines

Original v2 revision: 3058

rename linuxbios_* files in utils repository.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r178 | stepan | 2008-01-18 16:33:10 +0100 (Fri, 18 Jan 2008) | 8 lines

Original v2 revision: 3054

for some reasons the externals did not get committed.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r177 | duwe | 2008-01-11 01:32:07 +0100 (Fri, 11 Jan 2008) | 8 lines

Original v2 revision: 3045

This patch removes '\n' from the help output since this looks a bit strange.
After the patch [...] The line length is still below 80 characters.

Signed-off-by: Bernhard Walle <bernhard.walle@gmx.de>
Acked-by: Torsten Duwe <duwe@lst.de>

------------------------------------------------------------------------
r176 | hailfinger | 2008-01-10 14:27:22 +0100 (Thu, 10 Jan 2008) | 7 lines

Original v2 revision: 3042

Enable MX25L8005 support in flashrom. The #defines were already there.

Signed-off-by: Harald Gutmann <harald.gutmann@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r175 | hailfinger | 2008-01-07 14:48:51 +0100 (Mon, 07 Jan 2008) | 8 lines

Original v2 revision: 3036

Add support for the SST25VF040B 4 Mbit SPI flash chip.
Straight from the data sheet, not tested.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r174 | rminnich | 2008-01-04 18:22:44 +0100 (Fri, 04 Jan 2008) | 6 lines

Original v2 revision: 3033

Add board enable for the gigabyte ga_2761gxdk board
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r173 | hailfinger | 2008-01-04 17:22:09 +0100 (Fri, 04 Jan 2008) | 8 lines

Original v2 revision: 3032

Print at least the vendor for SPI flash chips if the exact chip ID is
unknown.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>

------------------------------------------------------------------------
r172 | hailfinger | 2007-12-31 15:05:08 +0100 (Mon, 31 Dec 2007) | 10 lines

Original v2 revision: 3031

Unfortunately, EN29F002T, EN29F002AT, EN29F002ANT, EN29F002NT all have
exactly the same ID. Improve model number printing.

Add EN29F002(A)(N)B support while I'm at it.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Markus Boas <bios@ryven.de>

------------------------------------------------------------------------
r171 | hailfinger | 2007-12-31 02:49:00 +0100 (Mon, 31 Dec 2007) | 22 lines

Original v2 revision: 3030

Add continuation ID support to jedec.c
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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Corey Osgood <corey.osgood@gmail.com>

------------------------------------------------------------------------
r170 | hailfinger | 2007-12-31 02:18:26 +0100 (Mon, 31 Dec 2007) | 12 lines

Original v2 revision: 3029

This fixes a few vendor IDs to conform with JEDEC publication 106W
(JEP106W), adds some device IDs and provides information about
non-conforming IDs.
The EON change is left to the patch adding EON chips.

This patch should have no effect on code generation.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Corey Osgood <corey.osgood@gmail.com>

------------------------------------------------------------------------
r169 | hailfinger | 2007-12-29 12:05:59 +0100 (Sat, 29 Dec 2007) | 10 lines

Original v2 revision: 3027

All SPI chips mentioned in flashchips.c had their sector size listed as
page size. Fix that. Page size is uniform 256 bytes for SPI.

A sector/block size field in struct flashchip would be nice, though.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Corey Osgood <corey.osgood@gmail.com>

------------------------------------------------------------------------
r168 | hailfinger | 2007-12-29 11:15:58 +0100 (Sat, 29 Dec 2007) | 10 lines

Original v2 revision: 3026

Print the chip status register for all SPI chips on probe if verbose
output is specified.
Pretty-print the chip status register (including block lock information)
for ST M25P family and Macronix MX25L family chips.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Corey Osgood <corey.osgood@gmail.com>

------------------------------------------------------------------------
r167 | hailfinger | 2007-12-29 11:14:38 +0100 (Sat, 29 Dec 2007) | 8 lines

Original v2 revision: 3025

Add 25VF016B support to flashrom. Untested, but verified against the
data sheet.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Corey Osgood <corey.osgood@gmail.com>

------------------------------------------------------------------------
r166 | hailfinger | 2007-12-17 23:22:40 +0100 (Mon, 17 Dec 2007) | 9 lines

Original v2 revision: 3012

Add support for ST M25P05-A, M25P10-A, M25P20, M25P40, M25P16, M25P32,
M25P64, M25P128 to flashrom. ST M25P80 support is already there.
Not tested, but conforming to data sheets and double checked.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>

------------------------------------------------------------------------
r165 | hailfinger | 2007-12-17 15:33:32 +0100 (Mon, 17 Dec 2007) | 12 lines

Original v2 revision: 3009

To make it easier to add new SPI chips to flashchips.c, rename functions
with multiple possible opcodes from linear numbering at the end (_1, _2)
to include the opcode at the end (_60, _c7). That way, you only have to
take a short look at the data sheet and choose the right function by
appending the opcode listed in the data sheet.
No functional changes.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ward Vandewege <ward@gnu.org>

------------------------------------------------------------------------
r164 | hailfinger | 2007-12-16 22:15:27 +0100 (Sun, 16 Dec 2007) | 8 lines

Original v2 revision: 3008

Add support for ST M25P80 chips to flashrom. Detection was tested.
Print status register before erase to help debugging block locks.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Corey Osgood <corey.osgood@gmail.com>

------------------------------------------------------------------------
r163 | hailfinger | 2007-12-10 17:57:59 +0100 (Mon, 10 Dec 2007) | 14 lines

Original v2 revision: 3003

Add support for more atmel chips:
AT49F002
AT49F002N
AT49F002T
AT49F002NT

Only tested the read function on AT49F002T.
datasheet @ http://www.atmel.com/atmel/acrobat/doc1017.pdf

Signed-off-by: Frederico Silva <frederico.silva@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r162 | uwe | 2007-12-04 22:49:06 +0100 (Tue, 04 Dec 2007) | 11 lines

Original v2 revision: 2997

Various coding style fixes, constification, fixed typos (trivial).

Also, s/0xFF80/0xFFC0/ in the Acorp 6A815EPD board-enable, as per
http://www.linuxbios.org/pipermail/linuxbios/2007-December/027750.html

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r161 | uwe | 2007-12-02 20:03:23 +0100 (Sun, 02 Dec 2007) | 9 lines

Original v2 revision: 2995

Add board-enable for Acorp 6A815EPD.

Signed-off-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r160 | jcrouse | 2007-11-13 17:45:22 +0100 (Tue, 13 Nov 2007) | 11 lines

Original v2 revision: 2967

[LinuxBIOS] flashrom support for AMD Geode CS5536

Attached is a patch that enables AMD Geode CS5536 chipset support.  I
have tested it successfully on a MSM800 board from digital logic.

Signed-off-by: Lane Brooks <lbrooks@mit.edu>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>


------------------------------------------------------------------------
r159 | hailfinger | 2007-11-13 15:56:54 +0100 (Tue, 13 Nov 2007) | 11 lines

Original v2 revision: 2962

Fix ATMEL 29C020 detection with flashrom. 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.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r158 | uwe | 2007-10-30 01:56:50 +0100 (Tue, 30 Oct 2007) | 11 lines

Original v2 revision: 2903

Add support for Intel 440MX systems.
Add support for the Fujitsu MBM29F400TC flash part.

Detection and reading works, writing is not tested.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Peter Stuge <peter@stuge.se>


------------------------------------------------------------------------
r157 | stuge | 2007-10-25 06:11:11 +0200 (Thu, 25 Oct 2007) | 13 lines

Original v2 revision: 2897

Added Am29LV040B

Looking through the sources of Uniflash utility I found that this chip
is no more no less than low-voltage variant of Am29F040B but with
different ID.

So I created a very quick patch (attached).

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r156 | hailfinger | 2007-10-22 22:36:16 +0200 (Mon, 22 Oct 2007) | 7 lines

Original v2 revision: 2884

Flashrom: Add more Vendor IDs and ensure correct sorting in flash.h.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r155 | hailfinger | 2007-10-22 18:15:28 +0200 (Mon, 22 Oct 2007) | 8 lines

Original v2 revision: 2881

Introduce block and sector erase routines to flashrom, but do not use
them yet.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r154 | hailfinger | 2007-10-18 19:56:42 +0200 (Thu, 18 Oct 2007) | 10 lines

Original v2 revision: 2876

Remove hardcoded wait from SPI write/erase routines and check the chip
status register instead.
This has been tested by Harald Gutmann <harald.gutmann@gmx.net> with a
MX25L4005 chip.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r153 | uwe | 2007-10-18 02:29:05 +0200 (Thu, 18 Oct 2007) | 8 lines

Original v2 revision: 2875

Documentation fixes and updates (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r152 | hailfinger | 2007-10-18 02:24:07 +0200 (Thu, 18 Oct 2007) | 14 lines

Original v2 revision: 2874

Add generic SPI flash erase and write support to flashrom. The first
chip the code was tested and verified with is the Macronix MX25L4005,
but other chips should work as well.
Timeouts are still hardcoded to data sheet maxima, but the status
register checking code is already there.
Thanks to Harald Gutmann for the initial code on which this is loosely
based.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r151 | uwe | 2007-10-18 01:55:15 +0200 (Thu, 18 Oct 2007) | 8 lines

Original v2 revision: 2873

Some cosmetic cleanups in the flashrom code and output.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r150 | hailfinger | 2007-10-18 00:30:07 +0200 (Thu, 18 Oct 2007) | 10 lines

Original v2 revision: 2868

Fix wrong values/typos in chipset_enable.c. This has been confirmed by
Ed Swierk in
http://www.mail-archive.com/linuxbios@linuxbios.org/msg09788.html .

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r149 | uwe | 2007-10-17 01:36:34 +0200 (Wed, 17 Oct 2007) | 15 lines

Original v2 revision: 2866

Multiple flashrom fixes:

 - Install binary in /usr/sbin (not /usr/bin), as it's a root-only tool.

 - Rename manpage from flashrom.1 to flashrom.8, as section 8 contains
   "System administration commands (usually only for root)".

 - Actually install the manpage upon 'make install'.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r148 | hailfinger | 2007-10-16 23:18:43 +0200 (Tue, 16 Oct 2007) | 8 lines

Original v2 revision: 2864

Add Gigabyte M61P-S3 SPI flash support to board_enable.c

Signed-off-by: Michael van der Kolff <mvanderkolff@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>


------------------------------------------------------------------------
r147 | hailfinger | 2007-10-16 23:09:06 +0200 (Tue, 16 Oct 2007) | 9 lines

Original v2 revision: 2863

Convert the existing it8716f_* functions to generic_spi_* functions by
applying abstraction and wrapping.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r146 | stepan | 2007-10-15 23:45:29 +0200 (Mon, 15 Oct 2007) | 17 lines

Original v2 revision: 2858

(forgot to add spi.c)

Move SPI code out of board_enable.c where it started its life. The SPI
chip finding and SPI chip accessor code is moved as well. This can be
split later if we feel like it.

The non-use of svn cp is intentional because the only history we'd have
to preserve are a few commits which were early prototypes of chip
identification code. For those who intend to look at that history, they
can look at board_enable.c revision 2853.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r145 | stepan | 2007-10-15 23:44:47 +0200 (Mon, 15 Oct 2007) | 15 lines

Original v2 revision: 2857

Move SPI code out of board_enable.c where it started its life. The SPI
chip finding and SPI chip accessor code is moved as well. This can be
split later if we feel like it.

The non-use of svn cp is intentional because the only history we'd have
to preserve are a few commits which were early prototypes of chip
identification code. For those who intend to look at that history, they
can look at board_enable.c revision 2853.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r144 | rminnich | 2007-10-12 23:22:40 +0200 (Fri, 12 Oct 2007) | 10 lines

Original v2 revision: 2850

Changes to flashrom to support the K8N-NEO3, first tested at Google on GSOC day :-)

Also minor changes to remove tab-space combinations where possible. 

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>

------------------------------------------------------------------------
r143 | uwe | 2007-10-10 19:42:20 +0200 (Wed, 10 Oct 2007) | 8 lines

Original v2 revision: 2847

Revert my last cleanup patch.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r142 | uwe | 2007-10-10 18:31:30 +0200 (Wed, 10 Oct 2007) | 8 lines

Original v2 revision: 2846

Cosmetic changes to make the flashrom output more consistent (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r141 | stepan | 2007-10-04 08:26:41 +0200 (Thu, 04 Oct 2007) | 11 lines

Original v2 revision: 2820

[FLASHROM] Fix the help, and print a message when nothing happens

The help implied that writes happen by default, which they don't.  Fix
the text, and say something when we dont specify any commands.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>    
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r140 | ward | 2007-10-02 17:49:25 +0200 (Tue, 02 Oct 2007) | 19 lines

Original v2 revision: 2817


This patch aims to restructure SPI flash support in a more reasonable
way. It introduces a generic SPI host driver for the IT8716F Super I/O
which will enable easy SPI programming without having to care for the
peculiarities of the SPI host.

To activate probing for the IT8716F, you have to use the gigabyte:m57sli
mainboard override. SPI support will then use the gathered SPI host data
to access the SPI flash.

This has been tested sucessfully by Ward Vandewege <ward@gnu.org> on the
GA-M57SLI v2.0, which has a MX25L4005 SPI flash part.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ward Vandewege <ward@gnu.org>


------------------------------------------------------------------------
r139 | ward | 2007-09-27 16:29:57 +0200 (Thu, 27 Sep 2007) | 12 lines

Original v2 revision: 2811


Add preliminary SPI flash identification support for SPI chips attached
to ITE IT8716F Super I/O. Right now this is hardcoded to the Gigabyte
M57SLI board. It works only with rev 2.0 of the board, but it will bail
out on earlier versions, so no damage can occur.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ward Vandewege <ward@gnu.org>


------------------------------------------------------------------------
r138 | uwe | 2007-09-11 17:58:18 +0200 (Tue, 11 Sep 2007) | 9 lines

Original v2 revision: 2770

Change out/in combinations to pci_read/write_byte in
sis630 chipset enable.

Signed-off-by: Alex Beregszaszi <alex@rtfs.hu>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r137 | uwe | 2007-09-09 22:24:29 +0200 (Sun, 09 Sep 2007) | 8 lines

Original v2 revision: 2769

Remove useless 'extern' keywords (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r136 | uwe | 2007-09-09 22:21:05 +0200 (Sun, 09 Sep 2007) | 8 lines

Original v2 revision: 2768

Add '(C)' where it's missing (for consistency reasons).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r135 | uwe | 2007-09-09 22:02:45 +0200 (Sun, 09 Sep 2007) | 16 lines

Original v2 revision: 2767

Add missing license header to udelay.c.

I'm self-ack'ing this, as the origin of the code in udelay.c (and thus
the license and copyright owner) is pretty clear.

The code which is now in udelay.c was split out from flash_rom.c in r1428,
and flash_rom.c, in turn, has been around since the beginning and had a
'Copyright 2000 Silicon Integrated System Corporation' line as well as the
usual GPLv2-or-later license header.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r134 | uwe | 2007-09-08 16:36:01 +0200 (Sat, 08 Sep 2007) | 9 lines

Original v2 revision: 2764

Add a copy of the GPL in the flashrom repository as it's an independent
project (being packaged by distros, among other things).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r133 | uwe | 2007-08-30 12:17:50 +0200 (Thu, 30 Aug 2007) | 8 lines

Original v2 revision: 2753

Add support for the Winbond W29EE011.

Signed-off-by: Markus Boas <ryven@ryven.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r132 | uwe | 2007-08-30 12:11:08 +0200 (Thu, 30 Aug 2007) | 8 lines

Original v2 revision: 2752

Add support for the Winbond W29C040P.

Signed-off-by: Markus Boas <ryven@ryven.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r131 | uwe | 2007-08-29 19:52:32 +0200 (Wed, 29 Aug 2007) | 9 lines

Original v2 revision: 2751

Change all flashrom license headers to use our standard format.
No changes in content of the files.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r130 | uwe | 2007-08-23 18:08:21 +0200 (Thu, 23 Aug 2007) | 8 lines

Original v2 revision: 2748

Cosmetic fixes (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r129 | uwe | 2007-08-23 17:20:38 +0200 (Thu, 23 Aug 2007) | 8 lines

Original v2 revision: 2747

Drop duplicated code (copies of plain JEDEC functions).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r128 | uwe | 2007-08-23 15:34:59 +0200 (Thu, 23 Aug 2007) | 8 lines

Original v2 revision: 2746

Drop a bunch of useless header files, merge them into flash.h.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r127 | uwe | 2007-08-23 12:20:40 +0200 (Thu, 23 Aug 2007) | 8 lines

Original v2 revision: 2745

Move code into *.c files, there's no reason to have it in header files.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r126 | stuge | 2007-08-13 06:10:32 +0200 (Mon, 13 Aug 2007) | 12 lines

Original v2 revision: 2744

Fix bug in probe_28sf040() causing flash corruption on SST49LF160C verify.

The first byte of the flash chip was read at the start of the function
and later written back to address 0 if the flash chip was not identified
as SST28SF040, which means most of the time. This write caused corruption
of flash contents when verifying a SST49LF160C part.

Signed-off-by: Ed Swierk <eswierk@arastra.com>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r125 | uwe | 2007-08-11 18:59:11 +0200 (Sat, 11 Aug 2007) | 9 lines

Original v2 revision: 2743

flashrom: Add board enable for the EPoX EP-BX3.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Peter Stuge <peter@stuge.se>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r124 | uwe | 2007-07-27 05:32:45 +0200 (Fri, 27 Jul 2007) | 8 lines

Original v2 revision: 2742

flashrom: Add missing supported flash chips to the README (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r123 | uwe | 2007-07-25 19:55:45 +0200 (Wed, 25 Jul 2007) | 13 lines

Original v2 revision: 2741

This patch adds support for the M50FLW040A, M50FLW040B, M50FLW080A,
M50FLW080B, M50FW080, M50FW016, M50LPW116, M29W010B flash chips made
by ST to flashrom.

The patch is based on the data sheets of the chips and has not been
tested at all.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r122 | uwe | 2007-07-24 20:18:05 +0200 (Tue, 24 Jul 2007) | 11 lines

Original v2 revision: 2740

This patch adds support for ST M50FW040 and ST M29W040B to flashrom.
Only reading from the chips was tested; writing support is untested.

Thanks to G?\195?\188rkan Seng?\195?\188n <gurkan@linuks.mine.nu> for testing!

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r121 | uwe | 2007-07-04 19:51:49 +0200 (Wed, 04 Jul 2007) | 10 lines

Original v2 revision: 2732

Flashrom: Add support for Tyan Tomcat K7M.

Same board enable as Asus A7V8-MX. Tested by Reinhard Max.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r120 | uwe | 2007-06-06 23:35:45 +0200 (Wed, 06 Jun 2007) | 14 lines

Original v2 revision: 2715

Fix up and document the AMD CS5530/CS5530A support in flashrom.

The previous code was pretty unreadable, undocumented and did some totally
unrelated things (such as mucking with the game port or port 0x92).

This version is tested with a 256 KB chip and should work for the
CS5530 and CS5530A.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r119 | uwe | 2007-06-05 17:02:18 +0200 (Tue, 05 Jun 2007) | 9 lines

Original v2 revision: 2713

flashrom: Document the newly supported IBM x3455 board and the
now-supported Broadcom HT-1000 chipset (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r118 | stepan | 2007-06-05 14:51:52 +0200 (Tue, 05 Jun 2007) | 8 lines

Original v2 revision: 2712

Move GPIO settings to board specific code for IBM x3455

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r117 | stepan | 2007-06-05 12:28:39 +0200 (Tue, 05 Jun 2007) | 8 lines

Original v2 revision: 2711

Add support for BCM HT1000 chipset to flashrom. Tested on IBM x3455.
(trivial)

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r116 | uwe | 2007-05-24 21:17:29 +0200 (Thu, 24 May 2007) | 8 lines

Original v2 revision: 2696

Minor cosmetics (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r115 | stepan | 2007-05-24 11:26:39 +0200 (Thu, 24 May 2007) | 8 lines

Original v2 revision: 2693

drop leftover includes (trivial)

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r114 | stepan | 2007-05-24 11:08:36 +0200 (Thu, 24 May 2007) | 7 lines

Original v2 revision: 2692

some copyright analysis
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r113 | stepan | 2007-05-24 10:48:10 +0200 (Thu, 24 May 2007) | 7 lines

Original v2 revision: 2691

factor out register mapping code (trivial)

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r112 | stepan | 2007-05-23 20:24:58 +0200 (Wed, 23 May 2007) | 8 lines

Original v2 revision: 2690

Unify mmap error messages in flashrom (trivial)

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r111 | stepan | 2007-05-23 19:20:56 +0200 (Wed, 23 May 2007) | 12 lines

Original v2 revision: 2689

big cosmetic offensive on flashrom. (trivial)
* 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.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r110 | uwe | 2007-05-21 23:39:08 +0200 (Mon, 21 May 2007) | 8 lines

Original v2 revision: 2686

Add support for the Winbond W39V040FA chip.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r109 | uwe | 2007-05-20 18:16:13 +0200 (Sun, 20 May 2007) | 15 lines

Original v2 revision: 2677

Flashrom: add support for ASUS P5A (Socket 7, ALi based).

* Add support for the ALi M1533 to chipset_enable.c
* Add some SMBus poking needed for the ASUS P5A, to board_enable.c

Since PCI subsystem IDs are worthless with this board, people will
have to name the board directly.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r108 | uwe | 2007-05-09 12:17:44 +0200 (Wed, 09 May 2007) | 13 lines

Original v2 revision: 2643

Fix coding style of flashrom by running indent on all files:

  indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs *.[ch]

Some minor fixups were required, and maybe a few more cosmetic
change?\209?\149 are needed.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r107 | stuge | 2007-05-04 06:47:04 +0200 (Fri, 04 May 2007) | 17 lines

Original v2 revision: 2627

Add WinBond Super IO helpers.

* These helpers severely clear up winbond superio usage.
* Removed board_iwill_dk8_htx as it can be replaced by
  board_agami_aruma (Mondrian Nuessle).
* Renamed board_agami_aruma to w83627hf_gpio24_raise.
* Clarified comments in w83627hf_gpio24_raise, and added
  some things from the old iwill code.
* Moved all board functions name argument to const.
  (warning breaks build)
* Moved iwill entry in board_pciid_enables.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r106 | uwe | 2007-05-03 12:09:23 +0200 (Thu, 03 May 2007) | 10 lines

Original v2 revision: 2624

Enable flashing on the IWILL DK8-HTX board by configuring the Super I/O
to set the right GPIO pins, so write protection is disabled.

Signed-off-by: Mondrian Nuessle <nuessle@uni-mannheim.de>
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r105 | stuge | 2007-04-28 04:22:59 +0200 (Sat, 28 Apr 2007) | 13 lines

Original v2 revision: 2621

Add initial support for the following flash chips:

 - Atmel AT29C020
 - STMicroelectronics M29F002B
 - STMicroelectronics M29F002T
 - STMicroelectronics M29F002NT

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Signed-off-by: Roger Zauner <roger@eskimo.com>
Acked-by: Peter Stuge <peter@stuge.se>

------------------------------------------------------------------------
r104 | stepan | 2007-04-14 18:32:59 +0200 (Sat, 14 Apr 2007) | 9 lines

Original v2 revision: 2610

Exit on return code of read_layout and print error message to stderr
instead of stdout (trivial)

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r103 | stepan | 2007-04-12 01:31:45 +0200 (Thu, 12 Apr 2007) | 9 lines

Original v2 revision: 2603

Rename flash_rom.c to flashrom.c. The tool is called 'flashrom' after
all.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r102 | uwe | 2007-04-10 00:59:22 +0200 (Tue, 10 Apr 2007) | 8 lines

Original v2 revision: 2601

flashrom: Add VIA CX700 to the list of supported southbridges (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r101 | stepan | 2007-04-10 00:27:45 +0200 (Tue, 10 Apr 2007) | 8 lines

Original v2 revision: 2599

add support for CX700 builtin southbridge
Signed-off-by: Randall Philipson <rtphilipson@cox.net>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r100 | stepan | 2007-04-06 13:58:03 +0200 (Fri, 06 Apr 2007) | 13 lines

Original v2 revision: 2585

Trivial (cosmetic) cleanup:
* Only open /dev/mem once and do it early.
* Drop extern for function prototypes.
* Minimize ts5300 impact in probe_flash()

This cleanup will making ICH7 SPI support quite some easier.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r99 | stepan | 2007-04-05 00:45:58 +0200 (Thu, 05 Apr 2007) | 21 lines

Original v2 revision: 2581

flashrom: split flash_enable.c into chipset_enable.c and board_enable.c

This splits up the ROM Write enable code into chipset specific and
board specific parts. This of course means that a lot of code is
plainly moved about.

* Allows for linuxbios name matching and pci-subsystem id matching.
  The latter uses a double set to properly distuinguish boards despite
  of some known vendors being lax about it.
* Fixes GPIO15 being raised on every VT8235 southbridge, regardless of what
  that line actually controls; rom on EPIA-M, backlight on mitac 8999 laptop.
* Adds flashrom support for Asus A7V400-MX (KM400 + VT8235)
* Island aruma was renamed agami aruma, the board specific code now got
  adjusted. A set of pci-ids was retrieved from source code.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r98 | uwe | 2007-04-01 22:00:32 +0200 (Sun, 01 Apr 2007) | 8 lines

Original v2 revision: 2578

Drop useless and partly even incorrect comments (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r97 | uwe | 2007-04-01 21:44:21 +0200 (Sun, 01 Apr 2007) | 8 lines

Original v2 revision: 2577

Coding style fixes (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r96 | uwe | 2007-03-31 21:48:38 +0200 (Sat, 31 Mar 2007) | 8 lines

Original v2 revision: 2575

Flashrom: Add support for the ICH7-DH southbridge (untested).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Peter Stuge <peter@stuge.se>


------------------------------------------------------------------------
r95 | stepan | 2007-03-22 15:51:45 +0100 (Thu, 22 Mar 2007) | 9 lines

Original v2 revision: 2573

This is a trivial cosmetic fix. Without it, the error message might look like:
Image size doesnt match: Success

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r94 | uwe | 2007-03-07 00:49:49 +0100 (Wed, 07 Mar 2007) | 11 lines

Original v2 revision: 2570

The attached patch adds additional PCI IDs for MCP55 LPC devices to
flashrom. 0x0360 is needed to support the DFI LANParty NF590SLI, and I
am deducing the others based on pci_ids.h in the Linux kernel.

Signed-off-by: Ed Swierk <eswierk@arastra.com>
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r93 | uwe | 2007-03-02 23:16:38 +0100 (Fri, 02 Mar 2007) | 15 lines

Original v2 revision: 2568

flashrom: Fix wrong VT8235 flash enable failed warning.

* Fix harmless but worrying warning where the return value of
  pci_write_byte is misinterpreted.
* Hash together VT8231 and VT8235 code into VT823x. VT8231 is the better
  implementation, but lacked the write protect disable code that's
  apparently needed for VT8235.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r92 | uwe | 2007-03-02 03:25:36 +0100 (Fri, 02 Mar 2007) | 9 lines

Original v2 revision: 2565

Add Winbond W39V080A support to Flashrom.

Signed-off-by: David Hendricks <david.hendricks@gmail.com>
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r91 | stepan | 2007-02-28 22:50:15 +0100 (Wed, 28 Feb 2007) | 8 lines

Original v2 revision: 2564

Add support for the Gigabyte m57sli-s4 board to flashrom.

Signed-off-by: Ward Vandewege <ward@gnu.org>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r90 | uwe | 2007-02-16 15:36:12 +0100 (Fri, 16 Feb 2007) | 11 lines

Original v2 revision: 2553

Currently the flashrom Makefile tries to detect whether pciutils-devel
is installed, but the test also fails if zlib-devel is missing. This
patch changes the error message accordingly.

Signed-off-by: Ed Swierk <eswierk@arastra.com>
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r89 | stepan | 2007-02-06 20:53:51 +0100 (Tue, 06 Feb 2007) | 9 lines

Original v2 revision: 2551

Include src/include/boot/linuxbios_tables.h in the flashrom source
tree to make it compilable independant of the LinuxBIOS source code.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r88 | stepan | 2007-02-06 20:47:50 +0100 (Tue, 06 Feb 2007) | 23 lines

Original v2 revision: 2550

This patch is a rework of Adam Kaufman's Solaris patch.

* flash.h:
  - add a license header
  - add system definitions
* flash_enable.c:
  - put io priviledge access in one single place
  - add includes required for Solaris.
* lbtable.c, flash_rom.c, 82802ab.c:
  - use MEM_DEV so it works on Solaris
* sst49lfxxxc.c, sharplhf00l04.c, sst_fwhub.c, 82802ab.c
  - drop unneeded include to sys/io.h
* Makefile
  - adapt to Solaris specifics.

Signed-off-by: Adam Kaufman <adam.kaufman@pinnacle.com>
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Adam Kaufman <adam.kaufman@pinnacle.com>


------------------------------------------------------------------------
r87 | uwe | 2007-01-27 14:39:06 +0100 (Sat, 27 Jan 2007) | 8 lines

Original v2 revision: 2539

Add support for the SST 49LF160C.

Signed-off-by: Alan Carvalho de Assis <acassis@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r86 | uwe | 2007-01-24 12:09:03 +0100 (Wed, 24 Jan 2007) | 9 lines

Original v2 revision: 2538

Delete superfluous and incorrect comment (trivial).
See also http://www.openbios.org/pipermail/linuxbios/2007-January/018042.html.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r85 | uwe | 2007-01-22 21:21:17 +0100 (Mon, 22 Jan 2007) | 11 lines

Original v2 revision: 2537

Add support for the SST-49LF004C, SST-49LF008C, SST-49LF016C in flashrom.
Also add suport for NVIDIA MCP55.

Signed-off-by: Yinghai Lu <yinghai.lu@amd.com>
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Peter Stuge <peter@stuge.se>



------------------------------------------------------------------------
r84 | uwe | 2006-12-20 15:59:56 +0100 (Wed, 20 Dec 2006) | 8 lines

Original v2 revision: 2531

Improve flashrom description in the manpage a bit (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r83 | uwe | 2006-12-20 15:53:22 +0100 (Wed, 20 Dec 2006) | 8 lines

Original v2 revision: 2530

Update flashrom requirements in the README (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r82 | uwe | 2006-12-14 01:59:41 +0100 (Thu, 14 Dec 2006) | 10 lines

Original v2 revision: 2524

Add an install target to the flashrom Makefile which installs flashrom
into /usr/local/bin. Closes #54.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



------------------------------------------------------------------------
r81 | uwe | 2006-12-04 09:20:40 +0100 (Mon, 04 Dec 2006) | 8 lines

Original v2 revision: 2518

Update list of supported flash chips in the flashrom README (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r80 | uwe | 2006-12-04 09:15:47 +0100 (Mon, 04 Dec 2006) | 11 lines

Original v2 revision: 2517

List the supported flash chips and southbridges in the flashrom
README file (trivial).

Closes #52.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r79 | uwe | 2006-11-22 16:27:29 +0100 (Wed, 22 Nov 2006) | 8 lines

Original v2 revision: 2507

Fix location of the bug tracker in the manpage (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r78 | stepan | 2006-11-22 01:29:51 +0100 (Wed, 22 Nov 2006) | 21 lines

Original v2 revision: 2505

apply patch from Giampiero Giancipoli <gianci@email.it>:

Fixed write_page_write_jedec() in jedec.c. 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.

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>


------------------------------------------------------------------------
r77 | stepan | 2006-11-22 00:51:08 +0100 (Wed, 22 Nov 2006) | 6 lines

Original v2 revision: 2504

Add support for ASD AE49F2008 
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de> (trivial patch)

------------------------------------------------------------------------
r76 | stepan | 2006-11-22 00:48:51 +0100 (Wed, 22 Nov 2006) | 8 lines

Original v2 revision: 2503

flashrom: Only write the flash if the image has the same size

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Segher Boessenkool <segher@kernel.crashing.org>


------------------------------------------------------------------------
r75 | uwe | 2006-11-21 16:09:05 +0100 (Tue, 21 Nov 2006) | 8 lines

Original v2 revision: 2502

Rename SM_ID to SYNCMOS_ID (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r74 | uwe | 2006-11-21 16:02:27 +0100 (Tue, 21 Nov 2006) | 9 lines

Original v2 revision: 2501

Add support for the SyncMOS S29C51001T, S29C51004T, and S29C31004T
flash chips to flashrom (closes: #50).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>


------------------------------------------------------------------------
r73 | uwe | 2006-11-20 21:32:35 +0100 (Mon, 20 Nov 2006) | 8 lines

Original v2 revision: 2500

Cosmetic fixes and typos (trivial).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r72 | uwe | 2006-11-20 21:03:07 +0100 (Mon, 20 Nov 2006) | 8 lines

Original v2 revision: 2499

Support for the 256K SyncMos S29C51002T flash.

Signed-off-by: Giampiero Giancipoli <gianci@email.it>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>


------------------------------------------------------------------------
r71 | stepan | 2006-11-07 14:48:46 +0100 (Tue, 07 Nov 2006) | 7 lines

Original v2 revision: 2494

Instead of checking the first byte only, the whole part is checked now. This
will detect any improper erase, closes #31
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de> 

------------------------------------------------------------------------
r70 | uwe | 2006-11-07 12:16:21 +0100 (Tue, 07 Nov 2006) | 10 lines

Original v2 revision: 2493

Fix some code comments of the Intel PIIX4/PIIX4E/PIIX4M code.
Add detailed instructions on how and where to get the datasheet,
its name, and order number (Closes #34).

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> 
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r69 | stepan | 2006-11-07 11:22:20 +0100 (Tue, 07 Nov 2006) | 7 lines

Original v2 revision: 2492

Support for VIA VT82C686 in flashrom utility (trivial)
closes #30
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r68 | uwe | 2006-11-05 19:26:08 +0100 (Sun, 05 Nov 2006) | 9 lines

Original v2 revision: 2489

Add support for Intel PIIX4/PIIX4E/PIIX4M-based mainboards to flashrom.
Tested on real hardware, reading, detecting and writing various chips works.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


------------------------------------------------------------------------
r67 | stepan | 2006-10-14 23:04:49 +0200 (Sat, 14 Oct 2006) | 5 lines

Original v2 revision: 2456

* add vt8237 support (Uwe Hermann)
* add more MCP51 support (me)

------------------------------------------------------------------------
r66 | stepan | 2006-10-08 00:59:03 +0200 (Sun, 08 Oct 2006) | 6 lines

Original v2 revision: 2450

here's a small patch to add support for the SST 49LF020A to flashrom.
by Uwe Hermann <uwe@hermann-uwe.de>
X-Signed-Off-By: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r65 | stepan | 2006-10-07 02:23:51 +0200 (Sat, 07 Oct 2006) | 6 lines

Original v2 revision: 2449

Tiny patch to show the size of the detected flash part 
from Uwe Hermann <uwe@hermann-uwe.de>
X-Signed-Off-By: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r64 | stepan | 2006-10-07 02:21:13 +0200 (Sat, 07 Oct 2006) | 6 lines

Original v2 revision: 2448

Fix flashrom for sst49lf080a and small print bug,
by Roman Kononov <kononov195-lbl@yahoo.com>.
X-Signed-Off-By: Stefan Reinauer <stepan@coresystems.de>

------------------------------------------------------------------------
r63 | stepan | 2006-09-21 15:09:22 +0200 (Thu, 21 Sep 2006) | 4 lines

Original v2 revision: 2431

abuild manpage and other fixes from Uwe Hermann. Thank you!

------------------------------------------------------------------------
r62 | stepan | 2006-09-06 17:48:48 +0200 (Wed, 06 Sep 2006) | 4 lines

Original v2 revision: 2395

Add patch from Uwe Hermann to support more ICH southbridges

------------------------------------------------------------------------
r61 | stepan | 2006-08-25 21:21:42 +0200 (Fri, 25 Aug 2006) | 4 lines

Original v2 revision: 2390

Print a warning if southbridge is not known to flashrom.

------------------------------------------------------------------------
r60 | stepan | 2006-08-23 16:33:54 +0200 (Wed, 23 Aug 2006) | 4 lines

Original v2 revision: 2386

Removing $Id$ tags as they have no meaning in SVN

------------------------------------------------------------------------
r59 | stepan | 2006-08-03 12:49:09 +0200 (Thu, 03 Aug 2006) | 4 lines

Original v2 revision: 2358

some documentation updates by Uwe and some smaller ones by me.

------------------------------------------------------------------------
r58 | stepan | 2006-08-01 01:37:17 +0200 (Tue, 01 Aug 2006) | 5 lines

Original v2 revision: 2354

Add support for SST39SF040 and SST39SF010A
apply C.-D. Hailfinger's patch for Winbond part (untested)

------------------------------------------------------------------------
r57 | stepan | 2006-07-28 01:29:02 +0200 (Fri, 28 Jul 2006) | 4 lines

Original v2 revision: 2349

add flashrom manpage from Uwe Hermann

------------------------------------------------------------------------
r56 | stepan | 2006-07-19 17:13:21 +0200 (Wed, 19 Jul 2006) | 8 lines

Original v2 revision: 2341

From: Scott Tsai, scott.tsai <AT> arima.com.tw
Tested on my home Shuttle SB51G box.
data sheet:
http://www.alldatasheet.com/datasheet-pdf/pdf/47674/WINBOND/W49V002FAP.html


------------------------------------------------------------------------
r55 | stepan | 2006-06-30 22:07:50 +0200 (Fri, 30 Jun 2006) | 4 lines

Original v2 revision: 2336

add support for EFST F49B002UA (untested)

------------------------------------------------------------------------
r54 | stepan | 2006-06-25 11:56:45 +0200 (Sun, 25 Jun 2006) | 4 lines

Original v2 revision: 2332

add support for PMC 49FL002 as used in the RD1-PMC2

------------------------------------------------------------------------
r53 | stepan | 2006-06-14 17:58:41 +0200 (Wed, 14 Jun 2006) | 4 lines

Original v2 revision: 2321

new flash part

------------------------------------------------------------------------
r52 | stepan | 2006-03-31 13:36:06 +0200 (Fri, 31 Mar 2006) | 8 lines

Original v2 revision: 2230

* https://openbios.org/roundup/linuxbios/issue96 - SST_49LF040B flash support for flashrom
* https://openbios.org/roundup/linuxbios/issue99 - add ICH4-M support to flashrom

both from scott.tsai <AT> arima.com.tw


------------------------------------------------------------------------
r51 | stepan | 2006-03-31 13:26:55 +0200 (Fri, 31 Mar 2006) | 6 lines

Original v2 revision: 2229

* support for Winbond W39V040A
* Support for ATI SB400 (RS480 chipset)
* Support for Intel ICH7 (from Scott Tsai, scott.tsai <AT> arima.com.tw)

------------------------------------------------------------------------
r50 | stepan | 2006-03-20 22:37:54 +0100 (Mon, 20 Mar 2006) | 4 lines

Original v2 revision: 2220

compilation fix for gcc 4.0.2 (SUSE10)

------------------------------------------------------------------------
r49 | stepan | 2006-03-19 23:30:42 +0100 (Sun, 19 Mar 2006) | 5 lines

Original v2 revision: 2215

redo ts5300 auto.c
add ts5300 flag as comment in flashrom utility Makefile

------------------------------------------------------------------------
r48 | stepan | 2006-03-17 23:35:56 +0100 (Fri, 17 Mar 2006) | 5 lines

Original v2 revision: 2210

update dumpmmcr.c utility
another flash chip that doesn't clog the serial line

------------------------------------------------------------------------
r47 | stepan | 2006-03-16 17:57:41 +0100 (Thu, 16 Mar 2006) | 7 lines

Original v2 revision: 2205

- speed up flash verification by only printing 1 of 4096 addresses
- support for flashing technologic system ts5300 SBC (needs -DTS5300 in
  the makefile)


------------------------------------------------------------------------
r46 | stepan | 2006-03-16 17:46:19 +0100 (Thu, 16 Mar 2006) | 5 lines

Original v2 revision: 2204

make am29f040b driver more solid by printing every 4096th flash address.
This fixes the timing when flashing over a serial console.

------------------------------------------------------------------------
r45 | stepan | 2006-03-16 17:44:07 +0100 (Thu, 16 Mar 2006) | 4 lines

Original v2 revision: 2203

support for Am29F016D

------------------------------------------------------------------------
r44 | rminnich | 2006-03-14 20:58:14 +0100 (Tue, 14 Mar 2006) | 7 lines

Original v2 revision: 2197

Fix for nehemiah
other fixes for gx2 ram init. 

support for sharplfg00l04 -- not working yet.

------------------------------------------------------------------------
r43 | rminnich | 2006-03-01 17:11:05 +0100 (Wed, 01 Mar 2006) | 4 lines

Original v2 revision: 2189

a few new items and mods for ollie

------------------------------------------------------------------------
r42 | rminnich | 2006-02-24 18:10:10 +0100 (Fri, 24 Feb 2006) | 4 lines

Original v2 revision: 2183

added support for ICH5

------------------------------------------------------------------------
r41 | stepan | 2006-02-24 14:47:26 +0100 (Fri, 24 Feb 2006) | 4 lines

Original v2 revision: 2182

new flashchip support by Leon Woestenberg <leonw@mailcan.com>

------------------------------------------------------------------------
r40 | rminnich | 2006-02-23 18:16:44 +0100 (Thu, 23 Feb 2006) | 4 lines

Original v2 revision: 2180

added sharp flash

------------------------------------------------------------------------
r39 | stepan | 2006-01-04 17:42:57 +0100 (Wed, 04 Jan 2006) | 4 lines

Original v2 revision: 2151

pass on return values

------------------------------------------------------------------------
r38 | stepan | 2005-12-18 19:40:46 +0100 (Sun, 18 Dec 2005) | 5 lines

Original v2 revision: 2147

redo image checking in conversion case. Please update to this
release if you are using flashrom.

------------------------------------------------------------------------
r37 | stepan | 2005-12-18 17:41:10 +0100 (Sun, 18 Dec 2005) | 6 lines

Original v2 revision: 2146

* make -v switch print debug messages.
* do case insensitive comparison of mainboards, as wished on the
  mailinglist

------------------------------------------------------------------------
r36 | stepan | 2005-12-01 17:19:24 +0100 (Thu, 01 Dec 2005) | 4 lines

Original v2 revision: 2117

issue 40, make flashrom utility build process more solid.

------------------------------------------------------------------------
r35 | stepan | 2005-12-01 11:51:08 +0100 (Thu, 01 Dec 2005) | 4 lines

Original v2 revision: 2114

mention build dependencies in Makefile.

------------------------------------------------------------------------
r34 | ollie | 2005-11-26 22:55:36 +0100 (Sat, 26 Nov 2005) | 3 lines

Original v2 revision: 2111

flasrom update from Stefan, resovle issue 21
------------------------------------------------------------------------
r33 | ollie | 2005-08-03 17:04:53 +0200 (Wed, 03 Aug 2005) | 3 lines

Original v2 revision: 1988

bug fix from Jonathan McDowell <noodles@earth.li>
------------------------------------------------------------------------
r32 | arch | 2005-07-06 19:13:46 +0200 (Wed, 06 Jul 2005) | 7 lines

Original v2 revision: 1946

Revision: linuxbios@linuxbios.org--devel/freebios--devel--2.0--patch-30
Creator:  Yinghai Lu <yhlu@tyan.com>

Nvidia Ck804 support

------------------------------------------------------------------------
r31 | ollie | 2005-01-11 03:48:22 +0100 (Tue, 11 Jan 2005) | 4 lines

Original v2 revision: 1852

*** empty log message ***

------------------------------------------------------------------------
r30 | ollie | 2004-12-08 21:10:01 +0100 (Wed, 08 Dec 2004) | 4 lines

Original v2 revision: 1815

added -E option for chip erase, remove duplicated code

------------------------------------------------------------------------
r29 | ollie | 2004-12-08 03:10:33 +0100 (Wed, 08 Dec 2004) | 4 lines

Original v2 revision: 1814

add retry to write_byte_program_jedec(), 99% success rate

------------------------------------------------------------------------
r28 | ollie | 2004-12-07 18:19:04 +0100 (Tue, 07 Dec 2004) | 4 lines

Original v2 revision: 1813

enable LPC decoding for 1 MB more addresss, for supporting SST49LF00xA/B

------------------------------------------------------------------------
r27 | ollie | 2004-12-07 04:15:51 +0100 (Tue, 07 Dec 2004) | 5 lines

Original v2 revision: 1812

SST49LF00[2,3,4] should use
the same driver as 49LF008

------------------------------------------------------------------------
r26 | yhlu | 2004-10-20 07:07:16 +0200 (Wed, 20 Oct 2004) | 4 lines

Original v2 revision: 1693

Tyan update to work with new CPU Config

------------------------------------------------------------------------
r25 | rminnich | 2004-09-30 18:37:01 +0200 (Thu, 30 Sep 2004) | 4 lines

Original v2 revision: 1651

support for sst firmware hub

------------------------------------------------------------------------
r24 | rminnich | 2004-09-28 22:32:17 +0200 (Tue, 28 Sep 2004) | 4 lines

Original v2 revision: 1650

use hex print in id1, id2

------------------------------------------------------------------------
r23 | rminnich | 2004-09-28 22:09:06 +0200 (Tue, 28 Sep 2004) | 4 lines

Original v2 revision: 1649

add support for ICH4. more i955pm stuff.

------------------------------------------------------------------------
r22 | ollie | 2004-09-07 23:31:47 +0200 (Tue, 07 Sep 2004) | 4 lines

Original v2 revision: 1647

code reformat

------------------------------------------------------------------------
r21 | rminnich | 2004-04-13 21:10:48 +0200 (Tue, 13 Apr 2004) | 4 lines

Original v2 revision: 1496

add missing return at 205

------------------------------------------------------------------------
r20 | ollie | 2004-03-27 01:31:03 +0100 (Sat, 27 Mar 2004) | 4 lines

Original v2 revision: 1487

data tye consistence

------------------------------------------------------------------------
r19 | ollie | 2004-03-27 01:18:15 +0100 (Sat, 27 Mar 2004) | 4 lines

Original v2 revision: 1486

removed false alarm of erase/write, use verify '-v' if you are not sure about the integrity

------------------------------------------------------------------------
r18 | ollie | 2004-03-22 23:19:17 +0100 (Mon, 22 Mar 2004) | 4 lines

Original v2 revision: 1464

more jedec standard consolidatation.

------------------------------------------------------------------------
r17 | ollie | 2004-03-20 18:39:43 +0100 (Sat, 20 Mar 2004) | 4 lines

Original v2 revision: 1459

rmove unused #define and function declaretion

------------------------------------------------------------------------
r16 | ollie | 2004-03-20 18:05:01 +0100 (Sat, 20 Mar 2004) | 5 lines

Original v2 revision: 1458

I have no idea what i was trying to show off when I used the while loop rather
than for loop. Please forgive me, I was too young 4 years ago.

------------------------------------------------------------------------
r15 | ollie | 2004-03-20 17:46:10 +0100 (Sat, 20 Mar 2004) | 4 lines

Original v2 revision: 1457

consolidate more jedec standard code

------------------------------------------------------------------------
r14 | ollie | 2004-03-19 23:10:07 +0100 (Fri, 19 Mar 2004) | 4 lines

Original v2 revision: 1456

remove duplicated code

------------------------------------------------------------------------
r13 | dhendricks | 2004-03-18 22:59:05 +0100 (Thu, 18 Mar 2004) | 4 lines

Original v2 revision: 1439

Added support for SST49LF0xxA parts.

------------------------------------------------------------------------
r12 | dhendricks | 2004-03-18 22:55:22 +0100 (Thu, 18 Mar 2004) | 4 lines

Original v2 revision: 1438

Added support for more SST 49lf0xxA parts

------------------------------------------------------------------------
r11 | ollie | 2004-03-18 21:35:33 +0100 (Thu, 18 Mar 2004) | 4 lines

Original v2 revision: 1437

forgot a semicolon

------------------------------------------------------------------------
r10 | ollie | 2004-03-18 21:31:54 +0100 (Thu, 18 Mar 2004) | 4 lines

Original v2 revision: 1436

removed unused code in pm49fl004, remove experimental delay in sst49lf040

------------------------------------------------------------------------
r9 | ollie | 2004-03-18 21:27:33 +0100 (Thu, 18 Mar 2004) | 4 lines

Original v2 revision: 1435

fixed stupid i++ evalution order bug

------------------------------------------------------------------------
r8 | ollie | 2004-03-18 20:40:07 +0100 (Thu, 18 Mar 2004) | 4 lines

Original v2 revision: 1434

fixed 32bit v.s. 64bit long int arithematics

------------------------------------------------------------------------
r7 | ollie | 2004-03-18 00:03:37 +0100 (Thu, 18 Mar 2004) | 6 lines

Original v2 revision: 1433

removed spd_dump.c, it has nothing to do with flashing flash parts.
use standard product ID exit method for w49f002u
move udelay stuff into its own file

------------------------------------------------------------------------
r6 | ollie | 2004-03-17 23:22:08 +0100 (Wed, 17 Mar 2004) | 4 lines

Original v2 revision: 1428

move utility functions into new source files

------------------------------------------------------------------------
r5 | dhendricks | 2004-03-17 22:47:30 +0100 (Wed, 17 Mar 2004) | 4 lines

Original v2 revision: 1422

Added support for SST49LF040

------------------------------------------------------------------------
r4 | rminnich | 2004-02-14 00:09:54 +0100 (Sat, 14 Feb 2004) | 4 lines

Original v2 revision: 1376

fix makefile

------------------------------------------------------------------------
r3 | rminnich | 2004-02-10 22:34:18 +0100 (Tue, 10 Feb 2004) | 4 lines

Original v2 revision: 1375

now we support 8111 and these parts.

------------------------------------------------------------------------
r2 | rminnich | 2003-11-05 17:36:57 +0100 (Wed, 05 Nov 2003) | 4 lines

Original v2 revision: 1255

fix volatile

------------------------------------------------------------------------
r1 | rminnich | 2003-10-25 19:01:29 +0200 (Sat, 25 Oct 2003) | 4 lines

Original v2 revision: 1232

due to popular demand, added flash_and_burn to the freebios2 tree.

------------------------------------------------------------------------
