summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Add support for Sanyo LE25FW406AStefan Tauner2014-05-182-1/+33
| | | | | | | | | | 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. Corresponding to flashrom svn r1796. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* sbxxx: Add spispeed parameterStefan Tauner2014-05-162-0/+44
| | | | | | | | | | | | | | | | | 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. Corresponding to flashrom svn r1795. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* sbxxx: Add support for new AMD SPI controllerWei Hu2014-05-163-10/+131
| | | | | | | | | | | | | | 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. Corresponding to flashrom svn r1794. 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@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* sbxxx: CleanupStefan Tauner2014-05-161-98/+88
| | | | | | | | | | | | | - 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. Corresponding to flashrom svn r1793. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* AT45DB: fix read functionsStefan Tauner2014-05-161-4/+8
| | | | | | | | | | | | | | | | | | | | | | 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. Corresponding to flashrom svn r1792. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add support for Sanyo LE25FU406BJurij Munda2014-05-142-0/+32
| | | | | | | | | | | | | | 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. Corresponding to flashrom svn r1791. Signed-off-by: Jurij Munda <jurij.munda@uni-mb.si> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Refine messages related to erase/write recoveryStefan Tauner2014-05-101-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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! Corresponding to flashrom svn r1790. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add 'const' keyword to chip write and other function prototypesMark Marshall2014-05-0919-117/+82
| | | | | | | | | | Corresponding to flashrom svn r1789. 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>
* Remove programmer_shutdown() from doit()Stefan Tauner2014-05-072-12/+10
| | | | | | | | | | | | | 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. Corresponding to flashrom svn r1788. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add support for SST25LF020AIdwer Vollering2014-05-072-1/+34
| | | | | | | | | Tested on hardware by Idwer too. Corresponding to flashrom svn r1787. Signed-off-by: Idwer Vollering <vidwer@gmail.com> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Support for Spansion S25FL132K and S25FL164KNikolay Martynov2014-05-042-0/+73
| | | | | | | | | Tested with actual S25FL164K via Arduino SPI. Corresponding to flashrom svn r1786. Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add support for SST25WF080Jason Harper2014-05-042-4/+47
| | | | | | | | | | Also, refine status register prettyprinting and unlocking of the whole family. Corresponding to flashrom svn r1785. 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>
* Add support for Macronix MX23L3254 mask ROMMichael Coppola2014-05-033-5/+23
| | | | | | | | Corresponding to flashrom svn r1784. 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>
* Add a bunch of new/tested stuff and various small changes 20Stefan Tauner2014-05-0312-74/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Milinković - 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 César Augusto Jakoby - Pegatron IPP7A-CP Reported by Илья Шипко - 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 Stolmár Tamás - Eon EN25QH64 to PR (+PR) Reported by Vladimir 'φ-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 Давыдов Дмитрий - 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 Michaël 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 Milinković - Intel HM87 (8086:8c4b) Reported by Vasiliy Vylegzhanin - Intel Z87 (8086:8c44) Reported by virii5 - NVIDIA MCP51 (10de:0261) Reported by Marcin Kościelnicki - 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. Corresponding to flashrom svn r1783. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Make delay values unsignedStefan Tauner2014-05-026-22/+21
| | | | | | | | | | | | | | | 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). Corresponding to flashrom svn r1782. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* ft2232_spi: Add support for TUMPA LiteStefan Tauner2014-04-273-2/+12
| | | | | | | | | | | http://www.tiaowiki.com/w/TIAO_USB_Multi_Protocol_Adapter_Lite_User's_Manual Initial patch from Jadran Puharic <jpuharic@gmail.com>. Corresponding to flashrom svn r1781. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Report if we are not able to disable AAI mode againStefan Tauner2014-04-261-5/+9
| | | | | | | Corresponding to flashrom svn r1780. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* CID1130000: Unchecked return value in default_spi_write_aai()Stefan Reinauer2014-04-261-9/+12
| | | | | | | | | | | 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. Corresponding to flashrom svn r1779. 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>
* CID1130006: Memory leaks in buspirate_spi_init()Stefan Reinauer2014-04-261-1/+6
| | | | | | | | | | | The one in the error case of register_shutdown() was discovered while reviewing the other one found by Coverity and fixed by Stefan Reinauer. Corresponding to flashrom svn r1778. 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>
* CID1129996: Unchecked return value from setsockopt() in serprogStefan Reinauer2014-04-261-1/+5
| | | | | | | Corresponding to flashrom svn r1777. Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* CID1130002: Logically dead code due to copy and paste errorStefan Reinauer2014-04-261-2/+2
| | | | | | | | | | | What we really want to do is check whether PCI_BASE_ADDRESS_2 is valid at this point, and not PCI_BASE_ADDRESS_0. Corresponding to flashrom svn r1776. 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>
* CID1130009: Resource leak in sp_opensocket()Stefan Reinauer2014-04-261-0/+1
| | | | | | | Corresponding to flashrom svn r1775. Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* CID1130007: Resource leak in ogp_spiStefan Reinauer2014-04-261-0/+2
| | | | | | | | | Memory leak in ogp_spi_init(). Corresponding to flashrom svn r1774. Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* CID1130008: Resource leak read_romlayout()Stefan Reinauer2014-04-261-0/+1
| | | | | | | Corresponding to flashrom svn r1773. Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* CID1130012: Double free in pony_spi_init()Stefan Reinauer2014-04-261-0/+1
| | | | | | | Corresponding to flashrom svn r1772. Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* CID1130011: Use after free in ich_descriptor_toolStefan Reinauer2014-04-261-1/+2
| | | | | | | Corresponding to flashrom svn r1771. Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* CID1130004: Nesting level does not match indentationStefan Reinauer2014-04-261-6/+7
| | | | | | | Corresponding to flashrom svn r1770. Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* linux_spi: Stop messing up the units of SPI speedAlexandru Gagniuc2014-03-191-6/+6
| | | | | | | | | | | | '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. Corresponding to flashrom svn r1769. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* linux_spi: Fix conversion from kHz to HzAlexandru Gagniuc2014-03-191-1/+1
| | | | | | | | | A kilohertz is exactly 1000 hertz, not 1024 hertz. Corresponding to flashrom svn r1768. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add support for Intel 82574L to nicintel_spi.cBill Paul2014-03-171-2/+9
| | | | | | | Corresponding to flashrom svn r1767. Signed-off-by: Bill Paul <wpaul@windriver.com> Acked-by: Idwer Vollering <vidwer@gmail.com>
* Add board enable for ASUS A7V8X-MXFrançois Revol2014-03-141-0/+1
| | | | | | | | | | | | 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. Corresponding to flashrom svn r1766. Signed-off-by: François Revol <revol@free.fr> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Clean up physmap, fix unaligned mapping problemsCarl-Daniel Hailfinger2014-03-054-21/+51
| | | | | | | | | | | | 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(). Corresponding to flashrom svn r1765. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add board enable for ASUS P5LD2-VM DHStefan Tauner2013-11-212-0/+4
| | | | | | | | | | | | | 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... Corresponding to flashrom svn r1764. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Ensure DMI strings used in dmi_compare() are not NULLStefan Tauner2013-10-291-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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! Corresponding to flashrom svn r1763. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add board enable for abit BF6Stefan Tauner2013-10-262-2/+4
| | | | | | | | | | | | 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! Corresponding to flashrom svn r1762. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Refactor Intel Chipset EnablesStefan Tauner2013-10-253-271/+214
| | | | | | | | | | | | | | | | | | | | | - 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. Corresponding to flashrom svn r1761. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* programmer_delay: filter 0 usec delaysUrja Rannikko2013-10-211-1/+2
| | | | | | | | | | We use 0 as delay value for some chips. Just skipping these here is the most elegant, maintainable solution. Corresponding to flashrom svn r1760. Signed-off-by: Urja Rannikko <urjaman@gmail.com> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* serial: use internal_delay() for timeoutsUrja Rannikko2013-10-191-1/+1
| | | | | | | | | | | | | 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... Corresponding to flashrom svn r1759. Signed-off-by: Urja Rannikko <urjaman@gmail.com> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Refine support for SST25VF familyCory Henderson2013-10-192-54/+169
| | | | | | | | | | | | | | - 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. Corresponding to flashrom svn r1758. Signed-off-by: Cory Henderson <dcoryh192@gmail.com> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* rayer_spi: Fix Xilinx DLC-5 cableKyösti Mälkki2013-10-021-0/+20
| | | | | | | | | | | | | | 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. Corresponding to flashrom svn r1757. Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* rayer_spi: Add pinout for Wiggler LPTMaksim Kuleshov2013-10-022-1/+12
| | | | | | | | | Corresponding to flashrom svn r1756. Signed-off-by: Maksim Kuleshov <mmcx@mail.ru> Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Tested-by: Maksim Kuleshov <mmcx@mail.ru> Acked-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
* rayer_spi: Add pinout for Atmel STK200/300Maksim Kuleshov2013-10-022-2/+30
| | | | | | | | Corresponding to flashrom svn r1755. Signed-off-by: Maksim Kuleshov <mmcx@mail.ru> Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Acked-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
* rayer_spi: Add pinout for Altera ByteBlasterMVMaksim Kuleshov2013-10-022-2/+31
| | | | | | | | | | | | | There is a ByteBlasterII product that is only almost compatible. Corresponding to flashrom svn r1754. Signed-off-by: Maksim Kuleshov <mmcx@mail.ru> Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Tested-by: Maksim Kuleshov <mmcx@mail.ru> Acked-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* rayer_spi: Improve support for different pinoutsKyösti Mälkki2013-10-022-54/+67
| | | | | | | | | | | | | | | 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. Corresponding to flashrom svn r1753. Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Tested-by: Maksim Kuleshov <mmcx@mail.ru> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* layout: Verify layout entries before building a new image using themStefan Tauner2013-09-234-8/+52
| | | | | | | | | | | | | | | | | 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. Corresponding to flashrom svn r1751. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* sbxxx: Set SPI clock to 16.5 MHz and disable fast readsStefan Tauner2013-09-151-8/+63
| | | | | | | | | | | | | | 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. Corresponding to flashrom svn r1750. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* layout: Add a method to cleanup layout data structuresStefan Tauner2013-09-153-2/+18
| | | | | | | | | Add layout_cleanup() to layout.c and hook it up in cli_classic.c. Corresponding to flashrom svn r1749. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Enable fwh_idsel parameter for C-ICH and ICH2/3/4/5 chipsetsKyösti Mälkki2013-09-142-13/+23
| | | | | | | | | | Register locations are different from ICH6, but otherwise appear to have identical bit specifications and defaults. Corresponding to flashrom svn r1748. Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Use ich_generation parameter in enable functions prior to ICH7Kyösti Mälkki2013-09-142-25/+64
| | | | | | | | | | | Follow the style used from ICH7 onwards to pass ich_generation parameter to lower-level functions on older ICH chipsets too. Corresponding to flashrom svn r1747. Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Introduce enable_flash_ich_fwh_decode()Kyösti Mälkki2013-09-141-8/+28
| | | | | | | | | | | | | | | | 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. Corresponding to flashrom svn r1746. Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
OpenPOWER on IntegriCloud