------------------------------------------------------------------------
r1954 | stefanct | 2016-03-13 18:46:08 +0100 (Sun, 13 Mar 2016) | 6 lines

Increase flashrom version number to 0.9.9.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Urja Rannikko <urjaman@gmail.com>
------------------------------------------------------------------------
r1953 | hailfinger | 2016-03-13 18:36:49 +0100 (Sun, 13 Mar 2016) | 22 lines

Fix fscanf format string security bug in layout.c

An internal security audit of the flashrom project by
Carl-Daniel Hailfinger found a buffer overflow bug present in all
flashrom versions since the year 2005.
This bug was independently found and reported to flashrom.org by
Cosmin Gorgovan a few days ago. 

A buffer on the stack and a buffer on the heap are affected by the
overflow caused by an incorrect fscanf format string.
The buffer overflow can only be triggered if the optional layout feature
is used and if the user manually specifies a specially crafted layout
file on the command line. Command line parsing and flash image handling
do not trigger the buggy code path.
Most usage of flashrom does not involve layout files.

The fix in this commit (changed fscanf format string) can be applied to
layout.c of all past flashrom versions.

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

------------------------------------------------------------------------
r1952 | hailfinger | 2016-03-13 17:24:09 +0100 (Sun, 13 Mar 2016) | 6 lines

Implement serial port shutdown both for regular termination and error
condition in pony_spi.

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

------------------------------------------------------------------------
r1951 | stefanct | 2016-03-13 16:16:30 +0100 (Sun, 13 Mar 2016) | 39 lines

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

Tested mainboards:
OK:
 - ASRock Fatal1ty 970 Performance and P4i65G
   Reported by anonymous email message ID:
   932677687262b1300eaf14260999d9262c31@guerrillamail.com
   The latter actually had a tested board enable already.

Flash chips:
 - Eon EN25Q128 to PREW (+PREW)
   Reported by Adrian Graham
 - GigaDevice GD25VQ41B to PREW (+PREW)
   Reported by David Hendricks
 - Winbond W39V040FB to PREW (+EW)
   Reported by fjed on IRC

Miscellaneous:
 - Change PCI IDs of "MS-6577 (Xenon)" board enable.
   The previous IDs contained the on-board display adapter which is
   disabled when a dedicated graphics card is installed.
 - Add a note to the README how to overcome the clang warning if only a
   single programmer is enabled.
 - Fix some typo and manpage problems found by lintian
 - r1920 introduced some explicit calls to pkg-config instead of $(PKG_CONFIG).
   This patch corrects that.
 - Make MS-7094 (K8T Neo2-F V2.0) board enable less contestable.
   Previous PCI IDs were board-specific but ot the other of devices
   that could be disabled by the firmware or that vary among
   hardware revions. There are no good alternatives available.
   However, since we always have a DMI decoder available now, we can
   use non-board-specific devices without taking risks. Thanks to
   Uwe Hermann for reporting and testing.
 - Some other small changes to clean up whitespace and fix some warnings
   from Debian's lintian.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1950 | stefanct | 2016-03-13 13:57:03 +0100 (Sun, 13 Mar 2016) | 11 lines

Fix compilation on SunOS.

This came up when I was testing if building on SunOS still works
on the buildbot's instance of OmniOS r151014 which is based on illumos.

The fix is
 - to link against libnsl
 - a small C type fix in ich_descriptor_tool

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1949 | hailfinger | 2016-03-12 20:49:14 +0100 (Sat, 12 Mar 2016) | 7 lines

Specifying spispeed=reserved as programmer parameter resulted in
selecting the default SPI speed instead of aborting. Rewrite the logic
to be more readable.

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

------------------------------------------------------------------------
r1948 | stefanct | 2016-03-06 23:32:16 +0100 (Sun, 06 Mar 2016) | 4 lines

Add support for GNU Hurd.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1947 | stefanct | 2016-03-06 15:33:49 +0100 (Sun, 06 Mar 2016) | 4 lines

Add support for GD25VQ21B, GD25VQ40C, GD25VQ80C and GD25VQ16C.

Signed-off-by: Hatim Kanchwala <hatim@hatimak.me>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1946 | hailfinger | 2016-02-28 23:04:51 +0100 (Sun, 28 Feb 2016) | 9 lines

Makefile: Fix driver blacklist dependencies

Allow mstarddc_spi and pony_spi on Android.
Allow mstarddc_spi and pony_spi on architectures with unsupported raw
access.

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

------------------------------------------------------------------------
r1945 | stefanct | 2016-02-28 18:04:38 +0100 (Sun, 28 Feb 2016) | 8 lines

rayer_spi: add support for SPI Tiny Tools-compatible hardware.

Apparently, there is at least one board of Russian origin (coined
SPI_TT LPT) that works with SPI Tiny Tools which is a closed-source
Windows GUI program somewhat similar to flashrom.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1944 | stefanct | 2016-02-27 00:51:21 +0100 (Sat, 27 Feb 2016) | 6 lines

makefile: allow to disable all default-yes config variables with CONFIG_NOTHING=yes.

All credit for this should be given to Patrick Georgi (see r1869).

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1943 | hailfinger | 2016-02-25 21:10:26 +0100 (Thu, 25 Feb 2016) | 7 lines

Partial architecture support for alpha hppa m68k sh s390

Only hardware not needing raw access (PCI, memory, port I/O) is supported.

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

------------------------------------------------------------------------
r1942 | stefanct | 2016-02-22 09:59:27 +0100 (Mon, 22 Feb 2016) | 7 lines

dediprog: use ordinary USB devs array.

Even though there is currently only one USB device ID in the wild using our
standard way to define the devices creates nicer output for -L and -z.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1941 | stefanct | 2016-02-22 09:59:15 +0100 (Mon, 22 Feb 2016) | 7 lines

pickit2_spi: use ordinary USB devs array.

Even though there is currently only one USB device ID in the wild using our
standard way to define the devices creates nicer output for -L and -z.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1939 | stefanct | 2016-02-21 19:17:14 +0100 (Sun, 21 Feb 2016) | 6 lines

Increase version number to 0.9.9-rc1.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Urja Rannikko <urjaman@gmail.com>
------------------------------------------------------------------------
r1938 | stefanct | 2016-02-21 12:18:24 +0100 (Sun, 21 Feb 2016) | 8 lines

Automatically disable atapromise for libpayload as well.

The atapromise module uses the rom_size field of the struct pci_dev found
in pci.h that does not exist in libpayload's implementation and thus does
not compile with libpayload.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1937 | stefanct | 2016-02-21 01:21:11 +0100 (Sun, 21 Feb 2016) | 4 lines

Add support for GigaDevice GD25VQ41B and GD25Q128C.

Signed-off-by: Hatim Kanchwala <hatim@hatimak.me>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1936 | hailfinger | 2016-02-20 23:28:16 +0100 (Sat, 20 Feb 2016) | 12 lines

Allow global disable of all drivers requiring libusb* or libpci

This is especially helpful for compile tests with CONFIG_EVERYTHING=yes,
but can also be used without CONFIG_EVERYTHING.

Usage:
make CONFIG_ENABLE_LIBUSB0_PROGRAMMERS=no
CONFIG_ENABLE_LIBUSB1_PROGRAMMERS=no CONFIG_ENABLE_LIBPCI_PROGRAMMERS=no

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

------------------------------------------------------------------------
r1935 | hailfinger | 2016-02-20 23:04:39 +0100 (Sat, 20 Feb 2016) | 8 lines

Automatically disable atapromise on non-x86

We do not support PCI port I/O on non-x86 (yet).
Atapromise needs PCI port I/O.

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

------------------------------------------------------------------------
r1934 | hailfinger | 2016-02-20 22:43:56 +0100 (Sat, 20 Feb 2016) | 10 lines

Do not require PCI code for RayeR SPI driver

CONFIG_RAYER_SPI only needs raw hardware access, but not libpci.
Disable CONFIG_RAYER_SPI on Android because of missing inb/outb.
Introduce NEED_RAW_ACCESS for raw memory access, PCI port I/O
and MSR access.

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

------------------------------------------------------------------------
r1933 | stefanct | 2016-02-20 21:53:46 +0100 (Sat, 20 Feb 2016) | 9 lines

dediprog: tremendously improve performance on SF600 by ignoring the spec.

The solution was discovered in a collaborative bug hunt with testing done by
David Hendricks. The actual culprit was found by Urja Rannikko by comparing
vanilla flashrom with David's version in chromiumos.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Tested-by: David Hendricks <dhendrix@chromium.org>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1932 | stefanct | 2016-02-20 21:21:58 +0100 (Sat, 20 Feb 2016) | 7 lines

Include sys/glibc-syscalls.h instead of inexistent sys/io.h on Android.

This won't make raw I/O work magically but at least it would provide iopl()
if some driver requires it and there is no better alternative currently.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1931 | stefanct | 2016-02-19 09:17:24 +0100 (Fri, 19 Feb 2016) | 15 lines

Makefile: fix overriding of make command line arguments.

Command line arguments given when executing make should not stop us
from setting commonly user-configurable variables like CPPFLAGS or
LDFLAGS.
Without this patch 'make CPPFLAGS="-Ifail"' would fail to find
libusb1 headers and abort.
Add override statements where we append mandatory options to
these variables to make (Debian) packagers more happy.

Also, r1920 introduced some explicit calls to pkg-config instead of
$(PKG_CONFIG). This patch corrects that as well.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1930 | hailfinger | 2016-02-19 00:11:52 +0100 (Fri, 19 Feb 2016) | 14 lines

Fix chip size limiting in atapromise

The current code is checking model_id to remember if a chip has already
been limited, but if flashchips.c contains two subsequent chips with
different vendor_id but identical model_id the adjustment will not be
done. Switch to checking the chip size instead.

If a chip has multiple whole-chip erase functions, only one will be
modified. Fix that.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Tested-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>
Acked-by: Urja Rannikko <urjaman@gmail.com>

------------------------------------------------------------------------
r1929 | stefanct | 2016-02-18 22:42:49 +0100 (Thu, 18 Feb 2016) | 10 lines

dediprog: port to libusb1 and use asynchronous bulk transfers for reading.

This patch is based on Nico Huber's original version that was rebased
by David Hendricks for Chromium OS in
Change-Id: I84384b9d8ed53911657cf2293733531a6e11fd23

Signed-off-by: Nico Huber <nico.huber@secunet.com>
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1928 | stefanct | 2016-02-18 22:42:41 +0100 (Thu, 18 Feb 2016) | 20 lines

dediprog: use command 0x0B (set voltage) only on older SF100s.

As per e-mail with Dediprog, command 0x0B (which is not listed in the
command spec) is need on older Dediprogs only. SF100 with firmware
V6.0.0 and newer as well as all SF600 programmers do not support it.

The original wording by Dediprog was: "0x0B is used to adjust voltage
level, but it's available for some version of SF100 only. SF100 of
firmware V6.x.x and all version of SF600/SF600Plus not support this
command. If you have old version of SF100, 0x0B is still needed."

This patch renames dediprog_device_init() to something more
appropriate  and adds comments for clarity, and only runs it
conditionally if we cannot query the devicestring initially.

Based on ChromiumOS'
Change-Id: I42de7d28401d7ad5be8fcf8a8c165e2614a45960

Signed-off-by: David Hendricks <dhendrix@chromium.org>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1927 | stefanct | 2016-02-18 22:42:15 +0100 (Thu, 18 Feb 2016) | 17 lines

dediprog: add support for SF600.

This patch is based on a number of changes by David Woodhouse and
David Hendricks.

SF600 uses two bulk endpoints, 1 for out and 2 for in unlike the
SF100 that uses only a single one. This patch make endpoint usage
more explicit and sets the in/out endpoint(s) appropriately for
SF100 and SF600.

Also, change all SF100-specific strings in messages and
leave standalone mode on SF600s.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1926 | hailfinger | 2016-02-17 23:25:12 +0100 (Wed, 17 Feb 2016) | 16 lines

List affected features for missing libraries

If libpci, libusb0 or libusb1 are missing, make will now tell you which
currently enabled features require those libraries.

Example output:
Checking for libusb-0.1/libusb-compat headers... not found.
The following features require libusb-0.1/libusb-compat:
CONFIG_PICKIT2_SPI CONFIG_DEDIPROG.
Please install libusb-0.1 headers or libusb-compat headers.
See README for more information.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Urja Rannikko <urjaman@gmail.com>

------------------------------------------------------------------------
r1925 | stefanct | 2016-02-14 16:46:00 +0100 (Sun, 14 Feb 2016) | 28 lines

ft2232_spi: Add support for Google Servo boards (v1 + v2).

This patch has been cherry-picked from various patches in the chromiumos
tree denoted below.

Change-Id: I4b679e23ab37a4357b1e3d23f6f65a1c31f7d71a
Change-Id: Ibda56201ab4519315431c08206c61ceffb7c7e65
Change-Id: I540ad2d304dc69a7c79ca154beb744ef947ff808

Servo V2 has two FT4232H parts. The first one (denoted 'legacy') is
dedicated to supporting orginal Servo V1 functionality. The second,
residing at USB ID 0x18d1:5003 provides two other SPI interfaces on
port A and B respectively.

Additional changes by Alexandru Gagniuc, Hatim Kanchwala and Urja Rannikko:

 - The clock divisor is set to '6', as this creates a 10MHz SPI clock,
   which is the same SPI clock that the chromiumos branch produced.
 - Add udev rule for Google servo boards to util/flashrom.rules.
 - Add Google servo entry to manpage.

Signed-off-by: Todd Broch <tbroch@chromium.org>
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Signed-off-by: Hatim Kanchwala <hatim@hatimak.me>
Signed-off-by: Urja Rannikko <urjaman@gmail.com>
Acked-by: Hatim Kanchwala <hatim@hatimak.me>
Acked-by: Urja Rannikko <urjaman@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1924 | stefanct | 2016-02-07 04:35:04 +0100 (Sun, 07 Feb 2016) | 7 lines

Fix compilation on non-i386 architectures on OpenBSD.

We use a header for MSR accesses on AMD Geodes that does only exist
on 32 bit x86 machines.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1923 | stefanct | 2016-02-01 01:27:25 +0100 (Mon, 01 Feb 2016) | 4 lines

Add support for ESI ES25P40, ES25P80 and ES25P16.

Signed-off-by: Hatim Kanchwala <hatim@hatimak.me>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1922 | stefanct | 2016-02-01 00:17:35 +0100 (Mon, 01 Feb 2016) | 7 lines

Separate Am29F0xx from Am29F0xxA/B definitions.

The earlier versions of the chip require 0x2AAA for probes thus split the
definitions and set them to untested to provoke reports.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1921 | stefanct | 2016-01-31 23:10:29 +0100 (Sun, 31 Jan 2016) | 5 lines

Add support for WCH CH341A as an SPI programmer.

Signed-off-by: Urja Rannikko <urjaman@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Urja Rannikko <urjaman@gmail.com>
------------------------------------------------------------------------
r1920 | stefanct | 2016-01-31 23:10:14 +0100 (Sun, 31 Jan 2016) | 4 lines

Add infrastructure to support libusb-1.0.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Urja Rannikko <urjaman@gmail.com>
------------------------------------------------------------------------
r1919 | stefanct | 2016-01-24 23:37:10 +0100 (Sun, 24 Jan 2016) | 7 lines

Makefile: print compile commands of configure steps to the build details file.

This allows for even more easy debugging of build failures due to
problems with libraries.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1918 | stefanct | 2016-01-24 00:27:58 +0100 (Sun, 24 Jan 2016) | 23 lines

dediprog: support new communication protocol, cleanup and enable by default.

The new protocol changes some commands, so adjust the code to support
these. Use helper functions to reduce duplication in libusb calls. Testing
with real hardware showed that the maximum read size via the control
endpoint is about 16 bytes although specification does not mention that.

Dediprog SF600 is not supported yet.

Based on the following chromiumos changes:
Change-Id: Ibd1e27d9e8273ba879b9b5d95675b99596255c89
Change-Id: Ifc33e7b1eed5b0cb80f83458fa24741a577fa46a
Additionally, some ideas from Alex for cleaner code were incorporated as well.

Tested on an SF100 V4 with both firmware generations PREWing a M25PX80
and AT45DB041D (the latter is using dediprog_spi_send_command() instead
of optimized functions which make it a good test vehicle).

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1917 | stefanct | 2016-01-23 17:16:49 +0100 (Sat, 23 Jan 2016) | 143 lines

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

Tested mainboards:
OK:
 - ASRock G31M-GS
   Reported by {U+0410}{U+043B}{U+0435}{U+043A}{U+0441}{U+0430}{U+043D}{U+0434}{U+0440} {U+0422}{U+0440}{U+0443}{U+0431}{U+0438}{U+0446}{U+044B}{U+043D}
 - ASRock G41M-VS3
   Reported by {U+0410}{U+043B}{U+0435}{U+043A}{U+0441}{U+0430}{U+043D}{U+0434}{U+0440} {U+0422}{U+0440}{U+0443}{U+0431}{U+0438}{U+0446}{U+044B}{U+043D}
 - ASRock N68C-S UCC
   Reported by Alexey Belyaev
 - ASRock AMCP7AION-HT (ION 330HT(-BD))
   Reported by Stefan Tauner
 - ASUS P5K SE
   Reported by {U+0410}{U+043B}{U+0435}{U+043A}{U+0441}{U+0430}{U+043D}{U+0434}{U+0440} {U+0422}{U+0440}{U+0443}{U+0431}{U+0438}{U+0446}{U+044B}{U+043D}
 - ASUS P5KPL-VM
   Reported by Marin Vlah
 - ASUS RAMPAGE III GENE
   Reported by stevessss on IRC
 - GIGABYTE GA-945GM-S2
   Reported by {U+0410}{U+043B}{U+0435}{U+043A}{U+0441}{U+0430}{U+043D}{U+0434}{U+0440} {U+0422}{U+0440}{U+0443}{U+0431}{U+0438}{U+0446}{U+044B}{U+043D}
 - GIGABYTE GA-945GCM-S2 (rev. 3.0)
   Reported by {U+0410}{U+043B}{U+0435}{U+043A}{U+0441}{U+0430}{U+043D}{U+0434}{U+0440} {U+0422}{U+0440}{U+0443}{U+0431}{U+0438}{U+0446}{U+044B}{U+043D}
 - GIGABYTE GA-965P-S3
   Reported by {U+0410}{U+043B}{U+0435}{U+043A}{U+0441}{U+0430}{U+043D}{U+0434}{U+0440} {U+0422}{U+0440}{U+0443}{U+0431}{U+0438}{U+0446}{U+044B}{U+043D}
 - GIGABYTE GA-EG43M-S2H
   Reported by {U+0410}{U+043B}{U+0435}{U+043A}{U+0441}{U+0430}{U+043D}{U+0434}{U+0440} {U+0422}{U+0440}{U+0443}{U+0431}{U+0438}{U+0446}{U+044B}{U+043D}
 - GIGABYTE GA-EP31-DS3L (rev. 1.0)
   Reported by {U+0410}{U+043B}{U+0435}{U+043A}{U+0441}{U+0430}{U+043D}{U+0434}{U+0440} {U+0422}{U+0440}{U+0443}{U+0431}{U+0438}{U+0446}{U+044B}{U+043D}
 - GIGABYTE GA-G33M-S2
   Reported by {U+0410}{U+043B}{U+0435}{U+043A}{U+0441}{U+0430}{U+043D}{U+0434}{U+0440} {U+0422}{U+0440}{U+0443}{U+0431}{U+0438}{U+0446}{U+044B}{U+043D}
 - GIGABYTE GA-G33M-S2L
   Reported by {U+0410}{U+043B}{U+0435}{U+043A}{U+0441}{U+0430}{U+043D}{U+0434}{U+0440} {U+0422}{U+0440}{U+0443}{U+0431}{U+0438}{U+0446}{U+044B}{U+043D}
 - GIGABYTE GA-H55M-S2
   Reported by {U+0410}{U+043B}{U+0435}{U+043A}{U+0441}{U+0430}{U+043D}{U+0434}{U+0440} {U+0422}{U+0440}{U+0443}{U+0431}{U+0438}{U+0446}{U+044B}{U+043D}
 - GIGABYTE GA-J1900N-D3V
   Reported by Marcos Truchado and Guillermo von Hunefeld
 - GIGABYTE GA-K8NS
   Reported  by nicolae788
 - GIGABYTE GA-M56S-S3
   Reported by Estevo Paz Freire
 - GIGABYTE GA-P31-DS3L
   Reported by {U+0410}{U+043B}{U+0435}{U+043A}{U+0441}{U+0430}{U+043D}{U+0434}{U+0440} {U+0422}{U+0440}{U+0443}{U+0431}{U+0438}{U+0446}{U+044B}{U+043D}
 - GIGABYTE GA-P31-S3G
   Reported by {U+0410}{U+043B}{U+0435}{U+043A}{U+0441}{U+0430}{U+043D}{U+0434}{U+0440} {U+0422}{U+0440}{U+0443}{U+0431}{U+0438}{U+0446}{U+044B}{U+043D}
 - MSI MS-7336
   Reported by Benjamin Bellec
 - MSI X79A-GD45 (8D) (MS-7760)"
   Reported by mortehu on IRC
 - Supermicro A1SAi-2550F
   Reported by Bernard Grymonpon
 - Supermicro X7DWT
   Reported by Steven Stremciuc

Laptop:
 - ASUS U38N
   Reported by Ultra on IRC
 - Dell Latitude D630
   Reported by Marton Miklos
 - Fujitsu Amilo Xi 3650
   Reported by Elmar Stellnberger
 - Lenovo T400 (whitelisting only)

Chipsets:
 - Mark 8086:1f38 (Intel Avoton/Rangeley) as tested
   Reported by Jeremy Porter and Bernard Grymonpon
 - Add Intel Sunrise Point IDs but no support yet.

Flash chips:
 - Atmel AT45DB321D to PREW (+PREW)
   Reported by The Raven
 - Eon EN25QH32 to PREW (+PREW)
   Reported by Josua Mayer
 - Eon EN25QH64 to PREW (+EW)
   Reported by David s. Alessio
 - GigaDevice GD25LQ64(B) to PREW (+PREW)
   Reported by Greg Tippit
 - Intel 28F001BN/BX-T to PREW (+EW)
   Reported by Lu Xie
 - Micron M25P10-A to PREW (+W)
   Reported by the Raven
 - Micron M25PE40
   Reported by David Wood
 - Micron N25Q128..3E to PREW (+PREW)
   Reported by Miklos Marton
 - Macronix MX25L3273E to PREW (+PREW)
   Reported by Roklobsta on IRC
 - Macronix MX23L6454 to PR (+PR)
   Reported by Steven Honeyman
 - Macronix MX25U6435E/F to PREW (+PREW)
   Reported by Marcos Truchado and Guillermo von Hunefeld
 - PMC Pm25LQ032C to PREW (+EW)
   Reported by Dirk Knop
 - Spansion S25FL016A to PREW (+EW)
   Reported by Marton Miklos
 - Spansion S25FL128S......0 to PREW (+PREW)
   Reported by Jim Houston
 - Spansion S25FL204K to PR (+PR)
   Reported by Thomas Debrunner
 - SST SST49LF016C to PREW (+EW)
   Reported by Steven Stremciuc
 - SST SST39VF040 to PREW (+PREW)
   Reported by Xavier Bourgeois
 - SST SST49LF040B to PREW (+EW)
   Reported by Rikard Ahlund
 - ST M25P10-A to PREW (+W)
   Reported by Martijn Schiedon
 - Winbond W39V040FA to PREW (+EW)
   Reported by {U+0415}{U+0432}{U+0433}{U+0435}{U+043D}{U+0438}{U+0438} {U+0427}{U+0435}{U+0440}{U+043A}{U+0430}{U+0448}{U+0438}{U+043D}
 - Winbond W39V080FA to PREW (+EW)
   Reported by protagonist0 on IRC
 - Winbond W25Q80.W to PREW (+PREW)
   Reported by Miklos Marton
 - Winbond W25X64 to PREW (+REW)
   Reported by Johannes Krampf and Manuel Dejonghe
 - Fix ID of AMIC A25LQ64
   Reported by Roman Titov
 - Fix page size of Spansion S25FL129P......1
   Copy and paste error from the 128S uniform 256kB variant, probably.
 - Add Micron/Numonyx phase-change memory IDs

Miscellaneous:
 - Detect Android target OS.
   No changes are required to build flashrom (excluding programmers
   with NEED_PCI) on Android.
 - Update rayerspi (spipgm) URL
 - Fix max_data_write handling of at45db.
 - Minor refinement of the README
 - Mark board enable for the GA-K8NS variants as tested.
   Tested by "nicolae788" on a board with socket 754.
 - Mark "Multi-system" chassis as non-laptop case.
 - Remove W836xx log requests.
   We got enough (and no one is looking at them for the time being anyway).
 - serprog: improve invalid reply error message, contributed by Urja Rannikko.
 - Remove default include paths for MinGW.
 - Disable implicit rules in the Makefile because we don't need them and they
   just make the build (imperceptibly) slower.
 - Enable our own strnlen() implementation not only on DJGPP but also if
   HAVE_STRNLEN is not defined. This is needed to get older BSDs
   (e.g. NetBSD 6.0, FreeBSD < 8.0) to work.
 - Tiny other stuff.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1916 | hailfinger | 2016-01-17 00:45:25 +0100 (Sun, 17 Jan 2016) | 16 lines

Add atapromise programmer

