1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 15:12:36 +02:00

1704 Commits

Author SHA1 Message Date
Carl-Daniel Hailfinger
f9aa3a8950 Add support for the SST25VF040B 4 Mbit SPI flash chip
Straight from the data sheet, not tested.

Corresponding to flashrom svn r175 and coreboot v2 svn r3036.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-01-07 13:48:51 +00:00
Ronald G. Minnich
8484d5a0a3 Add board enable for the gigabyte ga_2761gxdk board
Corresponding to flashrom svn r174 and coreboot v2 svn r3033.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-01-04 17:22:44 +00:00
Carl-Daniel Hailfinger
e973b05710 Print at least the vendor for SPI flash chips if the exact chip ID is unknown
Corresponding to flashrom svn r173 and coreboot v2 svn r3032.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
2008-01-04 16:22:09 +00:00
Carl-Daniel Hailfinger
2736e32832 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.

Corresponding to flashrom svn r172 and coreboot v2 svn r3031.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Markus Boas <bios@ryven.de>
2007-12-31 14:05:08 +00:00
Carl-Daniel Hailfinger
ae8afa9ddb 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.

Corresponding to flashrom svn r171 and coreboot v2 svn r3030.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Corey Osgood <corey.osgood@gmail.com>
2007-12-31 01:49:00 +00:00
Carl-Daniel Hailfinger
c2a18452b1 Refine various vendor ID annotations
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.

Corresponding to flashrom svn r170 and coreboot v2 svn r3029.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Corey Osgood <corey.osgood@gmail.com>
2007-12-31 01:18:26 +00:00
Carl-Daniel Hailfinger
a3c977ab63 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.

Corresponding to flashrom svn r169 and coreboot v2 svn r3027.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Corey Osgood <corey.osgood@gmail.com>
2007-12-29 11:05:59 +00:00
Carl-Daniel Hailfinger
9a3ec82063 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.

Corresponding to flashrom svn r168 and coreboot v2 svn r3026.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Corey Osgood <corey.osgood@gmail.com>
2007-12-29 10:15:58 +00:00
Carl-Daniel Hailfinger
e431827cf7 Add 25VF016B support
Untested, but verified against the data sheet.

Corresponding to flashrom svn r167 and coreboot v2 svn r3025.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Corey Osgood <corey.osgood@gmail.com>
2007-12-29 10:14:38 +00:00
Carl-Daniel Hailfinger
d8cc58c85e Add support for various ST M25P* chips
Add support for ST M25P05-A, M25P10-A, M25P20, M25P40, M25P16, M25P32,
M25P64, M25P128.

ST M25P80 support is already there. Not tested, but conforming to data
sheets and double checked.

Corresponding to flashrom svn r166 and coreboot v2 svn r3012.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2007-12-17 22:22:40 +00:00
Carl-Daniel Hailfinger
21c7890701 Rename SPI erase functions to include opcode
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.

Corresponding to flashrom svn r165 and coreboot v2 svn r3009.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ward Vandewege <ward@gnu.org>
2007-12-17 14:33:32 +00:00
Carl-Daniel Hailfinger
f5df46f6c6 Add support for ST M25P80 chips
Detection was tested. Print status register before erase to help
debugging block locks.

Corresponding to flashrom svn r164 and coreboot v2 svn r3008.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Corey Osgood <corey.osgood@gmail.com>
2007-12-16 21:15:27 +00:00
Frederico Silva
4bcf175190 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

Corresponding to flashrom svn r163 and coreboot v2 svn r3003.

Signed-off-by: Frederico Silva <frederico.silva@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2007-12-10 16:57:59 +00:00
Uwe Hermann
372eeb5710 Various coding style fixes, constification, fixed typos
Also, s/0xFF80/0xFFC0/ in the Acorp 6A815EPD board-enable, as per
http://www.linuxbios.org/pipermail/linuxbios/2007-December/027750.html

