1. 14 Nov, 2015 1 commit
    • 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 available in musl but there is no easy way
                     to detect it so we do not try yet.
      
      Corresponding to flashrom svn r1898.
      
      The bug report and initial patches were
      Signed-off-by: default avatarGwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      8cd0c73f
  2. 16 Oct, 2015 1 commit
  3. 05 Jul, 2015 1 commit
  4. 29 Jun, 2015 1 commit
  5. 28 Jun, 2015 1 commit
  6. 22 Jun, 2015 1 commit
  7. 20 Jun, 2015 1 commit
  8. 02 Jun, 2015 1 commit
  9. 23 May, 2015 1 commit
  10. 03 Apr, 2015 1 commit
  11. 01 Mar, 2015 2 commits
  12. 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
  13. 11 Feb, 2015 1 commit
  14. 10 Feb, 2015 1 commit
  15. 08 Feb, 2015 3 commits
  16. 27 Jan, 2015 1 commit
  17. 26 Jan, 2015 2 commits
  18. 25 Jan, 2015 4 commits
  19. 24 Jan, 2015 2 commits
  20. 19 Jan, 2015 1 commit
  21. 10 Jan, 2015 7 commits
  22. 05 Jan, 2015 1 commit
  23. 20 Dec, 2014 2 commits
  24. 12 Dec, 2014 1 commit
    • Jernej Škrabec's avatar
      Add support for Spansion S25FL127S · e814a9b6
      Jernej Škrabec authored
      
      This flash chip can be configured (one time) to use 64 KiB or 256 KiB sectors.
      Additionally, in the 64 KiB mode it supports 16 4 KiB sub-sectors that can be
      (one time) programmed to be on the top or bottom of the device. The sub-sectors
      can be erased with the 0x20 opcode but because this opcode does not work
      with the remaining sectors and flashrom can not cope with that the 0x20
      opcode is not supported yet.
      
      This patch adds two definitions, one for the 64 KiB and 256 KiB configuration
      respectively. The device also shares the RDID with the various S25FL128
      devices so we have to increase the maximum number of successfully probed
      chips to 8.
      
      The 64 KiB mode was tested on real hardware.
      
      Corresponding to flashrom svn r1858.
      Signed-off-by: default avatarJernej Škrabec <jernej.skrabec@planet.si>
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      e814a9b6
  25. 07 Dec, 2014 1 commit