Supported controllers are Promise PDC20262 (FastTrak66/Ultra66),
PDC20265 (FastTrak100 Lite/Ultra100), PDC20267 (FastTrak100/Ultra100).
At least the Ultra100 only has address lines A0-A14 wired up, limiting
addressable chip size to 32 kB. The flash chips mounted on those
controllers usually is 128 kB, i.e. parts of the flash chip are
inaccessible. As a workaround, the driver implicitly truncates the
size of all flash chips to 32 kB. Works well for the factory installed
flash.
Do NOT use as a generic programmer for chips >32 kB.

Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Urja Rannikko <urjaman@gmail.com>

------------------------------------------------------------------------
r1915 | stefanct | 2016-01-16 19:50:27 +0100 (Sat, 16 Jan 2016) | 6 lines

Fix file descriptor leak in serial.c.

Found by Coverity as "CID 1348465:  Resource leaks".

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1914 | stefanct | 2016-01-15 00:05:55 +0100 (Fri, 15 Jan 2016) | 8 lines

Set LC_ALL globally in Makefile.

This won't work for the majority of relevant commands because they use the
$(shell) function and GNU make does not relay variables exported within the
makefile to their evironment.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1913 | stefanct | 2016-01-14 23:47:55 +0100 (Thu, 14 Jan 2016) | 8 lines

Pimp the manpage to create nicer hyperlinks and HTML output.

Also, add a target to the makefile to build a flashrom.8.html with groff.
To fix some formatting issues this adds some indention commands as well.

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

------------------------------------------------------------------------
r1912 | stefanct | 2016-01-07 19:13:07 +0100 (Thu, 07 Jan 2016) | 11 lines

Add support for linking statically with CONFIG_STATIC=yes.

This is loosly based on the following changes of chromiumos:

 - flashrom: Add default pkg-config definition.
   Change-Id: I28744af0fd2d2d0bcc4569a5fbef370321691267
 - Fix FT2232 feature on static builds.
   Change-Id: I70d4a7bda573b64cb18429a21792455b018c4cba

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1911 | stefanct | 2016-01-07 18:45:59 +0100 (Thu, 07 Jan 2016) | 16 lines

Make make errors more less flashily.

Previously we have hid almost all error messages from called tools like
pkg-config or the compiler in the "configure" step. Only exceptions were
the library checks because Carl-Daniel felt it improved usability in
case of missing headers etc.

However, this makes the output of the makefile less readable and in
the case of pkg-config fallbacks the error messages are actually
expected. Instead of throwing a part of the detailed stderr outputs
of the tools into the face of the users and completely hiding
others, write all of them into a separate log file instead.

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

------------------------------------------------------------------------
r1910 | stefanct | 2016-01-07 10:50:26 +0100 (Thu, 07 Jan 2016) | 6 lines

makefile: fix exports of PKG_CONFIG_LIBDIR for pkg-config calls.

The parenthesis pushed the exports into a subshell thus made them useless.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1909 | stefanct | 2016-01-04 06:08:40 +0100 (Mon, 04 Jan 2016) | 9 lines

serial: support arbitrary baud rates on Windows.

Available baud rates obviously depend on driver support, but the
CBR_ defines used so far are basically only for backwards source
compatibility with Win16, so dont bother with them.

Signed-off-by: Urja Rannikko <urjaman@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1908 | stefanct | 2016-01-04 04:05:23 +0100 (Mon, 04 Jan 2016) | 8 lines

serprog: fix missing device parameter error message on Windows.

Previously, flashrom -p serprog didnt notice a completely missing dev=
string on Windows. Also, the error message shown if no device name
followed contained a misleading "/dev/...".

Signed-off-by: Urja Rannikko <urjaman@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1907 | stefanct | 2016-01-04 04:05:15 +0100 (Mon, 04 Jan 2016) | 8 lines

serprog: allow to omit specifying a baud rate.

On USB-based serial connections (VCP) the requested baud rate usually
does not matter (much). Remove the arbitrary restriction and use whatever
default values the OS/hardware provides.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Urja Rannikko <urjaman@gmail.com>
------------------------------------------------------------------------
r1906 | stefanct | 2016-01-04 04:05:06 +0100 (Mon, 04 Jan 2016) | 9 lines

serprog: ignore failures when setting serial port options.

There is no good reason to abort earlier just because some options did
not stick. This should improve compatibility without negative effects. If
communication is affected by the missing flag(s) then we abort later
anyway.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Urja Rannikko <urjaman@gmail.com>
------------------------------------------------------------------------
r1905 | stefanct | 2016-01-04 04:04:36 +0100 (Mon, 04 Jan 2016) | 8 lines

serprog: clear NDELAY flag only once after opening the port.

Change sp_openserport() to directly clear the O_NONBLOCK flag that
is potentially set by opening the device with O_NDELAY instead of
clearing ALL flags in serialport_config() unconditionally.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Urja Rannikko <urjaman@gmail.com>
------------------------------------------------------------------------
r1904 | stefanct | 2015-12-25 23:42:45 +0100 (Fri, 25 Dec 2015) | 11 lines

Add support for libftdi1.

Many distros no longer provide libftdi 0.2, and as a result,
programmers that depend on libftdi must be disabled to compile flashrom.
Luckily the libftdi API did not change significantly, so for our
purposes, we can simply use the newer headers and link to the newer
library if it is available.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1903 | stefanct | 2015-12-25 23:13:15 +0100 (Fri, 25 Dec 2015) | 5 lines

Add support for Sanyo LE25FU406C/LE25U40CMC.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Tested-by: Jose Luis Leon <zenky1@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1902 | stefanct | 2015-12-25 22:59:45 +0100 (Fri, 25 Dec 2015) | 22 lines

Rigorously check integrity of I/O stream data.

Even if fwrite() succeeds the data is not necessarily out of the clib's buffers
and writing it eventually could fail. Even if the data is flushed out (explicitly by
fflush() or implicitly by fclose()) the kernel might still hold a buffer.

Previously we have ignored this to a large extent - even in important cases
like writing the flash contents to a file. The results can be truncated
images that would brick the respective machine if written back as is (though
flashrom would not allow that due to a size mismatch). flashrom would not
indicate the problem in any output - so far we only check the return value
of fwrite() that is not conclusive.

This patch checks the return values of all related system calls like fclose()
unless we only read the file and are not really interested in output errors.
In the latter case the return value is casted to void to document this fact.
Additionally, this patch explicitly calls fflush() and fsync() (on regular files only)
to do the best we can to guarantee the read image reaches the disk safely
and at least inform the user if it did not work.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Urja Rannikko <urjaman@gmail.com>
------------------------------------------------------------------------
r1901 | stefanct | 2015-11-22 03:23:31 +0100 (Sun, 22 Nov 2015) | 13 lines

Add support for SST SST25WF020A, SST25WF040B, SST25WF080B.

