1. 18 Dec, 2011 1 commit
  2. 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
  3. 23 Nov, 2011 1 commit
  4. 04 Nov, 2011 1 commit
  5. 18 Sep, 2011 2 commits
  6. 03 Sep, 2011 1 commit
  7. 20 Aug, 2011 1 commit
  8. 04 Aug, 2011 1 commit
  9. 27 Jul, 2011 1 commit
  10. 26 Jun, 2011 2 commits
  11. 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. missing physunmap() calls).
      
      TODO: Remove forward declaration of serprog_shutdown() (added to simplify diff)
      
      Corresponding to flashrom svn r1338.
      Signed-off-by: default avatarDavid Hendricks <dhendrix@google.com>
      Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      8bb2021d
  12. 12 Jun, 2011 1 commit
  13. 03 Jun, 2011 1 commit
  14. 28 May, 2011 1 commit
  15. 19 May, 2011 1 commit
  16. 04 May, 2011 1 commit
  17. 17 Jan, 2011 1 commit
  18. 09 Nov, 2010 1 commit
  19. 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
  20. 20 Oct, 2010 1 commit
  21. 19 Oct, 2010 1 commit
    • Carl-Daniel Hailfinger's avatar
      Always read the flash chip before writing · 42d38a9d
      Carl-Daniel Hailfinger authored
      
      This will allow flashrom to skip erase of already-erased blocks and to
      skip write of blocks which already have the wanted contents.
      
      Avoid emergency messages by checking if the chip contents after a failed
      write operation (erase/write) are unchanged.
      
      Keep the emergency messages after a failed pure erase. That part is
      debatable because if someone wants erase, he pretty sure doesn't care
      about the flash contents anymore.
      
      Please note that this introduces additional overhead of a full chip read
      before write. This is frowned upon by people with slow programmers. A
      followup patch will make this configurable.
      
      Corresponding to flashrom svn r1215.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarStefan Reinauer <stepan@coreboot.org>
      42d38a9d
  22. 13 Oct, 2010 1 commit
  23. 08 Oct, 2010 1 commit
  24. 06 Oct, 2010 1 commit
  25. 25 Sep, 2010 1 commit
  26. 29 Jul, 2010 1 commit
  27. 27 Jul, 2010 2 commits
    • 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
    • Carl-Daniel Hailfinger's avatar
      Convert MMIO accesses of non-internal PCI-based programmers to be endian-agnostic · 1d3a2fef
      Carl-Daniel Hailfinger authored
      
      Convert all PCI-based external programmers to use special little-endian
      accessors for all MMIO regions of PCI devices. This patch does _not_
      touch the internal programmer (which is PCI-based as well).
      
      Huge thanks go to Misha Manulis who worked with me to create a first
      version of this patch for the satasii programmer based on modification
      of generic code.
      
      Huge thanks also go to Segher Boessenkool for suggesting the pci_mmio_
      prefix for the abstraction layer.
      
      NOTE to package maintainers: With this patch, compilation and usage of
      flashrom should be safe on x86, x86_64, MIPS (little and big endian) and
      PowerPC (big endian).
      
      The internal programmer is disabled on non-x86/x86_64 (but it
      compiles). The atahpt, nic3com, nicnatsemi, nicrealtek and rayer_spi
      can not be compiled on non-x86/x86_64 because port space I/O is
      not (yet) supported. Please compile with default settings on
      x86/x86_64 and with the following settings on all other architectures:
      make CONFIG_NIC3COM=no CONFIG_NICREALTEK=no CONFIG_NICNATSEMI=no
      CONFIG_RAYER_SPI=no
      
      Corresponding to flashrom svn r1111.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarMisha Manulis <misha@manulis.com>
      1d3a2fef
  28. 24 Jul, 2010 1 commit
  29. 22 Jul, 2010 2 commits
  30. 21 Jul, 2010 1 commit
  31. 18 Jul, 2010 1 commit
  32. 17 Jul, 2010 2 commits
  33. 14 Jul, 2010 2 commits
  34. 13 Jul, 2010 1 commit