- 17 May, 2009 1 commit
-
-
Carl-Daniel Hailfinger authored
Some MMIO accesses used volatile, others didn't (and risked non-execution of side effects) and even with volatile, some accesses looked dubious. Since the MMIO accessor functions and the onboard flash accessor functions are functionally identical (but have different signatures), make the flash accessors wrappers for the MMIO accessors. For some of the conversions, I used Coccinelle. Semantic patch follows: @@ typedef uint8_t; expression a; volatile uint8_t *b; @@ - b[a] + *(b + a) @@ expression a; volatile uint8_t *b; @@ - *(b) |= (a); + *(b) = *(b) | (a); @@ expression a; volatile uint8_t *b; @@ - *(b) = (a); + mmio_writeb(a, b); @@ volatile uint8_t *b; @@ - *(b) + mmio_readb(b) @@ type T; T b; @@ ( mmio_readb | mmio_writeb ) (..., - (T) - (b) + b ) Corresponding to flashrom svn r524. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Uwe tested read, write, erase with this patch on a random board to make sure nothing breaks. Acked-by:
Uwe Hermann <uwe@hermann-uwe.de>
-
- 16 May, 2009 2 commits
-
-
Uwe Hermann authored
They serve pretty much no purpose, compilers can optimize pretty much all of what we might mark as inline anyway, _and_ inlines are not enforced in any way by the compiler either. They're totally unneeded. Kill them. Corresponding to flashrom svn r522. Signed-off-by:
Uwe Hermann <uwe@hermann-uwe.de> Acked-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-
Uwe Hermann authored
Build-tested on 32bit x86. Corresponding to flashrom svn r521. Signed-off-by:
Uwe Hermann <uwe@hermann-uwe.de> Acked-by:
Uwe Hermann <uwe@hermann-uwe.de>
-
- 13 May, 2009 1 commit
-
-
Carl-Daniel Hailfinger authored
Among others, I have seen the following problems: - The SPI opcode is not supported by the controller. ICH-style controllers exhibit this if SPI config is locked down. - The address in in a prohibited area. This can happen on ICH for any access (BBAR) and for writes in chipset write protected areas. - There is no SPI controller. Introduce separate error codes for unsupported opcode and prohibited address. Add the ability to adjust REMS and RES addresses to the minium supported read address with the help of spi_get_valid_read_addr(). That function needs to call SPI controller specific functions like reading BBAR on ICH. Corresponding to flashrom svn r500. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Uwe Hermann <uwe@hermann-uwe.de>
-
- 09 May, 2009 2 commits
-
-
Carl-Daniel Hailfinger authored
Since many commands take around 10 microseconds to complete, it is totally pointless to wait for 1000 microseconds before checking the status again. This patch is tested and reduced write time on ICH7 with SST25VF080B from over one hour to 62 seconds. Thanks to Ali Nadalizadeh for testing! Corresponding to flashrom svn r487. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Myles Watson <mylesgw@gmail.com>
-
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>
-
- 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 1 commit
-
-
Peter Stuge authored
Thanks Patrick! Corresponding to flashrom svn r410 and coreboot v2 svn r3918. Signed-off-by:
Peter Stuge <peter@stuge.se> Acked-by:
Peter Stuge <peter@stuge.se>
-
- 15 Jan, 2009 1 commit
-
-
Peter Stuge authored
Corresponding to flashrom svn r383 and coreboot v2 svn r3862. Signed-off-by:
Peter Stuge <peter@stuge.se> Acked-by:
Peter Stuge <peter@stuge.se>
-
- 15 Dec, 2008 1 commit
-
-
FENG yu ning authored
* add a generic preop-opcode-pair table. * rename ich_check_opcodes to ich_init_opcodes. * let ich_init_opcodes do not need to access flashchip structure: . move the definition of struct preop_opcode_pair to a better place . remove preop_opcode_pairs from 'struct flashchip' . modify ich_init_opcodes and generate_opcodes so that they do not access the flashchip structure * call ich_init_opcodes during chipset enable. Now OPCODES generation mechanism works. * fix a coding style mistake. Corresponding to flashrom svn r367 and coreboot v2 svn r3814. Signed-off-by:
FENG yu ning <fengyuning1984@gmail.com> Acked-by:
Peter Stuge <peter@stuge.se>
-
- 08 Dec, 2008 1 commit
-
-
FENG yu ning authored
Corresponding to flashrom svn r364 and coreboot v2 svn r3805. Signed-off-by:
FENG yu ning <fengyuning1984@gmail.com> Acked-by:
Stefan Reinauer <stepan@coresystems.de>
-
- 18 Nov, 2008 1 commit
-
-
Carl-Daniel Hailfinger authored
Currently flashrom assumes every vendor BIOS shares our view about which SPI opcodes should be placed in which location. Move to a less optimistic implementation and actually use the generic SPI read functions. They're useful for abstracting exactly this stuff and that makes them the preferred choice. Corresponding to flashrom svn r346 and coreboot v2 svn r3758. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> 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>
-
- 02 Nov, 2008 1 commit
-
-
Stefan Reinauer authored
This is slightly slower (ha, ha), but works on boards with a locked opmenu. Tested on ICH7 and works. Corresponding to flashrom svn r336 and coreboot v2 svn r3721. Signed-off-by:
Stefan Reinauer <stepan@coresystems.de> Acked-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-
- 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
Corresponding to flashrom svn r301 and coreboot v2 svn r3417. Signed-off-by:
Peter Stuge <peter@stuge.se> Acked-by:
Peter Stuge <peter@stuge.se>
-
- 30 Jun, 2008 2 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
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>
-
- 29 Jun, 2008 2 commits
-
-
Carl-Daniel Hailfinger authored
Corresponding to flashrom svn r281 and coreboot v2 svn r3397. Signed-off-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by:
Stefan Reinauer <stepan@coresystems.de>
-
Peter Stuge authored
r3393 assumed that ICH7 always used SPI. This patch resets ich7_detected back to 0 when BOOT BIOS Straps indicate something else than SPI. Also fixes a build error in ichspi.c with gcc 4.2.2. Corresponding to flashrom svn r280 and coreboot v2 svn r3395. Signed-off-by:
Peter Stuge <peter@stuge.se> Acked-by:
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-
- 27 Jun, 2008 2 commits
-
-
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>
-
Stefan Reinauer authored
Corresponding to flashrom svn r277 and coreboot v2 svn r3392. Signed-off-by:
Stefan Reinauer <stepan@coresystems.de> Acked-by:
Stefan Reinauer <stepan@coresystems.de>
-
- 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>
-