1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-28 15:33:42 +02:00

446 Commits

Author SHA1 Message Date
Uwe Hermann
e8782a6307 Mark the SyncMOS S29C51002T as working
All operations tested by me on hardware.

Corresponding to flashrom svn r317 and coreboot v2 svn r3615.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-09-29 18:48:23 +00:00
Mats Erik Andersson
44e1a19467 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.

Corresponding to flashrom svn r316 and coreboot v2 svn r3602.

Signed-off-by: Mats Erik Andersson <mats.andersson@gisladisker.se>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-09-26 13:19:02 +00:00
Peter Stuge
3d20d901ec Winbond W49V002A TEST_OK_ PROBE READ ERASE WRITE
Per report from Kevin O'Connor. Thanks Kevin!

Corresponding to flashrom svn r315 and coreboot v2 svn r3570.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-09-10 09:55:10 +00:00
Peter Stuge
80d667b518 Debug print actual time base calculated by myusec_calibrate_delay()
Corresponding to flashrom svn r314 and coreboot v2 svn r3569.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-09-07 03:14:27 +00:00
Peter Stuge
483b8f0c0d 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.

Corresponding to flashrom svn r313 and coreboot v2 svn r3562.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-09-03 23:10:05 +00:00
Peter Stuge
8d74c1b05a SST49LF016C TEST_OK_ PROBE READ ERASE WRITE
Per test report from Bari Ari. Thanks!

Corresponding to flashrom svn r312 and coreboot v2 svn r3557.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-09-02 00:26:11 +00:00
Peter Stuge
e7efd4caf8 SST25VF016B TEST_OK_ PROBE READ ERASE WRITE
Per test report from Ward.

Corresponding to flashrom svn r311 and coreboot v2 svn r3541.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-08-27 21:28:41 +00:00
Ed Swierk
cd2ed475ad Recognize the Intel EP80579 LPC flash interface
Corresponding to flashrom svn r310 and coreboot v2 svn r3532.

Signed-off-by: Ed Swierk <eswierk@arastra.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-08-20 20:31:41 +00:00
Sean Nelson
b20953c3b9 Add support for MSI KT4V
The KT4V is autodetected and supports the KT3 Ultra 2 with "-m msi:kt4v"
(but is not autodetected, yet).

Corresponding to flashrom svn r309 and coreboot v2 svn r3528.

Signed-off-by: Sean Nelson <snelson@nmt.edu>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-08-19 21:51:39 +00:00
Segher Boessenkool
0d29b60641 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.

Corresponding to flashrom svn r308 and coreboot v2 svn r3502.

Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-08-12 11:58:00 +00:00
Peter Stuge
bff9bf24c7 ST M50FW040 TEST_OK PROBE READ ERASE WRITE
Per test report from Marcel Konrad. Thanks!

Corresponding to flashrom svn r307 and coreboot v2 svn r3485.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-08-08 10:55:57 +00:00
Stefan Reinauer
566ce1bea0 Update copyright year
Corresponding to flashrom svn r306 and coreboot v2 svn r3464.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-08-02 15:13:58 +00:00
Stefan Reinauer
ec20a75c37 Tested another intel chip
Corresponding to flashrom svn r305 and coreboot v2 svn r3462.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-08-02 14:58:49 +00:00
Peter Stuge
cce2682d6e 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.

Corresponding to flashrom svn r304 and coreboot v2 svn r3431.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-07-21 17:48:40 +00:00
Carl-Daniel Hailfinger
85f8a1725f Fix and clean up coreboot image detection heuristic
Additional compile fix for NetBSD.

Corresponding to flashrom svn r303 and coreboot v2 svn r3420.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-07-11 00:06:38 +00:00
Peter Stuge
f83221b6db 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.

Corresponding to flashrom svn r302 and coreboot v2 svn r3418.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-07-07 06:38:51 +00:00
Peter Stuge
6a214163c0 Trivial indent fix in ichspi.c
Corresponding to flashrom svn r301 and coreboot v2 svn r3417.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-07-07 05:14:06 +00:00
Carl-Daniel Hailfinger
8b114399d6 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.

Corresponding to flashrom svn r300 and coreboot v2 svn r3416.

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>
2008-07-06 23:04:01 +00:00
Andreas Thienemann
e707d64496 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.

Corresponding to flashrom svn r299 and coreboot v2 svn r3415.

Signed-off-by: Andreas Thienemann <andreas@bawue.net>
Acked-by: Peter Stuge <peter@stuge.se>
2008-07-06 17:35:30 +00:00
Stefan Reinauer
7f27464c8a Adding support for flashing system with Nvidia MCP67
Corresponding to flashrom svn r298 and coreboot v2 svn r3414.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-07-05 09:48:30 +00:00
Peter Stuge
57890c1e06 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.

Corresponding to flashrom svn r297 and coreboot v2 svn r3413.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-07-05 04:12:37 +00:00
Uwe Hermann
6c8866cd84 Minor cosmetics, e.g
Make stuff fit in 80 chars/line etc.

Corresponding to flashrom svn r296 and coreboot v2 svn r3412.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-07-03 19:26:44 +00:00
Carl-Daniel Hailfinger
84dcc8b38a Mark SST49LF040B as tested
Thanks to Paul Seidler and Ward Vandewege for testing.

Corresponding to flashrom svn r295 and coreboot v2 svn r3411.

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>
2008-07-03 19:08:52 +00:00
Uwe Hermann
83af9fb77c Mark the SST SST49LF040 as OK (tested by me), all operations
Corresponding to flashrom svn r294 and coreboot v2 svn r3410.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-07-03 18:58:58 +00:00
Peter Stuge
e02c0bbe9d Winbond W25x80 TEST_OK PROBE READ ERASE WRITE
Per test report from Björn Gerhart. Thanks!

