1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-26 22:52:34 +02:00

38 Commits

Author SHA1 Message Date
Angel Pons
e924dc0616 rayer_spi.c: Get rid of temporary prog_type string
Make the `get_params()` function provide a pointer to `struct
rayer_programmer` directly, instead of having a `prog_type` string
passed around three functions.

Change-Id: I83e34382ee9814f224025e21e5099fdab73cee8c
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/68239
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2022-10-22 00:45:30 +00:00
Edward O'Callaghan
759a056673 rayer_spi.c: Roll up programmer type search logic into func
Roll up the programmer type table search and match logic into
it's own function and lexically scope the 'rayer_spi_types'
table into the function while we are here.

Change-Id: Id226ea61132ecc30fd8696e1d8ea50373e752cac
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/68238
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-10-22 00:45:03 +00:00
Edward O'Callaghan
1837f0df27 rayer_spi.c: Drop lpt_outbyte intermediate var
The intermediate variable in this case serves no extra
assistance in readability or additional control flow
branching. Just assign the result directly into the
driver state tracker.

Change-Id: Idedabb7b1c401d666b3b7e621e75704c7e765fd1
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/68232
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-10-22 00:44:27 +00:00
Edward O'Callaghan
68e4d5cc4e rayer_spi.c: Move param parse logic into own func
Deconvolve programmer parameter parse logic out of main
'rayer_spi_init()' entry-point function control flow.

Change-Id: I287aa2e5d94e872553d08c0750f8dc6d60b9caff
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/68230
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-10-22 00:43:55 +00:00
Edward O'Callaghan
67d5015617 drivers/: Make 'fallback_{un}map' the default unless defined
Drop the explicit need to specify the default 'fallback_{un}map'
callback function pointer from the 'programmer_entry' struct.
This is a reasonable default for every other driver in the tree
with only a select few exceptions [atavia, serprog, dummyflasher
and internal].

Thus this simplifies driver development and paves way
to remove the 'programmer' global handle.

Change-Id: I5ea7bd68f7ae2cd4af9902ef07255ab6ce0bfdb3
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67404
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-10-08 18:36:21 +00:00
Edward O'Callaghan
4b503bee39 drivers/: Make 'internal_delay' the default unless defined
Drop the explicit need to specify the default 'internal_delay'
callback function pointer in the programmer_entry struct.
This is a reasonable default for every other driver in the
tree with only the two exceptions of ch341a_spi.c and serprog.c.

Thus this simplifies driver development.

Change-Id: I17460bc2c0aebcbb48c8dfa052b260991525cc49
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67391
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Thomas Heijligen <src@posteo.de>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-27 04:30:43 +00:00
Edward O'Callaghan
5c710ea54a tree: Port programmers to pass programmer_cfg to extractors
Ran;
```
 $ find -name '*.c' -exec sed -i 's/extract_programmer_param_str(NULL/extract_programmer_param_str(cfg/g' '{}' \;
```

Manually fix i2c_helper_linux.c and other cases after.

Treat cases of;
 - pcidev.c , and
 - usb_device.c
as exceptional to be dealt with in later patches.

Change-Id: If7b7987e803d35582dda219652a6fc3ed5729b47
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/66656
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
2022-09-07 01:56:58 +00:00
Edward O'Callaghan
1233e63833 tree: Allow passing programmer_cfg directly to programmer
Modify the type signature of each programmer entry-point
xxx_init() functions to allow for the consumption of the
programmer parameterisation string data.

```
 $ find -name '*.c' -exec sed -i 's/_init(void)/_init(const char *prog_param)/g' '{}' \;
 $ find -name '*.c' -exec sed -i 's/get_params(/get_params(const char *prog_param, /g' '{}' \;
 $ find -name '*.c' -exec sed -i 's/const char \*prog_param)/const struct programmer_cfg *cfg)/g' '{}' \;
 $ find -name '*.c' -exec sed -i 's/const char \*prog_param,/const struct programmer_cfg *cfg,/g' '{}' \;
```
and manually fix up any remaining parts.

