1. 22 Nov, 2015 1 commit
  2. 21 Nov, 2015 1 commit
  3. 14 Nov, 2015 2 commits
    • Stefan Tauner's avatar
      Use nanosleep() instead of usleep() where available · 839db6dc
      Stefan Tauner authored
      
      Usleep() has been obsolete for quite a while.
      The only target that uses it without alternative is DOS.
      
      Corresponding to flashrom svn r1899.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      839db6dc
    • Gwenhael Goavec-Merou's avatar
      Add (implicit) support for musl libc · 8cd0c73f
      Gwenhael Goavec-Merou authored
      This is mostly achieved by fixing or refining the inclusion of header
      files and replacing glibc-specific ifdefs with more generic ones.
      
       - <sys/io.h>: Contains iopl(2) and x86 I/O port access functions (inb, outb etc).
                     Generally Linux-specific but also availble on debian/kFreeBSD.
                     Provided by glibc as well as musl and uclibc.
                     Include it if we are running Linux or if glibc is detected.
       - <sys/fcntl.h>: should be (and is) replaced by <fcntl.h> (without the
          			  "sys" prefix).
       - <linux/spi/spidev.h>: Does not include all necessary headers, namely
                               _IOC_SIZEBITS that is used in the definition of
                               SPI_MSGSIZE is not brought in via <linux/ioctl.h>
                               but instead we relied so far on glibc's including
                               it via <sys/ioctl.h>. Change that to explicitly
                               including <linux/ioctl.h>.
       - <endian.h>: Would also be avai...
      8cd0c73f
  4. 16 Oct, 2015 1 commit
  5. 05 Jul, 2015 1 commit
  6. 29 Jun, 2015 1 commit
  7. 28 Jun, 2015 1 commit
  8. 22 Jun, 2015 1 commit
  9. 20 Jun, 2015 1 commit
  10. 02 Jun, 2015 1 commit
  11. 23 May, 2015 1 commit
  12. 03 Apr, 2015 1 commit
  13. 01 Mar, 2015 2 commits
  14. 18 Feb, 2015 1 commit
    • Stefan Tauner's avatar
      Fix a number of problems in mstarddc_spi.c · adadca66
      Stefan Tauner authored
      
      Coverity has brought up the following problems:
      
      mstarddc_spi_send_command():
       - CID 1270702: bad comparison of malloced pointer 'cmd'.
       - CID 1270701: a NULL pointer dereference possible because of above.
      
      Simply checking the return value of malloc in a valid way fixes both problems.
      
      mstarddc_spi_init():
       - CID 1270699 and 1270700: Memory leak of i2c_device.
      
      This patch revamps the function in various ways to fix these issues and some
      other irritating bits.
      It reduces scopes of variables where possible, pushes the code towards our
      coding standards and introduces a label-based resource cleanup at the end.
      
      Corresponding to flashrom svn r1885.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarAlexandre Boeglin <alex@boeglin.org>
      adadca66
  15. 11 Feb, 2015 1 commit
  16. 10 Feb, 2015 1 commit
  17. 08 Feb, 2015 3 commits
    • Justin Chevrier's avatar
      Add support for the Microchip PICkit2 as an SPI programmer · 66e554bc
      Justin Chevrier authored
      This patch was inspired by the code in AVRDude (open source Atmel AVR
      programmer) to support the PICkit2 written by Doug Brown [1]. The
      Dediprog code in flashrom was used as the template for this code with
      some reference to the ft2232 code as well.
      
      [1] - https://github.com/steve-m/avrdude/blob/master/pickit2.c
      
      
      
      Corresponding to flashrom svn r1881.
      Signed-off-by: default avatarJustin Chevrier <jchevrier@gmail.com>
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      66e554bc
    • Stefan Tauner's avatar
      Refine version check of libpci function pci_get_dev · 56734503
      Stefan Tauner authored
      
      The way more elegant check for the header fails unfortunately on CentOS 4.9
      because PCI_LIB_VERSION is not defined at all although the domain parameter
      is present. This patch jumps through the hoops via an additional check in the
      Makefile to determine if the function accepts 5 parameters (new version) or
      not (old version).
      
      Corresponding to flashrom svn r1880.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      56734503
    • Stefan Tauner's avatar
      Add a bunch of new/tested stuff and various small changes 22 · 5c316f95
      Stefan Tauner authored
      
      Tested mainboards:
      OK:
       - AOpen UK79G-1394 (used in EZ18 barebones)
         Reported by Lawrence Gough
       - ASUS M4N78 SE
         Reported by Dima Veselov
       - ASUS P5LD2-VM
         Mark board enable as tested (reported by Dima Veselov)
       - GIGABYTE GA-970A-UD3P (rev. 2.0)
         Reported by trucmar on IRC
       - GIGABYTE GA-990FXA-UD3 (rev. 4.0)
         Reported by ROKO__ on IRC
       - GIGABYTE GA-H77-DS3H (rev. 1.1)
         Reported by Evgeniy Edigarev
       - GIGABYTE GA-P55-USB3 (rev. 2.0)
         Reported by Måns Thörnqvist
       - MSI MS-7817 (H81M-E33)
         Reported by Igor Kolker
      
      Chipsets:
       - Marked Intel Bay Trail (0x0f1c) as tested OK
         Reported by Antonio Ospite
       - Refine Intel IDs
          * Add IDs for Braswell
          * Add IDs for 9 Series PCHs (e.g. H97, Z97)
          * Rename Wellsburg devices slightly
      
      Flash chips:
       - Atmel AT25DF041A to PREW (+PREW)
         Reported by Tai-hwa Liang
       - Atmel AT26DF161 to PREW (+EW)
         Reported by Steve Shenton
       - Atmel AT45DB011D to PREW (+PREW)
         Reported by The Raven
       - Atmel AT45DB642D to PREW (+PREW)
         Reported by Mahesh Mokal
       - Eon EN25F32 to PREW (+PREW)
         Reported by Arman Khodabande
       - Eon EN25F40 to PREW (+REW)
         Reported by Jerrad Pierce
       - Eon EN25QH16 to PREW (+EW)
         Reported by Ben Johnson
       - GigaDevice GD25Q20(B) to PREW (+PREW)
         Reported by Gilles Aurejac
       - Macronix MX25U6435E/F to PR (+PR)
         Reported by Matt Taggart
       - PMC Pm25LV512(A) to PREW (+PREW)
         Reported by The Raven
       - SST SST39VF020 to PREW (+PREW)
         Reported by Urja Rannikko
       - Winbond W25Q40.V to PREW (+EW)
         Reported by Torben Nielsen
       - Add E variants of MX25Lx006 (MX25L2006E, MX25L4006E, MX25L8006E).
       - Add MX25L6465E variant.
       - There was never a MX25L12805 AFAICT.
       - Split MX25L12805 from models with the same ID but an additional 32 kB
         eraser: MX25L12835F/MX25L12845E/MX25L12865E.
       - Add a bunch of ST parallel NOR flash chip IDs.
      
      Miscellaneous:
       - Whitelist ThinkPad X200.
       - Constify master parameter of register_master().
       - Remove FEATURE_BYTEWRITES because it was never used at all.
       - Refine hwseq messages and make them less prominent.
       - Fix the yet unused PRIxCHIPADDR format string thingy.
       - Fix copy&paste error in spi_prettyprint_status_register_bp().
         Spotted by Pablo Cases.
       - Add an additional SMBus controller revision to identify another Yangtze
         model. Thanks to Dan Christensen for reporting this issue.
       - dediprog: add missing include for stdlib.h.
         This fixes (at least) building on FreeBSD and DragonflyBSD with gcc.
       - Remove references to struct pci_filter from programmer.h.
         It is only needed in internal.c where it has a complete type. Having
         it in programmer.h provokes a warning by some old versions of gcc.
       - Tiny other stuff.
      
      Corresponding to flashrom svn r1879.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      5c316f95
  18. 27 Jan, 2015 1 commit
  19. 26 Jan, 2015 2 commits
  20. 25 Jan, 2015 4 commits
  21. 24 Jan, 2015 2 commits
  22. 19 Jan, 2015 1 commit
  23. 10 Jan, 2015 7 commits
  24. 05 Jan, 2015 1 commit
  25. 20 Dec, 2014 1 commit
    • Alexandre Boeglin's avatar
      Add support for the MSTAR I2C ISP protocol · 80e64715
      Alexandre Boeglin authored
      Basically, among other chips, MSTAR manufactures SoCs that equip TV sets
      and computer screens, and it seems that all of their products use the
      same in-system programming protocol. Basically, they use the DDC channel
      of VGA or DVI connectors, which is actually an I2C bus, to encapsulate
      SPI frames (the flash chip is connected to the SoC through an SPI bus).
      
      I wrote this patch since the screen I bought had a software bug, and the
      manufacturer only released a new firmware binary, but no tool or
      instructions on flashing it.
      
      More details can be found here:
      http://boeglin.org/blog/index.php?entry=Flashing-a-BenQ-Z-series-for-free(dom)
      
      
      
      I only read code from Linux kernel archives published by Acer to figure
      out the protocol (for a touchscreen controller and an NFC chip, both by
      MSTAR, that share the same ISP protocol), so I don't think there are
      any legal problems with it.
      
      Compilation is currently disabled by default in the Makefile.
      If in doubt, additional Makefile bugs were added by Stefan.
      
      Corresponding to flashrom svn r1860.
      Signed-off-by: default avatarAlexandre Boeglin <alex@boeglin.org>
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      80e64715