Corresponding to flashrom svn r293 and coreboot v2 svn r3409.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-07-03 16:54:05 +00:00
Carl-Daniel Hailfinger
ecab4fce51 Improve coreboot image detection heuristic
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.

Corresponding to flashrom svn r292 and coreboot v2 svn r3408.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-07-03 14:40:06 +00:00
Peter Stuge
27c3e2dc23 Probe_flash() cleanup for better code readability
Corresponding to flashrom svn r291 and coreboot v2 svn r3407.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-07-02 17:15:47 +00:00
Stefan Reinauer
4c390c8943 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.

Corresponding to flashrom svn r290 and coreboot v2 svn r3406.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-07-02 13:33:09 +00:00
Peter Stuge
5b1488562d Update to TEST_OK for Winbond W39V040FA PROBE READ
Thanks to Jake for the test report!

Corresponding to flashrom svn r289 and coreboot v2 svn r3405.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-07-02 03:07:46 +00:00
Peter Stuge
11103091b4 Don't rm *~ in make clean, who knows what files that could be
Corresponding to flashrom svn r288 and coreboot v2 svn r3404.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-07-02 03:03:58 +00:00
Peter Stuge
00019d959a Unknown vendor:board message can be triggered by -m too
Thanks to Stefan for pointing this one out.

Corresponding to flashrom svn r287 and coreboot v2 svn r3403.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-07-02 00:59:29 +00:00
Peter Stuge
0b9c5f3d89 Case insensitive matching of vendor:board strings in coreboot table
Needed at least for GIGABYTE:m57sli in coreboot to match gigabyte:m57sli in
flashrom.

Corresponding to flashrom svn r286 and coreboot v2 svn r3402.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-07-02 00:47:30 +00:00
Stefan Reinauer
2cb94e183b 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.

Corresponding to flashrom svn r285 and coreboot v2 svn r3401.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-06-30 23:45:22 +00:00
Rudolf Marek
e3eb9c1d69 Mine AMIC flash chip needs 4 bytes RDID
This enables to use the new probing code.

Corresponding to flashrom svn r284 and coreboot v2 svn r3400.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-30 21:48:54 +00:00
Rudolf Marek
48a85e497e Mine AMIC flash chip needs 4 bytes RDID
Following patch adds support for that.

Corresponding to flashrom svn r283 and coreboot v2 svn r3399.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-30 21:45:17 +00:00
Rudolf Marek
3fdbccf697 This patch adds support for VIA SPI controller on VT8237S
It is similar with few documented exceptions to ICH7 SPI controller.

Corresponding to flashrom svn r282 and coreboot v2 svn r3398.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-30 21:38:30 +00:00
Carl-Daniel Hailfinger
10693353ee Add a debug marker after ICH SPI opcode programming
Corresponding to flashrom svn r281 and coreboot v2 svn r3397.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-06-29 10:57:13 +00:00
Peter Stuge
7e2c079367 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.

Corresponding to flashrom svn r280 and coreboot v2 svn r3395.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-06-29 01:30:41 +00:00
Carl-Daniel Hailfinger
a0a791963b Use symbolic constants for PCI subsystem probing
Corresponding to flashrom svn r279 and coreboot v2 svn r3394.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-06-28 23:02:22 +00:00
Stefan Reinauer
a9424d597d Multiple unrelated changes
* 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)

Corresponding to flashrom svn r278 and coreboot v2 svn r3393.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-27 16:28:34 +00:00
Stefan Reinauer
325b5d47d8 Indent according to development guidelines
Corresponding to flashrom svn r277 and coreboot v2 svn r3392.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-06-27 15:18:20 +00:00
Jens Kühnel
43b2281f51 Winbond W39V080FA: Probe and Read are OK
Corresponding to flashrom svn r276 and coreboot v2 svn r3390.

Signed-off-by: Jens Kühnel <coreboot@jens.kuehnel.org>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-06-26 11:57:27 +00:00
Peter Stuge
e9117f7b05 Test status OK for ST M50FW040 PROBE READ
Per test report from Alex Perez. Thanks Alex!

Corresponding to flashrom svn r275 and coreboot v2 svn r3389.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-24 08:18:13 +00:00
Peter Stuge
e27fc84234 Test status OK for Macronix MX25L8005 PROBE READ ERASE WRITE
Per test report from Andrew Paprocki. Thanks Andrew!

Corresponding to flashrom svn r274 and coreboot v2 svn r3388.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-24 04:17:14 +00:00
Peter Stuge
8653b00461 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.

Corresponding to flashrom svn r273 and coreboot v2 svn r3387.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-24 02:09:09 +00:00
Peter Stuge
da4e5f3623 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.

Corresponding to flashrom svn r272 and coreboot v2 svn r3386.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Ward Vandewege <ward@gnu.org>
2008-06-24 01:22:03 +00:00
Uwe Hermann
f8a49fee02 Some flashrom documentation fixes, and removal of duplicated info
Corresponding to flashrom svn r271 and coreboot v2 svn r3385.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-06-22 18:50:25 +00:00
Peter Stuge
87d51fb0b7 A few changes were committed before the DoC remove, update README
Corresponding to flashrom svn r270 and coreboot v2 svn r3384.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-22 17:54:03 +00:00
Peter Stuge
db52c58e06 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.*

Corresponding to flashrom svn r269 and coreboot v2 svn r3382.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-06-22 17:06:41 +00:00
Peter Stuge
f1614e8d1c Update test status to TEST_OK_PREW for ST M50FLW080A and SST49LF008A
Many thanks to Julio Cesar Costa for the test report!

Corresponding to flashrom svn r268 and coreboot v2 svn r3379.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-22 02:04:49 +00:00