summaryrefslogtreecommitdiff
path: root/spi.c
Commit message (Collapse)AuthorAgeFilesLines
* Original v2 revision: 3325hailfinger2008-05-161-0/+6
| | | | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@239 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Original v2 revision: 3323hailfinger2008-05-151-0/+4
| | | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@237 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Original v2 revision: 3320hailfinger2008-05-151-1/+40
| | | | | | | | | | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@235 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Original v2 revision: 3308hailfinger2008-05-141-0/+4
| | | | | | | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@231 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Original v2 revision: 3305hailfinger2008-05-131-223/+15
| | | | | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@229 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Original v2 revision: 3302hailfinger2008-05-131-60/+1
| | | | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@228 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Original v2 revision: 3301hailfinger2008-05-131-17/+17
| | | | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@227 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Original v2 revision: 3296hailfinger2008-05-101-18/+18
| | | | | | | | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@224 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Original v2 revision: 3295stuge2008-05-101-36/+36
| | | | | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@223 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Original v2 revision: 3091hailfinger2008-02-061-4/+10
| | | | | | | | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@191 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Original v2 revision: 3069hailfinger2008-01-221-22/+19
| | | | | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@184 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Original v2 revision: 3068hailfinger2008-01-211-5/+8
| | | | | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@183 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Original v2 revision: 3061hailfinger2008-01-191-24/+180
| | | | | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@181 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Original v2 revision: 3032hailfinger2008-01-041-2/+7
| | | | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@173 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Original v2 revision: 3026hailfinger2007-12-291-7/+50
| | | | | | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@168 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Original v2 revision: 3009hailfinger2007-12-171-19/+19
| | | | | | | | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@165 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Original v2 revision: 3008hailfinger2007-12-161-0/+4
| | | | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@164 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Original v2 revision: 2881hailfinger2007-10-221-9/+70
| | | | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@155 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Original v2 revision: 2876hailfinger2007-10-181-18/+2
| | | | | | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@154 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Original v2 revision: 2874hailfinger2007-10-181-5/+123
| | | | | | | | | | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@152 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Original v2 revision: 2873uwe2007-10-171-3/+3
| | | | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@151 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Original v2 revision: 2863hailfinger2007-10-161-13/+20
| | | | | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@147 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Original v2 revision: 2858stepan2007-10-151-0/+199
(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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@146 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1