An error occurred fetching the project authors.
  1. 23 Apr, 2015 1 commit
  2. 15 Mar, 2015 1 commit
  3. 10 Nov, 2014 1 commit
  4. 20 Oct, 2014 1 commit
  5. 03 Oct, 2014 1 commit
  6. 20 Sep, 2014 1 commit
  7. 10 Mar, 2014 1 commit
  8. 15 Nov, 2013 1 commit
  9. 10 Oct, 2013 1 commit
  10. 06 Oct, 2013 3 commits
    • Marek Vasut's avatar
      i2c: mxs: Fix PIO mode on i.MX23 · 19e221be
      Marek Vasut authored
      The i.MX23 I2C controller is also capable of PIO, but needs a little harder
      push to behave. The controller needs to be reset after every PIO/DMA operation
      for some reason, otherwise in rare cases, the controller can hang or emit
      bytes onto the bus.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      19e221be
    • Marek Vasut's avatar
      i2c: mxs: Rework the PIO mode operation · 29faeb38
      Marek Vasut authored
      Analyze and rework the PIO mode operation. The PIO mode operation
      was unreliable on MX28, by analyzing the bus with LA, the checks
      for when data were available or were to be sent were wrong.
      
      The PIO WRITE has to be completely reworked as it multiple problems.
      The MX23 datasheet helped here, see comments in the code for details.
      The problems boil down to:
      - RUN bit in CTRL0 must be set after DATA register was written
      - The PIO transfer must be 4 bytes long tops, otherwise use
        clock stretching.
      Both of these fixes are implemented.
      
      The PIO READ operation can only be done for up to four bytes as
      we are unable to read out the data from the DATA register fast
      enough.
      
      This patch also tries to document the investigation within the
      code.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      29faeb38
    • Juergen Beisert's avatar
      i2c: mxs: distinguish i.MX23 and i.MX28 based I2C controller · 616228a1
      Juergen Beisert authored
      It seems the PIO mode does not work, or at least not like it works
      on a i.MX28. Each short transfer needs about one second (without an
      error message) but does not send anything on the I2C lines.
      Signed-off-by: default avatarJuergen Beisert <jbe@pengutronix.de>
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      616228a1
  11. 23 Aug, 2013 1 commit
    • Wolfram Sang's avatar
      i2c: move OF helpers into the core · 687b81d0
      Wolfram Sang authored
      I2C of helpers used to live in of_i2c.c but experience (from SPI) shows
      that it is much cleaner to have this in the core. This also removes a
      circular dependency between the helpers and the core, and so we can
      finally register child nodes in the core instead of doing this manually
      in each driver. So, fix the drivers and documentation, too.
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      687b81d0
  12. 16 Aug, 2013 1 commit
    • Lothar Waßmann's avatar
      i2c: mxs: fix broken timing calculation · 869c6a3e
      Lothar Waßmann authored
      The timing calculation is rather bogus and gives extremely wrong
      results for higher frequencies (on an i.MX28). E.g. instead of 400 kHz
      I measured 770 kHz.
      
      Implement a calculation that adheres to the I2C spec and gives exact
      results for I2C frequencies from 12.56 kHz to 960 kHz.
      
      Also the bus_free and leadin parameters are programmed according to
      the I2C spec for standard and fast mode.
      
      This was tested on a Ka-Ro TX28 module with a DS1339, TSC2007, PCA9554
      and SGTL5000 client.
      Signed-off-by: default avatarLothar Waßmann <LW@KARO-electronics.de>
      Acked-by: default avatarMarek Vasut <marex@denx.de>
      [wsa: patch fixes whitespace issue, too]
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      869c6a3e
  13. 15 Aug, 2013 1 commit
  14. 05 Aug, 2013 1 commit
  15. 12 Jun, 2013 1 commit
  16. 15 Apr, 2013 2 commits
    • Lucas Stach's avatar
      i2c: mxs: do error checking and handling in PIO mode · 92b775c2
      Lucas Stach authored
      In PIO mode we can end up with the same errors as in DMA mode, but as IRQs
      are disabled there we have to check for them manually after each command.
      
      Also don't use the big controller reset hammer when receiving a NAK from a
      slave. It's sufficient to tell the controller to continue at a clean state.
      Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
      Tested-by: default avatarMarek Vasut <marex@denx.de>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      92b775c2
    • Lucas Stach's avatar
      i2c: mxs: remove races in PIO code · 535ebd21
      Lucas Stach authored
      This commit fixes the three following races in PIO code:
      
      - The CTRL0 register is racy in itself, when programming transfer state and
        run bit in the same cycle the hardware sometimes ends up using the state
        from the last transfer. Fix this by programming state in one cycle, make
        sure the write is flushed down APBX bus by reading back the reg and only
        then trigger the run bit.
      
      - Only clear the DMAREQ bit in DEBUG0 after the read/write to the data reg
        happened. Otherwise we are racing with the hardware about who touches
        the data reg first.
      
      - When checking for completion of a transfer it's not sufficient to check
        if the data engine finished, but also a check for i2c bus idle is needed.
        In PIO mode we are really fast to program the next transfer after a finished
        one, so the controller possibly tries to start a new transfer while the
        clkgen engine is still busy writing the NAK/STOP from the last transfer to
        the bus.
      Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      535ebd21
  17. 04 Apr, 2013 1 commit
  18. 02 Apr, 2013 1 commit
  19. 21 Feb, 2013 1 commit
  20. 10 Feb, 2013 1 commit
  21. 28 Jan, 2013 1 commit
    • Marek Vasut's avatar
      i2c: mxs: Add PIO and mixed-DMA support · fc91e401
      Marek Vasut authored
      Add support for the PIO mode and mixed PIO/DMA mode support. The mixed
      PIO/DMA is the default mode of operation. This shall leverage overhead
      that the driver creates due to setting up DMA descriptors even for very
      short transfers.
      
      The current boundary between PIO/DMA 8 bytes, transfers shorter than 8
      bytes are transfered by PIO, longer transfers use DMA. The performance
      of write transfers remains unchanged, while there is a minor improvement
      of read performance. Reading 16KB EEPROM with DMA-only operations gives
      a read speed of 39.5KB/s, while with then new mixed-mode the speed is
      blazing 40.6KB/s.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Signed-off-by: default avatarWolfram Sang <w.sang@pengutronix.de>
      fc91e401
  22. 22 Jan, 2013 1 commit
  23. 21 Jan, 2013 1 commit
    • Marek Vasut's avatar
      i2c: mxs: Fix misuse init_completion · 85de7fac
      Marek Vasut authored
      The init_completion() call does reinit not only the variable carrying
      the flag that the completion finished, but also initialized the
      waitqueue associated with the completion. On the contrary, the
      INIT_COMPLETION() call only reinits the flag.
      
      In case there was anything still stuck in the waitqueue, subsequent call
      to init_completion() would be able to create possible race condition. This
      patch uses the proper function and moves init_completion() into .probe() call
      of the driver, to be issued only once.
      
      Note that such scenario is impossible, since two threads can never enter the
      mxs_i2c_xfer_msg(), since whole this section is protected by mutex in I2C core.
      This by no means allows this issue to exit though.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Signed-off-by: default avatarWolfram Sang <w.sang@pengutronix.de>
      85de7fac
  24. 22 Dec, 2012 1 commit
  25. 22 Nov, 2012 3 commits
  26. 02 Nov, 2012 1 commit
    • Wolfram Sang's avatar
      i2c: mxs: remove broken PIOQUEUE support · 82fa63bd
      Wolfram Sang authored
      This I2C master can do DMA and PIOQUEUE (PIO with FIFO). Originally,
      only PIOQUEUE was supported and it had issues, then DMA support was added
      this cycle. The original intention was to keep PIOQUEUE since it has
      less overhead what is nice for small transfers. However, runtime
      switching between PIOQEUE and DMA depending on the transfer size never
      worked despite a lot of trying. Since PIOQUEUE mode itself was flaky
      (polling at places where interrupts failed to work) and the
      implementation also imposed a size limit for transfers, it is best to
      remove the support, so users don't fall over its limitations. It also
      makes the driver a lot cleaner and more robust. If somebody really wants
      less overhead, plain PIO mode could still be implemented with the
      addidtional advantage that this mode is also available on MX23, too.
      Signed-off-by: default avatarWolfram Sang <w.sang@pengutronix.de>
      Reviewed-by: default avatarMarek Vasut <marex@denx.de>
      82fa63bd
  27. 08 Oct, 2012 1 commit
  28. 12 Sep, 2012 1 commit
  29. 13 Jul, 2012 1 commit
  30. 09 Jul, 2012 1 commit
  31. 13 May, 2012 1 commit
  32. 12 May, 2012 1 commit
  33. 27 Apr, 2012 1 commit
    • Wolfram Sang's avatar
      i2c: mxs: disable QUEUE when sending is done · 1e4f0b82
      Wolfram Sang authored
      Since the last fixes to this driver ensure now the queue termination is
      done correctly, we can finally disable the queue after a transfer
      without problems. The gain is that it will only be reenabled after the
      next transfer is fully set up. Before, the queue was running all the
      time and if the setup of the next message was interrupted by another
      thread, an incomplete buffer could have been sent, padded with zeroes.
      Signed-off-by: default avatarWolfram Sang <w.sang@pengutronix.de>
      1e4f0b82
  34. 25 Apr, 2012 1 commit
  35. 20 Apr, 2012 1 commit