Change-Id: I8bab51a635b9d3a43e1619a7a32b334f4ce2cdd2
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/66655
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
2022-09-07 01:50:58 +00:00
Edward O'Callaghan
e316f1970d tree: Change signature of extract_programmer_param_str()
Results can be reproduced with the following invocation;
```
 $ find -name '*.c' -exec sed -i 's/extract_programmer_param_str(/extract_programmer_param_str(NULL, /g' '{}' \;
```

This allows for a pointer to the actual programmer parameters
to be passed instead of a global.

Change-Id: I781a328fa280e0a9601050dd99a75af72c39c899
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/66654
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2022-09-07 01:49:49 +00:00
Chinmay Lonkar
1bb5ddde60 Add str extension to extract_programmer_param function name
This patch changes the function name of extract_programmer_param() to
extract_programmer_param_str() as this function name will clearly
specify that it returns the value of the given parameter as a string.

Signed-off-by: Chinmay Lonkar <chinmay20220@gmail.com>
Change-Id: Id7b9fff4d3e1de22abd31b8123a1d237cd0f5c97
Reviewed-on: https://review.coreboot.org/c/flashrom/+/65521
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-by: Thomas Heijligen <src@posteo.de>
2022-07-02 14:34:19 +00:00
Thomas Heijligen
b554cdc91e tree: indent struct *_master consistently with tabs
Use `<tab>.key<tab>*= <value>,`

TEST: `make VERSION=0 MAN_DATE=0` returns the same flashrom binary
before and after the patch

Change-Id: I1c45ea9804ca09e040d7ac98255042f58b01f8ef
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/65363
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
2022-06-27 08:56:00 +00:00
Thomas Heijligen
49d758698a hwaccess: move x86 port I/O related code into own files
Allow port I/O related code to be compiled independent from memory
mapping functionality. This enables for a better selection of needed
hardware access types.

Change-Id: I372b4a409f036da766c42bc406b596bc41b0f75a
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/60110
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-12-22 12:35:00 +00:00
Thomas Heijligen
95f39b0098 remove compile guards
The build system handles the decision when to build a file.
Extra compile guards for the source files are not necessary.

Change-Id: I76a76e05c7a7dd27637325ab1e9d8946fd5f9076
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/57797
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-09-26 13:00:26 +00:00
Thomas Heijligen
4f5169df5f programmer_table: move each entry to the associated programmer source
Change-Id: I3d02bd789f0299e936eb86819b3b15b5ea2bb921
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/52946
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-06-10 12:49:16 +00:00
Anastasia Klimchuk
38c133438c rayer_spi.c: Refactor singleton states into reentrant pattern
Move global singleton states into a struct and store within
the bitbang_spi_master data field for the life-time of the driver.

This is one of the steps on the way to move spi_master data
memory management behind the initialisation API, for more
context see other patches under the same topic "register_master_api".

BUG=b:185191942
TEST=builds

Change-Id: Idde4557d89f80fe5d5884ce6c8cdf538ad2e5d68
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/54998
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-06-03 05:21:10 +00:00
Anastasia Klimchuk
5f5eaeb7fa bitbang: Extend bitbang_spi_master functions to accept spi data
This way every bitbang spi master has access to its own spi data,
and can use this data in all its functions.

This patch only changes the signatures of functions.

BUG=b:185191942
TEST=builds

Change-Id: Id5722a43ce20feeed62630ad80e14df7744f9c02
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/54991
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
2021-06-03 05:19:37 +00:00
Anastasia Klimchuk
30815fc370 bitbang: Extend register_spi_bitbang_master() API with spi data
This allows the users of register_spi_bitbang_master() API to pass
their spi data into the API, and then the data can go further, into
register_spi_master() API.

BUG=b:185191942
TEST=builds

Change-Id: I13e83ae74dbc3a3e79c84d1463683d360ff47bc0
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/54990
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
2021-06-03 05:19:24 +00:00
Anastasia Klimchuk
5e0a9eadd2 rayer_spi.c: Remove forward-declarations
Reorder functions to avoid forward-declarations.
This was aimed to be done for all spi masters in the earlier patch
however this file was missed.

