1. 10 Oct, 2010 1 commit
    • Carl-Daniel Hailfinger's avatar
      Unify chip write functions · b30a5ed4
      Carl-Daniel Hailfinger authored
      
      The currently used write functions (wrappers) all use helpers which
      perform the actual write (inner functions).
      
      The signature of the write wrappers is: int write_chip(struct flashchip
      *flash, uint8_t * buf);
      
      The signature of the inner write functions varied a lot. This patch
      changes them to: int write_part(struct flashchip *flash, uint8_t *src,
      int start, int len);
      
      Did you know that flashrom has only 8 inner write functions for all
      flash chips? write_page_write_jedec_common write_sector_jedec_common
      write_sector_28sf040 spi_chip_write_256_new spi_chip_write_1_new
      spi_aai_write_new write_page_82802ab write_page_m29f400bt
      
      Export all inner write functions.
      
      Change the function signature of wait_82802ab to eliminate single-use
      variables.
      
      Remove an error message in write_page_m29f400bt which was printed for
      every byte written regardless of success.
      
      Add sharplhf00l04.c to the list of flash chip drivers in the Makefile.
      While the functions in there are unused, I suspect we will need them
      later, and by hooking the file up we ensure that compilation won't
      break.
      
      Corresponding to flashrom svn r1208.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      b30a5ed4
  2. 08 Oct, 2010 2 commits
  3. 06 Oct, 2010 1 commit
  4. 03 Sep, 2010 1 commit
    • Idwer Vollering's avatar
      Add Intel Gigabit NIC SPI flashing support · 004f4b79
      Idwer Vollering authored
      
      Tested on a 82541PI (0x8086, 0x107c) using 32-bit hardware.
      
      The last line in nicintel_request_spibus() could be changed so that FL_BUSY
      is used instead.
      
      Shortened sample log:
      [...]
      Found "Intel 82541PI Gigabit Ethernet Controller" (8086:107c, BDF 01:03.0).
      Found chip "ST M25P10.RES" (128 KB, SPI) at physical address 0xfffe0000.
      Multiple flash chips were detected: M25P05.RES M25P10.RES
      Please specify which chip to use with the -c <chipname> option.
      [...]
      
      Corresponding to flashrom svn r1151.
      Signed-off-by: default avatarIdwer Vollering <vidwer@gmail.com>
      Acked-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      004f4b79
  5. 29 Jul, 2010 1 commit
  6. 28 Jul, 2010 1 commit
    • Carl-Daniel Hailfinger's avatar
      Add Nvidia nForce MCP61/MCP65/MCP67/MCP78S/MCP73/MCP79 SPI flashing support · 2f436168
      Carl-Daniel Hailfinger authored
      
      Huge thanks go to Michael Karcher for reverse engineering the interface
      and to Johannes Sjölund for testing the first iterations of my patch on
      his hardware until it worked.
      
      Thanks to the following testers of the patch:
      * MCP61, 10de:03e0, LPC OK, ECS Geforce6100SM-M, Andrew Cleveland
      * MCP61, 10de:03e0, LPC OK, Biostar NF520-A2 NF61D-A2, Vitaliy Buchynskyy
      * MCP65, 10de:0441, SPI OK, MSI MS-7369 K9N Neo-F v2, Kjell Braden
      * MCP65, 10de:0441, SPI OK, MSI MS-7369, Wolfgang Schnitker
      * MCP65, 10de:0441, SPI OK, MSI MS-7369, Johannes Sjölund
      * MCP65, 10de:0441, SPI OK, MSI MS-7369, Melchior Franz
      * MCP78S, 10de:075c, SPI OK, Asus M3N78 PRO, Brad Rogers
      * MCP78S, 10de:075c, SPI OK, Asus M3N78-VM, Marcel Partap
      * MCP78S, 10de:075c, SPI OK, Asus M4N78 PRO, Kimmo Vuorinen
      * MCP78S, 10de:075c, SPI OK, Asus M4N78 PRO, Vikram Ambrose
      * MCP79, 10de:0aad, SPI OK, Acer Aspire R3600, Andrew Morgan
      * MCP79, 10de:0aae, LPC ??, Lenovo Ideapad S12 laptop, Christian Schmitt
      * MCP79, 10de:0aae, SPI OK, Apple iMac9,1 Mac-F2218EA9, David "dledson"
      
      flashrom will refuse to write/erase for safety reasons if MCP6x/MCP7x
      SPI is detected.
      
      Corresponding to flashrom svn r1113.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      2f436168
  7. 21 Jul, 2010 1 commit
  8. 02 Jul, 2010 1 commit
  9. 25 Jun, 2010 1 commit
  10. 14 Jun, 2010 3 commits
  11. 07 Jun, 2010 2 commits
  12. 04 Jun, 2010 4 commits
  13. 31 May, 2010 1 commit
  14. 30 May, 2010 1 commit
  15. 26 May, 2010 1 commit
    • Carl-Daniel Hailfinger's avatar
      Handle the following architectures in generic flashrom code · cceafa2a
      Carl-Daniel Hailfinger authored
      
      - x86/x86_64 (little endian)
      - PowerPC (big endian)
      - MIPS (big+little endian)
      
      No changes to programmer specific code. This means any drivers with MMIO
      access will _not_ suddenly start working on big endian systems, but with
      this patch everything is in place to fix them.
      
      Compilation should work on all architectures listed above for all
      drivers except nic3com and nicrealtek which require PCI Port IO which is
      x86-only for now.
      
      To compile without nic3com and nicrealtek, run
      make distclean
      make CONFIG_NIC3COM=no CONFIG_NICREALTEK=no
      
      Thanks to Misha Manulis for testing early versions of this patch on
      PowerPC (big endian) with the satasii programmer.
      Thanks to Segher Boessenkool for design review and for helping out with
      compiler tricks and pointing out that we need eieio on PowerPC.
      Thanks to Vladimir Serbinenko for compile testing on MIPS (little
      endian) and PowerPC (big endian) and for runtime testing on MIPS (little
      endian).
      Thanks to David Daney for compile testing on MIPS (big endian).
      Thanks to Uwe Hermann for compile and runtime testing on x86_64.
      
      DO NOT RUN flashrom ON NON-X86 AFTER APPLYING THIS PATCH!
      This patch only provides the infrastructure, but does not convert any
      drivers, so flashrom will compile, but it won't do the right thing on
      non-x86 platforms.
      
      Corresponding to flashrom svn r1013.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarMisha Manulis <misha@manulis.com>
      Acked-by: default avatarVladimir 'phcoder/φ-coder' Serbinenko <phcoder@gmail.com>
      Acked-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      Acked-by: default avatarSegher Boessenkool <segher@kernel.crashing.org>
      cceafa2a
  16. 21 May, 2010 1 commit
  17. 19 May, 2010 1 commit
  18. 15 May, 2010 1 commit
  19. 25 Apr, 2010 1 commit
    • Rudolf Marek's avatar
      Fix the DOS port · 837d8107
      Rudolf Marek authored
      
      Now the DS selector limit is set to 4GB and all mmio accesses goes
      through DS, the 1:1 mapping is fixed so the _DS base is taken onto
      account. Plus is that the hwaccess.c needs no change and memcpy etc can
      be used on mmaped space.
      
      Corresponding to flashrom svn r995.
      
      Signed-off-by: Rudolf Marek <r.marek@assembler.cz> 
      Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      837d8107
  20. 27 Mar, 2010 1 commit
    • Carl-Daniel Hailfinger's avatar
      Add runtime and build environment info to the flashrom version message · 132e2ec6
      Carl-Daniel Hailfinger authored
      
      This patch uses code from Idwer Vollering and Maciej Pijanka.
      I've added Makefile support and compiler version printing and
      restructured the code heavily.
      The code prints runtime system information and buildtime libpci
      information (I couldn't find any runtime libpci version function). Due
      to our ability to cross-compile flashrom, buildtime system information
      from "uname -mrs" doesn't help diagnosing any problems. That's why only
      libpci and gcc are buildtime info, and the rest is runtime info.
      
      Examples:
      
      openSUSE 10.3, i686, gcc 4.2.1, with PCI support:
      flashrom v0.9.1-r971 on Linux 2.6.22.19-0.2-default (i686), built with
      libpci 2.2.6, GCC 4.2.1 (SUSE Linux)
      
      openSUSE 10.3, i686, llvm-clang-2.6.99svn97231, with PCI support:
      flashrom v0.9.1-r971 on Linux 2.6.22.19-0.2-default (i686), built with
      libpci 2.2.6, LLVM 1/clang 1
      
      openSUSE 11.1, x86_64, gcc 4.3.2, with PCI support:
      flashrom v0.9.1-r972 on Linux 2.6.27.29-0.1-default (x86_64), built with
      libpci 3.0.1, GCC 4.3.2 [gcc-4_3-branch revision 141291]
      
      openSUSE 10.3, i686, gcc 4.2.1, without PCI support:
      flashrom v0.9.1-r971 on Linux 2.6.22.19-0.2-default (i686), built with
      GCC 4.2.1 (SUSE Linux)
      
      Windows/cygwin, i686, gcc 4.3.4, without PCI support:
      flashrom v0.9.1-r973 on CYGWIN_NT-5.1 1.7.1(0.218/5/3) (i686), built
      with GCC 4.3.4 20090804 (release) 1
      
      FreeBSD 8.0, i386, gcc 4.2.1, with PCI support:
      flashrom v0.9.1-r973 on FreeBSD 8.0-RELEASE-p2 (i386), built with libpci
      3.1.7, GCC 4.2.1 20070719  [FreeBSD]
      
      Corresponding to flashrom svn r987.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Signed-off-by: default avatarIdwer Vollering <vidwer@gmail.com>
      Acked-by: default avatarMaciej Pijanka <maciej.pijanka@gmail.com>
      132e2ec6
  21. 22 Mar, 2010 1 commit
  22. 21 Mar, 2010 1 commit
  23. 19 Mar, 2010 1 commit
  24. 26 Feb, 2010 1 commit
  25. 21 Feb, 2010 1 commit
  26. 19 Feb, 2010 1 commit
  27. 14 Feb, 2010 1 commit
  28. 12 Feb, 2010 1 commit
  29. 28 Jan, 2010 1 commit
    • Sean Nelson's avatar
      Complete the addition of Feature Bits for all Jedec based chips · 35727f76
      Sean Nelson authored
      
      Add FEATURE_SHORT_RESET, FEATURE_LONG_RESET, and FEATURE_EITHER_RESET
      rewrite jedec functions to use getaddrmask
      
      convert write_49f002 to write_jedec_1
      convert write_w39v040c to write_jedec_1
      convert probe_w39v040c to probe_jedec
      convert write_49lf040 to write_jedec_1
      convert write_pm29f002 to write_jedec
      convert write_29f040b to write_jedec_1
      convert probe_29f040b to probe_jedec
      convert erase_chip_29f040b to erase_chip_block_jedec
      convert erase_sector_29f040b to erase_sector_jedec
      convert write_m29f002b to write_jedec
      convert write_m29f002t to write_jedec
      convert *_29f002 to *_jedec
      
      decouple unused files from Makefile:
      am29f040b.c
      en29f002a.c
      m29f002.c
      mx29f002.c
      pm29f002.c
      sst49lf040.c
      w39v040c.c
      w49f002u.c
      
      Corresponding to flashrom svn r886.
      Signed-off-by: default avatarSean Nelson <audiohacked@gmail.com>
      Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarAnders Juel Jensen <andersjjensen@gmail.com>
      35727f76
  30. 22 Jan, 2010 1 commit
  31. 21 Jan, 2010 1 commit
  32. 20 Jan, 2010 1 commit
    • Michael Karcher's avatar
      Matching board via DMI · 6701ee83
      Michael Karcher authored
      
      If a board is not uniquely identifiable by PCI device/subsystem IDs, a
      string can be specified to be looked for (case-sensitive, substring or
      anchored) for now in one of the following DMI items in addition to matching
      the PCI IDs:
       - System Manufacturer
       - System Product Name
       - System Version
       - Baseboard Manufacturer
       - Baseboard Product Name
       - Baseboard Version
      
      Strings are anchored re-like (^ at the beginning, $ at the end), but
      there are no plans to support full regular expressions and matched to any
      of the mentioned fields.
      
      The match is only made if DMI info is available and the string matches.
      If no DMI info is available and the PCI IDs match, a warning is printed
      as the board can not be autodetected.
      
      It's still open to discussion whether we add an DMI override switch to
      specify a string that will definitely match, and whether this switch is
      only used if no DMI is available or whether it overrides or augments DMI
      data.
      
      DMI data is currently read using dmidecode. This tool is available for
      all major platforms except MacOS X. I heard that there also is a MacOS X
      version of dmidecode, but didn't investigate that.
      
      Corresponding to flashrom svn r874.
      Signed-off-by: default avatarMichael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
      Acked-by: default avatarLuc Verhaegen <libv@skynet.be>
      Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      6701ee83
  33. 19 Jan, 2010 1 commit
    • Carl-Daniel Hailfinger's avatar
      Dediprog SF100 support · d38fac8c
      Carl-Daniel Hailfinger authored
      
      Reverse engineered from USB logs. I never touched that programmer nor
      did I ever see the associated software.
      Disabled by default until it is complete. The driver needs to be hooked
      up to the SPI core before it will do anything besides init and
      diagnostics.
      
      I successfully reverse engineered all commands, but some are still
      somewhat magic.
      Logs from "flashrom -p dediprog -V" are appreciated.
      
      Probe and read should work, erase/write is expected to explode.
      The programmer will set voltage to 0 on exit.
      
      Thanks a lot to Stefan Reinauer and Patrick Georgi for providing USB
      logs and for testing the result.
      
      Corresponding to flashrom svn r870.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarStefan Reinauer <stepan@coresystems.de>
      d38fac8c