1. 31 May, 2009 1 commit
    • Carl-Daniel Hailfinger's avatar
      Add bus type annotation to struct flashchips · 1dfe0ff1
      Carl-Daniel Hailfinger authored
      
      Right now, the annotation only differentiates between SPI and non-SPI.
      Anyone who knows more about a specific flash chip should feel free to
      update it.
      
      The existing flashbus variable was abused to denote the SPI controller
      type. Use an aptly named variable for that purpose.
      
      Once this patch is merged, the chipset/programmer init functions can set
      supported flash chip types and flashrom can automatically select only
      matching probe/read/erase/write functions. A side benefit of that will
      be the elimination of the Winbond W29EE011 vs. AMIC A49LF040A conflict.
      
      Corresponding to flashrom svn r556.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      1dfe0ff1
  2. 29 May, 2009 1 commit
  3. 28 May, 2009 1 commit
    • Uwe Hermann's avatar
      Random flashrom updates · d1129ac7
      Uwe Hermann authored
      
       - Add explicit installation instructions in the README.
      
       - Code cleanups, coding style fixes, drop dead code.
      
       - Drop duplicate board listings from -L output (some boards were explicitly
         recorded in boards_ok[] _and_ implicitly via the board-enables table.
      
       - Add MS-xxxx numbers to MSI boards where we can find that info.
      
       - Fix typo, "K8T Neo2" should have been "K8T Neo2-F" actually, at least
         according to the comment of w83627thf_gpio4_4_raise_2e() which says
         "Suited for: MSI K8T Neo2-F".
      
      Corresponding to flashrom svn r554.
      Signed-off-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      Acked-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      d1129ac7
  4. 26 May, 2009 1 commit
  5. 25 May, 2009 1 commit
  6. 17 May, 2009 4 commits
  7. 16 May, 2009 6 commits
  8. 15 May, 2009 1 commit
  9. 14 May, 2009 4 commits
  10. 13 May, 2009 2 commits
    • Carl-Daniel Hailfinger's avatar
      There are various reasons why a SPI command can fail · 3e9dbea1
      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: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      3e9dbea1
    • Uwe Hermann's avatar
      Add support for 3COM NICs as "external programmer" and Atmel AT49BV512 · b4dcb718
      Uwe Hermann authored
      
      This allows flashrom to identify, read, write, erase and verify flash chips
      on (some) 3COM network cards. The patch uses the external programmer
      infrastructure, the network card is basically treated as an external
      flash programmer.
      
      Usage:
      
      $ ./flashrom -p nic3com
      flashrom v0.9.0-r498
      Found NIC "3COM 3C905C: EtherLink 10/100 PCI (TX)" (10b7:9200), addr = 0xa400
      Calibrating delay loop... OK.
      Found chip "Atmel AT49BV512" (64 KB) at physical address 0xffff0000.
      No operations were specified.
      
      $ ./flashrom -p nic3com -E
      flashrom v0.9.0-r498
      Found NIC "3COM 3C905C: EtherLink 10/100 PCI (TX)" (10b7:9200), addr = 0xa400
      Calibrating delay loop... OK.
      Found chip "Atmel AT49BV512" (64 KB) at physical address 0xffff0000.
      Erasing flash chip... SUCCESS.
      
      $ ./flashrom -p nic3com -wv backup.bin
      flashrom v0.9.0-r498
      Found NIC "3COM 3C905C: EtherLink 10/100 PCI (TX)" (10b7:9200), addr = 0xa400
      Calibrating delay loop... OK.
      Found chip "Atmel AT49BV512" (64 KB) at physical address 0xffff0000.
      Flash image seems to be a legacy BIOS. Disabling checks.
      Programming page: 1023 at address: 0x0000ffc0
      Verifying flash... VERIFIED.
      
      $ ./flashrom -p nic3com -r backup.bin
      flashrom v0.9.0-r498
      Found NIC "3COM 3C905C: EtherLink 10/100 PCI (TX)" (10b7:9200), addr = 0xa400
      Calibrating delay loop... OK.
      Found chip "Atmel AT49BV512" (64 KB) at physical address 0xffff0000.
      Reading flash... done.
      
      I have tested this on actual hardware (see PCI IDs above) and all
      operations worked fine.
      
      Support for other 3COM cards will follow (I added some more which should
      be supportable by this code, but they're untested so far), as well as
      support for NICs from other vendors.
      
      The patch also adds support for the Atmel AT49BV512 which is soldered
      onto the 3COM NIC I used for testing.
      
      Corresponding to flashrom svn r499.
      Signed-off-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      Acked-by: default avatarMateusz Murawski <matowy@tlen.pl>
      Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      b4dcb718
  11. 11 May, 2009 1 commit
  12. 09 May, 2009 3 commits
  13. 08 May, 2009 2 commits
  14. 06 May, 2009 1 commit
  15. 01 May, 2009 2 commits
  16. 28 Apr, 2009 1 commit
  17. 24 Apr, 2009 1 commit
  18. 23 Apr, 2009 1 commit
  19. 21 Apr, 2009 1 commit
  20. 06 Mar, 2009 1 commit
  21. 05 Mar, 2009 1 commit
    • Carl-Daniel Hailfinger's avatar
      Use helper functions to access flash chips · 61a8bd27
      Carl-Daniel Hailfinger authored
      
      Right now we perform direct pointer manipulation without any abstraction
      to read from and write to memory mapped flash chips. That makes it
      impossible to drive any flasher which does not mmap the whole chip.
      
      Using helper functions readb() and writeb() allows a driver for external
      flash programmers like Paraflasher to replace readb and writeb with
      calls to its own chip access routines.
      
      This patch has the additional advantage of removing lots of unnecessary
      casts to volatile uint8_t * and now-superfluous parentheses which caused
      poor readability.
      
      I used the semantic patcher Coccinelle to create this patch. The
      semantic patch follows:
      @@
      expression a;
      typedef uint8_t;
      volatile uint8_t *b;
      @@
      - *(b) = (a);
      + writeb(a, b);
      @@
      volatile uint8_t *b;
      @@
      - *(b)
      + readb(b)
      @@
      type T;
      T b;
      @@
      (
       readb
      |
       writeb
      )
       (...,
      - (T)
      - (b)
      + b
       )
      
      In contrast to a sed script, the semantic patch performs type checking
      before converting anything.
      
      Tested-by: Joe Julian
      
      Corresponding to flashrom svn r418 and coreboot v2 svn r3971.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarFENG Yu Ning <fengyuning1984@gmail.com>
      61a8bd27
  22. 26 Jan, 2009 3 commits