1. 19 Apr, 2013 1 commit
  2. 29 Dec, 2012 2 commits
    • Stefan Tauner's avatar
      Add support for Atmel's AT25F series of SPI flash chips · 57794ac1
      Stefan Tauner authored
      
      This adds support for the following chips:
       - AT25F512, AT25F512A, AT25F512B
       - AT25F1024, AT25F1024A
       - AT25F2048
       - AT25F4096
      
      Besides the definitions of the the chips in flashchips.c this includes
      - a dedicated probing method (probe_spi_at25f)
      - pretty printing methods (spi_prettyprint_status_register_at25f*), and
      - unlocking methods (spi_disable_blockprotect_at25f*)
      
      Corresponding to flashrom svn r1637.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      57794ac1
    • 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
  3. 27 Oct, 2012 1 commit
    • Stefan Tauner's avatar
      Add support for Atmel AT26DF041 · 94b39b47
      Stefan Tauner authored
      
      Wicked chip: No WRSR, no write enable command (but swallows our
      default one without a problem), supports an auto-erasing page write
      (but even without that page writes are recommended to write the
      whole page i.e. operate on a completely erased page), mad
      requirements on block refreshments if only partly written.
      
      Found on my Intel D946GZIS and tested with my serprog in situ.
      Using the page write by setting JEDEC_BYTE_PROGRAM to 0x11 and using
      the spi_chip_write_256 command greatly improves performance and works
      flawlessly.
      
      Corresponding to flashrom svn r1616.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      94b39b47
  4. 22 Sep, 2012 1 commit
  5. 21 Sep, 2012 1 commit
  6. 25 Aug, 2012 1 commit
  7. 02 Aug, 2012 2 commits
  8. 15 Jun, 2012 1 commit
  9. 06 May, 2012 1 commit
  10. 02 May, 2012 1 commit
    • Stefan Tauner's avatar
      spi25.c: Refactor spi_write_status_register helpers · 96c2dfc1
      Stefan Tauner authored
      
      In r1115 "Write protection handling for Atmel AT25*" the old
      spi_write_status_register function was duplicated to send WREN and
      EWSR commands respectively controlled by a new common wrapper function
      spi_write_status_register without a reason. Both functions' resulting
      code is equal apart from the opcode used. The code itself does also
      differ in the macros used, but their value (apart from the opcode) is
      equal. This patch adds a new parameter for the opcode to the helper
      function which allows removal of the other one. This relies on the fact
      that EWSR and WREN have the same INSIZE and OUTSIZE though. If that is
      really seen as an issue, the sizes could be made parameters too.
      
      This patch also changes the wrapper so that it no longer sets the
      feature bits of the struct flash(ctx) argument. This may result in
      changed output, because it no longer implicitly disables the debug
      message in following executions. Since almost all chips had their
      feature bits fixed in the previous commit, this is a minor problem.
      
      Also, spi_write_status_enable has been dead code since r658 or so.
      Remove it.
      
      Corresponding to flashrom svn r1528.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      96c2dfc1
  11. 17 Feb, 2012 1 commit
  12. 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
  13. 18 Dec, 2011 1 commit
  14. 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
  15. 23 Nov, 2011 1 commit
  16. 21 Oct, 2011 1 commit
  17. 18 Sep, 2011 2 commits
  18. 07 Jul, 2011 1 commit
  19. 26 Jun, 2011 1 commit
  20. 28 May, 2011 2 commits
  21. 19 May, 2011 1 commit
    • Carl-Daniel Hailfinger's avatar
      Refine status register and lock printing of Atmel and AMIC SPI chips · 7a3bd8f2
      Carl-Daniel Hailfinger authored
      
      Add lock printing for AMIC A25L05PT, A25L05PU, A25L10PT, A25L10PU,
      A25L20PT, A25L20PU, A25L40PT, A25L40PU, A25L80P, A25L16PT, A25L16PU,
      A25L512, A25L010, A25L020, A25L040, A25L080, A25L016, A25L032, A25LQ032
      to a25.c.
      
      Add lock printing for Atmel AT26DF081A, AT26DF161, AT26DF161A,
      AT26DF321.
      
      Move Atmel AT25*/AT26* lock related functions originally added in r1115
      from spi25.c to at25.c.
      
      For SPI chips the lock printing was handled by one common function, but
      sharing a common function which only is a big switch() statement doesn't
      make sense, especially if we can define lock printing functions per
      flash chip anyway.
      
      The printlock function pointer in struct flashchip is used to print
      status register and locking information, and serves as replacement for
      implicit status register and lock printing during probe. That code will
      later be changed to store locking info in a machine- accessible data
      structure so flashrom can handle locked regions correctly.
      
      Corresponding to flashrom svn r1316.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      7a3bd8f2
  22. 11 May, 2011 1 commit
    • Michael Karcher's avatar
      Kill central list of SPI programmers · b9dbe48b
      Michael Karcher authored
      
      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: default avatarMichael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
      Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      b9dbe48b
  23. 17 Jan, 2011 1 commit
  24. 27 Oct, 2010 1 commit
  25. 13 Oct, 2010 1 commit
  26. 08 Oct, 2010 2 commits
  27. 05 Oct, 2010 1 commit
  28. 15 Sep, 2010 1 commit
  29. 29 Jul, 2010 1 commit
  30. 27 Jul, 2010 1 commit
    • Carl-Daniel Hailfinger's avatar
      Split off programmer.h from flash.h · 5b997c3e
      Carl-Daniel Hailfinger authored
      
      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: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      5b997c3e
  31. 22 Jul, 2010 1 commit
  32. 14 Jul, 2010 2 commits
  33. 20 Jun, 2010 2 commits