1. 05 9月, 2014 5 次提交
  2. 21 5月, 2014 1 次提交
  3. 15 4月, 2014 6 次提交
  4. 13 3月, 2014 1 次提交
  5. 03 3月, 2014 1 次提交
    • Q
      spi: sirf: provide a shortcut for spi command-data mode · eeb71395
      Qipan Li 提交于
      there are many SPI clients which use the following protocal:
      step 1: send command bytes to clients(rx buffer is empty)
      step 2: send data bytes to clients or receive data bytes from
      clients.
      SiRFprimaII provides a shortcut for this kind of SPI transfer.
      when tx buf is less or equal than 4 bytes and rx buf is null
      in a transfer, we think it as 'command' data and use hardware
      command register for the transfer.
      here we can save some CPU loading than doing both tx and rx
      for a normal transfer.
      Signed-off-by: NQipan Li <Qipan.Li@csr.com>
      Signed-off-by: NBarry Song <Baohua.Song@csr.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      eeb71395
  6. 27 2月, 2014 1 次提交
  7. 24 2月, 2014 2 次提交
  8. 03 2月, 2014 1 次提交
  9. 17 1月, 2014 1 次提交
  10. 15 11月, 2013 1 次提交
  11. 07 10月, 2013 1 次提交
    • A
      spi: bitbang: Let spi_bitbang_start() take a reference to master · 702a4879
      Axel Lin 提交于
      Many drivers that use bitbang library have a leak on probe error paths.
      This is because once a spi_master_get() call succeeds, we need an additional
      spi_master_put() call to free the memory.
      
      Fix this issue by moving the code taking a reference to master to
      spi_bitbang_start(), so spi_bitbang_start() will take a reference to master on
      success. With this change, the caller is responsible for calling
      spi_bitbang_stop() to decrement the reference and spi_master_put() as
      counterpart of spi_alloc_master() to prevent a memory leak.
      
      So now we have below patten for drivers using bitbang library:
      
      probe:
      spi_alloc_master        -> Init reference count to 1
      spi_bitbang_start       -> Increment reference count
      remove:
      spi_bitbang_stop        -> Decrement reference count
      spi_master_put          -> Decrement reference count (reference count reaches 0)
      
      Fixup all users accordingly.
      Signed-off-by: NAxel Lin <axel.lin@ingics.com>
      Suggested-by: NUwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
      Acked-by: NUwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      702a4879
  12. 17 9月, 2013 1 次提交
    • A
      spi: bitbang: Let spi_bitbang_start() take a reference to master · 94c69f76
      Axel Lin 提交于
      Many drivers that use bitbang library have a leak on probe error paths.
      This is because once a spi_master_get() call succeeds, we need an additional
      spi_master_put() call to free the memory.
      
      Fix this issue by moving the code taking a reference to master to
      spi_bitbang_start(), so spi_bitbang_start() will take a reference to master on
      success. With this change, the caller is responsible for calling
      spi_bitbang_stop() to decrement the reference and spi_master_put() as
      counterpart of spi_alloc_master() to prevent a memory leak.
      
      So now we have below patten for drivers using bitbang library:
      
      probe:
      spi_alloc_master        -> Init reference count to 1
      spi_bitbang_start       -> Increment reference count
      remove:
      spi_bitbang_stop        -> Decrement reference count
      spi_master_put          -> Decrement reference count (reference count reaches 0)
      
      Fixup all users accordingly.
      Signed-off-by: NAxel Lin <axel.lin@ingics.com>
      Suggested-by: NUwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
      Acked-by: NUwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      94c69f76
  13. 29 8月, 2013 1 次提交
  14. 26 8月, 2013 1 次提交
  15. 23 8月, 2013 1 次提交
  16. 15 8月, 2013 1 次提交
    • J
      spi/sirf: simplify use of devm_ioremap_resource · 2479790b
      Julia Lawall 提交于
      Remove unneeded error handling on the result of a call to
      platform_get_resource when the value is passed to devm_ioremap_resource.
      
      Move the call to platform_get_resource adjacent to the call to
      devm_ioremap_resource to make the connection between them more clear.
      
      A simplified version of the semantic patch that makes this change is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression pdev,res,n,e,e1;
      expression ret != 0;
      identifier l;
      @@
      
      - res = platform_get_resource(pdev, IORESOURCE_MEM, n);
        ... when != res
      - if (res == NULL) { ... \(goto l;\|return ret;\) }
        ... when != res
      + res = platform_get_resource(pdev, IORESOURCE_MEM, n);
        e = devm_ioremap_resource(e1, res);
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Acked-by: NBarry Song <Baohua.Song@csr.com>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      2479790b
  17. 06 8月, 2013 1 次提交
  18. 15 7月, 2013 1 次提交
  19. 03 6月, 2013 1 次提交
    • A
      spi: sirf: avoid uninitialized-use warning · 804ae438
      Arnd Bergmann 提交于
      24778be2 "spi: convert drivers to use bits_per_word_mask"
      removed the "default" statement in the spi_sirfsoc_setup_transfer
      switch, causing a new warning:
      
      drivers/spi/spi-sirf.c: In function 'spi_sirfsoc_setup_transfer':
      arch/arm/include/asm/io.h:90:2: warning: 'rxfifo_ctrl' may be used uninitialized in this function [-Wmaybe-uninitialized]
        asm volatile("str %1, %0"
        ^
      drivers/spi/spi-sirf.c:364:19: note: 'rxfifo_ctrl' was declared here
        u32 txfifo_ctrl, rxfifo_ctrl;
                         ^
      
      The compiler has correctly identified that this case may happen,
      but since we know that things are horribly broken if bits_per_word
      is ever something other than the values we tested, calling BUG()
      is an appropriate action and tells the compiler that execution
      will not continue afterwards.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Mark Brown <broonie@kernel.org>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      804ae438
  20. 30 5月, 2013 1 次提交
  21. 21 5月, 2013 1 次提交
    • Q
      spi: sirf: fix the issue while transferring more than 256 words · 237ce466
      Qipan Li 提交于
      currently, spi irq handler only does rx processing and fetching data from rx
      fifo when "FRM_END" irq happens. FRM_END indicates one transfer completes. if
      rx size is less than 256, it works well.
      but the problem is that spi rx fifo size is only 256 bytes, then if data size
      of one frame is more than 256, before FRM_END comes, rx fifo will be filled with
      RXFIFO_OFLOW overflow interrupt, it will make us lose some data due to fifo
      overflow.
      Explicitly we need do fetch work from device rx fifo in irq handler not only in
      "FRM_END" irq but also in "THD_REACH" irq. THD_REACH means rx fifo has come to
      its threshold and will come to overflow if we don't take data from it in time.
      
      In this patch, we fix this issue. we take data from rx fifo when either FRM_END
      or RX_THD_REACH irq comes, we put data into tx fifo when either TX_FIFO_EMPTY
      or TX_THD_REACH irq comes.
      Signed-off-by: NQipan Li <Qipan.Li@csr.com>
      Signed-off-by: NZhiwu Song <Zhiwu.Song@csr.com>
      Signed-off-by: NBarry Song <Baohua.Song@csr.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      237ce466
  22. 13 5月, 2013 1 次提交
  23. 24 4月, 2013 1 次提交
  24. 05 2月, 2013 3 次提交
  25. 26 1月, 2013 1 次提交
  26. 08 12月, 2012 1 次提交
  27. 20 5月, 2012 1 次提交
  28. 10 3月, 2012 1 次提交