1. 05 7月, 2013 1 次提交
  2. 04 4月, 2013 2 次提交
  3. 08 1月, 2013 1 次提交
    • F
      dma: mxs-dma: Fix build warnings with W=1 · f2ad6992
      Fabio Estevam 提交于
      Fix the following warnings when building with W=1 option:
      
      drivers/dma/mxs-dma.c: In function 'mxs_dma_alloc_chan_resources':
      drivers/dma/mxs-dma.c:368:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      drivers/dma/mxs-dma.c: In function 'mxs_dma_prep_slave_sg':
      drivers/dma/mxs-dma.c:481:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      drivers/dma/mxs-dma.c:494:3: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      drivers/dma/mxs-dma.c:515:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      drivers/dma/mxs-dma.c: In function 'mxs_dma_prep_dma_cyclic':
      drivers/dma/mxs-dma.c:563:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      f2ad6992
  4. 22 9月, 2012 1 次提交
  5. 14 9月, 2012 1 次提交
  6. 16 7月, 2012 1 次提交
  7. 07 6月, 2012 1 次提交
  8. 12 5月, 2012 4 次提交
  9. 11 5月, 2012 1 次提交
    • L
      dmaengine: Use dma_sg_len(sg) instead of sg->length · fdaf9c4b
      Lars-Peter Clausen 提交于
      sg->length may or may not contain the length of the dma region to transfer,
      depending on the architecture - dma_sg_len(sg) always will though. For the
      architectures which use the drivers modified by this patch it probably is the
      case that sg->length contains the dma transfer length. But to be consistent and
      future proof change them to use dma_sg_len.
      
      To quote Russel King:
      	sg->length is meaningless to something performing DMA.
      
      	In cases where sg_dma_len(sg) and sg->length are the same storage, then
      	there's no problem. But scatterlists _can_ (and one some architectures) do
      	split them - especially when you have an IOMMU which can allow you to
      	combine a scatterlist into fewer entries.
      
      	So, anything using sg->length for the size of a scatterlist's DMA transfer
      	_after_ a call to dma_map_sg() is almost certainly buggy.
      
      The patch has been generated using the following coccinelle patch:
      <smpl>
      @@
      struct scatterlist *sg;
      expression X;
      @@
      -sg[X].length
      +sg_dma_len(&sg[X])
      @@
      struct scatterlist *sg;
      @@
      -sg->length
      +sg_dma_len(sg)
      </smpl>
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NVinod Koul <vinod.koul@linux.intel.com>
      fdaf9c4b
  10. 20 4月, 2012 1 次提交
  11. 27 3月, 2012 2 次提交
    • H
      mxs-dma : rewrite the last parameter of mxs_dma_prep_slave_sg() · 921de864
      Huang Shijie 提交于
      [1] Background :
          The GPMI does ECC read page operation with a DMA chain consist of three DMA
          Command Structures. The middle one of the chain is used to enable the BCH,
          and read out the NAND page.
      
          The WAIT4END(wait for command end) is a comunication signal between
          the GPMI and MXS-DMA.
      
      [2] The current DMA code sets the WAIT4END bit at the last one, such as:
      
          +-----+               +-----+                      +-----+
          | cmd | ------------> | cmd | ------------------>  | cmd |
          +-----+               +-----+                      +-----+
                                                                ^
                                                                |
                                                                |
                                                           set WAIT4END here
      
          This chain works fine in the mx23/mx28.
      
      [3] But in the new GPMI version (used in MX50/MX60), the WAIT4END bit should
          be set not only at the last DMA Command Structure,
          but also at the middle one, such as:
      
          +-----+               +-----+                      +-----+
          | cmd | ------------> | cmd | ------------------>  | cmd |
          +-----+               +-----+                      +-----+
                                   ^                            ^
                                   |                            |
                                   |                            |
                              set WAIT4END here too        set WAIT4END here
      
          If we do not set WAIT4END, the BCH maybe stalls in "ECC reading page" state.
          In the next ECC write page operation, a DMA-timeout occurs.
          This has been catched in the MX6Q board.
      
      [4] In order to fix the bug, rewrite the last parameter of mxs_dma_prep_slave_sg(),
          and use the dma_ctrl_flags:
          ---------------------------------------------------------
            DMA_PREP_INTERRUPT : append a new DMA Command Structrue.
            DMA_CTRL_ACK       : set the WAIT4END bit for this DMA Command Structure.
          ---------------------------------------------------------
      
      [5] changes to the relative drivers:
          <1> For mxs-mmc driver, just use the new flags, do not change any logic.
          <2> For gpmi-nand driver, and use the new flags to set the DMA
              chain, especially for ecc read page.
      Acked-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NHuang Shijie <b32955@freescale.com>
      Acked-by: NVinod Koul <vinod.koul@linux.intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      921de864
    • H
      mxs-dma : move the mxs dma.h to a more common place · 39468604
      Huang Shijie 提交于
      Move the header to a more common place.
      The mxs dma engine is not only used in mx23/mx28, but also used
      in mx50/mx6q.  It will also be used in the future chips.
      
      Rename it to mxs-dma.h, and create a new folder include/linux/fsl/ to
      store the Freescale's header files.
      
      change mxs-dma driver, mxs-mmc driver, gpmi-nand driver, mxs-saif driver
      to the new header file.
      Acked-by: NShawn Guo <shawn.guo@linaro.org>
      Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NHuang Shijie <b32955@freescale.com>
      Acked-by: NVinod Koul <vinod.koul@linux.intel.com>
      Acked-by: NChris Ball <cjb@laptop.org>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      39468604
  12. 21 3月, 2012 1 次提交
  13. 13 3月, 2012 5 次提交
  14. 28 12月, 2011 1 次提交
  15. 24 12月, 2011 1 次提交
    • S
      dmaengine: add DMA_TRANS_NONE to dma_transfer_direction · 62268ce9
      Shawn Guo 提交于
      Before dma_transfer_direction was introduced to replace
      dma_data_direction, some dmaengine device uses DMA_NONE of
      dma_data_direction for some talk with its client drivers.
      The mxs-dma and its clients mxs-mmc and gpmi-nand are such case.
      
      This patch adds DMA_TRANS_NONE to dma_transfer_direction and
      migrate the DMA_NONE use in mxs-dma to it.
      
      It also fixes the compile warning below.
      
      CC      drivers/dma/mxs-dma.o
      drivers/dma/mxs-dma.c: In function ‘mxs_dma_prep_slave_sg’:
      drivers/dma/mxs-dma.c:420:16: warning: comparison between ‘enum dma_transfer_direction’ and ‘enum dma_data_direction’
      Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NVinod Koul <vinod.koul@linux.intel.com>
      62268ce9
  16. 23 12月, 2011 4 次提交
  17. 27 10月, 2011 1 次提交
  18. 16 8月, 2011 1 次提交
  19. 26 7月, 2011 2 次提交
  20. 14 7月, 2011 1 次提交
    • S
      dmaengine: mxs-dma: skip request_irq for NO_IRQ · 95bfea16
      Shawn Guo 提交于
      In general, the mxs-dma users get separate irq for each channel,
      but gpmi is special one which has only one irq shared by all gpmi
      channels.  It causes mxs_dma channel allocation function fail for
      all other gpmi channels except the first one calling into the
      function.
      
      The patch gets request_irq call skipped for NO_IRQ case, and leaves
      this gpmi specific quirk to gpmi driver to sort out.  It will fix
      above problem if gpmi driver sets chan_irq as gpmi irq for only one
      channel and NO_IRQ for all the rest channels.
      Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
      Cc: Vinod Koul <vinod.koul@intel.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      95bfea16
  21. 02 3月, 2011 1 次提交
    • S
      dmaengine: mxs-dma: add dma support for i.MX23/28 · a580b8c5
      Shawn Guo 提交于
      This patch adds dma support for Freescale MXS-based SoC i.MX23/28,
      including apbh-dma and apbx-dma.
      
      * apbh-dma and apbx-dma are supported in the driver as two mxs-dma
        instances.
      
      * apbh-dma is different between mx23 and mx28, hardware version
        register is used to differentiate.
      
      * mxs-dma supports pio function besides data transfer.  The driver
        uses dma_data_direction DMA_NONE to identify the pio mode, and
        steals sgl and sg_len to get pio words and numbers from clients.
      
      * mxs dmaengine has some very specific features, like sense function
        and the special NAND support (nand_lock, nand_wait4ready).  These
        are too specific to implemented in generic dmaengine driver.
      
      * The driver refers to imx-sdma and only a single descriptor is
        statically assigned to each channel.
      Signed-off-by: NShawn Guo <shawn.guo@freescale.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      a580b8c5