Corresponding to flashrom svn r162 and coreboot v2 svn r2997.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2007-12-04 21:49:06 +00:00
Jonathan A. Kollasch
c778556271 Add board-enable for Acorp 6A815EPD
Corresponding to flashrom svn r161 and coreboot v2 svn r2995.

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>
2007-12-02 19:03:23 +00:00
Lane Brooks
d54958a3c4 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.

Corresponding to flashrom svn r160 and coreboot v2 svn r2967.

Signed-off-by: Lane Brooks <lbrooks@mit.edu>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>
2007-11-13 16:45:22 +00:00
Carl-Daniel Hailfinger
03d2826d21 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.

Corresponding to flashrom svn r159 and coreboot v2 svn r2962.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>
2007-11-13 14:56:54 +00:00
Uwe Hermann
97a647014d Add support for Intel 440MX and Fujitsu MBM29F400TC
Detection and reading works, writing is not tested.

Corresponding to flashrom svn r158 and coreboot v2 svn r2903.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Peter Stuge <peter@stuge.se>
2007-10-30 00:56:50 +00:00
Peter Lemenkov
220e26be9c Add 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).

Corresponding to flashrom svn r157 and coreboot v2 svn r2897.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>
2007-10-25 04:11:11 +00:00
Peter Lemenkov
539478d7fe Add more Vendor IDs and ensure correct sorting in flash.h
Corresponding to flashrom svn r156 and coreboot v2 svn r2884.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2007-10-22 20:36:16 +00:00
Carl-Daniel Hailfinger
5b1c6ed8de Introduce block and sector erase routines, but do not use them yet
Corresponding to flashrom svn r155 and coreboot v2 svn r2881.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2007-10-22 16:15:28 +00:00
Carl-Daniel Hailfinger
145acec2a3 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.

Corresponding to flashrom svn r154 and coreboot v2 svn r2876.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2007-10-18 17:56:42 +00:00
Uwe Hermann
67808fe9ca Documentation fixes and updates
Corresponding to flashrom svn r153 and coreboot v2 svn r2875.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2007-10-18 00:29:05 +00:00
Carl-Daniel Hailfinger
6b44496c56 Add generic SPI flash erase and write support
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.

Corresponding to flashrom svn r152 and coreboot v2 svn r2874.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2007-10-18 00:24:07 +00:00
Uwe Hermann
a502dcea3d Some cosmetic cleanups in the flashrom code and output
Corresponding to flashrom svn r151 and coreboot v2 svn r2873.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2007-10-17 23:55:15 +00:00
Carl-Daniel Hailfinger
dca0ab1884 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 .

Corresponding to flashrom svn r150 and coreboot v2 svn r2868.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2007-10-17 22:30:07 +00:00
Uwe Hermann
2c5d4c69fa 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'.

Corresponding to flashrom svn r149 and coreboot v2 svn r2866.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2007-10-16 23:36:34 +00:00
Michael van der Kolff
3385cb8069 Add Gigabyte M61P-S3 SPI flash support to board_enable.c
Corresponding to flashrom svn r148 and coreboot v2 svn r2864.

Signed-off-by: Michael van der Kolff <mvanderkolff@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2007-10-16 21:18:43 +00:00
Carl-Daniel Hailfinger
3d94a0e00e Convert the existing it8716f_* functions to generic_spi_* functions
Corresponding to flashrom svn r147 and coreboot v2 svn r2863.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2007-10-16 21:09:06 +00:00
Carl-Daniel Hailfinger
70539260f5 Add spi.c forgotten in r145
Corresponding to flashrom svn r146 and coreboot v2 svn r2858.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2007-10-15 21:45:29 +00:00
Carl-Daniel Hailfinger
00f911e0a8 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.

Corresponding to flashrom svn r145 and coreboot v2 svn r2857.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2007-10-15 21:44:47 +00:00
Ronald G. Minnich
fa49692869 Changes to support the K8N-NEO3, first tested at Google on GSOC day :-)
Also minor changes to remove tab-space combinations where possible. 