Apart from the strange ID (using Sanyo's vendor ID 0x62) the main
difference from the plain SST25WF series is that they lack op codes
0xAD (AAI Word program) and 0x52 (32K erase). The smallest version
does not support dual I/O operations either.

SST25WF080B was tested under Linux with spidev.

Tested-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1900 | stefanct | 2015-11-22 00:35:47 +0100 (Sun, 22 Nov 2015) | 10 lines

Add support for VIA VT8251.

Seems to work on IBM SurePOS 700 and
IBM (now Toshiba) AnyPlace Kiosk Model 4838-310.

Tested-by: Jason Vannest <Jason_Vannest@abercrombie.com>
Tested-by: Rowlinson Mark <Mark.Rowlinson@uk.fujitsu.com>

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1899 | stefanct | 2015-11-14 03:55:22 +0100 (Sat, 14 Nov 2015) | 7 lines

Use nanosleep() instead of usleep() where available.

usleep() has been obsolete for quite a while.
The only target that uses it without alternative is DOS.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1898 | stefanct | 2015-11-14 03:55:12 +0100 (Sat, 14 Nov 2015) | 25 lines

Add (implicit) support for musl libc.

This is mostly achieved by fixing or refining the inclusion of header
files and replacing glibc-specific ifdefs with more generic ones.

 - <sys/io.h>: Contains iopl(2) and x86 I/O port access functions (inb, outb etc).
               Generally Linux-specific but also availble on debian/kFreeBSD.
               Provided by glibc as well as musl and uclibc.
               Include it if we are running Linux or if glibc is detected.
 - <sys/fcntl.h>: should be (and is) replaced by <fcntl.h> (without the
    			  "sys" prefix).
 - <linux/spi/spidev.h>: Does not include all necessary headers, namely
                         _IOC_SIZEBITS that is used in the definition of
                         SPI_MSGSIZE is not brought in via <linux/ioctl.h>
                         but instead we relied so far on glibc's including
                         it via <sys/ioctl.h>. Change that to explicitly
                         including <linux/ioctl.h>.
 - <endian.h>: Would also be available in musl but there is no easy way
               to detect it so we do not try yet.

The bug report and initial patches were
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1897 | stefanct | 2015-10-16 04:16:20 +0200 (Fri, 16 Oct 2015) | 7 lines

Add support for 128 bytes write granularity.

Some chips such as the ENE KB9012 internal flash require a write
granularity of 128 bytes.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Acked-by: Nico Huber <nico.h@gmx.de>
------------------------------------------------------------------------
r1896 | stefanct | 2015-07-05 18:53:22 +0200 (Sun, 05 Jul 2015) | 16 lines

dediprog: Tidy up commands and remove dead nonsense code.

Use names for the commands and request types instead of magic
numbers and remove some of the unnecessary unexplained arguments.
Also, cleanup the nonsense code left over from RE. Most of it can
not be explained by official documentation and was recorded with
ancient firmware/software.

Based on the following chromiumos changes:
Change-Id: I80a0dcdf40eedc89da48fb2c54cd9d9fd13e6fa1
Change-Id: If61bac2c8194b3ec30a80422d871842c66f0cd74

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: David Hendricks <dhendrix@chromium.org>
------------------------------------------------------------------------
r1895 | stefanct | 2015-06-30 01:24:23 +0200 (Tue, 30 Jun 2015) | 10 lines

serprog: Fix FWH/LPC by implementing serprog_map.

The serprog protocol does only transmit 24 bit-wide address and ignores the
top 8 bit. This is fine as long as the underlying hardware ignores the latter
anyway (which is the case for parallel chips that even lack the respective pins).
FWH/LPC chips, however, operate on a full 32-bit (LPC) or 28-bit (FWH) address
space and would fail with the fallback mapping to NULL.

Signed-off-by: Urja Rannikko <urjaman@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1894 | stefanct | 2015-06-28 15:31:19 +0200 (Sun, 28 Jun 2015) | 14 lines

dediprog: Invert the LED polarity in the code.

Previously we have used low-active macros (because the hardware and
old protocol were so too) and set every single LED explicitly although we
only used a limited number of combinations. Using an enumeration for
commonly used values instead makes things easier.

Based on the following chromiumos change:
Change-Id: Ie481a583e623cdc45e3649a4db69b15570f65a7b

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: David Hendricks <dhendrix@chromium.org>
------------------------------------------------------------------------
r1893 | stefanct | 2015-06-23 01:59:15 +0200 (Tue, 23 Jun 2015) | 11 lines

spi25: ignore 0x00 as a manufacturer id in the generic match.

Saying that manufacturer id 0x00 is an "unknown SPI chip"
just confuses people with external programmers without a
proper connection to a chip and makes them think flashrom
doesn't support the chip they're trying to use.
Also causes unnecessary -c requirement with a multiple-slot
(FWH/LPC and SPI) serprog device i was testing.

Signed-off-by: Urja Rannikko <urjaman@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1892 | stefanct | 2015-06-20 13:53:10 +0200 (Sat, 20 Jun 2015) | 8 lines

Add support for Winbond W29C512A/W29EE512.

Tested with a W29EE512P-70 (PLCC32, 5V)  found on an RTL8169 network card.
The ID for the chip was already in flashchips.h with the name W29C512A
and a note for "also W29EE512". The datasheets are almost identical.

Signed-off-by: Urja Rannikko <urjaman@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1891 | stefanct | 2015-06-03 00:32:24 +0200 (Wed, 03 Jun 2015) | 5 lines

Add support for PMC Pm25LQ020, Pm25LQ040, Pm25LQ080, Pm25LQ016, Pm25LQ032C.

Signed-off-by: Steven Honeyman <stevenhoneyman@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1890 | stefanct | 2015-05-24 01:59:23 +0200 (Sun, 24 May 2015) | 9 lines

hwaccess.h: fix compilation on OSX.

DirectHW provides prototypes for out[bwl] and in[bwl], but we still
need to define the respective OUT[BWL] and IN[BWL] binding macros.

Apparently this has been broken since r1864 (or January 2015).

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1889 | stefanct | 2015-04-03 23:29:04 +0200 (Fri, 03 Apr 2015) | 6 lines

Add support for more GigaDevice GD25LQ chips.

Namely GD25LQ40, GD25LQ80, GD25LQ16, GD25LQ64(B), GD25LQ128.

Signed-off-by: Roman Titov <titovroman@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1887 | stefanct | 2015-03-01 23:05:16 +0100 (Sun, 01 Mar 2015) | 4 lines

Increase flashrom version number to 0.9.8.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1886 | stefanct | 2015-03-01 23:04:38 +0100 (Sun, 01 Mar 2015) | 26 lines

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

Tested mainboards:
OK:
 - Elitegroup GF7050VT-M
   Reported by Alex
 - Fujitsu D2724-A1x (used in ESPRIMO E5625)
   Reported by Rainer Spillmann
 - Teclast X98 Air 3G
   Reported by Antonio Ospite

Flash chips:
 - Fix MX25L6405(D) definition by splitting it.
   Reported by Reggie McMurtrey
 - Add Macronix MX25L..08E family and rearrange MX25L6436E.
 - Pm49FL004 to PREW (+EW)
   Reported by Georg Sauthoff

Miscellaneous:
 - Add board enable for abit KN9 Ultra.
 - Mark ARM-USB-OCD as working OK.
 - Use "mobile devices" instead of "laptops" in output.
 - Tiny other stuff.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1885 | stefanct | 2015-02-19 00:28:30 +0100 (Thu, 19 Feb 2015) | 20 lines

Fix a number of problems in mstarddc_spi.c.

Coverity has brought up the following problems:

mstarddc_spi_send_command():
 - CID 1270702: bad comparison of malloced pointer 'cmd'.
 - CID 1270701: a NULL pointer dereference possible because of above.

Simply checking the return value of malloc in a valid way fixes both problems.

mstarddc_spi_init():
 - CID 1270699 and 1270700: Memory leak of i2c_device.

This patch revamps the function in various ways to fix these issues and some
other irritating bits.
It reduces scopes of variables where possible, pushes the code towards our
coding standards and introduces a label-based resource cleanup at the end.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Alexandre Boeglin <alex@boeglin.org>
------------------------------------------------------------------------
r1883 | stefanct | 2015-02-11 23:21:03 +0100 (Wed, 11 Feb 2015) | 5 lines

Increase flashrom version number to 0.9.8-rc1.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1882 | stefanct | 2015-02-10 09:03:10 +0100 (Tue, 10 Feb 2015) | 6 lines

Add support for SPARC (maybe).

Was implemented by SPARC newbies, does (cross-)compile but is not run-tested.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1881 | stefanct | 2015-02-08 22:58:10 +0100 (Sun, 08 Feb 2015) | 12 lines

Add support for the Microchip PICkit2 as an SPI programmer.

This patch was inspired by the code in AVRDude (open source Atmel AVR
programmer) to support the PICkit2 written by Doug Brown [1]. The
Dediprog code in flashrom was used as the template for this code with
some reference to the ft2232 code as well.

[1] - https://github.com/steve-m/avrdude/blob/master/pickit2.c

Signed-off-by: Justin Chevrier <jchevrier@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1880 | stefanct | 2015-02-08 22:58:04 +0100 (Sun, 08 Feb 2015) | 10 lines

Refine version check of libpci function pci_get_dev.

The way more elegant check for the header fails unfortunately on CentOS 4.9
because PCI_LIB_VERSION is not defined at all although the domain parameter
is present. This patch jumps through the hoops via an additional check in the
Makefile to determine if the function accepts 5 parameters (new version) or
not (old version).

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1879 | stefanct | 2015-02-08 22:57:52 +0100 (Sun, 08 Feb 2015) | 80 lines

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

Tested mainboards:
OK:
 - AOpen UK79G-1394 (used in EZ18 barebones)
   Reported by Lawrence Gough
 - ASUS M4N78 SE
   Reported by Dima Veselov
 - ASUS P5LD2-VM
   Mark board enable as tested (reported by Dima Veselov)
 - GIGABYTE GA-970A-UD3P (rev. 2.0)
   Reported by trucmar on IRC
 - GIGABYTE GA-990FXA-UD3 (rev. 4.0)
   Reported by ROKO__ on IRC
 - GIGABYTE GA-H77-DS3H (rev. 1.1)
   Reported by Evgeniy Edigarev
 - GIGABYTE GA-P55-USB3 (rev. 2.0)
   Reported by Mans Thornqvist
 - MSI MS-7817 (H81M-E33)
   Reported by Igor Kolker

Chipsets:
 - Marked Intel Bay Trail (0x0f1c) as tested OK
   Reported by Antonio Ospite
 - Refine Intel IDs
    * Add IDs for Braswell
    * Add IDs for 9 Series PCHs (e.g. H97, Z97)
    * Rename Wellsburg devices slightly

Flash chips:
 - Atmel AT25DF041A to PREW (+PREW)
   Reported by Tai-hwa Liang
 - Atmel AT26DF161 to PREW (+EW)
   Reported by Steve Shenton
 - Atmel AT45DB011D to PREW (+PREW)
   Reported by The Raven
 - Atmel AT45DB642D to PREW (+PREW)
   Reported by Mahesh Mokal
 - Eon EN25F32 to PREW (+PREW)
   Reported by Arman Khodabande
 - Eon EN25F40 to PREW (+REW)
   Reported by Jerrad Pierce
 - Eon EN25QH16 to PREW (+EW)
   Reported by Ben Johnson
 - GigaDevice GD25Q20(B) to PREW (+PREW)
   Reported by Gilles Aurejac
 - Macronix MX25U6435E/F to PR (+PR)
   Reported by Matt Taggart
 - PMC Pm25LV512(A) to PREW (+PREW)
   Reported by The Raven
 - SST SST39VF020 to PREW (+PREW)
   Reported by Urja Rannikko
 - Winbond W25Q40.V to PREW (+EW)
   Reported by Torben Nielsen
 - Add E variants of MX25Lx006 (MX25L2006E, MX25L4006E, MX25L8006E).
 - Add MX25L6465E variant.
 - There was never a MX25L12805 AFAICT.
 - Split MX25L12805 from models with the same ID but an additional 32 kB
   eraser: MX25L12835F/MX25L12845E/MX25L12865E.
 - Add a bunch of ST parallel NOR flash chip IDs.

Miscellaneous:
 - Whitelist ThinkPad X200.
 - Constify master parameter of register_master().
 - Remove FEATURE_BYTEWRITES because it was never used at all.
 - Refine hwseq messages and make them less prominent.
 - Fix the yet unused PRIxCHIPADDR format string thingy.
 - Fix copy&paste error in spi_prettyprint_status_register_bp().
   Spotted by Pablo Cases.
 - Add an additional SMBus controller revision to identify another Yangtze
   model. Thanks to Dan Christensen for reporting this issue.
 - dediprog: add missing include for stdlib.h.
   This fixes (at least) building on FreeBSD and DragonflyBSD with gcc.
 - Remove references to struct pci_filter from programmer.h.
   It is only needed in internal.c where it has a complete type. Having
   it in programmer.h provokes a warning by some old versions of gcc.
 - Tiny other stuff.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1878 | stefanct | 2015-01-27 19:07:50 +0100 (Tue, 27 Jan 2015) | 9 lines

Make strnlen() visible in old versions of glibc.

strnlen() is in POSIX 2008 but was a GNU extension up to glibc 2.10
requiring to define _GNU_SOURCE. This fixes compilation on CentOS 4.9.
Also, move our implementation of strnlen() that was added to support
DJGPP to helpers.c.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1877 | stefanct | 2015-01-26 23:06:04 +0100 (Mon, 26 Jan 2015) | 11 lines

Properly include current libusb-win32 header.

libusb-win32 is using a different header file name (lusb0_usb.h) for
a while. Use that on Windows builds to make clear that this is
currently the correct header to include.

Hopefully this will change soonish by migrating away from libusb-0.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1876 | stefanct | 2015-01-26 23:03:35 +0100 (Mon, 26 Jan 2015) | 17 lines

Let pkg-config work with cross-compilers.

In cross-compiler setups pkg-config often needs some help to
determine the correct libraries. This can be done for example by
setting PKG_CONFIG_LIBDIR to point to the directory where the
cross-compile .pc files are located. If PKG_CONFIG_LIBDIR was not
set already outside of the Makefile we set it according to LIBS_BASE
and add the respective path to the linker's rpath. This makes it
possible to easily cross-compile by only setting CC and LIBS_BASE on
the command line.

This patch also removes the explicit default for LIBS_BASE again
because it does not play well with this change and was a bad idea to
begin with.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1875 | stefanct | 2015-01-26 00:57:08 +0100 (Mon, 26 Jan 2015) | 8 lines

Fix "unterminated variable reference" on ancient versions of GNU make.

Add a workaround for the GNU make that shipped with CentOS 4.9, which
apparently does not like semicolons in shell code (and which also
ignores info functions altogether by the way).

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1874 | stefanct | 2015-01-26 00:45:14 +0100 (Mon, 26 Jan 2015) | 8 lines

Shadowing fix in nicintel_eeprom.c for ancient libpci.

Very old versions (<2.2) of pciutils had a typedef named "word" in
types.h. That does not play well with previous local variable names
of nicintel_eeprom.c.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1873 | stefanct | 2015-01-26 00:42:57 +0100 (Mon, 26 Jan 2015) | 11 lines

ftdi2232_spi: revert usage of DIS_DIV_5 macro.

In r1872 we replaced some magic values with constant macros from
ftdi.h. Among them was DIS_DIV_5 that represents the opcode that
disables the use of the 5x prescaler on newer devices. Unfortunately
this macro was only introduced with support for FT232H and hence is
not available in older versions of the library. Revert back to using
the magic constant.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1872 | stefanct | 2015-01-25 04:52:47 +0100 (Sun, 25 Jan 2015) | 7 lines

ft2232_spi.c: use constants from ftdi.h instead of magic numbers.

Also, improve documentation of static variables cs_bits and pindir.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1871 | stefanct | 2015-01-24 16:16:14 +0100 (Sat, 24 Jan 2015) | 9 lines

Fix the --mainboard parameter that controls board enables.

We refactored board_match_name()/--mainboard handling in r1577 and
apparently broke it because since then we were always comparing to
the respective coreboot values of board and vendor names instead of
the user-supplied strings.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1870 | stefanct | 2015-01-24 16:06:27 +0100 (Sat, 24 Jan 2015) | 20 lines

Add support for Eon EN25P Series.

These are very similar to Eon's EN25B series but unlike those the
EN25P has uniform sectors (of 32 and 64 kB). They can not be
distinguished by RDID alone but the RES and REMS IDs are different
and hence could be detected eventually in the future. This patch
also refines tiny bits of the EN25B series.

The series includes:
 - EN25P05
 - EN25P10
 - EN25P20
 - EN25P40
 - EN25P80
 - EN25P16
 - EN25P32
 - EN25P64

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1869 | stefanct | 2015-01-19 20:52:34 +0100 (Mon, 19 Jan 2015) | 13 lines

Allow to easily build all optional modules.

This patch adds a CONFIG_EVERYTHING flag to the Makefile
that sets all CONFIG_* flags to "yes" if they were "no".

This provides a comfortable way to ensure maximum code exposure
to tools like coverity[0] or clang's scan-build.

[0] https://scan.coverity.com/projects/1020

Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1868 | stefanct | 2015-01-10 16:59:54 +0100 (Sat, 10 Jan 2015) | 4 lines

Fix support for Macronix MX25L6495F.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1867 | stefanct | 2015-01-10 10:33:14 +0100 (Sat, 10 Jan 2015) | 7 lines

Add support for Macronix MX25L6495F.

This is based on the code sent to the flashrom mailing list
by Alex Lu (alexlu6@mxic.com.tw) without sign-off.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1866 | stefanct | 2015-01-10 10:33:06 +0100 (Sat, 10 Jan 2015) | 10 lines

Refinements for DragonflyBSD.

 - /usr/include/cpu/param.h defines PAGE_MASK already, hence use another
   name for the respective macro in nicintel_eeprom.c.
 - Since DragonflyBSD 3.6 DPorts is used as the default package manager.
   Therefore we should use /usr/local/ instead of /usr/pkg/ on default
   to fetch libraries.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1865 | stefanct | 2015-01-10 10:33:00 +0100 (Sat, 10 Jan 2015) | 10 lines

Remove defaults for CC and AR.

AR defaults to "ar" anyway in GNU make and instead of gcc it is probably a
better idea to use just cc. The latter allows to build on freebsd 10 without
overriding CC or doing symlink tricks (because it uses clang as cc, provides
multiple gcc packages but only versioned binaries without any actual "gcc"
command name in the path).

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1864 | stefanct | 2015-01-10 10:32:50 +0100 (Sat, 10 Jan 2015) | 19 lines

Unify target OS and CPU architecture checks.

We do CPU architecture checks once for the makefile in arch.h and
once for HW access abstraction in hwaccess.c. This patch unifies
related files so that they can share the checks to improve
maintainability and reduce the chance of inconsistencies.
Furthermore, it refines some of the definitions, which
 - adds "support" for AARCH64 and PPC64,
 - adds big-endian handling on arm as well as LE handling on PPC64,
 - fixes compilation of internal.c on AARCH64 and PPC64.

Additionally, this patch continues to unify all OS checks in
flashrom by adding a new helper macro IS_WINDOWS.

The old header file for architecture checking is renamed to platform.h
to reflect its broader scope and all new macros are add in there.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1863 | stefanct | 2015-01-10 10:32:44 +0100 (Sat, 10 Jan 2015) | 6 lines

Allow to easily set a global path prefix for libraries and include files.

Gets rid of a few DOS-specific Makefile hacks.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1862 | stefanct | 2015-01-10 10:32:07 +0100 (Sat, 10 Jan 2015) | 10 lines

Refine revision handling.

Up to now, when compiling flashrom outside a VCS it would print two
warnings that are not very clear to the user. This patch adds a new
auxilary function to getrevision.sh and uses it in the makefile to print a
single and more meaningful message to the user while hiding the
warnings from getrevision.sh.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1861 | stefanct | 2015-01-06 00:00:14 +0100 (Tue, 06 Jan 2015) | 11 lines

Fix wrong density encoding on Intel Silvermont.

Silvermont (Bay Trail, Rangeley, Avoton) seems to still use the old
density encoding with 3 bits per chip. Documentation is unavailable
(held concealed by Intel) but thanks to the efforts of Tai-Hong
(Type) Wu the layout is clear now. This patch is based on his one
but solves the issue differently thus reducing the code complexity.

Signed-off-by: Tai-Hong Wu <thwu@lunartoday.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1860 | stefanct | 2014-12-20 21:25:19 +0100 (Sat, 20 Dec 2014) | 26 lines

Add support for the MSTAR I2C ISP protocol.

Basically, among other chips, MSTAR manufactures SoCs that equip TV sets
and computer screens, and it seems that all of their products use the
same in-system programming protocol. Basically, they use the DDC channel
of VGA or DVI connectors, which is actually an I2C bus, to encapsulate
SPI frames (the flash chip is connected to the SoC through an SPI bus).

I wrote this patch since the screen I bought had a software bug, and the
manufacturer only released a new firmware binary, but no tool or
instructions on flashing it.

More details can be found here:
http://boeglin.org/blog/index.php?entry=Flashing-a-BenQ-Z-series-for-free(dom)

I only read code from Linux kernel archives published by Acer to figure
out the protocol (for a touchscreen controller and an NFC chip, both by
MSTAR, that share the same ISP protocol), so I don't think there are
any legal problems with it.

Compilation is currently disabled by default in the Makefile.
If in doubt, additional Makefile bugs were added by Stefan.

Signed-off-by: Alexandre Boeglin <alex@boeglin.org>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1859 | stefanct | 2014-12-20 17:45:31 +0100 (Sat, 20 Dec 2014) | 12 lines

Fix handling of write protection at register space address +2.

Since r1833 we added the offset of the virtual register in several
functions, which produced segfaults. This patch renames a few
parameters and reorganizes/fixes various parts of the
changelock_regspace2_block() function - hence the rather big diff.

Thanks to Roman Lebedev for reporting this issue and testing numerous
revisions of this patch.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1858 | stefanct | 2014-12-12 01:32:03 +0100 (Fri, 12 Dec 2014) | 19 lines

Add support for Spansion S25FL127S.

This flash chip can be configured (one time) to use 64 KiB or 256 KiB sectors.
Additionally, in the 64 KiB mode it supports 16 4 KiB sub-sectors that can be
(one time) programmed to be on the top or bottom of the device. The sub-sectors
can be erased with the 0x20 opcode but because this opcode does not work
with the remaining sectors and flashrom can not cope with that the 0x20
opcode is not supported yet.

This patch adds two definitions, one for the 64 KiB and 256 KiB configuration
respectively. The device also shares the RDID with the various S25FL128
devices so we have to increase the maximum number of successfully probed
chips to 8.

The 64 KiB mode was tested on real hardware.

Signed-off-by: Jernej Skrabec <jernej.skrabec@planet.si>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1857 | stefanct | 2014-12-07 22:57:53 +0100 (Sun, 07 Dec 2014) | 7 lines

Add support for Eon EN29LV040 and EN29LV040A.

Both use the same ID and are mostly identical.

Tested-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1856 | stefanct | 2014-12-05 23:56:13 +0100 (Fri, 05 Dec 2014) | 16 lines

Add support for Intel 82599 10 GbE NICs.

The Intel 82599 series of 10 GbE controllers has a bit-banged SPI
interface that's register-compatible with the one in the 1 GbE
controllers, except the register addresses are shifted up by
0x10000, cf. Intel document 331520:
http://www.intel.com/content/dam/www/public/us/en/documents/datasheets/82599-10-gbe-controller-datasheet.pdf

This patch was tested with a board that has the 0x10fc device and a Micron
M25P40 SPI flash chip. The PCI IDs and names for the devices are per Intel document 331521
https://www-ssl.intel.com/content/dam/www/public/us/en/documents/specification-updates/82599-10-gbe-controller-spec-update.pdf
and the PCI SIG device ID registry with small refinements.

Signed-off-by: Ed Swierk <eswierk@skyportsystems.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1855 | stefanct | 2014-11-30 23:31:12 +0100 (Sun, 30 Nov 2014) | 8 lines

Add board enable for GIGABYTE GA-8SIMLFS 2.0.

This board was used/sold by Fujitsu. The board enabled was tested (sadly
with the wrong image, i.e. one of the GA-8SIMLH images directly from
GIGABYTE instead of one from Fujitsu).

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1854 | stefanct | 2014-11-02 00:12:33 +0100 (Sun, 02 Nov 2014) | 9 lines

cbtable.c: Do not unnecessarily duplicate strings.

The strdup calls were a leftover that slipped through the cleanup in
r1577.

Found-by: Valgrind 3.10.0

Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1853 | stefanct | 2014-11-01 23:56:06 +0100 (Sat, 01 Nov 2014) | 4 lines

Move strtok_r implementation verbatim to helpers.c.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1852 | stefanct | 2014-10-19 09:54:27 +0200 (Sun, 19 Oct 2014) | 8 lines

dmi.c: make sure we call isprint() correctly.

ISO C and POSIX require to call ctype functions with values representable
by unsigned char. We have used a char as input so far which might be
negative and hence get sign-extended.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1851 | stefanct | 2014-10-19 09:53:45 +0200 (Sun, 19 Oct 2014) | 11 lines

Make read before write configurable (infrastructure part).

 - Introduce a variable in doit() that allows to influence
   read-before-write and its consequences.
 - Modify build_new_image so that it still works even if the old content
   is not read before.
 - Add copy_old_content() to ease the pain for future patches.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1850 | stefanct | 2014-09-10 01:03:32 +0200 (Wed, 10 Sep 2014) | 6 lines

Add support for Winbond W25Q40.V chips.

Read-tested by Peter Ruesch.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1849 | stefanct | 2014-09-05 18:14:11 +0200 (Fri, 05 Sep 2014) | 6 lines

dmi.c: Duplicate returned strings because they are meant to be freed.

Without this patch dmi_shutdown calls free() on read-only strings.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1848 | stefanct | 2014-08-31 02:09:21 +0200 (Sun, 31 Aug 2014) | 6 lines

Introduce generic shutdown_free() and remove redundant internal_shutdown().

The former will be useful in cases where cleanup equals a simple call to free().

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1847 | stefanct | 2014-08-31 01:39:51 +0200 (Sun, 31 Aug 2014) | 15 lines

Refine physical address mapping of flash chips.

 - Create distinct functions for mapping and unmapping for flash chips.
 - Map only when needed: map before probing and unmap immediately
   after it. Map again when a single chip was probed successfully before
   taking any actual actions and clean up afterwards.
 - Map special function chip registers centrally together with flash space
   instead of within (some) probing methods after successful probes.
 - Save the used base addresses of the mappings in struct flashctx as well.
 - Do not try to (un)map the zero-sized chip definitions that are merely hacks.
   This also fixes the printing of wrong warnings for these chip definitions
   introduced in r1765.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1846 | stefanct | 2014-08-20 20:56:35 +0200 (Wed, 20 Aug 2014) | 4 lines

Add support for Macronix MX23L1654, MX23L6454 and MX23L12854 mask ROMs.

Signed-off-by: Michael Coppola <michael.n.coppola@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1845 | stefanct | 2014-08-20 17:39:38 +0200 (Wed, 20 Aug 2014) | 8 lines

Add support for Intel Wildcat Point PCH.

The Wildcat Point PCH can be paired with Broadwell or Haswell.
This patch was essentially backported from ChromiumOS commit 9bd2af8.

Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1844 | stefanct | 2014-08-20 17:39:32 +0200 (Wed, 20 Aug 2014) | 19 lines

Add support for Intel Silvermont: Bay Trail, Rangeley and Avoton.

The core of this patch to support Bay Trail originally came from the
Chromiumos flashrom repo and was modified by Sage to support the
Rangeley/Avoton parts as well.
Because that was not complicated enough already Stefan Tauner refactored
and refined everything. Bay Trail seems to be the first Atom SoC able to
support hwseq. No SPI Programming Guide could be obtained so it is
handled similarly to Lynx Point which seems to be its nearest relative.

Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Signed-off-by: Martin Roth <gaumless@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Tested-by: Marc Jones <marcj303@gmail.com>
Tested-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Tested-by: Thomas Reardon <thomas_reardon@hotmail.com>
Tested-by: Wen Wang <wen.wang@adiengineering.com>
Acked-By: Marc Jones <marcj303@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1843 | stefanct | 2014-08-20 17:39:19 +0200 (Wed, 20 Aug 2014) | 12 lines

Refine Flash Component descriptor handling.

Possible values as well as encodings have changed in newer chipsets as follows.
 - Pre-PCH (i.e. ICH) chipsets had a maximum frequency of 33 MHz for all
   operations
 - Since Cougar Point the chipsets support dual output fast reads (encoded
   in bit 30).
 - Flash component density encoding has changed from 3 to 4 bits with Lynx
   Point, currently allowing for up to 64 MB chips.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1842 | stefanct | 2014-08-15 19:17:59 +0200 (Fri, 15 Aug 2014) | 13 lines

Refine handling chips that exceed maximum programmer sizes.

 - Change check_max_decode() to return the number of (common) busses
   where the flash chip exceeds the supported size of the programmer.
 - Refine its signature to use a flashctx pointer only.
 - Move CLI-related bits to cli_classic.c.
 - Rename check_max_decode() to count_max_decode_exceedings() to
   better reflect what it (now) really does.
 - Refine the messages printed by the caller to better integrate with the new
   setup, and simplify them.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1841 | stefanct | 2014-08-09 01:52:33 +0200 (Sat, 09 Aug 2014) | 12 lines

Refactor some CLI-relevant parts.

Begin to move functions that clearly belong to the (command line)
user interface out of flashrom's core files like flashrom.c.

 - Refine messages within check_chip_supported(), rename it to
   print_chip_support_status() and move it to newly created cli_common.c.
 - Move flashbuses_to_text() to cli_common.c as well.
 - Move global verbosity variables to cli_output.c.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1840 | stefanct | 2014-08-08 10:33:01 +0200 (Fri, 08 Aug 2014) | 15 lines

Unify non-shifted and shifted JEDEC access.

Some Parallel bus chips have a 16-bit mode and an 8-bit mode. They use
normal JEDEC addresses for 16-bit mode and shifted addresses (by 1 bit)
for 8-bit mode. Some programmers can access them in 16-bit mode, but on
all flashrom-supported programmers so far, we access them in 8-bit mode.
This means we have to shift the addresses but apart from the addresses
we can share the code.

This patch makes this possible by checking the chip's FEATURE_ADDR_SHIFTED
flag in common JEDEC functions and applying the right addresses respectively.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1839 | stefanct | 2014-08-06 17:09:15 +0200 (Wed, 06 Aug 2014) | 38 lines

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

Tested mainboards:
OK:
 - ASUS F2A85-M
   Reported by various corebooters
 - ASUS M2N-MX SE Plus
   Reported by Antonio
 - ASUS P5LD2
   Reported by Francois Revol
 - Lenovo ThinkPad T530
   Reported and partially authored by Edward O'Callaghan
 - MSI MS-7502 (Medion MD8833)
   Reported by naq on IRC
 - Shuttle AB61
   Reported by olofolleola4
 - ZOTAC IONITX-F-E
   Reported by Bernardo Kuri

Flash chips:
 - Atmel AT45DB021D to PREW (+PREW)
   Reported by The Raven
 - Atmel AT25F4096 to PREW (+PREW)
   Reported by {U+1100}{U+1169}{U+11BC}{U+110C}{U+116E}{U+11AB}{U+1112}{U+1167}{U+11A8}
 - GigaDevice GD25Q16(B) to PREW (+PREW)
   Reported by luxflow@live.com using a GD25Q16BSIG
 - Catalyst CAT28F512
   Mark erase and write as known bad (not implemented)

Miscellaneous:
 - Various spelling corrections by Daniele Forsi.
 - Added and refined a bunch of chips originally investigated by Carl-Daniel.
 - Marked the ARM-USB-OCD-H programmer as tested
   (reported by Ruud Schramp).
 - Tiny other stuff.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1838 | stefanct | 2014-08-06 16:36:27 +0200 (Wed, 06 Aug 2014) | 21 lines

Add support for S25FL128P, S25FL129P and refine it for S25FL128S chips.

Additionally to the existing S25FL128S......0 definition this patch
adds S25FL128P......0, S25FL128P......1 and S25FL128S......1, as well as
S25FL129P......0 and S25FL129P......1 definitions.
S25FL12xP seem to be the predecessor families of S25FL128S. All
associated chips can not be distinguished with RDID alone.

Besides the new chips, this patch also fixes the name of the  previously
supported S25FL128S model with uniform 256 kB sectors
(S25FL128P......1 not 0) and adds the hybrid sector version (0) as well.

Due to the shared IDs the user has to select the right chip manually
with the -c parameter. To make this even possible, this patch enlarges
the respective array for results to 6.

Tested-by: Antonio Ospite <ao2@ao2.it>
with a S25FL129P......0.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1837 | stefanct | 2014-08-06 01:28:47 +0200 (Wed, 06 Aug 2014) | 13 lines

ichspi: fix missing set_addr on erases and possible crossings of 256 B boundaries.

Apparently the erase function did never set any address before issuing the
erase commands. How could this ever work?
Also, according to PCH documentation crossing 256 byte boundaries is invalid
and may cause wraparound due to the flash chip's pages. Check for this on
reads as well as writes.

Thanks to Vladimir '{U+03C6}-coder/phcoder' Serbinenko for noticing these issues
and providing the initial patch.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1836 | stefanct | 2014-08-06 00:16:01 +0200 (Wed, 06 Aug 2014) | 15 lines

linux_spi: properly convert pointers to kernel's u64.

For arm64 with 32-bit userspace, pointers such as 0xff96ebf8 were
incorrectly getting converted to u64_t 0xffffffffff96ebf8 in the
spi_ioc_transfer struct which was causing ioctl()s to be rejected by
the kernel. With this patch we first cast to uintptr_t (to avoid
warnings on architectures where char * are not 64b wide) and then to
uint64_t which is always big enough and does not produce warnings.

This patch is taken from ChromiumOS'
Change-Id: I5a15b4ca5d9657c3cb1ddccd42eafd91c852dd26

Signed-off-by: David Riley <davidriley@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1835 | stefanct | 2014-08-03 16:15:14 +0200 (Sun, 03 Aug 2014) | 19 lines

Add support for a bunch of 29GL parallel flash chips.

29GL chips use a new 3-Byte device ID probing function at addresses
0x01, 0x0E, 0x0F.

Flash chip families supported by this method include...
 - EON EN29GL
 - Gigadevice GD29GL (if they really exist)
 - ISSI (PMC) IS29GL
 - Macronix MX29GL (+MX68GL1G0F)
 - Spansion S29GL (+S70GL02G)
 - Winbond W29GL

This patch adds respective flash chip definitions for chips up to 16 MB from
Eon, ISSI, Macronix and Winbond. Bigger chips as well as those from
Gigadevice and Spansion are left out.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1834 | stefanct | 2014-08-03 15:05:45 +0200 (Sun, 03 Aug 2014) | 6 lines

Add support for Atmel AT49LH004 and AT49LH00B4.

Also, slightly refine the definition of AT49LH002.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1833 | stefanct | 2014-08-03 15:05:34 +0200 (Sun, 03 Aug 2014) | 8 lines

Refactor unlocking of many chips with locking at register space address +2.

This includes PMC Pm49*, SST 49LF00*, ST M50* and Winbond W39* families.
The erase and write test status bits of all affected chips have been reset.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1832 | stefanct | 2014-07-28 22:35:21 +0200 (Mon, 28 Jul 2014) | 13 lines

Add new programmer for SPI EEPROMs attached to Intel 82580 NICs.

This patch lets you read and write the EEPROM on 82580-based gigabit NIC
cards. So far it has been tested on copper NICs only, but other variants
employing this controller should work too.
It is a nice substitution for the official eeupdate tool.

Speed is quite decent: less than 4 seconds for erases or writes of 32 kB.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Tested-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1831 | hailfinger | 2014-07-20 00:03:29 +0200 (Sun, 20 Jul 2014) | 10 lines

Rename programmer registration functions

register_programmer suggests that we register a programmer. However,
that function registers a master for a given bus type, and a programmer
may support multiple masters (e.g. SPI, FWH). Rename a few other
functions to be more consistent.

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

------------------------------------------------------------------------
r1830 | stefanct | 2014-07-15 15:50:58 +0200 (Tue, 15 Jul 2014) | 11 lines

Add support for AMD Bolton chipset.

SPI controller on the bolton chipset uses the same 3-bit speed
settings as Yangtze, but is otherwise the same as the Hudson chips.
Note that the Bolton RRG doesn't specify a speed setting for the bit
setting of 0b111, so I'm assuming that it's the same setting as
Yangtze.

Signed-off-by: Martin Roth <martin.roth@se-eng.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1829 | stefanct | 2014-07-15 15:50:17 +0200 (Tue, 15 Jul 2014) | 4 lines

Refine messages regarding AMD FCH flash protections.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1828 | stefanct | 2014-07-14 20:04:15 +0200 (Mon, 14 Jul 2014) | 9 lines

Add Board Enable for ASUS Vintage 2 PH1 (P5LD2-MQ).

ASUS Vintage 2 PH1 barebone systems have a mainboard from the P5LD2 series,
namely the P5LD2-MQ (although it is labeled V2-PH1). Pin 16 GPIO needs to
be raised to enable write/erase like on other boards of the series.
NB: it uses a ICH7DH southbridge and hence requires different PCI IDs.

Signed-off-by: Dima Veselov <kab00m@lich.phys.spbu.ru>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1827 | stefanct | 2014-07-14 01:53:40 +0200 (Mon, 14 Jul 2014) | 18 lines

Improve messages on failed erases with default verbosity.

Without this...
Erasing and writing flash chip... ERASE FAILED at 0x00001000! Expected=0xff, Read=0xb4, failed byte count from 0x00000000-0x0000ffff: 0xef09
ERASE FAILED!
Reading current flash chip contents... done.
<loooooong break while the next eraser and writing is tried>
Erase/write done.
Verifying flash... VERIFIED.

Even if there is not a long temporal pause, it is very confusing for
the user to first see a failed erase, followed by a read, a done
message and eventually the verification message.
This patch inserts "Looking for another erase function." where there is
just a silent pause above.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1826 | stefanct | 2014-07-13 19:06:11 +0200 (Sun, 13 Jul 2014) | 7 lines

Fix Intel FWH IDSEL message printing.

This should get rid of extra and/or missing line breaks in verbose(+)
output on Intel chipsets.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1825 | stefanct | 2014-07-13 16:53:45 +0200 (Sun, 13 Jul 2014) | 7 lines

Add support for Macronix MX29F022(N)B and MX29F022(N)T.

The MX29F022(N)T definition was successfully tested by Daniele.

Signed-off-by: Daniele Forsi <dforsi@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1824 | stefanct | 2014-07-13 14:52:15 +0200 (Sun, 13 Jul 2014) | 17 lines

Fix garbage handling in DMI strings.

Previously we tried to replace garbage characters with <space> directly in
the read-only memory-mapped SMBIOS area(!). This could never have
worked for any DMI strings with garbage and results in a segfault on
machines with such strings.

Thanks to Brian Rak (Supermicro X10SLE-F) and John Pohlman (HP XW9400)
for reporting this issue.

With this patch the strings are duplicated within dmi_string() already,
just before we sanitize them. Also, the limit variable used everywhere
points to the first invalid byte address. Refine respective checks
accordingly.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1823 | stefanct | 2014-07-13 02:05:07 +0200 (Sun, 13 Jul 2014) | 5 lines

Add support for Macronix MX25U12835F.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1822 | hailfinger | 2014-06-17 00:36:17 +0200 (Tue, 17 Jun 2014) | 9 lines

EEPROM support: handle implicit erase

Add support for EEPROMs with 1 byte granularity and implicit erase on
write. flashrom will not try to erase before write on these chips.
Explicitly requested erase with -E is done by writing 0xff.

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

------------------------------------------------------------------------
r1821 | stefanct | 2014-06-13 00:57:36 +0200 (Fri, 13 Jun 2014) | 9 lines

Add selfcheck_board_enables().

Check for NULL termination of the array, that each board has the two
main PCI ID sets defined, that coreboot vendor and model fields are either
both set or unset, and that at least either an enable function or a max
decode size is available.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1820 | stefanct | 2014-06-12 23:07:03 +0200 (Thu, 12 Jun 2014) | 7 lines

Remove MCP6/7/8 SPI log requests.

We got enough (and no one is looking at them for the time being anyway).
Also, return an error code in the case no bus type could be detected.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1819 | stefanct | 2014-06-12 02:04:32 +0200 (Thu, 12 Jun 2014) | 7 lines

Introduce helpers.c.

Move some suitable functions there, add it to the Makefile, but leave the
declarations in flash.h for now.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1818 | stefanct | 2014-06-04 18:17:03 +0200 (Wed, 04 Jun 2014) | 8 lines

Add support for Sanyo LE25FW106.

Also, add spi_disable_blockprotect_bp1_srwd().

Originally written and tested by The Raven <originalraven@hotmail.com>.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1817 | stefanct | 2014-06-02 02:46:02 +0200 (Mon, 02 Jun 2014) | 6 lines

print_wiki.c: there is only one way to represent time.

ISO 8601.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1816 | stefanct | 2014-06-02 02:45:57 +0200 (Mon, 02 Jun 2014) | 4 lines

print_wiki.c: refine header and include a legend explaining the test state representation.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1815 | stefanct | 2014-06-02 02:34:58 +0200 (Mon, 02 Jun 2014) | 8 lines

Utilize new tested states for chipsets as well.

Mark all ME-enabled Intel chipsets as DEP, alter print.c accordingly
(print_wiki.c was already prepared). And realign the chipset enable
table when we are at it already.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1814 | stefanct | 2014-06-02 02:12:23 +0200 (Mon, 02 Jun 2014) | 6 lines

Add default arguments for the default programmer (only).

This code exists thanks to food for thought from Urja Rannikko.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1813 | stefanct | 2014-06-02 01:49:03 +0200 (Mon, 02 Jun 2014) | 4 lines

Move global io_base_addr into compilation units.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1812 | stefanct | 2014-06-02 01:48:31 +0200 (Mon, 02 Jun 2014) | 23 lines

Add IT8212F as programmer.

This PCI PATA controller can use 3V parallel flash up to 128 kB.

My card was identified as:
  PCI 1283:8212, subsystem 1283:0001.

and labelled as:
  Innovision Multimedia LTD.
  EIO ATA133 RAID
  (DM-8401 Ver A)

This particular card did not require setting of any GPIO signals to
enable flash writing. My card has Pm39LV512 in PLCC32 package without
socket.

Rebased by Stefan (automatic cleanup, some PCI changes, changed
enable bit handling). Committed with test state NT because the
rebased version was not tested on real hardware (yet).

Signed-off-by: Kyosti Malkki <kyosti.malkki@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1811 | stefanct | 2014-06-02 00:36:30 +0200 (Mon, 02 Jun 2014) | 4 lines

atavia: Fix a few problems overlooked/introduced while rebasing.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1810 | stefanct | 2014-06-01 15:22:35 +0200 (Sun, 01 Jun 2014) | 4 lines

Add support for Atmel (now Adesto) AT25DL081 and AT25DL161.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1809 | stefanct | 2014-06-01 12:26:23 +0200 (Sun, 01 Jun 2014) | 12 lines

Add VIA VT6421A LPC programmer driver.

Due to the mysterious address handling of this chip the user can specify
a base address with the offset parameter, e.g.:
flashrom -p atavia:offset=0xFFF00000

Thanks to Idwer Vollering for his iterative testing of this code, as well as to
Martijn Bastiaan who did the last tests before merging.

Signed-off-by: Jonathan Kollasch <jakllsch@kollasch.net>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1808 | stefanct | 2014-06-01 04:21:02 +0200 (Sun, 01 Jun 2014) | 12 lines

Combine block_erase*_en29lv640b and block_erase*_m29f400bt respectively.

This patch combines two identical block and chip erase functions respectively:
 - Merge block_erase_m29f400bt and block_erase_en29lv640b into
   erase_block_shifted_jedec.
 - Merge block_erase_chip_m29f400bt and block_erase_chip_en29lv640b into
   erase_chip_block_shifted_jedec.

Leave their implementations in en29lv640b.c for now.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1807 | stefanct | 2014-06-01 04:13:23 +0200 (Sun, 01 Jun 2014) | 7 lines

print.c: improve device printing.

Add headers and columns (i.e. print device entries in a table-like manner).
Also, add and use test_state_to_text() to support the new test states.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1806 | stefanct | 2014-05-30 21:34:00 +0200 (Fri, 30 May 2014) | 14 lines

Fix PMC Pm25LV512 and Pm25LV010 probing.

Apparently PMC did not understand the purpose of the JEDEC
continuation code. These chips reply to RES (the only supported ID
command) with the prefix-less vendor ID, a device ID, eventually
followed by the continuation byte for the vendor ID.

This fix uses only the first two bytes instead of appending the
continuation code to the device ID. The problem was reported by The
Raven who also tested the fix on a Pm25LV010 (with an imprint of
"Pm25LV010E").

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1805 | stefanct | 2014-05-29 13:51:24 +0200 (Thu, 29 May 2014) | 7 lines

jedec.c: constify a bit more.

Also, include chipdrivers.h to find conflicting types between exported
declarations and actual implementations.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1804 | stefanct | 2014-05-28 15:02:13 +0200 (Wed, 28 May 2014) | 7 lines

print_wiki: simplify template handling.

Add test_state_to_template() and use it everywhere to select the correct
template. This also enables the use of the new states in all tables.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1803 | stefanct | 2014-05-28 00:10:15 +0200 (Wed, 28 May 2014) | 11 lines

CID1129998/1129999: Unchecked return value from library.

Check return values of various fcntl() invocations in
serialport_config(), serialport_read_nonblock() and
serialport_write_nonblock().

Also, remove some superfluous print conversion specifiers and refine
messages.

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1802 | stefanct | 2014-05-27 23:27:27 +0200 (Tue, 27 May 2014) | 9 lines

Rename some spi_prettyprint_status_register_* functions.

spi_prettyprint_status_register_default_bpX ->
spi_prettyprint_status_register_bpX_srwd

Why was the default in there anyway? :)

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1801 | stefanct | 2014-05-27 23:27:14 +0200 (Tue, 27 May 2014) | 4 lines

