- 09 May, 2009 2 commits
-
-
Carl-Daniel Hailfinger authored
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. Corresponding to flashrom svn r485. 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>
-
Carl-Daniel Hailfinger authored
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! Corresponding to flashrom svn r484. 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>
-
- 06 May, 2009 1 commit
-
-
Carl-Daniel Hailfinger authored
- 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. Corresponding to flashrom svn r468. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Peter Stuge <peter@stuge.se>
-
- 15 Apr, 2009 1 commit
-
-
Uwe Hermann authored
Corresponding to flashrom svn r429 and coreboot v2 svn r4117. Signed-off-by:
Uwe Hermann <uwe@hermann-uwe.de> Acked-by:
Uwe Hermann <uwe@hermann-uwe.de>
-
- 26 Jan, 2009 3 commits
-
-
Peter Stuge authored
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. Corresponding to flashrom svn r407 and coreboot v2 svn r3913. Signed-off-by:
Peter Stuge <peter@stuge.se> Acked-by:
Peter Stuge <peter@stuge.se>
-
Peter Stuge authored
Corresponding to flashrom svn r406 and coreboot v2 svn r3912. Signed-off-by:
Peter Stuge <peter@stuge.se> Acked-by:
Peter Stuge <peter@stuge.se>
-
Peter Stuge authored
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! Corresponding to flashrom svn r404 and coreboot v2 svn r3910. Signed-off-by:
Peter Stuge <peter@stuge.se> Acked-by:
Ward Vandewege <ward@gnu.org>
-
- 25 Jan, 2009 1 commit
-
-
Peter Stuge authored
Corresponding to flashrom svn r390 and coreboot v2 svn r3895. Signed-off-by:
Peter Stuge <peter@stuge.se> Acked-by:
Peter Stuge <peter@stuge.se>
-
- 28 Nov, 2008 2 commits
-
-
Jason Wang authored
This has been tested by Uwe Hermann on an RS690/SB600 board. Corresponding to flashrom svn r351 and coreboot v2 svn r3779. 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>
-
Carl-Daniel Hailfinger authored
- 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 Corresponding to flashrom svn r349 and coreboot v2 svn r3775. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Peter Stuge <peter@stuge.se>
-
- 27 Nov, 2008 1 commit
-
-
Carl-Daniel Hailfinger authored
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. Corresponding to flashrom svn r348 and coreboot v2 svn r3774. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
FENG yu ning <fengyuning1984@gmail.com>
-
- 18 Nov, 2008 1 commit
-
-
Carl-Daniel Hailfinger authored
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. Corresponding to flashrom svn r345 and coreboot v2 svn r3757. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Otherwise: Acked-by: Stefan Reinauer <stepan@coresystems.de>
-
- 03 Nov, 2008 1 commit
-
-
Carl-Daniel Hailfinger authored
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. Corresponding to flashrom svn r337 and coreboot v2 svn r3722. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Stefan Reinauer <stepan@coresystems.de>
-
- 29 Oct, 2008 1 commit
-
-
Stefan Reinauer authored
Using block erase d8 as discussed with Peter Stuge Corresponding to flashrom svn r333 and coreboot v2 svn r3707. Signed-off-by:
Stefan Reinauer <stepan@coresystems.de> Acked-by:
Stefan Reinauer <stepan@coresystems.de>
-
- 18 Oct, 2008 1 commit
-
-
Uwe Hermann authored
Corresponding to flashrom svn r326 and coreboot v2 svn r3669. Signed-off-by:
Uwe Hermann <uwe@hermann-uwe.de> Acked-by:
Uwe Hermann <uwe@hermann-uwe.de>
-
- 07 Jul, 2008 1 commit
-
-
Peter Stuge authored
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>
-
- 30 Jun, 2008 3 commits
-
-
Stefan Reinauer authored
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>
-
Rudolf Marek authored
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>
-
Rudolf Marek authored
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>
-
- 27 Jun, 2008 1 commit
-
-
Stefan Reinauer authored
* 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>
-
- 24 Jun, 2008 1 commit
-
-
Peter Stuge authored
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>
-
- 16 May, 2008 1 commit
-
-
Dominik Geyer authored
This is done by using the generic SPI interface. Corresponding to flashrom svn r239 and coreboot v2 svn r3325. Signed-off-by:
Dominik Geyer <dominik.geyer@kontron.com> Acked-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-
- 15 May, 2008 2 commits
-
-
Carl-Daniel Hailfinger authored
Corresponding to flashrom svn r237 and coreboot v2 svn r3323. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Peter Stuge <peter@stuge.se>
-
Carl-Daniel Hailfinger authored
Add support for the JEDEC RES (Read Electronic Signature and Resume from Powerdown) SPI command 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. Corresponding to flashrom svn r235 and coreboot v2 svn r3320. 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>
-
- 14 May, 2008 1 commit
-
-
Carl-Daniel Hailfinger authored
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. Corresponding to flashrom svn r231 and coreboot v2 svn r3308. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Peter Stuge <peter@stuge.se>
-
- 13 May, 2008 3 commits
-
-
Carl-Daniel Hailfinger authored
No behavioural changes, but greatly improved SPI abstraction. Corresponding to flashrom svn r229 and coreboot v2 svn r3305. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Peter Stuge <peter@stuge.se>
-
Carl-Daniel Hailfinger authored
This patch has no code changes. Corresponding to flashrom svn r228 and coreboot v2 svn r3302. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Peter Stuge <peter@stuge.se>
-
Carl-Daniel Hailfinger authored
In theory, this patch has no behaviour changes. Corresponding to flashrom svn r227 and coreboot v2 svn r3301. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Peter Stuge <peter@stuge.se>
-
- 10 May, 2008 2 commits
-
-
Carl-Daniel Hailfinger authored
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. Corresponding to flashrom svn r224 and coreboot v2 svn r3296. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Peter Stuge <peter@stuge.se>
-
Peter Stuge authored
This is a very early step toward cleaning up SPI code in flashrom. Corresponding to flashrom svn r223 and coreboot v2 svn r3295. Signed-off-by:
Peter Stuge <peter@stuge.se> Acked-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-
- 06 Feb, 2008 1 commit
-
-
Carl-Daniel Hailfinger authored
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. Corresponding to flashrom svn r191 and coreboot v2 svn r3091. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Chris Lingard <chris@stockwith.co.uk>
-
- 22 Jan, 2008 1 commit
-
-
Carl-Daniel Hailfinger authored
Minor formatting changes. Corresponding to flashrom svn r184 and coreboot v2 svn r3069. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Harald Gutmann <harald.gutmann@gmx.net>
-
- 21 Jan, 2008 1 commit
-
-
Ronald Hoogenboom authored
readcnt==0 saves 10 seconds with the unconditional 10us delay, reducing programming time for SST25VF016B to 40-45 secs. Corresponding to flashrom svn r183 and coreboot v2 svn r3068. Signed-off-by:
Ronald Hoogenboom <hoogenboom30@zonnet.nl> Acked-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-
- 19 Jan, 2008 1 commit
-
-
Ronald Hoogenboom authored
Support SPI flash chips bigger than 512 kByte sitting behind IT8716F Super I/O performing LPC-to-SPI flash translation. Corresponding to flashrom svn r181 and coreboot v2 svn r3061. 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>
-
- 04 Jan, 2008 1 commit
-
-
Carl-Daniel Hailfinger authored
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>
-
- 29 Dec, 2007 1 commit
-
-
Carl-Daniel Hailfinger authored
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>
-
- 17 Dec, 2007 1 commit
-
-
Carl-Daniel Hailfinger authored
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>
-
- 16 Dec, 2007 1 commit
-
-
Carl-Daniel Hailfinger authored
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>
-
- 22 Oct, 2007 1 commit
-
-
Carl-Daniel Hailfinger authored
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>
-
- 18 Oct, 2007 1 commit
-
-
Carl-Daniel Hailfinger authored
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>
-