Corresponding to flashrom svn r144 and coreboot v2 svn r2850.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: David Hendricks <david.hendricks@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2007-10-12 21:22:40 +00:00
Uwe Hermann
ac30934194 Revert my last cleanup patch
Corresponding to flashrom svn r143 and coreboot v2 svn r2847.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2007-10-10 17:42:20 +00:00
Uwe Hermann
17d00abf0a Cosmetic changes to make the flashrom output more consistent
Corresponding to flashrom svn r142 and coreboot v2 svn r2846.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2007-10-10 16:31:30 +00:00
Jordan Crouse
144ede66ca 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.

Corresponding to flashrom svn r141 and coreboot v2 svn r2820.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>    
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2007-10-04 06:26:41 +00:00
Carl-Daniel Hailfinger
e151499fd2 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.

Corresponding to flashrom svn r140 and coreboot v2 svn r2817.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ward Vandewege <ward@gnu.org>
2007-10-02 15:49:25 +00:00
Carl-Daniel Hailfinger
9224262838 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.

Corresponding to flashrom svn r139 and coreboot v2 svn r2811.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ward Vandewege <ward@gnu.org>
2007-09-27 14:29:57 +00:00
Alex Beregszaszi
c9fb5d92e2 Change out/in combinations to pci_read/write_byte in sis630 chipset enable
Corresponding to flashrom svn r138 and coreboot v2 svn r2770.

Signed-off-by: Alex Beregszaszi <alex@rtfs.hu>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2007-09-11 15:58:18 +00:00
Uwe Hermann
a0cc53d738 Remove useless 'extern' keywords
Corresponding to flashrom svn r137 and coreboot v2 svn r2769.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2007-09-09 20:24:29 +00:00
Uwe Hermann
d22a1d4e53 Add '(C)' where it's missing (for consistency reasons)
Corresponding to flashrom svn r136 and coreboot v2 svn r2768.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2007-09-09 20:21:05 +00:00
Uwe Hermann
ca7f0e4668 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.

Corresponding to flashrom svn r135 and coreboot v2 svn r2767.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2007-09-09 20:02:45 +00:00
Uwe Hermann
83c6c5391c Add a dedicated license
Add a copy of the GPL in the flashrom repository as it's an independent
project (being packaged by distros, among other things).

Corresponding to flashrom svn r134 and coreboot v2 svn r2764.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2007-09-08 14:36:01 +00:00
Markus Boas
d2ac6fc185 Add support for the Winbond W29EE011
Corresponding to flashrom svn r133 and coreboot v2 svn r2753.

Signed-off-by: Markus Boas <ryven@ryven.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2007-08-30 10:17:50 +00:00
Markus Boas
05e7f45373 Add support for the Winbond W29C040P
Corresponding to flashrom svn r132 and coreboot v2 svn r2752.

Signed-off-by: Markus Boas <ryven@ryven.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2007-08-30 10:11:08 +00:00
Uwe Hermann
d110764ccd Change all flashrom license headers to use our standard format
No changes in content of the files.

Corresponding to flashrom svn r131 and coreboot v2 svn r2751.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2007-08-29 17:52:32 +00:00
Uwe Hermann
ffec5f3ab7 Cosmetic fixes
Corresponding to flashrom svn r130 and coreboot v2 svn r2748.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2007-08-23 16:08:21 +00:00
Uwe Hermann
fd37414dbb Drop duplicated code (copies of plain JEDEC functions)
Corresponding to flashrom svn r129 and coreboot v2 svn r2747.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2007-08-23 15:20:38 +00:00
Uwe Hermann
0846f89b0a Drop a bunch of useless header files, merge them into flash.h
Corresponding to flashrom svn r128 and coreboot v2 svn r2746.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2007-08-23 13:34:59 +00:00
Uwe Hermann
51582f282b Move code into *.c files, there's no reason to have it in header files
Corresponding to flashrom svn r127 and coreboot v2 svn r2745.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2007-08-23 10:20:40 +00:00
Ed Swierk
966dc20cc3 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.

Corresponding to flashrom svn r126 and coreboot v2 svn r2744.

Signed-off-by: Ed Swierk <eswierk@arastra.com>
Acked-by: Peter Stuge <peter@stuge.se>
2007-08-13 04:10:32 +00:00