Add support for ESMT F25L32PA.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1800 | stefanct | 2014-05-27 02:06:14 +0200 (Tue, 27 May 2014) | 10 lines

Fix various tiny problems in verify_range().

First of all, fix CID1130010: Resource leak as reported by Stefan Reinauer.
Alternatively to Stefan's approach, just move the malloc() out of the scope.

Additionally, get rid of an unnecessary exit(1) and correctly return -1 in all
error cases as documented.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1799 | stefanct | 2014-05-27 00:05:31 +0200 (Tue, 27 May 2014) | 9 lines

Fix selfcheck of various arrays.

Stefan Reinauer has reported ridiculous NULL checks for arrays in our
self_check function found by Coverity (CID1130005). This patch removes
the useless checks but keeps and fixes the one responsible for the
flashchips array by exporting the array size in a new constant.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1798 | stefanct | 2014-05-26 02:36:24 +0200 (Mon, 26 May 2014) | 21 lines

Add two new states to enum test_state and use it for flashchips.

The new enum test_state looks like this:
enum test_state {
	OK = 0,
	NT = 1,	/* Not tested */
	BAD,	/* Known to not work */
	DEP,	/* Support depends on configuration (e.g. Intel flash descriptor) */
	NA,	/* Not applicable (e.g. write support on ROM chips) */
};

The second new state 'NA' is introduced, among other things, to indicate
the erase and write states of real ROMs correctly. This is also implemented
by this patch and required to exchange the previous bit mask in struct
flashchip with a new struct containing an enum test_state for each operation.
The -L output is changed accordingly to print '-' in the case of an N/A state
and the wiki output uses a new template producing a greyed out cell.
Previous users of enum test_state are not affected by this change (yet).

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1797 | stefanct | 2014-05-25 09:47:47 +0200 (Sun, 25 May 2014) | 7 lines

Constify dediprog's write functions too.

I forgot doing so in r1789 which broke compiling the dediprog module with
-Werror (which is default). Thanks to Mike Hibbett for reporting this.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1796 | stefanct | 2014-05-18 23:36:04 +0200 (Sun, 18 May 2014) | 7 lines

Add support for Sanyo LE25FW406A.

No datasheet available. Tested read, write and all erasers separately by
The Raven. He did also provide the patch but refused to sign it off.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1795 | stefanct | 2014-05-16 23:39:48 +0200 (Fri, 16 May 2014) | 14 lines

sbxxx: Add spispeed parameter.

Allow to set the SPI clock frequency on AMD chipsets with a programmer
parameter. If the parameter is given (and matches a possible value), the
SPI clock is set temporarily. Both registers are restored on programmer
shutdown.

Example: ./flashrom -p internal:spispeed="33 MHz" -V

Possible values for spispeed are "16.5 MHz", "22 MHz", "33 MHz", "66 MHz",
"100 MHZ" and "800 kHz" depending on the chipset generation.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1794 | stefanct | 2014-05-16 23:39:33 +0200 (Fri, 16 May 2014) | 11 lines

sbxxx: Add support for new AMD SPI controller.

This patch adds support for the "SPI 100" SPI engine in Yangtze FCHs
(found in Kabini and Temash).

Tested reading/writing on ASRock IMB-A180 and PC Engines' APU board.

Signed-off-by: Wei Hu <wei@aristanetworks.com>
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: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1793 | stefanct | 2014-05-16 23:39:28 +0200 (Fri, 16 May 2014) | 10 lines

sbxxx: Cleanup.

 - Move programmer definition to the top.
 - Rewrite array accesses to use indices instead of using pointer arithmetic.
 - Move length check and opcode extraction to a function.
 - Move IMC parameter handling into existing IMC handling function.
 - Split comparing and resetting the FIFO pointer.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1792 | stefanct | 2014-05-16 19:52:04 +0200 (Fri, 16 May 2014) | 19 lines

AT45DB: fix read functions.

This fixes segfaults on reads (implicit reads on writes too), ouch.
Thanks to The Raven for reporting the problem and testing my patch, and
to Alexander Irenkov for providing a workable fix for it additionally.

There were actually two problems:
1) The loop conditions were bogus which could lead to read errors
   (e.g. on implicit erase verifications).
2) The offset used within the read buffers provided to spi_nbyte_read()
   and memcpy() were not starting at 0 but the offset of the block
   within the flash chip (which has nothing to do with read buffer in
   most cases).

This patch works similarly to Alexander's but is intended to be
more readable.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1791 | stefanct | 2014-05-14 15:19:50 +0200 (Wed, 14 May 2014) | 11 lines

Add support for Sanyo LE25FU406B.

It is very similar to LE25FW418A, except for HD_READ support (that
is not implemented in flashrom anyway yet) and allowed voltage range.

Probing, erasing, reading and writing has been tested.

This chip is found on Seagate Constellation hard drives.

Signed-off-by: Jurij Munda <jurij.munda@uni-mb.si>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1790 | stefanct | 2014-05-10 11:25:44 +0200 (Sat, 10 May 2014) | 21 lines

Refine messages related to erase/write recovery.

We are more verbose inside erase_and_write_flash() although it does not
matter as much as at the end of the whole process in doit().

New output for the non-fatal (i.e. read-protected + successful recovery read) case:

Reading old flash chip contents... done.
Erasing and writing flash chip... spi_block_erase_d8 failed during command execution at address 0x8000
Reading current flash chip contents... done. spi_chip_erase_c7 failed during command execution
FAILED!
Uh oh. Erase/write failed. Checking if anything has changed.
Reading current flash chip contents... done.
Good, writing to the flash chip apparently didn't do anything.
Please check the connections (especially those to write protection pins) between
the programmer and the flash chip. If you think the error is caused by flashrom
please report this on IRC at chat.freenode.net (channel #flashrom) or
mail flashrom@flashrom.org, thanks!

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1789 | stefanct | 2014-05-09 23:16:21 +0200 (Fri, 09 May 2014) | 7 lines

Add 'const' keyword to chip write and other function prototypes.

Inspired by and mostly based on a patch
Signed-off-by: Mark Marshall <mark.marshall@omicron.at>

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1788 | stefanct | 2014-05-08 00:07:23 +0200 (Thu, 08 May 2014) | 10 lines

Remove programmer_shutdown() from doit().

Because the programmer initialization that has to be called way
earlier and independently elsewhere, it does not make a lot of sense
to deinit within doit(). Also, free the logfile name at the end of
main() to catch more execution paths and because this moves it to
the other cleanup instructions.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1787 | stefanct | 2014-05-07 17:25:04 +0200 (Wed, 07 May 2014) | 6 lines

Add support for SST25LF020A.

Tested on hardware by Idwer too.

Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1786 | stefanct | 2014-05-04 23:44:13 +0200 (Sun, 04 May 2014) | 6 lines

Support for Spansion S25FL132K and S25FL164K.

Tested with actual S25FL164K via Arduino SPI.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1785 | stefanct | 2014-05-04 02:55:24 +0200 (Sun, 04 May 2014) | 7 lines

Add support for SST25WF080.

Also, refine status register prettyprinting and unlocking of the whole family.

Signed-off-by: Jason Harper <jharper@iseis.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1784 | stefanct | 2014-05-04 01:01:18 +0200 (Sun, 04 May 2014) | 5 lines

Add support for Macronix MX23L3254 mask ROM.

Signed-off-by: Michael Coppola <michael.n.coppola@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1783 | stefanct | 2014-05-03 23:33:01 +0200 (Sat, 03 May 2014) | 135 lines

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

Tested mainboards:
OK:
 - abit BX6 2.0
   Reported by Stefan Tauner
 - Acer EM61SM/EM61PM (used in Acer Aspire T180)
   Reported by Benjamin Bellec
 - ADLINK Express-HR
   Reported by Obermair Thomas
 - ASUS M3N-H/HDMI
   Reported by Franc Serres
 - Attro G5G100-P
   Reported by Christoph Grenz
 - ASRock 960GM-GS3 FX
   Reported by Fuley Istvan
 - Elitegroup P6BAP-A+ (V2.2)
   Reported by Arnaldo Pirrone
 - Elitegroup GeForce7050M-M (V2.0)
   Reported by Leif Middelschulte
 - Fujitsu D3041-A1 (used in ESPRIMO P2560)
   Reported by Daggi Duck
 - GIGABYTE GA-8S648
   Reported by TeslaBIOS
 - GIGABYTE GA-970A-D3P (rev. 1.0)
   Reported by Jean-Francois Pirus
 - GIGABYTE GA-B85M-D3H
   Reported by Mladen Milinkovic
 - GIGABYTE GA-X79-UD3
   Reported by Jeff O'Neil
 - GIGABYTE GA-X79-UP4 (rev. 1.0)
   Reported by George Spelvin
 - GIGABYTE GA-Z68MA-D2H-B3 (rev. 1.3)
   Reported by Vangelis Skarmoutsos
 - GIGABYTE GA-Z87-HD3
   Reported by virii5
 - Lenovo Tilapia CRB
   Reported by jenkins56 on IRC
 - MSI GT60-2OD (notebook, only with layout patches)
   Reported by Vasiliy Vylegzhanin
 - MSI MS-6704 (845PE Max2 PCB 1.0) (Pure Version w/o raid)
   Reported by professorll
 - MSI MS-7399 1.1 (used in Acer Aspire M5640/M3640)
   Reported by Koen Rousseau
 - MSI MS-7125 (K8N Neo4(-F/FI/FX))
   We had a board enable for that one for years, but it was not (and still is not)
   completely clear which boards are covered.
 - MSI MS-7522 (MSI X58 Pro-E)
   Reported by Gianluigi Tiesi
 - PCWARE APM80-D3
   Reported by Cesar Augusto Jakoby
 - Pegatron IPP7A-CP
   Reported by {U+0418}{U+043B}{U+044C}{U+044F} {U+0428}{U+0438}{U+043F}{U+043A}{U+043E}
 - Supermicro H8QME-2
   Reported by Greg Tippitt
 - Supermicro X7SPA-H
   Reported by Kyle Bentley
 - Supermicro X7SPE-HF-D525
   Reported by Micah Anderson
 - Supermicro X8DTE
   Reported by Mark Nipper
 - Supermicro X8SIL-F
   Reported by Peter Samuelson
 - ZOTAC IONITX-A (-E) version
   Reported by Maciej Wroniecki
NOT OK:
 - Supermicro X10SLM-F
   Reported by Micah Anderson

Flash chips:
 - Atmel AT29C020 to PREW (+PREW)
   It was marked like that in the past, but I could not find the reason why the
   test bits were reset. Urja Rannikko tested it again and it still works.
 - Eon EN25F10 to PREW (+PREW)
   Reported by Stolmar Tamas
 - Eon EN25QH64 to PR (+PR)
   Reported by Vladimir '{U+03C6}-coder' Serbinenko
 - GigaDevice GD25Q32(B) to PREW (+PREW)
   Reported by mrnuke
 - Macronix MX25L512(E)/MX25V512(C) to PREW (+PREW)
   Reported by Jamie Nichol
 - Macronix MX25L2005(C) to PREW (+PREW)
   Reported by {U+0414}{U+0430}{U+0432}{U+044B}{U+0434}{U+043E}{U+0432} {U+0414}{U+043C}{U+0438}{U+0442}{U+0440}{U+0438}{U+0438}
 - Micron/Numonyx/ST N25Q064..1E to PREW (+PREW)
   Reported by Paolo Zambotti
 - Pmc Pm25LD010(C) to PREW (+PREW)
   Reported by Vasile Ceteras
 - Micron/Numonyx/ST M25P16 to PREW (+EW)
   Reported by raven
 - Micron/Numonyx/ST M25PX64 to PREW (+W)
   Reported by Zaolin
 - SST SST25VF020B to PREW (+PREW)
   Reported by Michael Zweers
 - SST SST49LF040 to PREW (+W)
   Reported by Oskar Enoksson
 - Add support for MX25L3273E (evil twin of MX25L3205 et al.)
   Also, add MX25L1673 and MX25L6473E to the names of their twins and
   add a note about MX25L8073E.
 - Winbond W25X32 to PREW (+REW)
   Reported by The Raven
 - Winbond W29C010 etc. to PREW (+W)
   Reported by san

Chipsets tested OK:
 - Intel NM70 (8086:1e5f)
   Reported by mrnuke
 - Intel C204 (8086:1c54)
   Reported by Vasiliy Vylegzhanin
 - Intel QM67 (8086:1c4f)
   Reported by Obermair Thomas
 - Intel HM77 (8086:1e57)
   Reported by Vasiliy Vylegzhanin
 - Intel B85 (8086:8c50)
   Reported by Mladen Milinkovic
 - Intel HM87 (8086:8c4b)
   Reported by Vasiliy Vylegzhanin
 - Intel Z87 (8086:8c44)
   Reported by virii5
 - NVIDIA MCP51 (10de:0261)
   Reported by Marcin Koscielnicki
 - SiS 648 (1039:0648)
   Reported by TeslaBIOS

Miscellaneous:
 - Mark ARM-USB-TINY-H as tested in ft2232_spi (reported by _nanodev_).
 - getrevision.sh: Ignore failing date calls.
 - getrevision.sh: Fix -u and -l for older git versions which require = for the
   git log grep parameter.
 - Corrected K8T Neo2-F entries due to a report from Stelios Tsampas.
 - Add "-p internal" to output that requests users to send flashrom -V logs.
 - Add Macbook2,1, Thinkpad X230, EasyNote LM85 to laptop whitelist.
 - Tiny other stuff.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1782 | stefanct | 2014-05-02 17:41:42 +0200 (Fri, 02 May 2014) | 12 lines

Make delay values unsigned.

There is no reason for negative delays in our use cases:
 - We don't need it (to work around any quirks).
 - sleep() (POSIX) uses an unsigned argument.
 - usleep() (POSIX) uses an unsigned argument.
 - Sleep() (Windows) uses an unsigned argument.

Change all callees as well (without any complications).

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1781 | stefanct | 2014-04-27 07:07:35 +0200 (Sun, 27 Apr 2014) | 8 lines

ft2232_spi: Add support for TUMPA Lite.

http://www.tiaowiki.com/w/TIAO_USB_Multi_Protocol_Adapter_Lite_User's_Manual

Initial patch from Jadran Puharic <jpuharic@gmail.com>.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1780 | stefanct | 2014-04-26 18:13:09 +0200 (Sat, 26 Apr 2014) | 4 lines

Report if we are not able to disable AAI mode again.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1779 | stefanct | 2014-04-26 18:12:55 +0200 (Sat, 26 Apr 2014) | 8 lines

CID1130000: Unchecked return value in default_spi_write_aai().

Also, try to always disable WRDI because else the user is stuck
with a chip in AAI mode that won't return by itself w/o a reset.

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1778 | stefanct | 2014-04-26 18:12:45 +0200 (Sat, 26 Apr 2014) | 8 lines

CID1130006: Memory leaks in buspirate_spi_init().

The one in the error case of register_shutdown() was discovered while
reviewing the other one found by Coverity and fixed by Stefan Reinauer.

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1777 | stefanct | 2014-04-26 18:12:31 +0200 (Sat, 26 Apr 2014) | 4 lines

CID1129996: Unchecked return value from setsockopt() in serprog.

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1776 | stefanct | 2014-04-26 18:12:15 +0200 (Sat, 26 Apr 2014) | 8 lines

CID1130002: Logically dead code due to copy and paste error.

What we really want to do is check whether PCI_BASE_ADDRESS_2 is valid at this
point, and not PCI_BASE_ADDRESS_0.

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1775 | stefanct | 2014-04-26 18:12:03 +0200 (Sat, 26 Apr 2014) | 4 lines

CID1130009: Resource leak in sp_opensocket().

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1774 | stefanct | 2014-04-26 18:11:50 +0200 (Sat, 26 Apr 2014) | 6 lines

CID1130007: Resource leak in ogp_spi.

Memory leak in ogp_spi_init().

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1773 | stefanct | 2014-04-26 18:11:39 +0200 (Sat, 26 Apr 2014) | 4 lines

CID1130008: Resource leak read_romlayout().

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1772 | stefanct | 2014-04-26 18:11:30 +0200 (Sat, 26 Apr 2014) | 4 lines

CID1130012: Double free in pony_spi_init().

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1771 | stefanct | 2014-04-26 18:11:21 +0200 (Sat, 26 Apr 2014) | 4 lines

CID1130011: Use after free in ich_descriptor_tool.

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1770 | stefanct | 2014-04-26 18:11:07 +0200 (Sat, 26 Apr 2014) | 4 lines

CID1130004: Nesting level does not match indentation.

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
------------------------------------------------------------------------
r1769 | stefanct | 2014-03-19 18:17:06 +0100 (Wed, 19 Mar 2014) | 9 lines

linux_spi: Stop messing up the units of SPI speed.

'speed' is stored in Hz, so rename the variable to 'speed_hz' to
clarify any potential confusion. Also, when printing the speed after
setting it with an ioctl, convert it to kHz to match the units given
in the message.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1768 | stefanct | 2014-03-19 18:17:00 +0100 (Wed, 19 Mar 2014) | 6 lines

linux_spi: Fix conversion from kHz to Hz.

A kilohertz is exactly 1000 hertz, not 1024 hertz.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1767 | stefanct | 2014-03-17 23:07:29 +0100 (Mon, 17 Mar 2014) | 4 lines

Add support for Intel 82574L to nicintel_spi.c.

Signed-off-by: Bill Paul <wpaul@windriver.com>
Acked-by: Idwer Vollering <vidwer@gmail.com>
------------------------------------------------------------------------
r1766 | stefanct | 2014-03-14 09:10:02 +0100 (Fri, 14 Mar 2014) | 9 lines

Add board enable for ASUS A7V8X-MX.

Use the same trick as for the MX-SE variant.
Despite being mentioned as supported on
http://flashrom.org/Supported_hardware flashrom fails to detect the
flash chip without this.

Signed-off-by: Francois Revol <revol@free.fr>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1765 | hailfinger | 2014-03-05 01:16:16 +0100 (Wed, 05 Mar 2014) | 10 lines

Clean up physmap, fix unaligned mapping problems

Convert all physmaps in dmi.c to use aligned readonly maps.
Convert all physmaps in cbtable.c to use unaligned readonly maps.
Make physunmap() a generic architecture-independent wrapper.
Add physunmap_unaligned() to complement physmap*_unaligned().

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

------------------------------------------------------------------------
r1764 | stefanct | 2013-11-21 16:59:52 +0100 (Thu, 21 Nov 2013) | 10 lines

Add board enable for ASUS P5LD2-VM DH.

Tested on real hardware by TeslaBIOS.
Besides the usual board_enable stuff the GPIO definitions for the ICH7 DH
were also missing. Apparently Intel forgot to add the PCI IDs for the desktop
version in the spec update, but the normal datasheet mentions the DH
desktop version so this should be fine...

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1763 | stefanct | 2013-10-29 02:38:45 +0100 (Tue, 29 Oct 2013) | 29 lines

Ensure DMI strings used in dmi_compare() are not NULL.

Previously the external DMI decoder did not allow this to happen because
all possible pointers were initialized at startup by the output of
'dmidecode -s ...' which has default values for all supported types.

The now active internal DMI decoder does work differently: it scans the
complete DMI table once and copies the available strings. Therefore, strings
that are not set by the firmware are left at their default value of NULL.

A segfault would arise if the following conditions are all true:
 - the firmware sets up a DMI/SMBIOS table which has at least a correct
   checksum, and
 - that table does *not* define at least one of the DMI strings we use
   for matching (as defined by dmi_strings[] in dmi.c), and
 - there exists a board enable whose PCI IDs are matched by the board,
   and which has a DMI string set that ends with a $ anchor, and
 - the user calls the internal programmer of flashrom without the
   optional mainboard parameter.

This was first observed by Gelip on an abit BF6 using the coreboot port
for the abit BE6-II V2.0.
The segfault was reproduced by Idwer Vollering on an ASUS F2A85-M with
the default DMI values of CONFIG_MAINBOARD_SMBIOS_MANUFACTURER etc.
overwritten and a forged board enable matching his board.
Idwer also verified that this patch fixes the problem, thanks a lot!

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1762 | stefanct | 2013-10-26 19:02:03 +0200 (Sat, 26 Oct 2013) | 9 lines

Add board enable for abit BF6.

Because the board does not have any PCI subsystem IDs set and the
DMI strings are not very specific at all, autodetection has been disabled.
The GPIO was found by roxfan and the patch tested on hardware by Gelip,
thanks!

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1761 | stefanct | 2013-10-25 02:33:37 +0200 (Fri, 25 Oct 2013) | 18 lines

Refactor Intel Chipset Enables.

 - Combine enable_flash_ich_4e() and enable_flash_ich_dc() to
   enable_flash_ich_fwh().
 - Remove unjustified (chipset) name parameters from various
   enable_flash_ich* functions.
 - Make Poulsbo and Tunnel Creek use generic enables by refining existing
   functions to work with them, including everything in ichspi.c.
 - Refactor enable_flash_ich_fwh_decode() to be called unconditionally for
   all chipsets.
 - Add support for Intel Atom Centerton (S12x0).
 - Recombine ICH2/3/4/5 to CHIPSET_ICH2345 because we treat them equally
   anyway.
 - Move spibar handling out of ich_init_spi() into enable_flash_ich_spi()
 - Various small cleanups.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1760 | stefanct | 2013-10-21 23:49:08 +0200 (Mon, 21 Oct 2013) | 7 lines

programmer_delay: filter 0 usec delays.

We use 0 as delay value for some chips. Just skipping these here is the
most elegant, maintainable solution.

Signed-off-by: Urja Rannikko <urjaman@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1759 | stefanct | 2013-10-20 01:35:28 +0200 (Sun, 20 Oct 2013) | 10 lines

serial: use internal_delay() for timeouts.

Using programmer_delay() for timeouts in serial writes could cause a
(theoretically) endless recursion if serial communication is used to
send the programmer the delay command to be executed on the programmer
instead of the host which fails again, following a timeout which
sends...

Signed-off-by: Urja Rannikko <urjaman@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1758 | stefanct | 2013-10-20 01:09:16 +0200 (Sun, 20 Oct 2013) | 11 lines

Refine support for SST25VF family.

 - Reorder some models and refine comments.
 - Add SST25VF512A:
   AAI is available but with an uncommon opcode (0xAF). Fully tested
   with Bus Pirate 3.5 running 6.2 beta firmware by Cory.
 - Add SST25VF020 and SST25VF020B.

Signed-off-by: Cory Henderson <dcoryh192@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1757 | stefanct | 2013-10-02 03:22:17 +0200 (Wed, 02 Oct 2013) | 11 lines

rayer_spi: Fix Xilinx DLC-5 cable.

Pin 6 on LPT controls a pulldown on MISO/TDO signal. Whether there exists
an unbuffered clone is unknown. The author of the original patch confirmed
in private correspondence that the patch was incomplete. There has been
no sign of an unbuffered version on the interwebs, hence just change the
existing driver to disable the pulldown.

Signed-off-by: Kyosti Malkki <kyosti.malkki@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1756 | stefanct | 2013-10-02 03:22:11 +0200 (Wed, 02 Oct 2013) | 6 lines

rayer_spi: Add pinout for Wiggler LPT.

Signed-off-by: Maksim Kuleshov <mmcx@mail.ru>
Signed-off-by: Kyosti Malkki <kyosti.malkki@gmail.com>
Tested-by: Maksim Kuleshov <mmcx@mail.ru>
Acked-by: Kyosti Malkki <kyosti.malkki@gmail.com>
------------------------------------------------------------------------
r1755 | stefanct | 2013-10-02 03:22:02 +0200 (Wed, 02 Oct 2013) | 5 lines

rayer_spi: Add pinout for Atmel STK200/300.

Signed-off-by: Maksim Kuleshov <mmcx@mail.ru>
Signed-off-by: Kyosti Malkki <kyosti.malkki@gmail.com>
Acked-by: Kyosti Malkki <kyosti.malkki@gmail.com>
------------------------------------------------------------------------
r1754 | stefanct | 2013-10-02 03:21:57 +0200 (Wed, 02 Oct 2013) | 10 lines

rayer_spi: Add pinout for Altera ByteBlasterMV.

There is a ByteBlasterII product that is only almost compatible.

Signed-off-by: Maksim Kuleshov <mmcx@mail.ru>
Signed-off-by: Kyosti Malkki <kyosti.malkki@gmail.com>
Tested-by: Maksim Kuleshov <mmcx@mail.ru>
Acked-by: Kyosti Malkki <kyosti.malkki@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1753 | stefanct | 2013-10-02 03:21:45 +0200 (Wed, 02 Oct 2013) | 12 lines

rayer_spi: Improve support for different pinouts.

Create a list of programmer types with names, test state and linked layouts.
This list could be listed with flashrom -L in follow-up patches.

Handle a bit in status register that is inverted, this will be used
in different future programmer types.

Signed-off-by: Kyosti Malkki <kyosti.malkki@gmail.com>
Tested-by: Maksim Kuleshov <mmcx@mail.ru>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1751 | stefanct | 2013-09-23 16:21:06 +0200 (Mon, 23 Sep 2013) | 14 lines

layout: Verify layout entries before building a new image using them.

This fixes a SEGFAULT if a layout entry is included that addresses memory
outside the current chip's address range. flashrom will only abort if the
offending region(s) is/are included else it will just warn.

It will print warnings for regions with negative or zero-length address ranges
and bail out after checking all of them.

Also, abort for non-write operations if a layout file is given because there is
no layout support for other operations yet.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1750 | stefanct | 2013-09-15 16:17:39 +0200 (Sun, 15 Sep 2013) | 11 lines

sbxxx: Set SPI clock to 16.5 MHz and disable fast reads.

Do not rely on broken firmware to set up the SPI configuration correctly.
Some boards fail with flashrom because the firmware chose too high speeds
for the alternate SPI mode which flashrom uses. Temporarily change the
clock to the lowest common value of 16.5 MHz.

Also, disable fast reads just to be safe.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1749 | stefanct | 2013-09-15 16:01:06 +0200 (Sun, 15 Sep 2013) | 6 lines

layout: Add a method to cleanup layout data structures.

Add layout_cleanup() to layout.c and hook it up in cli_classic.c.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1748 | stefanct | 2013-09-15 01:37:01 +0200 (Sun, 15 Sep 2013) | 7 lines

Enable fwh_idsel parameter for C-ICH and ICH2/3/4/5 chipsets.

Register locations are different from ICH6, but otherwise appear
to have identical bit specifications and defaults.

Signed-off-by: Kyosti Malkki <kyosti.malkki@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1747 | stefanct | 2013-09-15 01:36:57 +0200 (Sun, 15 Sep 2013) | 8 lines

Use ich_generation parameter in enable functions prior to ICH7.

Follow the style used from ICH7 onwards to pass ich_generation
parameter to lower-level functions on older ICH chipsets too.

Signed-off-by: Kyosti Malkki <kyosti.malkki@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1746 | stefanct | 2013-09-15 01:36:53 +0200 (Sun, 15 Sep 2013) | 13 lines

Introduce enable_flash_ich_fwh_decode().

ICH2 (and C-ICH)/3/4/5 also have FWH_SEL1/2 registers but at
different addresses. In preparation for implementing fwh_idsel
parsing for older ICH chipsets extract the parameter handling
and add variables for the offsets.

While FWH_DEC_EN1 is a 16bit register for ICH6, it is two separate
8bit registers on ICH5 and earlier. Implement all accesses with two
byte instructions instead, to prepare for extended support.

Signed-off-by: Kyosti Malkki <kyosti.malkki@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1745 | stefanct | 2013-09-14 11:02:27 +0200 (Sat, 14 Sep 2013) | 12 lines

Remove exit call and mayfail parameter from physmap_common().

The only call path where exit was reached was from physmap functions.

Callers of physmap() et al. which were not prepared to handle
ERROR_PTR return values have been adjusted.
physmap_try_ro() has been renamed to physmap_ro() and physmap_common()
slightly refactored due to the now removed *FAIL parameters.

Signed-off-by: Niklas Soderlund <niso@kth.se>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1744 | stefanct | 2013-09-13 21:19:25 +0200 (Fri, 13 Sep 2013) | 7 lines

Remove exit call from sys_physmap_*.

All callers are prepared to handle error if ERROR_PTR is returned.
The Manpage mentioning the respective return code is readapted.

Signed-off-by: Niklas Soderlund <niso@kth.se>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1743 | stefanct | 2013-09-13 19:21:05 +0200 (Fri, 13 Sep 2013) | 7 lines

Add debug output to programmer_map_flash_region().

While we don't expect addresses with more than 32 bits here, let's
print the whole possible range for debugging anyway.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1742 | stefanct | 2013-09-12 17:48:39 +0200 (Thu, 12 Sep 2013) | 12 lines

BSD refinements.

Make it easier to compile flashrom under NetBSD and DragonFlyBSD:
 - Use /usr/pkg/ as prefix for includes and linking
 - Use pciutils as include path for the right(tm) libpci

Also, fix date handling in getrevision.sh to work with the various formats for
invoking 'date'. This also uses svn's info --xml output instead of the regular one.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Tested-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1741 | stefanct | 2013-09-12 17:48:35 +0200 (Thu, 12 Sep 2013) | 10 lines

sbxxx: Add detection for the remaining AMD chipset families.

Also, correct prettyprinting of the registers of the various families,
and abort if SpiAccessMacRomEn or SpiHostAccessRomEn prohibit full access.

Tested reading/writing on ASRock IMB-A180, and chipset detection on
one of each affected generation by Chris Goodrich from Sage.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1740 | stefanct | 2013-09-12 16:04:31 +0200 (Thu, 12 Sep 2013) | 9 lines

Makefile: Warn if user tries to compile for libpayload w/o crossgcc.

While flashrom is not as picky on compilers as coreboot, there is still a
high probablilty of breakage when one combines libpayload and distribution
compilers. Print a warning if we detect that to give the daring user a hint
how to resolve the explosions potentially following below it.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1739 | stefanct | 2013-09-12 10:38:23 +0200 (Thu, 12 Sep 2013) | 11 lines

Fix ROM decoding on VIA VT82C596 and VT82C686A/B.

These support an additional bit which we did not turn on yet.
Without this patch they decode up to 512 kB, with this up to 1 MB.

Disentangle the enables of unrelated but mostly compatible chipsets
too, add some more debug output and set the max_rom_decode limits.
Also, make warnings really only warnings.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1738 | stefanct | 2013-09-12 10:29:06 +0200 (Thu, 12 Sep 2013) | 6 lines

Enable sector erase function for selected ST M50 chips.

Affected chips: M50FLW040A, M50FLW040B, M50FLW080A, M50FLW080B.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1737 | stefanct | 2013-09-12 10:29:00 +0200 (Thu, 12 Sep 2013) | 4 lines

Add support for ST M50LPW080.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1736 | stefanct | 2013-09-12 10:28:56 +0200 (Thu, 12 Sep 2013) | 12 lines

Cleanup ST M50 driver.

There are two locking strategies used by this umbrella family, one uniform
and one that matches the sector layout of the chip. Refactor the functions
involved and rename the overly complicated file to just stm50.c and the
functions accordingly.

This fixes unlocking of some of the non-uniform chips and gets rid of the
abuse of page_size.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1735 | stefanct | 2013-09-12 01:35:03 +0200 (Thu, 12 Sep 2013) | 31 lines

Add an internal DMI decoder.

Previously we had to rely on dmidecode to decode the DMI/SMBIOS table.
This patch integrates a DMI decoder into flashrom. The old behavior of calling
dmidecode can be brought back by using CONFIG_INTERNAL_DMI=no.

Significant portions of this patch were taken from dmidecode, hence add its
authors to the copyright notice (dmidecode is also GPL2+). We do a few things
differently though. First of all we do more bounds checking to prevent accessing
unmapped memory. We do not support disovery via EFI (yet), but memory
scanning only. We handle the chassis-type lock bit correctly which dmidecode
did not for a long while.

The API to the rest of flashrom remains stable, but the output changes slightly.
To share as much code as possible (which actually is not much), i have added
dmi_fill methods that get called in dmi_init. They are reponsible to fill the
dmi_strings array and setting the is_laptop variable. After it is called, dmi_init
prints all dmi_strings. Previously the strings were printed in the order they were
discovered, followed by the chassis-type, which is now output earlier (in dmi_fill).

Because DJGPP does not support strnlen a simple implementation was added
for it.

This is still only available on x86; actually it is not even compiled in for other
architectures at all anymore.

Signed-off-by: Sean Nelson<audiohacked@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Tested-by: Maciej Pijanka <maciej.pijanka@gmail.com>
Tested-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1734 | stefanct | 2013-09-12 01:34:57 +0200 (Thu, 12 Sep 2013) | 10 lines

DOS refinements.

This allows to use the DOS library trees stored in a user-specified directory.

I have mirrored the needed patches, sources and binaries (the latter
are properly licensed to allow that) in the flashrom wiki, so use those
URLs instead of the original sources.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1733 | stefanct | 2013-09-10 12:42:48 +0200 (Tue, 10 Sep 2013) | 10 lines

Add board enable for Bcom WinNET P680.

This patch replaces Alex Mauer's previous patch for this board (from 2008).
Tested to read, erase, and write on 2 different boards, both with AMIC
A29040BL flash chips, using both stock BIOS and coreboot images.

This patch marks the AMIC chip as tested at the same time.

Signed-off-by: Corey Osgood <corey.osgood@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1732 | stefanct | 2013-08-31 00:23:02 +0200 (Sat, 31 Aug 2013) | 9 lines

layout: Rename romlayout_t to romentry_t.

The type describes one entry of the whole layout actually.
Using layout_entry_t or something similar would be more correct,
but due to it length we will use "rom" instead of "layout" here and
in upcoming code.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1731 | stefanct | 2013-08-31 00:22:57 +0200 (Sat, 31 Aug 2013) | 9 lines

layout: Rename romimages to num_rom_entries.

Since we are planning to support image files for rom entries, rename the
variable used to count the number of known rom entries to avoid confusion.
There is already num_include_args with similar semantics, hence we use
num_rom_entries.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1730 | stefanct | 2013-08-30 23:29:45 +0200 (Fri, 30 Aug 2013) | 8 lines

libpayload: Remove file I/O in flashrom.c.

read_buf_from_file() and write_buf_to_file() use file streams which are
not supported in libpayload.

Signed-off-by: Nico Huber <nico.huber@secunet.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1729 | stefanct | 2013-08-29 15:15:36 +0200 (Thu, 29 Aug 2013) | 7 lines

Add now auto-generated manpage to svn:ignore.

I had to touch svn directly, where is my reimbursement?

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

------------------------------------------------------------------------
r1728 | stefanct | 2013-08-29 02:38:19 +0200 (Thu, 29 Aug 2013) | 9 lines

Automatically add version and date to the manpage.

To avoid funny effects of ever changing files tracked by the VCS this patch
moves the manpage data to flashrom.8.tmpl and generates the actual
manpage with a new makefile target if needed.

Signed-Off-By: Joerg Mayer <jmayer@loplof.de>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1727 | stefanct | 2013-08-29 02:38:14 +0200 (Thu, 29 Aug 2013) | 26 lines

Improve getrevision.sh.

 - remove bashism.
 - simplify some git-related code.
 - improved parameter and error handling.
 - additional -d/--date action which is similar to the timestamp action.
 - support for an optional path parameter.
 - there is only one sane time format.
 - and only one sane date format too.
 - use UTC dates and times only.
 - vastly improve git_url() to print the correct remote url and
   "nearest" branch.
 - remove username from repository URLs.
 - add "-dirty" to local revisions if there are uncommitted changes.
 - indicate in local revisions how many git-only commits were done
   since branching from upstream svn.
 - fix svn_revision() fallback to svn info and remove git-svn.
 - print leading r in script instead of hardcode it in the makefile;
   no more "0.9.7-runknown".
 - make retrieving the upstream revision work even in cloned git-svn
   repositories.
 - more abstractions and helper functions.
 - less fragmentation of actual functionality.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1726 | stefanct | 2013-08-28 11:55:04 +0200 (Wed, 28 Aug 2013) | 18 lines

libpayload: By default build libflashrom.a instead of flashrom.

flashrom won't build nor run as native payload very soon (or ever).
This patch changes a special GNU make variable that allows to select
the default goal which is taken if no goal is given explicitly on
the command line. Normally this would be the first rule in Makefile,
i.e. all. This won't compile if the target OS is libpayload, hence
change it to "libflashrom.a" in that case.

This requires two not completely ancient GNU make features:
 - MAKECMDGOALS
 - .DEFAULT_GOAL

Checking for these with ancient-only GNU make features is non-trivial
and hereby postponed.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1725 | stefanct | 2013-08-27 20:02:19 +0200 (Tue, 27 Aug 2013) | 8 lines

Add support for AT45CS1282.

This one is even more strange than the AT45DB chips. Like the AT45DB321C
it does not support any power-of-2 page sizes. There is only one asymmetrical
eraser and that uses two opcodes.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1724 | stefanct | 2013-08-27 20:02:12 +0200 (Tue, 27 Aug 2013) | 7 lines

Add support for AT45DB321C.

It seems like this model is one-of-a-kind... it shares some properties
with the older versions of the AT45DB series as well as with new ones.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1723 | stefanct | 2013-08-27 20:01:53 +0200 (Tue, 27 Aug 2013) | 5 lines

Add support for Atmel AT45DB* chips.

Signed-off-by: Aidan Thornton <makosoft@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1722 | stefanct | 2013-08-25 15:31:43 +0200 (Sun, 25 Aug 2013) | 4 lines

Add support for Fujitsu MBM29LV160BE/TE.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1721 | stefanct | 2013-08-25 02:10:56 +0200 (Sun, 25 Aug 2013) | 4 lines

Makefile: Explain process of handling CONFIG_* variables.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1720 | stefanct | 2013-08-24 14:18:17 +0200 (Sat, 24 Aug 2013) | 12 lines

IT87: Add ability to select between chips on GIGABYTE DualBIOS boards.

Thanks to Vadim Girlin for finding out how to do that.
This is known to work on GA-MA770-UD3, GA-B75M-D3V, GA-B75N and
GA-H61M-S1 (only M_BIOS is populated).

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Damien Zammit <damien@zamaudio.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Tested-by: Damien Zammit <damien@zamaudio.com>
Tested-by: Anton Kochkov <anton.kochkov@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1719 | stefanct | 2013-08-24 04:10:18 +0200 (Sat, 24 Aug 2013) | 11 lines

Get rid of sp_die().

- Add return values to sp_flush_stream(), sp_pass_writen(),
  sp_execute_opbuf(), sp_execute_opbuf_noflush(),
  sp_check_opbuf_usage(), sp_do_read_n().
- Use those return values to propagate errors instead of exiting.
  In some places this has to wait for core API changes (error handling for
  chip_readb, chip_readn, chip_write) hence comments are added instead.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1718 | stefanct | 2013-08-24 01:29:23 +0200 (Sat, 24 Aug 2013) | 8 lines

Add additional error handling to pcidev_readbar() callers.

This is mostly a leftover of Niklas' "remove exit call from pcidev_init" patch.
While not explicitly necessary detecting errors early is usually a good idea.

Signed-off-by: Niklas Soderlund <niso@kth.se>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1717 | stefanct | 2013-08-23 23:51:32 +0200 (Fri, 23 Aug 2013) | 7 lines

Introduce serialport_config().

This allows to easily reconfigure a serial port as needed in
the Bus Pirate speedup patch.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1716 | stefanct | 2013-08-18 01:58:01 +0200 (Sun, 18 Aug 2013) | 6 lines

getrevision.sh: Make sure we don't get translated output.

(And explicitly require bash.)

Signed-Off-By: Joerg Mayer <jmayer@loplof.de>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1715 | stefanct | 2013-08-14 18:28:19 +0200 (Wed, 14 Aug 2013) | 11 lines

Allow physmap_common() to round address ranges to page boundaries.

Automatically round address ranges requested from rphysmap() to page
boundaries. Other physmap() variants were not changed so this is
safe regarding unmapping.

I had also to shorten the readbility defines for the physmap_common
parameters to make the calls fit a single line.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1714 | stefanct | 2013-08-14 17:48:44 +0200 (Wed, 14 Aug 2013) | 9 lines

Automatically unmap physmap()s.

Similarly to the previous PCI self-clean up patch this one allows to get rid
of a huge number of programmer shutdown functions and makes introducing
bugs harder. It adds a new function rphysmap() that takes care of unmapping
at shutdown. Callers are changed where it makes sense.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1713 | stefanct | 2013-08-14 16:47:26 +0200 (Wed, 14 Aug 2013) | 9 lines

Add getrevision.sh utility script.

This allows to retrieve various data from SCM systems (git and svn) and
use them in the build process to better indicate which source was used.
For now only use it for the upstream (i.e. svn) revision number, which
was previously implemented by an awful line in the Makefile.

Signed-Off-By: David Hendricks <dhendrix@google.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1710 | stefanct | 2013-08-14 00:13:01 +0200 (Wed, 14 Aug 2013) | 6 lines

Increase flashrom release number to 0.9.7.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: David Hendricks <dhendrix@google.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1709 | stefanct | 2013-08-14 00:10:41 +0200 (Wed, 14 Aug 2013) | 33 lines

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

Tested mainboards:
OK:
 - ASUS P8H77-V LE
   http://www.flashrom.org/pipermail/flashrom/2013-June/011127.html
 - HP Pegatron IPMEL-AE (Evans-GL6)
   Reported by Idwer on IRC
 - MSI MS-7379 (G31M)
   http://paste.flashrom.org/view.php?id=1726
 - MSI MS-7816 (H87-G43)
   http://www.flashrom.org/pipermail/flashrom/2013-July/011349.html
 - MSI MS-9830 (IM-945GSE-A, A9830IMS)
   http://paste.flashrom.org/view.php?id=1730
 - Supermicro X8SAX
   http://paste.flashrom.org/view.php?id=1717
NOT OK:
 - Intel D2700MUD
   http://paste.flashrom.org/view.php?id=1723
 - Intel DQ45CB
   http://www.flashrom.org/pipermail/flashrom/2013-August/011369.html

Chipsets:
 - Add PCI ID for Intel's Coleto Creek.
 - Mark Intel H87 (0x8c4a) as OK.
   http://www.flashrom.org/pipermail/flashrom/2013-July/011349.html

Miscellaneous:
 - ichspi: Fix printing address ranges if space is divided by FPB.
 - Tiny other stuff.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1708 | hailfinger | 2013-08-13 09:09:57 +0200 (Tue, 13 Aug 2013) | 10 lines

An unused programmer parameter is a sign that the user wanted to either
do something not supported by the programmer or misspelled a parameter
which may be essential for the given programmer. Aborting is the only
safe choice. If the programmer parameter is unused because of an error
during programmer init, aborting would have happened anyway due to that
error.

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

------------------------------------------------------------------------
r1707 | stefanct | 2013-08-13 00:58:43 +0200 (Tue, 13 Aug 2013) | 16 lines

Fix verification operation.

I broke this in r1702 where I enabled avoidance of the verification step if
we did not modify anything in the erase/write step. The problem is that
all_skipped is initialized to true and hence it would only ever verify if
there have been changes noted in the erase/write step. This obviously
breaks the verification operation (-v/--verify) because there we never
enter the erase/write loop.

The better alternative would be to enable (the implicit) verification
in the write loop and not in cli_classic.c. This would require a bigger
change due to the existance of dont_verify_it. Eventually this is the
right thing to do but not so shortly before a release.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1706 | stefanct | 2013-08-08 14:00:19 +0200 (Thu, 08 Aug 2013) | 20 lines

Detect AMD Yangtze (found in Kabini and Tamesh).

The PCI ID of the LPC bridge doesn't change between Hudson-2/3/4 and
Yangtze (Kabini/Temash) but the SPI interface does. Bail out in case we
detect Yangtze and add infrastructure to distinguish other families too for
further refactorings.

Also, add ASRock IMB-A180 to the laptop whitelist and refine the IMC
warning a bit.

Tested on ASRock IMB-A180 with and w/o USE_YANGTZE_HEURISTICS, and
by Chris Goodrich from Sage on
 - SB600
 - SB700
 - SB800
 - Hudson 3 (A70M)
 - Kabini

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1705 | stefanct | 2013-07-30 11:34:44 +0200 (Tue, 30 Jul 2013) | 4 lines

dediprog: Fix crash if usb_open() fails.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1704 | stefanct | 2013-07-26 00:58:56 +0200 (Fri, 26 Jul 2013) | 9 lines

sbxxx: Handle active IMCs in AMD chipsets.

Detect and temporarily disable the IMC while accessing the flash.
Disable writes on default, but allow the user to enforce it.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: David Hendricks <dhendrix@google.com>
------------------------------------------------------------------------
r1703 | stefanct | 2013-07-26 00:58:51 +0200 (Fri, 26 Jul 2013) | 10 lines

Rename Numonyx and ST (SGS/Thomson) chips to Micron.

Micron acquired Numonyx and asked us to change the vendor names to
"Micron". For the chips clearly emerging from the former
manufacturers we (will) use "Micron/Numonyx/ST" and the original
name for the rest. Resorting the chip entries makes the diff
unreadable, hence the stand-alone commit.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1702 | stefanct | 2013-07-26 00:54:25 +0200 (Fri, 26 Jul 2013) | 126 lines

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

Tested mainboards:
OK:
 - ASUS C60M1-I
   http://www.flashrom.org/pipermail/flashrom/2013-February/010578.html
 - ASUS P8H77-I
   http://www.flashrom.org/pipermail/flashrom/2013-March/010607.html
 - ASUS P8H77-M
   http://www.flashrom.org/pipermail/flashrom/2013-May/010994.html
 - ASUS P8P67 LE (B2)
   http://www.flashrom.org/pipermail/flashrom/2013-May/010972.html
 - Elitegroup GeForce6100PM-M2 (V3.0)
   http://www.flashrom.org/pipermail/flashrom/2013-July/011177.html
 - GIGABYTE GA-P55A-UD7
   http://www.flashrom.org/pipermail/flashrom/2013-July/011302.html
 - MSI B75MA-E33 (MS-7808)
   http://www.flashrom.org/pipermail/flashrom/2013-March/010659.html
 - MSI H77MA-G43 (MS-7756)
   http://www.flashrom.org/pipermail/flashrom/2013-April/010853.html
 - MSI KA780G (MS-7551)
   http://paste.flashrom.org/view.php?id=1617
 - SAPPHIRE IPC-E350M1
   Reported by xvilka on IRC
 - Supermicro X8DTG-D
   http://www.flashrom.org/pipermail/flashrom/2013-July/011305.html
NOT OK:
 - ASRock Fatal1ty Z77 Performance
   http://www.flashrom.org/pipermail/flashrom/2013-January/010467.html
 - ASRock Z68 Extreme4
   http://www.flashrom.org/pipermail/flashrom/2013-May/010984.html
 - ASUS P8B75-M LE
   http://www.flashrom.org/pipermail/flashrom/2013-April/010867.html
 - ASUS P8P67-M PRO
   http://www.flashrom.org/pipermail/flashrom/2013-February/010541.html
 - ASUS P8Z68-V LE
   http://www.flashrom.org/pipermail/flashrom/2013-February/010582.html
 - Intel DQ77MK
   http://paste.flashrom.org/view.php?id=1603
 - Supermicro X9DRD-7LN4F
   http://paste.flashrom.org/view.php?id=1582
 - Supermicro X9SCE-F
   http://www.flashrom.org/pipermail/flashrom/2013-February/010588.html
 - Supermicro X9SCM-F
   http://www.flashrom.org/pipermail/flashrom/2013-February/010527.html
 - Tyan S7066
   http://www.flashrom.org/pipermail/flashrom/2013-March/010630.html

Chipsets:
 - Marked Intel B75 as tested
   http://www.flashrom.org/pipermail/flashrom/2013-March/010659.html
 - Marked Intel H77 as tested
   http://www.flashrom.org/pipermail/flashrom/2013-March/010607.html
 - Removed 10de:03e2 because it is apparently the MCP61 host bridge.
   It was reclassified to Host Bridge in the PCI device ID database and there
   is at least one report suggesting this configuration too:
   http://www.flashrom.org/pipermail/flashrom/2012-August/009716.html
 - Added MCP89 which hopefully works with the code for previous versions.
   Thanks to James Laird for submitting this change.

Tested flash chips:
 - Atmel AT25DF641(A) to PREW (+PREW)
   http://www.flashrom.org/pipermail/flashrom/2013-June/011113.html
 - Atmel AT25F512 to PREW (+PREW)
   http://www.flashrom.org/pipermail/flashrom/2013-April/010904.html
   Also, change its ID according to Modification of PCN SC040401A:
   "There has been a change in the returned value of the Product Identification
   (RDID) command, the AT25F512A RDID code is 65h compared to 60h from
   the AT25F512 product."
   It seems to be quite likely that all AT25F512 are fully functional relabeled
   AT25F1024 chips. There are even some hints in the datasheet:
   in table 6 they stress that address pin 16 needs to be low under all circum-
   stances; while continuous reads can wrap around on the AT25F1024 the DS
   notes "For the AT25F512, the read command must be terminated when the
   highest address (00FFFF) is reached." OTOH the lock bit semantics are
   different, but this has not been tested thoroughly
 - Atmel AT25F512A to PREW (+PREW)
   http://paste.flashrom.org/view.php?id=1569
 - Eon EN25F05 to PREW (+PREW)
   http://paste.flashrom.org/view.php?id=1571
 - Macronix MX25L12805(D) to PREW (+REW)
   http://www.flashrom.org/pipermail/flashrom/2013-April/010913.html
 - Spansion S25FL256S......0 and S25FL512S to P/!R!E!W (+P)
   Tested by Stefan Tauner
 - Micron/Numonyx/ST M25PX80 to PREW (+PREW)
   Tested by Stefan Tauner
 - Micron/Numonyx/ST N25Q032..3E and N25Q128..3E to PREW (+PREW)
   Tested by Stefan Tauner
 - Micron/Numonyx/ST N25Q256..3E and N25Q512..3G to P/!R!E!W (+P)
   Tested by Stefan Tauner
 - SST SST25VF040B to PREW (+PREW)
   http://paste.flashrom.org/view.php?id=1574
 - SST SST25VF040B.REMS to PREW (+EW)
   http://paste.flashrom.org/view.php?id=1575
 - ST M25P05-A to PREW (+PREW)
   http://paste.flashrom.org/view.php?id=1576
 - ST M29W512B to PREW (+W)
   http://www.flashrom.org/pipermail/flashrom/2013-March/010635.html
 - Winbond W25Q64.W to PREW (+PREW)
   Tested by the chromiumos guys.
 - Winbond W25Q128.V to PREW (+REW)
   http://www.flashrom.org/pipermail/flashrom/2013-June/011108.html
 - Winbond W25X20 to PREW (+PREW)
   http://www.flashrom.org/pipermail/flashrom/2013-May/010990.html

Miscellaneous:
 - Add Lenovo X201 to the laptop whitelist.
 - Add chip IDs for the ESMT F25L..QA family.
 - Add chip IDs for a few Macronix MX25 models.
 - The list of flashchips is not sorted strictly alphabetically and should not be
   either. Refine the comment explaining the scheme on top of the list.
 - Support -L output of chip sizes with up to 6 decimal places (up to 4 Gb).
 - Use z length modifier in (more) prints for size_t types.
 - Remove chips >16MB again because our current implementation of memory mapping
   the flash chip violates common rules by mapping a window as large as the chip.
   This leads to failing mmaps as can be seen here:
   http://paste.flashrom.org/view.php?id=1695
 - Document spispeed parameter of linux_spi (and fix some leaks).
 - Rephrase the "multiple chips detected" message because it was confusing.
 - Skip verification step if the image is equal to the flash contents.
 - Tiny other stuff.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Most parts are also
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1701 | stefanct | 2013-07-18 01:46:44 +0200 (Thu, 18 Jul 2013) | 16 lines

uintptr_t-ify map_flash_region functions.

unsigned long is not the right type for manipulating pointer values.
Since C99 there are suitable unsigned and signed types available, namely
uintptr_t and intptr_t respectively.

Use them in functions assigned to programmers' map_flash_region fields and
their callers where applicable.

This patch also changes the display width of all associated address values in
physmap.c to 16/8 hex characters depending on the actual size by
introducing a macro PRIxPTR_WIDTH and exploiting printf's * field width
specifier.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1700 | stefanct | 2013-07-17 11:28:00 +0200 (Wed, 17 Jul 2013) | 9 lines

print.c: Fix multiline support.

 - Use the reentrant tokenizer version strtok_r to break up vendor and model
   names in print.c.
 - Add implementation of strtok_r for mingw (strtok_r is POSIX only).
 - Free allocated temporary memory again.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1699 | stefanct | 2013-07-15 12:47:53 +0200 (Mon, 15 Jul 2013) | 30 lines

Differentiate ultimate error messages depending on programmer used.

With every newly supported programmer the information regarding reboots
on failures becomes more ridiculous. With this patch it is only shown when
the internal programmer module was selected.

Example outputs for external programmers:
1) non-fatal:
[...]
Reading current flash chip contents... done. FAILED at 0x00000000! Expected=0xff, Found=0x28, failed byte count from 0x00000000-0x0001ffff: 0x1fde7
ERASE FAILED!
FAILED!
Uh oh. Erase/write failed. Checking if anything changed.
Good. It seems nothing was changed.
Writing to the flash chip apparently didn't do anything.
Please check the connections (especially those to write protection pins) between
the programmer and the flash chip. If you think the error is caused by flashrom
please report this on IRC at chat.freenode.net (channel #flashrom) or
mail flashrom@flashrom.org, thanks!

2) fatal:
[...]
Verifying flash... FAILED at 0x00000000! Expected=0x0f, Found=0xff, failed byte count from 0x00000000-0x0001ffff: 0x1fde6
Your flash chip is in an unknown state.
Please report this on IRC at chat.freenode.net (channel #flashrom) or
mail flashrom@flashrom.org, thanks!

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: David Hendricks <dhendrix@google.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1698 | stefanct | 2013-07-14 01:31:37 +0200 (Sun, 14 Jul 2013) | 4 lines

Use uintptr_t for chipaddr instead of unsigned long.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1697 | stefanct | 2013-07-14 01:21:05 +0200 (Sun, 14 Jul 2013) | 20 lines

Various cross-platform fixes.

Improve compilation with libpayload (compiling flashrom.c and
linking is still broken):
 - disable Ponyprog (which enforced serial.c compilation)
 - make errno available where it is needed

Fix internal.c for non-x86 and enable cb parsing on ARM.

Fix mingw builds by using its __USE_MINGW_ANSI_STDIO macro
and gnu_printf definition for printf format style checking.
See http://sourceforge.net/apps/trac/mingw-w64/wiki/gnu%20printf
This requires inclusion of stdio.h in flash.h.

Fix order of libraries in the Makefile:
FEATURE_LIBS needs to come *after* PCILIBS in case ZLIB is needed by it.

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>
------------------------------------------------------------------------
r1696 | stefanct | 2013-07-13 23:18:32 +0200 (Sat, 13 Jul 2013) | 11 lines

Add support for AMD Geode's MSR on OpenBSD.

Previously the default implementation was used, which always failed.
On other systems than the Geode the code is not equal to that anymore,
but should not explode because setup_cpu_msr() returns an error and
therefore no other MSR functions should be called.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Tested-by Leonardo Guardati <leonardo@guardati.it>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1695 | stefanct | 2013-07-13 22:55:33 +0200 (Sat, 13 Jul 2013) | 9 lines

Fix hwaccess (again).

I completely forgot about NetBSD in r1638 which was broken since then.
Also, on OpenBSD use iopl again and refine the warning in case we have
insufficient privileges.
Thanks to Jonathan A. Kollasch for his help in getting the details right.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1694 | stefanct | 2013-07-11 15:48:52 +0200 (Thu, 11 Jul 2013) | 13 lines

print_wiki: Fixes, explanation re. flash chips, links to footnotes.

 - Escape mainboard notes in the wiki output with <nowiki> (this became
   necessary because MediaWiki started to convert <mark@zl2tod.net> to <mark>).
 - Add explanations at the top of the flash chip table in the wiki.
 - Add links to the footnotes of mainboards and laptops similarly to
   what MediaWiki does: link from the reference to the footnote and
   vice versa too. Also, check for truncations of the footnotes due
   to the limited buffer.
 - Fix a typo introduced in r1555.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1693 | stefanct | 2013-06-28 23:29:51 +0200 (Fri, 28 Jun 2013) | 17 lines

Add support for remaining Numonyx (Micron) N25Q chips.

Add...
 - N25Q128..3E
 - N25Q128..1E
 - N25Q256..1E (defunct due to addressing)
 - N25Q256..3E (defunct due to addressing)
 - N25Q512..1E (defunct due to addressing)
 - N25Q512..3E (defunct due to addressing)
 - N25Q00A..3G (defunct due to addressing)

Also, refine existing family members.

Signed-off-by: Nikolay Nikolaev <evrinoma@gmail.com>
Reviewed-by: Steven Zakulec <spzakulec@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1692 | stefanct | 2013-06-28 23:29:44 +0200 (Fri, 28 Jun 2013) | 12 lines

Add support for Spansion S25FL...S chips.

Add...
 - S25FL128S
 - S25FL256S uniform version (defunct due to addressing)
 - S25FL512S uniform version (defunct due to addressing)

Merge Intel S33 status register functions with this one's.

Signed-off-by: Nikolay Nikolaev <evrinoma@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1691 | stefanct | 2013-06-28 23:29:36 +0200 (Fri, 28 Jun 2013) | 11 lines

Add support for Spansion S25FL2 chips.

Add...
 - S25FL204K
 - S25FL208K
 - S25FL216K (same ID as S25FL116K)

Signed-off-by: Nikolay Nikolaev <evrinoma@gmail.com>
Reviewed-by: Steven Zakulec <spzakulec@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1690 | stefanct | 2013-06-28 23:29:27 +0200 (Fri, 28 Jun 2013) | 9 lines

Add support for Micron/Numonyx/ST M25PX80.

Also, refine status register prettyprinting and unlocking of all family
members and add OTP details.

Signed-off-by: Nikolay Nikolaev <evrinoma@gmail.com>
Reviewed-by: Steven Zakulec <spzakulec@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1689 | stefanct | 2013-06-28 23:29:21 +0200 (Fri, 28 Jun 2013) | 8 lines

Add support for AMIC A25LQ16 and A25LQ64.

Also, refine unlocking of A25L032, A25LQ32A and A25LQ032.

Signed-off-by: Nikolay Nikolaev <evrinoma@gmail.com>
Reviewed-by: Steven Zakulec <spzakulec@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1688 | stefanct | 2013-06-28 23:29:14 +0200 (Fri, 28 Jun 2013) | 11 lines

Add support for more Eon EN25QH chips.

Add...
 - EN25QH64
 - EN25QH128
 - EN25QH256 (defunct due to addressing)

Signed-off-by: Nikolay Nikolaev <evrinoma@gmail.com>
Reviewed-by: Steven Zakulec <spzakulec@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1687 | stefanct | 2013-06-28 23:29:08 +0200 (Fri, 28 Jun 2013) | 15 lines

Add support for Eon EN25S series.

Add...
 - EN25S10
 - EN25S20
 - EN25S40
 - EN25S80
 - EN25S16
 - EN25S32
 - EN25S64

Signed-off-by: Nikolay Nikolaev <evrinoma@gmail.com>
Reviewed-by: Steven Zakulec <spzakulec@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1686 | stefanct | 2013-06-28 23:29:03 +0200 (Fri, 28 Jun 2013) | 13 lines

Add support for Numonyx M45PE series.

Add...
 - M45PE10
 - M45PE20
 - M45PE40
 - M45PE80
 - M45PE16

Signed-off-by: Nikolay Nikolaev <evrinoma@gmail.com>
Reviewed-by: Steven Zakulec <spzakulec@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1685 | stefanct | 2013-06-28 23:28:56 +0200 (Fri, 28 Jun 2013) | 13 lines

Add support for some GigaDevice GD25* chips.

Add...
 - GigaDevice GD25T80
 - GigaDevice GD25Q10
 - GigaDevice GD25Q512

Also, improve some others.

Signed-off-by: Nikolay Nikolaev <evrinoma@gmail.com>
Reviewed-by: Steven Zakulec <spzakulec@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1684 | stefanct | 2013-06-28 23:28:49 +0200 (Fri, 28 Jun 2013) | 14 lines

Add support for all Sanyo LE25FW chips.

Add...
 - Sanyo LE25FW403A
 - Sanyo LE25FW418A
 - Sanyo LE25FW806
 - Sanyo LE25FW808

Also, fix wrong description of Sanyo LE25FW203A.

Signed-off-by: Nikolay Nikolaev <evrinoma@gmail.com>
Reviewed-by: Steven Zakulec <spzakulec@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1683 | stefanct | 2013-06-28 23:28:43 +0200 (Fri, 28 Jun 2013) | 11 lines

Add support for Nantronics N25 series.

Add...
 - N25S10
 - N25S20
 - N25S40
 - N25S80
 - N25S16

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1682 | stefanct | 2013-06-28 23:28:37 +0200 (Fri, 28 Jun 2013) | 9 lines

Introduce spi_block_erase_db().

Used for page erase on some chips (e.g. Numonyx M45PE and
Sanyo LF25FW series).

Signed-off-by: Nikolay Nikolaev <evrinoma@gmail.com>
Reviewed-by: Steven Zakulec <spzakulec@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1681 | stefanct | 2013-06-28 23:28:27 +0200 (Fri, 28 Jun 2013) | 15 lines

Introduce additional SPI status register helpers.

 - spi_prettyprint_status_register_default_welwip():
   It just prettyprints the plain hex value and the welwip bits.
 - spi_prettyprint_status_register_default_bp4():
   Prints the hex value, welwip, bp0-5 and srwd bits.
 - spi_disable_blockprotect_bp2_srwd(),
 - spi_disable_blockprotect_bp3_srwd() and
   spi_disable_blockprotect_bp4_srwd():
   Three new common block unprotection functions for the frequent
   cases where there is a status register lock bit at bit #7 and some
   block protection bits at bits #2-#4, #2-#5 and #2-#6 respectively.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1680 | stefanct | 2013-06-24 00:15:39 +0200 (Mon, 24 Jun 2013) | 12 lines

Warn if we skipped all blocks while writing.

Quick hack to print a warning if we skip all blocks in a write
process because they are already equal to the requested image. We
want something like this to make users aware... and some developers
who regularly fall for this too *coughcough*. There might be more
elegant solutions for this... patches welcome.

This does not work for erasing because we do that unconditionally.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Idwer Vollering <vidwer@gmail.com>
------------------------------------------------------------------------
r1679 | stefanct | 2013-06-21 00:55:41 +0200 (Fri, 21 Jun 2013) | 26 lines

Fix unlocking function for most Atmel AT2[56]D* chips.

I broke unlocking them correctly in r1635 while refactoring (NB: the
commit log including the overly selfconfident statement about the
"bug in spi_disable_blockprotect_at25df()").

Affected chips have per sector protection bits and the write protection bits
in the status register do indicate if none, some or all sectors are protected.
It is possible to globally (un)lock all sectors at once but in a way that was
not anticipated when refactoring the spi25 unlocking functions into
spi_disable_blockprotect_generic(). To globally unprotect not only the
protection bits (2 and 3) have 0 to be written to them but also bits 4 and 5
which normally would not be touched by spi_disable_blockprotect_generic().
Some of the chips also support a permanent lockdown with fuses which we
do not handle yet.

To fix this without copying the whole method I introduce another mask
parameter to spi_disable_blockprotect_generic() namely unprotect_mask.
See verbose comments inline for details.

Also, prettyprint the status register after trying to disable the block
protection fails.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Tested-by: Chi Zhang <zhangchi866@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1678 | stefanct | 2013-06-16 12:30:08 +0200 (Sun, 16 Jun 2013) | 9 lines

sbxxx: spibar[0] debug print refinements.

Newer models support a 66 MHz clock and fast reads.
We should probably distinguish the models better (as we do in ichspi)
and add support for frequency selection etc. For now this has to
suffice.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1677 | stefanct | 2013-06-09 16:00:46 +0200 (Sun, 09 Jun 2013) | 12 lines

Add W25Q...W series.

 - Use ".V" (and "_V" in macros) for 3.3V Winbond 25Q chips.
   Rename the existing chips and add a .voltage entry where it was missing.
 - Use ".W" (and "_W" in macros) for 1.8V Winbond 25Q chips.
 - Add W25Q20.W, W25Q40.W, W25Q80.W, W25Q16.W, W25Q32.W, W25Q64.W.
 Based on chromiumos' 469707f0d9b7d81b6c6bb2cace13f09db70f4382
 http://git.chromium.org/gitweb/?p=chromiumos/third_party/flashrom.git;a=commitdiff;h=469707f0d9b7d81b6c6bb2cace13f09db70f4382

Signed-off-by: Yung-Chieh Lo <yjlou%chromium.org@gtempaccount.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1675 | stefanct | 2013-06-01 02:06:12 +0200 (Sat, 01 Jun 2013) | 8 lines

Change warning regarding protected ICH regions.

There is no good reason to collect further log files of locked Intel-
based boards. Forward affected users directly to an explanation in
the wiki instead.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1674 | stefanct | 2013-05-23 23:47:46 +0200 (Thu, 23 May 2013) | 10 lines

dediprog: fix SPI clock setting.

Avoid setting SPI speed on firmware versions < 5.0.0 and note this
limitation in the man page.
Use the correct offset of the "12M" element in the spispeeds array to
match our manpage and the default of Dediprog's dpcmd.

Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1673 | stefanct | 2013-05-03 23:58:28 +0200 (Fri, 03 May 2013) | 8 lines

dediprog: add support for chip select.

Thanks to the traces captured and tests done by Martin Roth, and confirmed
by tests and analysis by Joshua Zarr too, we can now use both target chips
on the Dediprog SF100.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1672 | stefanct | 2013-05-01 16:04:19 +0200 (Wed, 01 May 2013) | 7 lines

Update spi_get_erasefn_from_opcode().

We forgot to add a few SPI erase functions to the helper function that is
used for SFDP. Also, sort the declarations in the header.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1671 | stefanct | 2013-04-19 03:59:15 +0200 (Fri, 19 Apr 2013) | 19 lines

Add support for PMC Pm25LD series.

This patch adds support for
 - Pm25LD256C
 - Pm25LD512(C)
 - Pm25LD010(C)
 - Pm25LD020(C)
 - Pm25LD040(C)

These seem to be the successors of the Pm25LV series.
The main difference seems to be the dual I/O and additional erase opcodes.
Some support an additional, complex locking register (maybe all of the
above, but available datahsheets do not indicate it for all).

The Pm25LD512C was tested by Chi Zhang:
http://paste.flashrom.org/view.php?id=1579

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1670 | stefanct | 2013-04-19 03:58:33 +0200 (Fri, 19 Apr 2013) | 16 lines

Refine PMC Pm25LV series.

 - Add missing bits and resort chips
 - Refine Pm25LV512(A) and Pm25LV010
   Due to manufacturer ID continuation this one needs a new probing
   function: probe_spi_res3() which should be refactored in the future.
   The datasheet describes a very weird order of ID bytes:
   Vendor byte, model byte, vendor continuation byte. Let's pretend we did
   not read that or the datasheet is bogus (although the datasheet of the
   successor series describes the same but luckily additionally to RDID).
 - Add Pm25LV010A
   This was tested by Chi Zhang:
   http://paste.flashrom.org/view.php?id=1573

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1669 | stefanct | 2013-04-13 02:29:30 +0200 (Sat, 13 Apr 2013) | 4 lines

Initialize sp_fd and fix baud rate setting on windows.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1668 | stefanct | 2013-04-07 15:08:30 +0200 (Sun, 07 Apr 2013) | 7 lines

Get rid of perror().

It prints to stderr and that's not what we want necesserily;
using msg_*err gives us more control.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1667 | hailfinger | 2013-04-05 10:06:10 +0200 (Fri, 05 Apr 2013) | 7 lines

usleep() is not found in all versions of MinGW, use Sleep() on Windows.
Handle long sleeps on non-Windows correctly.

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

------------------------------------------------------------------------
r1666 | stefanct | 2013-04-01 21:34:53 +0200 (Mon, 01 Apr 2013) | 8 lines

Refine granularity handling in preparation of AT45DB series support.

This adds a number of new granularitie and refines the handling of
n-byte granularities by extracting the respective code into a helper
function which reduces the pain of the above significantly.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1665 | stefanct | 2013-04-01 02:46:05 +0200 (Mon, 01 Apr 2013) | 10 lines

Enable serprog on Windows.

Sockets are not ported (yet).

Tested on Windows 7 with my Atmega32U2 serprog implementation.
http://paste.flashrom.org/view.php?id=1566

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1664 | stefanct | 2013-04-01 02:45:57 +0200 (Mon, 01 Apr 2013) | 7 lines

serial.c: be more pedantic.

Check more return codes and close the file handle in case of errors in
sp_openserport().

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1663 | stefanct | 2013-04-01 02:45:51 +0200 (Mon, 01 Apr 2013) | 7 lines

Replace native calls in serprog with wrapper calls.

read(), write(), usleep() are replaced.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1662 | stefanct | 2013-04-01 02:45:45 +0200 (Mon, 01 Apr 2013) | 10 lines

Introduce serialport_write_nonblock().

It seems useful to have a generic and platform-independent method to
read and write to a serial port without blocking. This is the write part.

This allows to get rid of the explicit temporary disabling of blocking I/O in
serprog's sp_synchronize().

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1661 | stefanct | 2013-04-01 02:45:38 +0200 (Mon, 01 Apr 2013) | 12 lines

Replace sp_sync_read_timeout() with serialport_read_nonblock().

It seems useful to have a generic and platform-independent method to
read and write to a serial port without blocking. This is the read part.

It stores the current blocking properties before disabling blocking and
restores them after reading. The timeout is implemented as previously
by retrying every millisecond until the timeout is reached or enough
characters are available.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1660 | stefanct | 2013-04-01 02:45:32 +0200 (Mon, 01 Apr 2013) | 14 lines

serial.c: round baudrates to valid ones.

MSDN says: "The baud rate at which the communications device
operates. This member can be an actual baud rate value, or one of
the following indexes." But it is not specified what happens for
different values, so we round down to valid ones (or to the minimum
of 9600) by reusing the existing struct baudentry sp_baudtable[] and
the new function round_baud().

Do similarly on non-Windows where arbitrary values are not allowed
anyway.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1659 | stefanct | 2013-04-01 02:45:08 +0200 (Mon, 01 Apr 2013) | 8 lines

serial.c: abstract system error printing.

Windows is awkward. The win32 API does not support errno/strerror as one
might expect. Introduce a new msg_* function that alleviates the pain a bit
(my head still hurts very badly).

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1658 | stefanct | 2013-03-27 14:00:23 +0100 (Wed, 27 Mar 2013) | 10 lines

Add Altera USB-Blaster SPI programmer.

Adds support for the Altera USB-Blaster programming dongle in Active
Serial (AS) mode. Tested on both original product and a clone dongle.

Signed-off-by: James Laird <jhl@mafipulation.org>
Signed-off-by: Kyosti Malkki <kyosti.malkki@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Kyosti Malkki <kyosti.malkki@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1657 | stefanct | 2013-03-16 02:22:12 +0100 (Sat, 16 Mar 2013) | 44 lines

Fix evil twins of Macronix MX25L1605, MX25L3205, MX25L6405.

Similarly to the patch in r1647 this one updates the chips identified as above
with references to and data about their respective twins. Unlike previously this
one deals with the more evil details.

Helge Wagner from GE discovered some problems with chips sharing IDs
and proposed a patch to tackle (some of) them, see:
http://patchwork.coreboot.org/patch/3709/
That patch was bitrotting in our mailboxes for a long time and it is still not
ready for merge, but we increasingly get reports about problems (e.g.
http://paste.flashrom.org/view.php?id=1525) regarding these chips and
hence must act to ensure users' safety.

This patch splits the chip definitions of evil twins into separate ones which
correctly declare the respective attributes (the main problems are the erase
block sizes for the 0x20 opcode and hence my changes combine different
chips with partly different attributes apart from their names as long as the
erasers layout it the same). This forces the user to select the (right) chip
definition with the -c/--chip parameter and hence will break a number of
previously perfectly working environments.

0x2015 is used by and split to
 - MX25L1605 (64kB sectors in 0x20 erases)
 - MX25L1605A/MX25L1606E (4kB in 0x20 erases and an additional 0x52 opcode with 64kB blocks)
 - MX25L1605D/MX25L1608D (4k sectors in 0x20 erases)

0x2016 is used by and split to
 - MX25L3205/MX25L3205A (64kB 0x20)
 - MX25L3205D/MX25L3208D (4kB 0x20)
 - MX25L3206E (4k 0x20, 64k 0x52)

0x2017 is used by and split to
 - MX25L6405/MX25L6405D (64k 0x20)
 - MX25L6406E/MX25L6436E (4k 0x20)
 - MX25L6445E (4k 0x20, 64k 0x52)

Bonus: add some minor details to MX25L1635D, MX25L1635E, MX25L3235D,
MX25L12805D.

Tested with MX25L3206E, MX25L64036E.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1656 | stefanct | 2013-03-15 04:12:29 +0100 (Fri, 15 Mar 2013) | 11 lines

Add support for Intel Lynx Point low-power and Wellsburg.

New IDs taken from Intel's patches for the Linux kernel.
Also, refine original Lynx Point naming etc.

Based on the chromiumos patch
Change-Id: I303a05baa80e4449e70d20adf78ebc7128b88d8e
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1655 | stefanct | 2013-03-15 03:03:16 +0100 (Fri, 15 Mar 2013) | 17 lines

Add support for Macronix MX25U1635E, MX25U3235E/F and MX25U6435E/F.

Macronix MX25U3235 is a 4MB (32Mbits) 1.8v SPI flash supporting QPI.
Code for it was refined after merging it from chromium:
Change-Id: I62c7db070254ba3ec68090e783f57b25a6e8d15a
Reviewed-on: https://gerrit.chromium.org/gerrit/44395
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>

Based on that support for MX25U1635E and MX25U6435E/F was added
by Stefan Tauner.
Also, add a feature flag for QPI-enabled chips: FEATURE_QPI.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1654 | stefanct | 2013-03-09 18:55:35 +0100 (Sat, 09 Mar 2013) | 12 lines

Add utility to print all chip names in flashchips.h that are not in flashchips.c.

This allows to list yet unsupported chips easily.

First it tries to find the directory containing the files, then it uses sed to
extract the macro names of chips from flashchips.h, greps for them in
flashchips.c and prints it if it is not found.
If verbose mode is activated by giving at least one additional parameter
it prints the chip ID and comment following the macro definition too.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1653 | stefanct | 2013-03-04 02:41:56 +0100 (Mon, 04 Mar 2013) | 6 lines

Add (untested) board enable for ASUS P4PE-X/TE.

REed by roxfan and Michael Karcher, patch by Stefan Tauner.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1652 | stefanct | 2013-03-04 02:20:28 +0100 (Mon, 04 Mar 2013) | 8 lines

Add M25P20-old.

This older (ST-branded) revision of M25P20 chip does not support RDID and
hence was not detected correctly. This patch adds a workaround similar
to M25P40-old.

Signed-off-by: Kyosti Malkki <kyosti.malkki@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1651 | stefanct | 2013-03-04 00:49:48 +0100 (Mon, 04 Mar 2013) | 4 lines

Make write granularity a chip attribute.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1650 | stefanct | 2013-02-22 16:58:45 +0100 (Fri, 22 Feb 2013) | 47 lines

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

Tested Mainboards:
OK:
 - Acer V75-M (used in IBM Aptiva 2170-G)
   http://www.flashrom.org/pipermail/flashrom/2012-December/010300.html
 - Acorp 6M810C
   http://www.flashrom.org/pipermail/flashrom/2013-January/010433.html
 - ASRock G31M-S rev 2.0
   http://www.flashrom.org/pipermail/flashrom/2013-February/010538.html
 - ASUS F1A75-V PRO
   http://paste.flashrom.org/view.php?id=1528
 - ASUS M5A97 (rev. 1.0)
   http://www.flashrom.org/pipermail/flashrom/2013-February/010483.html
 - ASUS P5KPL-AM IN/GB
   http://www.flashrom.org/pipermail/flashrom/2013-January/010455.html
 - GABYTE GA-H77M-D3H
   http://www.flashrom.org/pipermail/flashrom/2013-February/010538.html

NOT OK:
 - GIGABYTE GA-Z77MX-D3H
   http://paste.flashrom.org/view.php?id=1529
   http://paste.flashrom.org/view.php?id=1530

Tested flash chips:
 - Winbond W25X10 to PREW (+PREW)
   Reported on IRC(?)
 - Eon EN25Q32(A/B) to PREW (+REW)
   http://www.flashrom.org/pipermail/flashrom/2013-February/010533.html
 - Eon EN25Q64 to PREW (+PREW)
   http://www.flashrom.org/pipermail/flashrom/2013-January/010466.html

Miscellaneous:
- Fix superflouos line breaks in wiki mainboard and laptop output.
- Use the .nh (no hyphenation) command in the manpage to enforce
  single-line URLs where useful.
- Reference the manpage (besides the Laptops wiki page) in the laptop warning.
- Minor output and whitespace fixes.
- Add Fidelix IDs.
- Add ISSE clones of PMC chips.
- Fix typo: EMST -> ESMT.
- Add ID of ESMT F25D08QA.
- Refine GigaDevice GD25Q series (missing voltages and comments).
- Use underscore instead of lower-case x as wildcard in Sharp chip names.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1649 | hailfinger | 2013-02-20 19:03:36 +0100 (Wed, 20 Feb 2013) | 12 lines

Adds a programmer parameter 'spispeed' to the dediprog driver to
control the transfer rate on the spi bus. The following rates are
available (in Hz):
  375k, 750k, 1.5M, 2.18M, 3M, 8M, 12M and 24M

The original driver reinitializes the programmer after setting the
speed, so the initialization calls have moved into a new function
dediprog_setup() which is called twice.

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

------------------------------------------------------------------------
r1648 | stefanct | 2013-02-04 05:38:42 +0100 (Mon, 04 Feb 2013) | 15 lines

Fix building for MacOSX.

- Add a new macro named IS_MACOSX to hwaccess.c and use it to enable iopl().
  This was broken since r1638. This fix does *not* restore the very permissive
  concept where iopl() was activated in an #else branch that was inplace before
  r1638.
- Make printing the image file's size in flashrom.c platform independent.

Bonus: remove definitions of off64_t and lseek64 which are not necessary
anymore for about 1000 commits.

Thanks to SJ for reporting the issue and testing the solution.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1647 | stefanct | 2013-02-02 16:35:44 +0100 (Sat, 02 Feb 2013) | 17 lines

Update Macronix MX25L512, MX25L1005, MX25L2005, MX25L4005, MX25L8005.

Update MX25L512 with references to and data about
  MX25L512E, MX25V512, MX25V512C.
Update MX25L1005 with references to and data about
  MX25L1005C, MX25L1006E.
Update MX25L2005 with references to and data about
  MX25L2005C.
Update MX25L4005 with references to and data about
  MX25L4005A, MX25L4005C.
Update MX25L8005 with references to and data about
  MX25V8005.

Bonus: add chip IDs of MX25U1635E, MX25U3235E/F, MX25U6435E/F.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1646 | stefanct | 2013-01-15 18:37:48 +0100 (Tue, 15 Jan 2013) | 7 lines

Fix duplicate 'const' declaration specifiers.

Thanks to Idwer and clang for noticing these problems.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1645 | hailfinger | 2013-01-08 23:49:12 +0100 (Tue, 08 Jan 2013) | 8 lines

Fix compilation for DOS and non-x86 targets.

Fixup for r1638.
Thanks to Idwer Vollering 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>

------------------------------------------------------------------------
r1644 | hailfinger | 2013-01-06 00:52:45 +0100 (Sun, 06 Jan 2013) | 13 lines

Decouple BAR reading from pci device init, handle errors gracefully.

pcidev_init() now returns struct pci_device * instead of a BAR stored in
PCI config space. This allows for real error checking instead of having
exit(1) everywhere in pcidev.c.
Thanks to Niklas Soderlund for coming up with the original error
handling patch which was slightly modified and folded into this patch.
Move the declaration of struct pci_device in programmer.h before the
first user.

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

------------------------------------------------------------------------
r1643 | stefanct | 2013-01-04 23:54:07 +0100 (Fri, 04 Jan 2013) | 7 lines

Introduce msg_*warn.

Also, unify all outputs of "Warning:" and "Error:" to use normal
capitalization instead of mixing it with all capitals.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Idwer Vollering <vidwer@gmail.com>
------------------------------------------------------------------------
r1642 | stefanct | 2013-01-04 23:24:58 +0100 (Fri, 04 Jan 2013) | 16 lines

Unify PCI init and let pcidev clean itself up.

Previously the internal programmer used its own code to initialize pcilib.
This patch extracts the common code from the internal programmer and
pcidev_init() into pcidev_init_common().
This fixes the non-existent PCI cleanup of the internal programmer and adds
an additional safety by checking for an already existing PCI context.

We got a nice shutdown function registration infrastructure, but did not use it
very wisely. Instead we added shutdown functions to a myriad of programmers
unnecessarily. In this patch we get rid of those that do only call pci_cleanup(pacc)
by adding a shutdown function the pcidev.c itself that gets registered by
pcidev_init().

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1641 | stefanct | 2013-01-03 21:44:30 +0100 (Thu, 03 Jan 2013) | 20 lines

Add user interface to activate the Bus Pirate pull-up resistors.

When working with some flash chips using the Bus Pirate programmer, the
use of the Bus Pirate's on-board pull-up resistors is sometimes
necessary.

On v3 hardware the use of said pull-up resistors requires the user to apply a
voltage to the VPU pin of the Bus Pirate, and then command it to use them.
For v4 hardware which supports also fixed internal 3.3V and 5V sources no
documentation could be found.

Here is a link to information pertaining to what this patch does:
http://dangerousprototypes.com/docs/SPI_(binary)#0100wxyz_-_Configure_peripherals_w.3Dpower.2C_x.3Dpull-ups.2C_y.3DAUX.2C_z.3DCS

Bonus: small cleanup of superfluous stack variables.

Signed-off-by: Brian Salcedo <bsalcedo@gmx.us>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Tested-by: Brian Salcedo <bsalcedo@gmx.us>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1640 | stefanct | 2013-01-01 01:06:51 +0100 (Tue, 01 Jan 2013) | 82 lines

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

Tested Mainboards:
OK:
 - Acer V75-M (used in IBM Aptiva 2170-G
   http://www.flashrom.org/pipermail/flashrom/2012-December/010300.html
 - ASRock 4CoreDual-VSTA with W39V040FB
   http://paste.flashrom.org/view.php?id=1446
 - ASRock 775Dual-VSTA
   http://www.flashrom.org/pipermail/flashrom/2012-December/010294.html
 - ASRock E350M1/USB3
   http://paste.flashrom.org/view.php?id=1465
 - ASUS P5B-VM
   http://www.flashrom.org/pipermail/flashrom/2012-December/010351.html
 - ASUS SABERTOOTH 990FX R2.0
   http://www.flashrom.org/pipermail/flashrom/2012-December/010210.html
 - Elitegroup A928 (including a laptop whitelist board enable)
   http://www.flashrom.org/pipermail/flashrom/2012-November/010119.html
 - EVGA 122-CK-NF68
   Reported by Stephanie Daugherty on IRC
   http://paste.flashrom.org/view.php?id=1431
 - GIGABYTE GA-A75M-UD2H
   Reported by Soul_keeper on IRC
   http://paste.flashrom.org/view.php?id=1490
 - Intel D945GCNL
   Add board enable to override laptop detection too.
   http://www.flashrom.org/pipermail/flashrom/2012-December/010276.html
 - MSI G33M (MS-7357)
   http://www.flashrom.org/pipermail/flashrom/2012-October/010056.html
 - Shuttle FB61
   http://www.flashrom.org/pipermail/flashrom/2012-November/010105.html
 - Tyan S4882 (Thunder K8QS Pro)
   Reported on IRC
NOT OK:
   Alienware Aurora-R2
   http://www.flashrom.org/pipermail/flashrom/2012-December/010225.html
   Biostar H61MU3
   http://www.flashrom.org/pipermail/flashrom/2012-November/010144.html
   Dell OptiPlex 7010
   http://paste.flashrom.org/view.php?id=1481
   Intel DH67CL
   http://www.flashrom.org/pipermail/flashrom/2012-November/010112.html
   Supermicro X9DRT-HF+
   http://www.flashrom.org/pipermail/flashrom/2012-November/010155.html
   Supermicro X9DRW
   http://www.flashrom.org/pipermail/flashrom/2012-November/010150.html

Tested flash chips:
 - Atmel AT25FS010 to PREW (+PREW)
   http://paste.flashrom.org/view.php?id=1484
 - Eon EN25F64 to PREW (+EW)
   http://www.flashrom.org/pipermail/flashrom/2012-December/010210.html
 - Spansion S25FL032A/P to PREW (+EW)
   http://paste.flashrom.org/view.php?id=1510
 - ST M29F002T/NT to PREW (+PREW)
   http://www.flashrom.org/pipermail/flashrom/2012-December/010300.html
 - Winbond W25X10 to PREW (+PREW)
   http://paste.flashrom.org/view.php?id=1486

Tested chipsets:
 - NVIDIA MCP78S http://www.flashrom.org/pipermail/flashrom/2012-November/010176.html
 - SiS 650 http://www.flashrom.org/pipermail/flashrom/2012-November/010119.html

Miscellaneous:
- Typo in GA-X58A-UDR3 (correct is GA-X58A-UD3R).
- Force 2-digit hex numbers in prints were it makes sense.
- Share code between enable_flash_sis530() and enable_flash_sis540().
- Some SST 25 series chips support both WRSR enable commands...
- S25FL032A and S25FL064A share the IDs with their P versions, so rename them.
- Fix a few memleaks in serprog.
- Dediprog uses UINT_MAX so include limits.h (fixes the Windows build of dediprog)
- Add (another) hint regarding the mandatory -p parameter to the manpage
  to make Debian bug #690478 happy.
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=690478
- Fix whitespace issues.
- On shutdown, reset count of registered programmers (by Nico Huber)
- Fix atahpt.c shutdown.
  The order of pcidev_init, register_shutdown and rpci_write_* is important!
  Thanks to Roy for reporting the problem and testing the fix.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1639 | stefanct | 2012-12-30 02:23:17 +0100 (Sun, 30 Dec 2012) | 8 lines

Constify parameters and globals.

This makes some stuff const (partially to get a more convenient
libflashrom interface).

Signed-off-by: Nico Huber <nico.huber@secunet.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1638 | stefanct | 2012-12-29 20:26:55 +0100 (Sat, 29 Dec 2012) | 15 lines

Simplify hwaccess.c.

Previously the code was focused on architectures which led to lots of
duplicate code and spread the information regarding differences between
the architectures accross the file.

With this patch there is a single function header for any function and the
differentiation between architectures (and OS where needed) happens
in one place for each function. Also, this patch adds simple defines to bundle
often used arch and os checks. A central check for unknown architectures
and OSes has been added on top.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1637 | stefanct | 2012-12-29 16:04:20 +0100 (Sat, 29 Dec 2012) | 15 lines

Add support for Atmel's AT25F series of SPI flash chips.

This adds support for the following chips:
 - AT25F512, AT25F512A, AT25F512B
 - AT25F1024, AT25F1024A
 - AT25F2048
 - AT25F4096

Besides the definitions of the the chips in flashchips.c this includes
- a dedicated probing method (probe_spi_at25f)
- pretty printing methods (spi_prettyprint_status_register_at25f*), and
- unlocking methods (spi_disable_blockprotect_at25f*)

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1636 | stefanct | 2012-12-29 16:04:12 +0100 (Sat, 29 Dec 2012) | 30 lines

Add support for Intel S33 series flash chips.

This includes:
Bottom boot block:
* 16Mb/2MB:
  QB25F160S33B8, QB25F016S33B8, QH25F160S33B8, QH25F016S33B8
* 32Mb/4MB:
  QB25F320S33B8, QH25F320S33B8
* 64Mb/8MB:
  QB25F640S33B8, QH25F640S33B8

Top boot block:
* 16Mb/2MB:
  QB25F160S33T8, QB25F016S33T8, QH25F160S33T8, QH25F016S33T8
* 32Mb/4MB:
  QB25F320S33T8, QH25F320S33T8
* 64Mb/8MB:
  QB25F640S33T8, QH25F640S33T8

At least some seem to be marketed by other vendors (too?) but also with
Intel's vendor ID.

Besides a 0xC7 chip erase and a 0xD8 uniform 64kB block erase they
support also erasing the top/bottom 8 8kB blocks with opcode 0x40.
But since this command fails for all addresses outside those ranges,
it is not easily implemented with flashrom's current code base and
hence left out.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1635 | stefanct | 2012-12-29 16:04:05 +0100 (Sat, 29 Dec 2012) | 8 lines

Add a generic SPI block unprotect function.

This does not only remove a huge pile of duplicate code, it does
also fix a bug in spi_disable_blockprotect_at25df(), which is also
a good example why duplicated code is a bad idea.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1634 | stefanct | 2012-12-29 16:03:51 +0100 (Sat, 29 Dec 2012) | 28 lines

Improve SPI status register pretty printing.

 - Move all functions related to SPI status registers to a new file
   spi25_statusreg.c. This includes the generic as well as the
   SST-specific functions from spi25.c and the chip-specific functions
   from a25.c and at25.c.
 - introduce helper functions
    * spi_prettyprint_status_register_hex()
    * spi_prettyprint_status_register_bpl()
    * spi_prettyprint_status_register_plain()
   Use the latter on every compatible flash chip that has no better printlock
   function set and get rid of the implicit pretty printing in the SPI probing
   functions.
 - remove
    * spi_prettyprint_status_register_common()
    * spi_prettyprint_status_register_amic_a25lq032() because it can be fully
      substituted with spi_prettyprint_status_register_amic_a25l032().
    * spi_prettyprint_status_register() (old switch, no longer needed)
 - promote and export
    * spi_prettyprint_status_register_amic_a25l05p() as spi_prettyprint_status_register_default_bp1().
    * spi_prettyprint_status_register_amic_a25l40p() as spi_prettyprint_status_register_default_bp2().
    * spi_prettyprint_status_register_st_m25p() as spi_prettyprint_status_register_default_bp3().
 - add #define TEST_BAD_REW and use it for a number of Atmel chips which
   had only TEST_BAD_READ set even though they dont have erasers or a write
   function set.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1633 | stefanct | 2012-12-27 19:40:40 +0100 (Thu, 27 Dec 2012) | 4 lines

print_wiki.c: print programmers of type OTHER too.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1632 | stefanct | 2012-12-27 19:40:36 +0100 (Thu, 27 Dec 2012) | 16 lines

Unify usbdev_status and pcidev_status into dev_entry.

Once upon a time usbdev_status was created for the ft2232
programmer. Its IDs are semantically different to pcidev_status
because they indicate USB instead of PCI IDs, but apart from that
both data structures are equal. This change makes life easier for
everything involved in handling and printing the status of devices
that is noted in those structures by combining them into dev_entry.

It is still possible to distinguish between PCI and USB devices
indirectly by using the struct programmer's type field.

Also, add a programmer column to the PCI and USB devices lists.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1631 | stefanct | 2012-12-27 19:40:26 +0100 (Thu, 27 Dec 2012) | 14 lines

Refactor PCI and USB device status printing.

To be able to get rid of lots of #ifdefs and centralize programmer-specific
data more...
 - introduce two new fields to struct programmer_entry, namely
   enum type (OTHER, USB, PCI) and union devs (pcidev_status, usbdev_status
   or char *note).
 - use those fields to generate device listings in print.c and print_wiki.c.

Bonus: add printing of USB devices to print_wiki.c and count supported PCI
and USB devices.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1630 | stefanct | 2012-12-26 20:51:23 +0100 (Wed, 26 Dec 2012) | 6 lines

Add general programmer sanity checks.

And remove the completely unused vendor field.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1629 | stefanct | 2012-12-26 08:55:00 +0100 (Wed, 26 Dec 2012) | 16 lines

Fix memleaks in cli_classic.c.

Frees the memory allocated for the following strings
- log file name
- layout file name
- image file name
- programmer parameter (and reset the associated global variable in flashrom.c)

Also, free the flashchip structs allocated by probe_flash.

The layout image names were not fixed due to the pending layout patches.

These bugs were found thanks to valgrind.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1628 | stefanct | 2012-12-24 23:07:36 +0100 (Mon, 24 Dec 2012) | 18 lines

Add a "device" parameter for Dediprog.

This patch adds a "device" parameter for Dediprog which enables use of
multiple dediprogs connected to a single machine. Very handy for test racks.

Example usage:
flashrom -p dediprog:device=0
flashrom -p dediprog:device=1
etc...

The patch was originally written by Nathan Laredo.
Thanks to David Hendricks for submitting it upstream.
Additional error handling, man page etc. by Stefan Tauner.

Signed-off-by: Nathan Laredo <nil@google.com>
Signed-off-by: David Hendricks <dhendrix@google.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1627 | stefanct | 2012-11-30 17:46:45 +0100 (Fri, 30 Nov 2012) | 4 lines

Fix sp_openserport users on Windows.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Idwer Vollering <vidwer@gmail.com>
------------------------------------------------------------------------
r1626 | stefanct | 2012-11-30 17:46:41 +0100 (Fri, 30 Nov 2012) | 8 lines

Break endless loop in serialport_write().

serialport_write could loop endlessly when used with a seemingly valid port
that does always return 0 on writes instead of an error.
Give up after about 125 ms i.e. 250 tries with a period of 500 us.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Idwer Vollering <vidwer@gmail.com>
------------------------------------------------------------------------
r1625 | hailfinger | 2012-11-29 23:22:04 +0100 (Thu, 29 Nov 2012) | 7 lines

Fix linker flag bug introduced in r1623.

Spotted by Idwer Vollering.

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>

------------------------------------------------------------------------
r1624 | stefanct | 2012-11-24 19:59:39 +0100 (Sat, 24 Nov 2012) | 7 lines

Improve --help and friends.

More clear "variable" names, better explanation if no programmer is selected etc.

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: Paul Menzel <paulepanter@users.sourceforge.net>
------------------------------------------------------------------------
r1623 | hailfinger | 2012-11-20 22:06:16 +0100 (Tue, 20 Nov 2012) | 8 lines

Explicitly detect libusb-0.1 in the Makefile

Avoid funny interactions between libpci and libusb detection.
Leave libftdi autodetection alone for now.

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>

------------------------------------------------------------------------
r1622 | stefanct | 2012-11-05 13:20:29 +0100 (Mon, 05 Nov 2012) | 8 lines

Add (untested) board enable for Asus DSAN-DX.

IDs are from the host bridge and LPC controller. The enable function
was reverse engineered by roxfan, thanks!
User mezzo vanished without reporting any test results.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1621 | hailfinger | 2012-11-02 00:38:51 +0100 (Fri, 02 Nov 2012) | 6 lines

Support the new fast SPI mode present in Bus Pirate firmware v5.5 or
newer.

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>

------------------------------------------------------------------------
r1620 | stefanct | 2012-10-28 02:50:08 +0100 (Sun, 28 Oct 2012) | 13 lines

Add support for Winbond W39F010/W39L010/W39L020.

W39F010 is a 128kB parallel 5V flash chip, 16k bootblocks.
W39L010 is a 128kB parallel 3.3V flash chip, 8k bootblocks.
W39L020 is a 256kB parallel 3.3V flash chip, 64k/16k bootblocks.

The W39F010 code was tested with a satasii programmer. The first write
attempt after an erase returned with verify failure, but the second
write attempt was succesful:
http://paste.flashrom.org/view.php?id=1418

Signed-off-by: Kyosti Malkki <kyosti.malkki@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1619 | stefanct | 2012-10-27 17:36:56 +0200 (Sat, 27 Oct 2012) | 15 lines

Do not read the flash chip twice in verification mode.

Kyosti Malkki noticed that we unnecessarily read the flash chip twice when
called with --verify. The first one is the mandatory read before everything
(to be able to detect the seriousness of errors), but the second one is not
necessary because we can just use the former for the comparison.

This introduces a small output change: previously we printed ERASE or
VERIFY depending on the callee. This special case has been dropped
because it is unnecessary to print it (and wrong for the verification
function to need to know why it is verifying exactly).
If an erase fails we mention that fact explicitly already, similar for verify.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1618 | stefanct | 2012-10-27 02:34:23 +0200 (Sat, 27 Oct 2012) | 7 lines

serprog: add opcode to control the programmer's output drivers.

This allowed me to let the clips remain attached on my D946GZIS while
playing with coreboot/serialice.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1617 | stefanct | 2012-10-27 02:34:18 +0200 (Sat, 27 Oct 2012) | 4 lines

serprog: move the macro list to its own header file.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1616 | stefanct | 2012-10-27 02:06:02 +0200 (Sat, 27 Oct 2012) | 15 lines

Add support for Atmel AT26DF041.

Wicked chip: No WRSR, no write enable command (but swallows our
default one without a problem), supports an auto-erasing page write
(but even without that page writes are recommended to write the
whole page i.e. operate on a completely erased page), mad
requirements on block refreshments if only partly written.

Found on my Intel D946GZIS and tested with my serprog in situ.
Using the page write by setting JEDEC_BYTE_PROGRAM to 0x11 and using
the spi_chip_write_256 command greatly improves performance and works
flawlessly.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1615 | stefanct | 2012-10-26 18:49:15 +0200 (Fri, 26 Oct 2012) | 10 lines

Add support for Numonyx N25Q016 and N25Q032.

The 32Mb version has 1.8V and 3.0V versions, the smaller one 1.8V only
(or Numonyx/Micron forgot to publish it). Another difference is that the
16Mb chip has 32 kB subsectors (erase opcode 0x52). As long as there
are no funky configurations like for the 128Mb chips, we got the smaller
parts covered with this change.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1614 | stefanct | 2012-10-23 15:06:46 +0200 (Tue, 23 Oct 2012) | 9 lines

Remove exit calls from print_supported_chips.

Propagate the error code using return values instead, but let cli_classic.c
still decide the ultimate return value of the process.
Also, remove setting the ret value again after print_supported_wiki() - 
success is the default.

Signed-off-by: Niklas Soderlund <niso@kth.se>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1613 | stefanct | 2012-10-20 11:13:16 +0200 (Sat, 20 Oct 2012) | 31 lines

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

Tested Mainboards:
OK:
 - Foxconn P55MX
   http://www.flashrom.org/pipermail/flashrom/2012-October/010002.html

Tested flash chips:
 - Eon EN25F64 to PR (+PR)
   http://paste.flashrom.org/view.php?id=1426
 - Macronix MX25L1005 to PREW (+PREW)
   http://www.flashrom.org/pipermail/flashrom/2012-October/010004.html
 - Set SST39VF512 to PREW (+W)
   http://www.flashrom.org/pipermail/flashrom/2012-September/009958.html

Tested chipsets:
 - Z77 (only reading was really tested)

Miscellaneous:
 - Fix ft2232_spi's parameter parsing.
 - Fix nicrealtek's init (always segfaulted since r1586 oops).
 - Add another T60 variant to the laptop whitelist.
 - Improve message shown when image file size does not match flash chip
 - Refine messages regarding the flash descriptor override strap according
   to the findings by Vladislav Bykov on his P55MX.
 - Fix the ID of EN25F64.
 - Demote and clarify debug message in serprog_delay().
 - Minor other cleanups.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1612 | stefanct | 2012-10-04 16:41:20 +0200 (Thu, 04 Oct 2012) | 20 lines

Differentiate Numonyx N25Q064 1.8V and 3.0V versions.

This patch differentiates between the N25Q064 1.8V version and 3.0V
version which have different JEDEC IDs.

It extends the chip name to include more characters of the part
number. The first two of those characters indicate the process
technology (65nm) and feature set (hold pin etc.), neither of which
matter for flashrom at the moment. The third and fourth characters
specify voltage and block/sector size and uniformity, which are
important and hence included.

To abstract the irrelevant portions of the part number leading up to
the characters we care about, dots are used. This helps prevent
unwanted changes in chip name that can break fragile scripts and
confuse people. More about this schema here:
http://www.flashrom.org/pipermail/flashrom/2012-July/009595.html

Signed-off-by: David Hendricks <dhendrix@google.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1611 | stefanct | 2012-10-02 00:45:08 +0200 (Tue, 02 Oct 2012) | 9 lines

Add support for SST's 25WF series of SPI flash chips.

This includes SST25WF512, SST25WF010, SST25WF020 and SST25WF040.
They require a VCC of 1.65 - 1.95V, which is why i could not test them.
The SOIC version of the SST25WF512 is used on an AMD X300-based
graphics card i own.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1610 | stefanct | 2012-09-26 02:48:16 +0200 (Wed, 26 Sep 2012) | 8 lines

Cleanup ft2322.c and add more detail to error messages.

 - Use libftdi's error string to add more detail.
 - Add full stops to messages.
 - Minor white space fixes.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1609 | stefanct | 2012-09-26 02:47:09 +0200 (Wed, 26 Sep 2012) | 9 lines

Add support for FT232H.

For older versions of libftdi we define TYPE_232H ourselves and this
seems to be enough to get at least basic support (and we don't need
more than that AFAICT).

Signed-off-by: Ilya A. Volynets-Evenbakh <ilya@total-knowledge.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1608 | stefanct | 2012-09-26 02:46:02 +0200 (Wed, 26 Sep 2012) | 10 lines

Add support for all 4 possible channels to the ft2232_spi programmer.

Add a check to validate the selected channel/interface, which not even
libftdi seems to do yet.
This patch changes default behavior: the new default channel/interface is A.
Also, this patch uses the word 'channel' in addition or in place of 'interface'
where possible without too much hassle because it is the term FTDI uses.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1607 | stefanct | 2012-09-25 23:24:55 +0200 (Tue, 25 Sep 2012) | 7 lines

Introduce a compile time option to select a default programmer.

Heavily influenced by a discussion with (and based on code from) Peter Stuge.
Please read the comment in the Makefile before using this option.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Peter Stuge <peter@stuge.se>
------------------------------------------------------------------------
r1606 | stefanct | 2012-09-25 23:08:41 +0200 (Tue, 25 Sep 2012) | 11 lines

Whitelist known working Thinkpads of the T60 and X60 series.

This should get rid of the need to specify the laptop force
parameter on T60 and X60 series Thinkpads (including T60s and X60s)
that are using one of the Intel 94x northbridges and are known to have
no interfering EC. Please note that although the EC is no problem, flashrom
is not able to access the entire flash chip with the vendor BIOS, see the
coreboot wiki for details: http://www.coreboot.org/Lenovo_x60x

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>
------------------------------------------------------------------------
r1605 | stefanct | 2012-09-24 23:29:29 +0200 (Mon, 24 Sep 2012) | 11 lines

Fix flashrom running on boards with coreboot.

In r1577 we removed the discrimination of coreboot IDs and user-specified
mainboards. The problem is that the board enable code required to find
a board enable if either of these model strings were set. Therefore boards
running coreboot that do not need a board enable failed to execute flashrom
since then. This patch fixes this by handling coreboot IDs and user-supplied
IDs differently again.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Idwer Vollering <vidwer@gmail.com>
------------------------------------------------------------------------
r1604 | stefanct | 2012-09-23 14:14:28 +0200 (Sun, 23 Sep 2012) | 12 lines

Fix memleaks in dmi.c.

In dmi_init() we populate static char *dmistrings[] with values that get
later compared in dmi_match(). Those strings are actually strduped in
get_dmi_string() and hence need to be freed later. This patch accomplishes
this by registering another shutdown method. Also, the tangling pointers are
nulled when the memories are freed.

This bug was found thanks to valgrind.

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

Fix a memleak in the dummyflasher.

emu_persistent_image was not freed correctly.

This bug was found thanks to valgrind.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1602 | stefanct | 2012-09-22 03:38:06 +0200 (Sat, 22 Sep 2012) | 4 lines

Generify a25.c's SRWD printing function and move it to spi25.c.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1601 | stefanct | 2012-09-21 14:52:50 +0200 (Fri, 21 Sep 2012) | 74 lines

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

Tested Mainboards:
OK:
 - ASUS M3A78-EH
   http://www.flashrom.org/pipermail/flashrom/2010-October/005297.html
 - ASUS P2B-LS
   http://www.flashrom.org/pipermail/flashrom/2010-November/005506.html
 - Biostar TA790GX A3+
   http://paste.flashrom.org/view.php?id=1350
 - ECS 848P-A7
   http://www.flashrom.org/pipermail/flashrom/2011-January/005781.html
 - GIGABYTE GA-G41MT-S2PT
   Reported on IRC
 - GIGABYTE GA-H77-D3H
   Reported and tested by Alexander Gordeev on IRC.
 - Gigabyte GA-X79-UD5
   http://www.flashrom.org/pipermail/flashrom/2012-August/009811.html
 - Shuttle FN78S
   http://www.flashrom.org/pipermail/flashrom/2012-August/009714.html
 - VIA EITX-3000
   Reported on IRC by Tuju

NOT OK:
 - Dell PowerEdge C6220 (0HYFFG)
   http://www.flashrom.org/pipermail/flashrom/2012-September/009900.html
 - Foxconn Q45M
   http://www.flashrom.org/pipermail/flashrom/2012-September/009923.html
 - MSI MS-7309 (K9N6SGM-V)
   http://www.flashrom.org/pipermail/flashrom/2012-August/009712.html
 - Supermicro X9QRi-F+
   http://www.flashrom.org/pipermail/flashrom/2012-September/009887.html
 - ZOTAC H61-ITX WiFi (H61ITX-A-E)
   http://www.flashrom.org/pipermail/flashrom/2012-August/009649.html

ASUS CUSL2-C has been tested to be working with the board enable once
implemented for the TUSL2-C board. They seem to have the same PCI IDs
as shown in the links below. Since only the CUSL2-C board enable has been
tested yet, we distinguish the two by DMI strings.
http://paste.flashrom.org/view.php?id=1393
http://www.flashrom.org/pipermail/flashrom/attachments/20091206/ddca2c6c/attachment-0002.eml

Tested flash chips:
 - Set EMST F25L008A to PREW (+PREW)
   http://www.flashrom.org/pipermail/flashrom/2012-August/009714.html
 - Set GigaDevice GD25Q64 to PREW (+PREW)
   http://git.chromium.org/gitweb/?p=chromiumos/third_party/flashrom.git;a=commit;h=9e8ef49b1f626c2197e131fba6c5b65c8af4eeea
 - Set Macronix MX25L12805 to P (+P)
   http://www.flashrom.org/pipermail/flashrom/2012-September/009887.html
 - Set SST SST49LF003A/B to PREW (+EW)
   http://paste.flashrom.org/view.php?id=467
 - Set Winbond W49V002FA to PREW (+EW)
   http://www.flashrom.org/pipermail/flashrom/2011-January/005781.html

Tested chipsets:
 - Intel X79 (0x1d41)
   http://www.flashrom.org/pipermail/flashrom/2012-August/009811.html

Board enables:
 - add ASUS P4P800-X
   Created by Idwer Vollering and tested by Mingsen Bao:
   http://paste.flashrom.org/view.php?id=467
 - add DMI string to P4P800-VM

Miscellaneous:
 - Add remaining Intel 7 series chipset (LPC) PCI IDs
 - Add generic SPI detection for chips from Winbond
 - Minor manpage changes
 - Minor other cleanups
 - Escape full stops after abbreviations in the manpage.
 - Add ICH9 and successors to spi_get_valid_read_addr

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1600 | stefanct | 2012-09-21 14:46:56 +0200 (Fri, 21 Sep 2012) | 9 lines

Add spi_block_erase_62.

This is used by the AT25F series (only?), but is generic enough to reside in spi25.c.
The only currently supported chip is the AT25F512B. Other members of that series
need some additional infrastructure code, hence this patch adds the erase function to
the AT25F512B only.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1599 | stefanct | 2012-09-17 02:40:54 +0200 (Mon, 17 Sep 2012) | 9 lines

Allow to select FTDI device by serial number.

Requires libftdi > 0.5 (2004, commit ID a8f46ddc1595b1b07abfcce613acdafe5b8ddf9d).
Idea stolen from chromiumos commit 5eb5624aeb7e2ee483e2fa0823c4e634c8ea3e68:
http://git.chromium.org/gitweb/?p=chromiumos/third_party/flashrom.git;a=commit;h=5eb5624aeb7e2ee483e2fa0823c4e634c8ea3e68

Signed-off-by: Shik Chen <shik@chromium.org>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1598 | stefanct | 2012-09-17 02:05:44 +0200 (Mon, 17 Sep 2012) | 12 lines

Add support for GigaDevice GD25LQ32.

This is the low power version (vendor,device = 0xc8,0x6016) of
GD25Q32 (0xc8,0x4016) which matches that of W25Q32 (0xef,0x4016) and
W25Q32DW (0xef,0x6016).  All their datasheets look pretty much the
same with respect to commands, erase blocks, etc.

Stolen from chromiumos:
http://git.chromium.org/gitweb/?p=chromiumos/third_party/flashrom.git;a=commitdiff;h=9a0051f0ba0b67af6f08e052c31cba3e9dbbbdbf

Signed-off-by: Bryan Freed <bfreed@chromium.org>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1597 | stefanct | 2012-09-15 17:51:09 +0200 (Sat, 15 Sep 2012) | 8 lines

Add board enable for MSI K8N Neo Platinum.

It's the same as for the Neo2.
Thanks to roxfan and twice11 who did the RE!

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Tested-by: Jud Porter
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1596 | stefanct | 2012-09-07 10:27:46 +0200 (Fri, 07 Sep 2012) | 8 lines

Add untested board enable for ASUS P5LD2-VM.

Based on http://patchwork.coreboot.org/patch/2881/ but with 
the right pin (i.e. 16) according to Joshua Roys.

Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1595 | stefanct | 2012-09-07 09:07:07 +0200 (Fri, 07 Sep 2012) | 15 lines

Remove exit calls from sp_sync_read_timeout and sp_synchronize.

Add return values to sp_synchronize so we can signal a failure to the
only upstream caller (serprog_init), which is prepared to propagate a failure.

sp_sync_read_timeout was harder to fix because it already used a return
value, but we needed to distinguish two different failure modes. This
solution distinguishes them by the sign of the return values, which maintains
readability as much as possible.

Thanks to Niklas Soderlund for the original patch and idea.

Signed-off-by: Niklas Soderlund <niso@kth.se>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1594 | stefanct | 2012-09-06 19:37:16 +0200 (Thu, 06 Sep 2012) | 10 lines

Add support for Eon EN25F64.

Its ID was spotted in an ICH descriptor region update by Jetway:
http://paste.flashrom.org/view.php?id=1217 and is used on ASUS P8B75-V
boards according to some forum posts (2 chips per board actually).

No datasheet was found, so most values are just guessed from the EN25F32.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1593 | stefanct | 2012-09-04 05:55:04 +0200 (Tue, 04 Sep 2012) | 17 lines

Try to remove all read and write locks on CK804 (and MCP51).

We made a first step into this direction in r1405, but failed to
notice that there was already an extended patch by Jonathan which
was refined to become this one.

Allows the removal of board_shuttle_fn25 (which was also intended to be
used on the ASUS A8N-SLI Deluxe, but this was never tested).

A previous iteration was tested on CK804 and
Signed-off-by: Jonathan Kollasch <jakllsch@kollasch.net>
which was then
Acked-by: Stefan Reinauer <stepan@coreboot.org>

Rebasing, refining and making errors non-fatal is
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1592 | stefanct | 2012-09-04 03:49:49 +0200 (Tue, 04 Sep 2012) | 11 lines

Nvidia chipset enables: refactor setting bit 0 in 0x6d.

This patch also changes semantics: previously failing to set this was interpreted as
a fatal error by enable_flash_ck804 and enable_flash_mcp55 although the output
indicated otherwise. Also, in enable_flash_nvidia_nforce2 there was no check
if settings the bit succeeds.

Now all methods check for success and return ERROR_NONFATAL on failure.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1591 | stefanct | 2012-09-01 23:47:19 +0200 (Sat, 01 Sep 2012) | 7 lines

Fix compilation with MinGW.

This was broken since r1557 when we got rid of some exit calls, but returned
-1 instead which is not a valid HANDLE value.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Idwer Vollering <vidwer@gmail.com>
------------------------------------------------------------------------
r1590 | stefanct | 2012-09-01 23:32:04 +0200 (Sat, 01 Sep 2012) | 10 lines

Add support for AJAWe to pony_spi.

http://www.ajawe.pl/ajawe0208.htm
http://www.ajawe.pl/files/0208_R_DOK.pdf

First version was
Signed-off-by: Virgil-Adrian Teaca <darkstarlinux@gmail.com>
Refinements and general cleanup is
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1589 | hailfinger | 2012-08-30 23:41:00 +0200 (Thu, 30 Aug 2012) | 8 lines

Add RES/REMS support to all dummyflasher emulated chips as a test case.

Fix a few odd corner cases in RES/REMS support in dummyflasher
emulation which became noticeable once RES/REMS was used heavily.

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>

------------------------------------------------------------------------
r1588 | stefanct | 2012-08-29 05:41:57 +0200 (Wed, 29 Aug 2012) | 10 lines

Remove potential endless loops from satasii.c.

This is based on the idea from the "Make satasii driver more robust" patch
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

It factors out the wait loop and replaces all potential endless
loops instead of just a few.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1587 | stefanct | 2012-08-27 17:12:36 +0200 (Mon, 27 Aug 2012) | 15 lines

ichspi: ignore bogus FREGs.

Some vendors forget to disable regions properly and set their FRAP bits
and FREG to 0. While not documented publicly this is being ignored by the
chipset(s)[1] and hence flashrom should do so too. Without this patch
flashrom prints a warning and disables writes.
The check for i (region index) excludes the descriptor region which should not
be becessary because specs suggest that the descriptor region should not
be locked, but if vendors would follow the specs this patch would not have
been necessary in the first place.

[1]: http://www.flashrom.org/pipermail/flashrom/2012-May/009303.html

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1586 | stefanct | 2012-08-27 03:24:15 +0200 (Mon, 27 Aug 2012) | 11 lines

Add support for Realtek RTL8169.

And some cleanups including the removal of any left traces of the
nicsmc1211 programmer. The RTL8169 still needs someone to test it,
but it's good enough to be in the tree now.

Signed-off-by: Sergey Lichack <shadowpilot34@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Mathias Krause <mathias.krause@secunet.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1585 | stefanct | 2012-08-27 02:44:42 +0200 (Mon, 27 Aug 2012) | 14 lines

Some ISO C fixes.

This patch just fixes a limited number of bits not conforming to c99 by using
 - __asm__ instead of just asm
 - {0} instead of {} for struct initialization
 - h_addr_list[0] instead of h_addr to access the host address in
   struct hostent
 - #include <strings.h> where needed (for ffs and strcasecmp)

Based on a previous patch by Carl-Daniel.

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>
------------------------------------------------------------------------
r1584 | stefanct | 2012-08-26 23:50:36 +0200 (Sun, 26 Aug 2012) | 4 lines

Use getpagesize() to determine the physmap's length in nicintel_spi.c.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1583 | stefanct | 2012-08-26 23:04:27 +0200 (Sun, 26 Aug 2012) | 8 lines

Rename AT25F512B-specific code.

The AT25F512B is quite different from the other (older and yet
unsupported) chips in the AT25F* familiy, hence rename 512B-specific
stuff to make room for the generic AT25F* code.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1582 | stefanct | 2012-08-26 04:35:13 +0200 (Sun, 26 Aug 2012) | 19 lines

Clean up enable_flash_ich and attempt to disable SMM write protection.

This is based on chromiumos commit a5f4e82c59d6bcaf06b94623e5516d1db8cb843a.
http://git.chromium.org/gitweb/?p=chromiumos/third_party/flashrom.git;a=commit;h=a5f4e82c59d6bcaf06b94623e5516d1db8cb843a
See also http://www.flashrom.org/pipermail/flashrom/2011-November/008191.html

Besides disabling the SMM protection this also fixes something that bothered
me for a long time: the content of BIOS_CNTL was shown before we try to modify
it. This is usually not what interests us and contradicts other outputs.
With this patch we try to set the write enable and disable the SMM protection
first and show the state of BIOS_CNTL afterwards.

We now return an error only if the write enable is not set (which should be
equivalent to the previous behavior on sane hardware, but it seems to be
'more correct' and makes the code clearer to do this explicitly).

Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1581 | stefanct | 2012-08-25 05:53:12 +0200 (Sat, 25 Aug 2012) | 9 lines

Add untested board enable for DFI AD77.

Based on http://patchwork.coreboot.org/patch/2983/
Signed-off-by: Tadas Slotkus <devtadas@gmail.com>

PCI IDs are generic therefore requiring manual activation.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1580 | stefanct | 2012-08-25 04:07:20 +0200 (Sat, 25 Aug 2012) | 4 lines

Clean up satasii.c.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1579 | hailfinger | 2012-08-25 03:17:58 +0200 (Sat, 25 Aug 2012) | 10 lines

Make struct flashchip a field in struct flashctx instead of a complete copy.

All the driver conversion work and cleanup has been done by Stefan.
flashrom.c and cli_classic.c are a joint work of Stefan and Carl-Daniel.

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: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

------------------------------------------------------------------------
r1578 | stefanct | 2012-08-25 01:03:46 +0200 (Sat, 25 Aug 2012) | 19 lines

Fix VIA VX*** support.

Helge Wagner's patch that added VIA VX900 chipset support made me look
closer at the datasheets which led to some concise documentation about
newer VIA chipsets: http://flashrom.org/VIA

Based on that this patch adds full support for VX800/VX820, VX855/VX875
and VX900, including SPI and LPC. VT8237S was not changed (SPI support
only) because there is no public datasheet and it is not clear how to
distinguish between LPC and SPI strapping and investigations in (NDAed)
documents have not brought up anything conclusively.

enable_flash_vt823x could probably be enhanced too due to various
ignored LPC options of the chipset.

Signed-off-by: Helge Wagner <Helge.Wagner@ge.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Tested-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1577 | stefanct | 2012-08-20 02:24:22 +0200 (Mon, 20 Aug 2012) | 13 lines

Refactor the -p internal:mainboard handling.

This patch gets rid of some global variables and makes lots of bits along
the code path that control the board enable execution more generic and
clearer. From now on flashrom aborts on a few more occasions that should be
safer for the user. For example it aborts if the enable function for the
specified mainboard (enable) can not be found.

Parts of the board_match_cbname refactoring were done by Carl-Daniel.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
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>
------------------------------------------------------------------------
r1576 | hailfinger | 2012-08-17 19:30:43 +0200 (Fri, 17 Aug 2012) | 23 lines

Bus Pirate init cleanup and fixes.

The Bus Pirate firmware (at least v6.1 and earlier) can't handle UART
input buffer overflow in BBIO mode, and sending a sequence of 0x00 too
fast apparently triggers such an UART input buffer overflow. Wait 10 ms
after sending each 0x00 byte during init to give the Bus Pirate enough
time to handle the input. This fixes a Bus Pirate hang if the previous
flashrom run was aborted by the user.

The Bus Pirate firmware v6.1 and earlier use the wrong (too slow) SPI
speed if more than 2 MHz are requested. Automatically downgrade SPI
speed to 2 MHz for affected firmware versions.

Detect Bus Pirate hardware and firmware versions to allow quirk
handling.

The Bus Pirate init sequence has lots of open-coded sequences which wait
for a given string on the serial line. Refactor them into
buspirate_wait_for_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>

------------------------------------------------------------------------
r1575 | hailfinger | 2012-08-16 01:06:32 +0200 (Thu, 16 Aug 2012) | 10 lines

Allow specifying CPPFLAGS

The user may know better which CFLAGS/CPPFLAGS are appropriate.
Use FLASHROM_CFLAGS for flags which flashrom definitely needs to build.

Thanks to Stefan Tauner for pointing out the flaw in r1574.

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>

------------------------------------------------------------------------
r1574 | hailfinger | 2012-08-14 23:36:11 +0200 (Tue, 14 Aug 2012) | 17 lines

Allow the user to specify CFLAGS without breaking the build

GNU make has a very interesting quirk: If you set a variable on the
command line, any changes to that variable in the Makefile are ignored
unless marked with the "override" keyword.

Use CFLAGS only for optimization and warning options, and use CPPFLAGS
for the dependency and other preprocessor related options.
That way packagers can specify their own CFLAGS without breaking the
build.

As a side benefit, the ich_descriptors_tool Makefile now behaves exactly
the same whether called standalone or as part of the main Makefile.

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

------------------------------------------------------------------------
r1573 | stefanct | 2012-08-14 03:32:46 +0200 (Tue, 14 Aug 2012) | 8 lines

Call ftdi_set_interface right after ftdi_init and before ftdi_usb_open.

Else libftdi complains that it is impossible to set interface on an already
open device since 1c5fa36b67bc30742eee94ed3e3648fcd4640f24
(which will probably end up in libftdi 0.21).

Signed-off-by: Ilya A. Volynets-Evenbakh <ilya@total-knowledge.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1572 | stefanct | 2012-08-14 01:43:46 +0200 (Tue, 14 Aug 2012) | 8 lines

Add support for Atmel AT49(H)F010, AT49F080 and AT49F080T.

Also, alter the page size of the other family members to indicate that it is
unused. Maybe we this accelerates the deletion of this field... haha.

Signed-off-by: Andrew Morgan <ziltro@ziltro.com>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1571 | stefanct | 2012-08-13 18:33:04 +0200 (Mon, 13 Aug 2012) | 14 lines

serprog: Add support for setting the SPI frequency.

Introduce a new opcode (0x14) that sends the requested frequency as a 32b
long value in Hertz to the programmer and receives the frequency eventually
chosen by the programmer. The user can specify this with the programmer
parameter "spispeed" (named after the similar parameter for the buspirate)
including an optional suffix of 'M' or 'k' for specifying megahertz or kilohertz
respectively (lowercase suffixes are also accepted).

Thanks to Idwer and Uwe (and maybe others) for their feedback especially
regarding the unit of frequency to use.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1570 | stefanct | 2012-08-13 10:45:13 +0200 (Mon, 13 Aug 2012) | 7 lines

Clean up ICH descriptor code.

 - allows for compilation with -Werror=shadow,
 - use extended line limit to fix the most awful line breaks.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1569 | stefanct | 2012-08-11 18:07:08 +0200 (Sat, 11 Aug 2012) | 6 lines

Move show_id to where it belongs.

And remove the unused force parameter.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
------------------------------------------------------------------------
r1568 | stefanct | 2012-08-11 04:33:20 +0200 (Sat, 11 Aug 2012) | 9 lines

Fix broken board enables.

abit KN8 Ultra, agami/island aruma and IWILL DK8-HTX had no secondary
PCI IDs which complicates things.
Some google foo discovered some appropriate IDs, but they are all untested.
Let's pretend this breaks nothing.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1567 | hailfinger | 2012-08-10 01:34:41 +0200 (Fri, 10 Aug 2012) | 29 lines

Portability fixes and cleanups

Move Mac OS X IOKit/DirectHW availability checks in the Makefile from
compiler check to pciutils check.

Print the compiler error messages for feature detection.

Add DOS libpci in the Makefile includes only if a PCI-based programmer
was requested.

Restrict mmap usage in ich_descriptors_tool to Unix style systems.

Build ich_descriptors_tool with the correct .exe extension on
DOS/Windows.

Build ich_descriptors_tool by default on x86. (Patch by Stefan Tauner)

Print the Windows version instead of "unknown machine" on Windows.

Don't #define our own __DARWIN__, use the standard OS X detection
method.

Update the README.

Add more generated files to svn:ignore

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>

------------------------------------------------------------------------
r1566 | stefanct | 2012-08-10 01:25:27 +0200 (Fri, 10 Aug 2012) | 8 lines

Add board enable for Biostar M7VIQ.

The PCI IDs are generic VIA IDs. Only Biostar IDs are those of the LOM, but
that would not be a good choice for ID. So autodetection has been disabled
and the user needs to specify -p internal:mainboard=biostar:m7viq instead.

Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
r1565 | stefanct | 2012-08-09 23:09:51 +0200 (Thu, 09 Aug 2012) | 4 lines

Simplify processor_enable.c.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
------------------------------------------------------------------------
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 Soderlund <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 Soderlund.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Signed-off-by: Niklas Soderlund <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 Soderlund <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: Kyosti Malkki <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 Ibradzic <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 Soderlund <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.
{U+0410}{U+043D}{U+0434}{U+0440}{U+0435}{U+0438} {U+0422}{U+0438}{U+043C}{U+0438}{U+0440}{U+0430}{U+0435}{U+0432} <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 Skytta <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{U+00AE} ICH7, ICH8, ICH9 and ICH10 - 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 Ibradzic <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: Marton Miklos
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: Noe 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: Noe 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 Magherusan-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: Raul 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 Petteno <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 Sjolund 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
   "Nestor 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 Jorg 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: Jorg 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 Sjolund 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 Sjolund
* 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: Frantisek Kucera <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 Sjolund 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 Zenczykowski <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/{U+03C6}-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 {U+674E}{U+5F65}{U+5B78} (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{U+0142} 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: Raul 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: Raul 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 Jorg, 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: Jorg Mayer <jmayer@loplof.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Jorg 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 Jorg 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 Muller <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 Muller <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 Stephan 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 Bjorn 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 Kuhnel <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 Gurkan Sengun <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{U+0455} 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.

------------------------------------------------------------------------
