summaryrefslogtreecommitdiff
path: root/rayer_spi.c
Commit message (Collapse)AuthorAgeFilesLines
* rayer_spi: add support for SPI Tiny Tools-compatible hardware.stefanct2016-02-281-0/+8
| | | | | | | | | | | Apparently, there is at least one board of Russian origin (coined SPI_TT LPT) that works with SPI Tiny Tools which is a closed-source Windows GUI program somewhat similar to flashrom. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1945 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Rename programmer registration functionshailfinger2014-07-191-1/+1
| | | | | | | | | | | | | register_programmer suggests that we register a programmer. However, that function registers a master for a given bus type, and a programmer may support multiple masters (e.g. SPI, FWH). Rename a few other functions to be more consistent. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1831 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* rayer_spi: Fix Xilinx DLC-5 cable.stefanct2013-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. Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1757 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* rayer_spi: Add pinout for Wiggler LPT.stefanct2013-10-021-0/+8
| | | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1756 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* rayer_spi: Add pinout for Atmel STK200/300.stefanct2013-10-021-0/+28
| | | | | | | | 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> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1755 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* rayer_spi: Add pinout for Altera ByteBlasterMV.stefanct2013-10-021-0/+26
| | | | | | | | | | | | | There is a ByteBlasterII product that is only almost compatible. 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@student.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1754 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* rayer_spi: Improve support for different pinouts.stefanct2013-10-021-50/+64
| | | | | | | | | | | | | | | 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. 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@student.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1753 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Some ISO C fixes.stefanct2012-08-271-0/+1
| | | | | | | | | | | | | | | | | This patch just fixes a limited number of bits not conforming to c99 by using - __asm__ instead of just asm - {0} instead of {} for struct initialization - h_addr_list[0] instead of h_addr to access the host address in struct hostent - #include <strings.h> where needed (for ffs and strcasecmp) Based on a previous patch by Carl-Daniel. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1585 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Automatically release I/O permissions on shutdown.hailfinger2012-07-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | get_io_perms() is renamed to rget_io_perms() and automatically registers a function to release I/O permissions on shutdown. Actually release I/O permissions on Solaris and iopl()-supporting operating systems like Linux. This patch fixes quite a few programmers which forgot to release I/O permissions on shutdown, and it simplifies the shutdown and error handling code for all others. Do not call exit(1) if I/O permissions are denied and return an error instead. This part of the patch was written by Niklas Söderlund. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Signed-off-by: Niklas Söderlund <niso@kth.se> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1551 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Hide hwaccess.h from public API.hailfinger2012-07-201-0/+1
| | | | | | | | | | | | | | Move hwaccess.h #include from flash.h to individual drivers. libflashrom users need flash.h, but they do not care about hwaccess.h and should not see its definitions because they may conflict with other hardware access functions and #defines used by the libflashrom user. Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1549 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Have all programmer init functions register bus masters/programmershailfinger2011-12-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | All programmer types (Parallel, SPI, Opaque) now register themselves into a generic programmer list and probing is now programmer-centric instead of chip-centric. Registering multiple SPI/... masters at the same time is now possible without any problems. Handling multiple flash chips is still unchanged, but now we have the infrastructure to deal with "dual BIOS" and "one flash behind southbridge and one flash behind EC" sanely. A nice side effect is that this patch kills quite a few global variables and improves the situation for libflashrom. Hint for developers: struct {spi,par,opaque}_programmer now have a void *data pointer to store any additional programmer-specific data, e.g. hardware configuration info. Note: flashrom -f -c FOO -r forced_read.bin does not work anymore. We have to find an architecturally clean way to solve this. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1475 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Add a bunch of new/tested stuff and various small changes 8stefanct2011-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tested mainboards: OK: - ASUS Crosshair II Formula http://www.flashrom.org/pipermail/flashrom/2011-September/007888.html - ASUS K8N http://paste.flashrom.org/view.php?id=856 - ASUS M2N-E SLI http://www.flashrom.org/pipermail/flashrom/2011-September/007909.html - ASUS M3N78-VM http://www.flashrom.org/pipermail/flashrom/2011-May/006496.html - ASUS M4A78LT-M LE http://www.flashrom.org/pipermail/flashrom/2011-September/007869.html - ASUS M4A89GTD PRO http://www.flashrom.org/pipermail/flashrom/2011-February/005824.html - MSI A75MA-G55 (MS-7696) http://www.flashrom.org/pipermail/flashrom/2011-October/008055.html - PCCHIPS M598LMR (V9.0) http://www.flashrom.org/pipermail/flashrom/2011-October/008051.html - ECS P4VXMS (V1.0A) http://www.flashrom.org/pipermail/flashrom/2011-September/007986.html - Foxconn P4M800P7MA-RS2 http://www.flashrom.org/pipermail/flashrom/2011-October/008114.html - GIGABYTE GA-P67A-UD3P http://www.flashrom.org/pipermail/flashrom/2011-September/007930.html - GIGABYTE Z68MX-UD2H-B http://www.flashrom.org/pipermail/flashrom/2011-October/008080.html - ZOTAC Fusion-ITX WiFi (FUSION350-A-E) http://www.flashrom.org/pipermail/flashrom/2011-October/008011.html NOT OK: - ASUS P8B-E/4L http://www.flashrom.org/pipermail/flashrom/2011-October/008047.html - ASUS P8B WS http://www.flashrom.org/pipermail/flashrom/2011-October/008081.html Tested chipsets: - MCP78S (:075d) http://www.flashrom.org/pipermail/flashrom/2011-August/007612.html - VT8233 (:3074) http://www.flashrom.org/pipermail/flashrom/2011-September/007986.html - SiS 530 (:0530) http://www.flashrom.org/pipermail/flashrom/2011-October/008051.html - P67 (:1c46) http://www.flashrom.org/pipermail/flashrom/2011-September/007930.html - Z68 (:1c44) http://www.flashrom.org/pipermail/flashrom/2011-October/008080.html Tested flash chips: - mark AMIC A29002T as TEST_OK_PREW http://www.flashrom.org/pipermail/flashrom/2011-October/008085.html - mark Eon EN29F002(A)(N)T as TEST_OK_PREW http://www.flashrom.org/pipermail/flashrom/2011-October/008053.html - mark EonEN25F16 as TEST_OK_PREW http://www.flashrom.org/pipermail/flashrom/2011-February/005824.html - mark Macronix MX29F002(N)T as TEST_OK_PREW http://www.flashrom.org/pipermail/flashrom/2011-October/008083.html - mark Pm39LV040 as TEST_OK_PR http://www.flashrom.org/pipermail/flashrom/2011-September/007942.html - mark Pm39LV010 as TEST_OK_PREW http://www.flashrom.org/pipermail/flashrom/2011-September/007942.html - mark SST49LF008A as TEST_OK_PREW http://www.flashrom.org/pipermail/flashrom/2011-September/007989.html - mark SyncMOS {F,S,V}29C51002T as TEST_OK_PREW http://www.flashrom.org/pipermail/flashrom/2011-October/008052.html - mark W39V040B as write tested http://www.flashrom.org/pipermail/flashrom/2011-October/008114.html - mark W39V040C as TEST_OK_PREW http://www.flashrom.org/pipermail/flashrom/2011-October/008114.html - remove superfluous line break in enable_flash_ich_dc_spi - m->M in "min" and "max" (voltage) in print_wiki.c - spi25: get rid of unneccessary line breaks (on failed probes) which is Acked-by: Uwe Hermann <uwe@hermann-uwe.de> - rayer_spi.c: Remove double word: `s/the the/the/` which is Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> The parts added until 2011-10-14 (most of this patch) were Acked-by: Uwe Hermann <uwe@hermann-uwe.de> everything else is Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1454 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Add support for Xilinx parallel III (DLC5) programing cablehailfinger2011-09-121-17/+58
| | | | | | | | | | | | The rayer_spi driver defaults to the RayeR cable, but selecting other predefined pin layouts with the type= parameter is possible: flashrom -p rayer_spi:type=xilinx Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1437 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* kill central list of SPI programmersmkarcher2011-05-111-3/+0
| | | | | | | | | | | | | | | | | | Remove the array spi_programmer, replace it by dynamic registration instead. Also initially start with no busses supported, and switch to the default non-SPI only for the internal programmer. Also this patch changes the initialization for the buses_supported variable from "everything-except-SPI" to "nothing". All programmers have to set the bus type on their own, and this enables register_spi_programmer to just add the SPI both for on-board SPI interfaces (where the internal programmer already detected the other bus types), as well as for external programmers (where we have the default "none"). Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1299 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Speed up RayeR SPIPGM driver in flashrom by a factor of 2.hailfinger2010-10-051-34/+56
| | | | | | | | | | | | | | | | Allow specification of an alternate base address with flashrom -p rayer_spi:iobase=0x278 Any base address is allowed as long as it is nonzero, below 65536 and a multiple of four. Read speed is now on par with original spipgm.exe. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Tested-by: Martin Rehak <rayer@seznam.cz> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1188 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Split off programmer.h from flash.h.hailfinger2010-07-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | Programmer specific functions are of absolutely no interest to any file except those dealing with programmer specific actions (special SPI commands and the generic core). The new header structure is as follows (and yes, improvements are possible): flashchips.h flash chip IDs chipdrivers.h chip-specific read/write/... functions flash.h common header for all stuff that doesn't fit elsewhere hwaccess.h hardware access functions programmer.h programmer specific functions coreboot_tables.h header from coreboot, internal programmer only spi.h SPI command definitions Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1112 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
* Add support for RayeR SPIPGM hardware as described inhailfinger2010-07-211-0/+122
http://rayer.ic.cz/elektro/spipgm.htm To use the RayeR driver, run flashrom -p rayer_spi -V Known bugs/limitations: - Won't compile/work on non-x86 architectures. - Will always use direct port I/O access. Log follows: flashrom v0.9.2-r1039 on MS-DOS 7 (i686), built with libpci 3.1.5, GCC 4.3.2, little endian Calibrating delay loop... OK. Initializing rayer_bitbang_spi programmer Using port 0x378 as I/O base for parallel port access. ... Probing for Macronix MX25L1605, 2048 KB: probe_spi_rdid_generic: id1 0xc2, id2 0x2015 ... Found chip "Macronix MX25L1605" (2048 KB, SPI) at physical address 0xffe00000. ... No operations were specified. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Martin Rehak <rayer@seznam.cz> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1093 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1