1. 01 Apr, 2013 1 commit
  2. 15 Mar, 2013 1 commit
  3. 03 Mar, 2013 1 commit
  4. 04 Jan, 2013 1 commit
  5. 30 Dec, 2012 1 commit
  6. 29 Dec, 2012 1 commit
    • Stefan Tauner's avatar
      Improve SPI status register pretty printing · 6ee37e28
      Stefan Tauner authored
      
       - Move all functions related to SPI status registers to a new file
         spi25_statusreg.c. This includes the generic as well as the
         SST-specific functions from spi25.c and the chip-specific functions
         from a25.c and at25.c.
       - introduce helper functions
          * spi_prettyprint_status_register_hex()
          * spi_prettyprint_status_register_bpl()
          * spi_prettyprint_status_register_plain()
         Use the latter on every compatible flash chip that has no better printlock
         function set and get rid of the implicit pretty printing in the SPI probing
         functions.
       - remove
          * spi_prettyprint_status_register_common()
          * spi_prettyprint_status_register_amic_a25lq032() because it can be fully
            substituted with spi_prettyprint_status_register_amic_a25l032().
          * spi_prettyprint_status_register() (old switch, no longer needed)
       - promote and export
          * spi_prettyprint_status_register_amic_a25l05p() as spi_prettyprint_status_register_default_bp1().
          * spi_prettyprint_status_register_amic_a25l40p() as spi_prettyprint_status_register_default_bp2().
          * spi_prettyprint_status_register_st_m25p() as spi_prettyprint_status_register_default_bp3().
       - add #define TEST_BAD_REW and use it for a number of Atmel chips which
         had only TEST_BAD_READ set even though they dont have erasers or a write
         function set.
      
      Corresponding to flashrom svn r1634.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      6ee37e28
  7. 27 Oct, 2012 1 commit
    • Stefan Tauner's avatar
      Do not read the flash chip twice in verification mode · 78ffbeaa
      Stefan Tauner authored
      
      Kyösti Mälkki noticed that we unnecessarily read the flash chip twice when
      called with --verify. The first one is the mandatory read before everything
      (to be able to detect the seriousness of errors), but the second one is not
      necessary because we can just use the former for the comparison.
      
      This introduces a small output change: previously we printed ERASE or
      VERIFY depending on the callee. This special case has been dropped
      because it is unnecessary to print it (and wrong for the verification
      function to need to know why it is verifying exactly).
      If an erase fails we mention that fact explicitly already, similar for verify.
      
      Corresponding to flashrom svn r1619.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      78ffbeaa
  8. 23 Oct, 2012 1 commit
  9. 21 Sep, 2012 1 commit
  10. 25 Aug, 2012 1 commit
  11. 28 Jul, 2012 1 commit
    • Stefan Tauner's avatar
      Introduce enum test_state · 2c20b28f
      Stefan Tauner authored
      
      Previously boards in the wiki were tagged either as working or as known
      bad. But we added support to various boards via board enables that were
      then never tested because the owners have not reported back. This can
      now be tagged with NT and is shown appropriately.
      
      Also, the underlying data structure indicating state was converted from
      macros to an enum while preserving original integer values and is used
      for programmers and chipsets too.
      
      Corresponding to flashrom svn r1555.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      2c20b28f
  12. 20 Jul, 2012 1 commit
  13. 08 Jun, 2012 1 commit
  14. 06 Jun, 2012 1 commit
  15. 14 May, 2012 1 commit
  16. 17 Feb, 2012 1 commit
  17. 15 Feb, 2012 1 commit
  18. 25 Dec, 2011 1 commit
  19. 20 Dec, 2011 1 commit
    • Carl-Daniel Hailfinger's avatar
      Have all programmer init functions register bus masters/programmers · c40cff7b
      Carl-Daniel Hailfinger authored
      
      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: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarMichael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
      c40cff7b
  20. 18 Dec, 2011 1 commit
  21. 14 Dec, 2011 1 commit
    • Carl-Daniel Hailfinger's avatar
      Use struct flashctx instead of struct flashchip for flash chip access · 63fd9026
      Carl-Daniel Hailfinger authored
      
      Struct flashchip is used only for the flashchips array and for
      operations which do not access hardware, e.g. printing a list of
      supported flash chips.
      
      struct flashctx (flash context) contains all data available in
      struct flashchip, but it also contains runtime information like
      mapping addresses. struct flashctx is expected to grow additional
      members over time, a prime candidate being programmer info.
      struct flashctx contains all of struct flashchip with identical
      member layout, but struct flashctx has additional members at the end.
      
      The separation between struct flashchip/flashctx shrinks the memory
      requirement of the big flashchips array and allows future extension
      of flashctx without having to worry about bloat.
      
      Corresponding to flashrom svn r1473.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarMichael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
      63fd9026
  22. 23 Nov, 2011 1 commit
  23. 04 Nov, 2011 1 commit
  24. 18 Sep, 2011 2 commits
  25. 03 Sep, 2011 1 commit
  26. 20 Aug, 2011 1 commit
  27. 04 Aug, 2011 1 commit
  28. 27 Jul, 2011 1 commit
  29. 26 Jun, 2011 2 commits
  30. 14 Jun, 2011 1 commit
    • David Hendricks's avatar
      Use shutdown callback mechanism to shutdown programmers · 8bb2021d
      David Hendricks authored
      This patch attempts to resolve some programmer shutdown ordering issues
      by having the programmer init functions register shutdown callbacks explicitly
      wherever it makes most sense. Before, assumptions were made that could lead to
      the internal programmer's state changing before the external programmer could be
      shut down properly. Now, each programmer cleans up after itself and (hopefully)
      performs each operation in the correct order.
      
      As a side-effect, this patch gives us a better usage model for reverse
      operations such as rpci_* and rmmio_*. In the long-run, this should make
      reversing the initialization process easier to understand, less tedious, and
      less error-prone.
      
      In short, this patch does the following:
      - Registers a shutdown callback during initialization for each programmer.
      - Kills the .shutdown function pointer from programmer_entry struct. Also,
        make most shutdown functions static.
      - Adds a few minor clean-ups and corrections (e.g. missi...
      8bb2021d
  31. 12 Jun, 2011 1 commit
  32. 03 Jun, 2011 1 commit
  33. 28 May, 2011 1 commit
  34. 19 May, 2011 1 commit
  35. 04 May, 2011 1 commit
  36. 17 Jan, 2011 1 commit
  37. 09 Nov, 2010 1 commit
  38. 01 Nov, 2010 1 commit
    • Carl-Daniel Hailfinger's avatar
      Add SPI flash emulation capability to the dummy programmer · f68aa8ac
      Carl-Daniel Hailfinger authored
      
      You have to choose between
      - no emulation
      - ST M25P10.RES SPI flash chip (RES, page write)
      - SST SST25VF040.REMS SPI flash chip (REMS, byte write)
      - SST SST25VF032B SPI flash chip (RDID, AAI write)
      Example usage: flashrom -p dummy:emulate=SST25VF032B
      
      Flash image persistence is available as well.
      Example usage: flashrom -p dummy:image=dummy_simulator.rom
      
      Allow setting the max chunksize for page write with the dummy
      programmer.
      Example usage: flashrom -p dummy:spi_write_256_chunksize=5
      
      Flash emulation is compiled in by default. 
      
      This code helped me find and fix various bugs in the SPI write code
      as well as in the testsuite.
      
      Corresponding to flashrom svn r1220.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarDavid Hendricks <dhendrix@google.com>
      f68aa8ac