1. 01 Jan, 2013 1 commit
  2. 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
  3. 29 Nov, 2012 1 commit
  4. 20 Nov, 2012 1 commit
  5. 26 Sep, 2012 1 commit
  6. 25 Sep, 2012 1 commit
  7. 15 Aug, 2012 1 commit
  8. 14 Aug, 2012 1 commit
  9. 09 Aug, 2012 1 commit
    • Carl-Daniel Hailfinger's avatar
      Portability fixes and cleanups · 60d9bd26
      Carl-Daniel Hailfinger authored
      
      Move Mac OS X IOKit/DirectHW availability checks in the Makefile from
      compiler check to pciutils check.
      
      Print the compiler error messages for feature detection.
      
      Add DOS libpci in the Makefile includes only if a PCI-based programmer
      was requested.
      
      Restrict mmap usage in ich_descriptors_tool to Unix style systems.
      
      Build ich_descriptors_tool with the correct .exe extension on
      DOS/Windows.
      
      Build ich_descriptors_tool by default on x86. (Patch by Stefan Tauner)
      
      Print the Windows version instead of "unknown machine" on Windows.
      
      Don't #define our own __DARWIN__, use the standard OS X detection
      method.
      
      Update the README.
      
      Add more generated files to svn:ignore
      
      Corresponding to flashrom svn r1567.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      60d9bd26
  10. 08 Aug, 2012 1 commit
  11. 02 Aug, 2012 1 commit
  12. 28 Jul, 2012 1 commit
  13. 16 May, 2012 1 commit
  14. 30 Apr, 2012 1 commit
  15. 14 Apr, 2012 1 commit
  16. 13 Mar, 2012 1 commit
  17. 08 Mar, 2012 1 commit
  18. 25 Feb, 2012 1 commit
  19. 18 Feb, 2012 1 commit
  20. 17 Feb, 2012 1 commit
  21. 16 Feb, 2012 1 commit
  22. 13 Feb, 2012 1 commit
  23. 20 Dec, 2011 1 commit
    • Carl-Daniel Hailfinger's avatar
      Cross-compilation fixes · 33a65a06
      Carl-Daniel Hailfinger authored
      
      Switch from host OS detection to target OS detection.
      Complain about unknown target OS/architecture.
      Disable annoying format string warnings on DJGPP.
      
      Native and cross-compilation now usually just require setting CC.
      Examples:
      make CC=i586-pc-msdosdjgpp-gcc
      make CC="clang -m64"
      make CC=i686-w64-mingw32-gcc
      
      Tested for a boatload of native and cross compilation configurations.
      
      There is a new target "make libpayload" in case you don't want to
      specify all tools by hand.
      
      Corresponding to flashrom svn r1476.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarDavid Hendricks <dhendrix@google.com>
      33a65a06
  24. 04 Nov, 2011 1 commit
  25. 15 Sep, 2011 1 commit
    • Stefan Tauner's avatar
      ichspi: add ICH/PCH flash descriptor decoding via FDOC/FDOD · 1e14639f
      Stefan Tauner authored
      
      Based on the work of Matthias 'mazzoo' Wenzel this patch adds pretty
      printing of those ICH/PCH flash descriptor sections that are
      cached/mapped by the chipset (and which are therefore reachable via
      FDOC/FDOD registers).
      
      this includes the following:
      - content section:
          describes the image and some generic properties (number of
          sections, offset of sections, PCH/ICH and MCH/PROC strap
          offsets and lengths)
      - component section:
          identify the different SPI flash chips and their capabilities.
      - region section
          similarly to a partition table this describes the different regions.
          the content of FLREG* is derived from this section.
      - master section
          defines SPI master (host, ME, GbE) access rights of the
          individual regions. the content of PR* is derived from this section.
      
      this is only a part of the data included in the descriptor. other
      information can be retrieved from a complete binary dump of the
      descriptor region only.
      
      this patch also adds macros and pretty printing for "Vendor Specific
      Component Capabilities" registers: there are two of them: lower and
      upper. they describe the properties of the address space divided by
      FPBA (which allows to use multiple flash chips or partitions with
      different properties). the properties of all supported flash chips
      (together with their RDIDs) are stored in the same format in table
      in a descriptor section (which is used by the ME apparently). a
      later patch will use the macros outside of ichspi.c which is the
      reason why the prettyprinting function and the register bit macros
      are not defined in ichspi.c but ich_descriptors.h (else they would
      be moved in the follow-up patch).
      
      because this patch relies on (compiler) implementation-specific
      layouting of bit-fields, it checks for correct layout before taking
      any action on runtime.
      
      Corresponding to flashrom svn r1443.
      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>
      1e14639f
  26. 03 Sep, 2011 1 commit
  27. 20 Aug, 2011 1 commit
    • Uwe Hermann's avatar
      Makefile: Fix MinGW build, improve output with bogus CC · 44ffd58a
      Uwe Hermann authored
      
      As per IRC discussion, the "ARCH :=" line should be moved after any
      lines which set CC, as it uses CC itself. This fixes the MinGW build.
      
      Also, add a "2>/dev/null" in the "ARCH :=" as per suggestion from
      Stefan Tauner to improve the output in the case CC is bogus:
      
      Before:
      $ make CC=foo
      /bin/sh: foo: not found
      Checking for a C compiler... not found.
      make: *** [compiler] Error 1
      
      After:
      $ make CC=foo
      Checking for a C compiler... not found.
      make: *** [compiler] Error 1
      
      Corresponding to flashrom svn r1418.
      Signed-off-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      44ffd58a
  28. 18 Aug, 2011 1 commit
    • Stefan Tauner's avatar
      Makefile: fix and simplify test program compilations · 56787086
      Stefan Tauner authored
      This was totally broken due to the make's shell function's temporal
      behavior.
      
      quote from the gnu make documentation
      (http://www.gnu.org/s/hello/manual/make/Shell-Function.html):
      "The commands run by calls to the shell function are run when the
      function calls are expanded"
      we have used the shell function to echo the test programs to a file.
      the file name used was equal for all tests and was overwritten for
      each test. the result was that all tests (in a single target?) used
      the last test program because the echoing of the test programs was
      done before all test compilations(!)
      see my mail for details:
      http://lists.gnu.org/archive/html/bug-make/2011-08/msg00010.html
      
      
      
      also the branching for testing ifeq ($(CONFIG_FT2232_SPI), yes) was
      unnecessarily complicated.
      
      in my approach here i am using verbatim variables (allows to define
      even complex test programs in the makefile without jumping through
      hoops) that get exported to environment variables (via "export",
      reference afterwards with "$$<varname>").
      
      i have also added the missing redirection of stderr to the compiler
      test and changed the definition of ARCH to use simple expansion (:=).
      
      the latter is still wrong, because it uses $(CC) before we check if
      a compiler is installed... makes the compiler check pretty much
      useless. The simple expansion just reduces the number of errors
      printed to 1.
      
      Corresponding to flashrom svn r1416.
      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>
      56787086
  29. 29 Jul, 2011 1 commit
  30. 26 Jul, 2011 1 commit
  31. 07 Jul, 2011 1 commit
  32. 03 Jul, 2011 1 commit
    • Uwe Hermann's avatar
      Fix and improve Windows/MinGW/MSYS build · d5e85d67
      Uwe Hermann authored
      
       - Makefile: Use $(OS_ARCH) to add some MinGW-specific workarounds and
         settings, so that a simple "make" is sufficient on MinGW (instead of
         manual Makefile hacking).
      
       - Explicitly set CC=gcc in the Makefile, otherwise you get an error like
         "cc: command not found" on MinGW.
      
       - MinGW doesn't have ffs(), use gcc's __builtin_ffs() instead.
      
       - Add /usr/local/include and /usr/local/lib to CPPFLAGS/LDFLAGS, that's
         where libusb-win32 and libftdi stuff is usually placed on MinGW/MSYS.
      
       - Disable serprog (no sockets) and all PCI-based programmers (no libpci)
         for now. That leaves dummy, ft2232_spi, and buspirate_spi enabled on
         MinGW per default.
      
       - serial.c: Use correct type for 'tmp', both on Windows/MinGW (DWORD)
         and POSIX (ssize_t).
      
      Corresponding to flashrom svn r1363.
      Signed-off-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      d5e85d67
  33. 26 Jun, 2011 1 commit
  34. 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
  35. 08 May, 2011 1 commit
  36. 18 Mar, 2011 1 commit
  37. 08 Mar, 2011 1 commit
  38. 28 Feb, 2011 1 commit
  39. 04 Feb, 2011 1 commit
  40. 05 Dec, 2010 1 commit
    • Carl-Daniel Hailfinger's avatar
      Add support for Winbond W39V040FB and W39V040FC · 9188240a
      Carl-Daniel Hailfinger authored
      
      Print lock status for all supported Winbond W39* chips:
      W39V040A, W39V040B, W39V040C, W39V040FA, W39V040FB, W39V040FC,
      W39V080A, W39V080FA, W39V080FA (dual mode).
      
      Fill in correct probe timing for Winbond W39V040C and W39V080FA.
      
      Please note that the W39V040B/W39V040FB pair has identical IDs,
      identical read/write/erase, but locking differs. Same applies to
      W39V040C/W39V040FC. This causes double detection on chipsets which
      support LPC and FWH, making flashing more difficult because the user
      has to select the correct chip. This is called the evil twin problem.
      A better evil twin handling (patch available) will resolve that problem.
      
      Corresponding to flashrom svn r1245.
      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>
      9188240a