BUG=b:140394053
TEST=builds

Change-Id: I0e3c82967a169d6a2512ffa17d1e0c78eafb2797
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/51555
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-03-18 01:25:40 +00:00
Nico Huber
cb44eb7dad bitbang_spi: Drop bitbang_spi_master_type
It only existed to make maintenance harder and waste our time.

Change-Id: I7a3b5d9ff1e99d2d4f873c6f19fb318f93762037
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33638
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-06-23 13:06:51 +00:00
Elyes HAOUAS
0cacb11c62 Remove trailing whitespace
Change-Id: I1ff9418bcf150558ce7c97fafa3a68e5fa59f11e
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/31227
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-03-04 15:46:25 +00:00
Elyes HAOUAS
e083880279 Remove address from GPLv2 headers
Change-Id: I7bfc339673cbf5ee2d2ff7564c4db04ca088d0a4
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/25381
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-04-24 20:21:41 +00:00
Stefan Tauner
fdb1659107 rayer_spi: add support for SPI Tiny Tools-compatible hardware
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.

Corresponding to flashrom svn r1945.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2016-02-28 17:04:38 +00:00
Carl-Daniel Hailfinger
a5bcbceb58 Rename programmer registration functions
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.

Corresponding to flashrom svn r1831.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2014-07-19 22:03:29 +00:00
Kyösti Mälkki
1d473796bc rayer_spi: Fix Xilinx DLC-5 cable
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>
2013-10-02 01:22:17 +00:00
Maksim Kuleshov
acba2ac238 rayer_spi: Add pinout for Wiggler LPT
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>
2013-10-02 01:22:11 +00:00
Maksim Kuleshov
4dab5c1e07 rayer_spi: Add pinout for Atmel STK200/300
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>
2013-10-02 01:22:02 +00:00
Maksim Kuleshov
3647b2d5ed rayer_spi: Add pinout for Altera ByteBlasterMV
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>
2013-10-02 01:21:57 +00:00
Kyösti Mälkki
8b1bdf19b0 rayer_spi: Improve support for different pinouts
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>
2013-10-02 01:21:45 +00:00
Carl-Daniel Hailfinger
1c6d2ff03d Some ISO C fixes
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.

Corresponding to flashrom svn r1585.

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: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2012-08-27 00:44:42 +00:00
Carl-Daniel Hailfinger
d6bb828b01 Automatically release I/O permissions on shutdown
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.

Corresponding to flashrom svn r1551.

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>
2012-07-21 17:27:08 +00:00
Patrick Georgi
32508eb304 Hide hwaccess.h from public API
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.

Corresponding to flashrom svn r1549.

Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2012-07-20 20:35:14 +00:00
Carl-Daniel Hailfinger
c40cff7b86 Have all programmer init functions register bus masters/programmers
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.

Corresponding to flashrom svn r1475.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
2011-12-20 00:19:29 +00:00
Paul Menzel
018d482536 Add a bunch of new/tested stuff and various small changes 8
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

Corresponding to flashrom svn r1454.

- 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@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2011-10-21 12:33:07 +00:00
Carl-Daniel Hailfinger
ae418d87b2 Add support for Xilinx parallel III (DLC5) programing cable
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

Corresponding to flashrom svn r1437.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
2011-09-12 06:17:06 +00:00
Michael Karcher
b9dbe48b77 Kill central list of SPI programmers
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").

Corresponding to flashrom svn r1299.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2011-05-11 17:07:07 +00:00
Carl-Daniel Hailfinger
37c4252ef7 Speed up RayeR SPIPGM driver by a factor of 2
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.

Corresponding to flashrom svn r1188.

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>
2010-10-05 19:19:48 +00:00
Carl-Daniel Hailfinger
5b997c3ed6 Split off programmer.h from flash.h
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

Corresponding to flashrom svn r1112.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2010-07-27 22:41:39 +00:00
Carl-Daniel Hailfinger
e7fdd6e9a1 Add support for RayeR SPIPGM hardware as described in 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.

Corresponding to flashrom svn r1093.

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>
2010-07-21 10:26:01 +00:00