1. 14 1月, 2015 1 次提交
  2. 17 11月, 2014 10 次提交
    • L
      dmaengine: at_xdmac: Add DMA_PRIVATE · fef4cbf2
      Ludovic Desroches 提交于
      same issue as commit 7f5ae355:
      "Without DMA_PRIVATE the driver is not able to allocate more than one channel.
      Since it uses dma_get_any_slave_channel that calls private_candidate, the
      second allocation fails at
      /* some channels are already publicly allocated */
      "
      Signed-off-by: NLudovic Desroches <ludovic.desroches@atmel.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      fef4cbf2
    • L
      dmaengine: at_xdmac: fix missing spin_unlock · 87809839
      Ludovic Desroches 提交于
      Lock taken when entering the function but unlock missing before it
      returns.
      Signed-off-by: NLudovic Desroches <ludovic.desroches@atmel.com>
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      87809839
    • C
      dmaengine: at_xdmac: fix a bug in transfer residue computation · 57819276
      Cyrille Pitchen 提交于
      The total size of the transfer was wrong in at_xdmac_prep_slave_sg()
      resulting in bad computation of the transfer residue by
      at_xdmac_tx_status().
      Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
      Signed-off-by: NLudovic Desroches <ludovic.desroches@atmel.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      57819276
    • C
      dmaengine: at_xdmac: fix software lockup at_xdmac_tx_status() · 4e097820
      Cyrille Pitchen 提交于
      According to the Atmel eXtended DMA controller datasheet, requesting a
      DMA transfer flush for a channel is only revelant when this transfer is
      source peripheral synchronized.
      
      So we have to check this condition before requesting a channel flush by
      writing the channel bit into the Global channel SoftWare Flush (GSWF)
      register then waiting for flush to complete by monitoring the end of
      Flush Interrupt Status (FIS) bit in the Channel Interrupt Status (CIS)
      register.
      
      Indeed, for non source peripheral synchronized transfer, writing the
      channel bit into the GSWF register does nothing. Especially, the FIS bit
      is never set into the CIS register. The former code looped forever
      waiting for this bit to be set.
      Signed-off-by: NCyrille Pitchen <cyrille.pitchen@atmel.com>
      Signed-off-by: NLudovic Desroches <ludovic.desroches@atmel.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      4e097820
    • L
      dmaengine: at_xdmac: remove chancnt affectation · 77e6c9bf
      Ludovic Desroches 提交于
      Remove chancnt affectation since it is done in dma_async_device_regiser.
      Signed-off-by: NLudovic Desroches <ludovic.desroches@atmel.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      77e6c9bf
    • L
      dmaengine: at_xdmac: prefer usage of readl/writel_relaxed · 6e5ae29b
      Ludovic Desroches 提交于
      _relaxed version of readl and writel are not implemented on all
      architecture so COMPILE_TEST has to be removed in order to not cause
      some build failures.
      Signed-off-by: NLudovic Desroches <ludovic.desroches@atmel.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      6e5ae29b
    • V
      dmaengine: xdmac: fix print warning on dma_addr_t variable · 82e24246
      Vinod Koul 提交于
      As documented in printk-formats.txt the dma_addr_t should be printed with
      %pad specfiers. This way it works on all archs.
      
       make.cross ARCH=s390
      
      All warnings:
      
         drivers/dma/at_xdmac.c: In function 'at_xdmac_prep_slave_sg':
      >> drivers/dma/at_xdmac.c:621:3: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat=]
            dev_dbg(chan2dev(chan),
            ^
      >> drivers/dma/at_xdmac.c:621:3: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=]
      >> drivers/dma/at_xdmac.c:628:4: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=]
             dev_dbg(chan2dev(chan),
             ^
         drivers/dma/at_xdmac.c: In function 'at_xdmac_prep_dma_cyclic':
      >> drivers/dma/at_xdmac.c:663:2: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat=]
           dev_dbg(chan2dev(chan), "%s: buf_addr=0x%08x, buf_len=%d, period_len=%d, dir=%s, flags=0x%lx\n",
           ^
      >> drivers/dma/at_xdmac.c:690:3: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=]
            dev_dbg(chan2dev(chan),
            ^
      >> drivers/dma/at_xdmac.c:709:3: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat=]
            dev_dbg(chan2dev(chan),
            ^
      >> drivers/dma/at_xdmac.c:709:3: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=]
      >> drivers/dma/at_xdmac.c:716:4: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=]
             dev_dbg(chan2dev(chan),
      
      >> drivers/dma/at_xdmac.c:731:2: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=]
           dev_dbg(chan2dev(chan),
           ^
         drivers/dma/at_xdmac.c: In function 'at_xdmac_prep_dma_memcpy':
      >> drivers/dma/at_xdmac.c:765:2: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat=]
           dev_dbg(chan2dev(chan), "%s: src=0x%08x, dest=0x%08x, len=%d, flags=0x%lx\n",
           ^
      >> drivers/dma/at_xdmac.c:765:2: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=]
            dev_dbg(chan2dev(chan), "%s: remaining_size=%u\n", __func__, remaining_size);
                                    ^
      >> drivers/dma/at_xdmac.c:845:3: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Wformat=]
            dev_dbg(chan2dev(chan),
            ^
      >> drivers/dma/at_xdmac.c:845:3: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=]
      >> drivers/dma/at_xdmac.c:852:4: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=]
             dev_dbg(chan2dev(chan),
             ^
         drivers/dma/at_xdmac.c: In function 'at_xdmac_tx_status':
      >> drivers/dma/at_xdmac.c:929:2: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Wformat=]
           dev_dbg(chan2dev(chan),
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      82e24246
    • V
      dmaengine: xdmac: fix print warning on size_t variable · c66ec04e
      Vinod Koul 提交于
      As documented in printk-formats.txt the size_t should be printed with
      %zu/%zd specfiers. This way it works on all archs.
      
      make.cross ARCH=avr32
      
      All warnings:
      
         drivers/dma/at_xdmac.c: In function 'at_xdmac_prep_dma_cyclic':
      >> drivers/dma/at_xdmac.c:663: warning: format '%d' expects type 'int', but argument 6 has type 'size_t'
      >> drivers/dma/at_xdmac.c:663: warning: format '%d' expects type 'int', but argument 7 has type 'size_t'
         drivers/dma/at_xdmac.c: In function 'at_xdmac_prep_dma_memcpy':
      >> drivers/dma/at_xdmac.c:765: warning: format '%d' expects type 'int', but argument 7 has type 'size_t'
      >> drivers/dma/at_xdmac.c:794: warning: format '%u' expects type 'unsigned int', but argument 5 has type 'size_t'
      >> drivers/dma/at_xdmac.c:815: warning: format '%u' expects type 'unsigned int', but argument 5 has type 'size_t'
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      c66ec04e
    • V
      dmaengine: at_xdmac: fix usage of read, write wrappers · 2abd4198
      Vinod Koul 提交于
      This driver uses read_relaxed and writel_relaxed to read, write to IO
      memory. the config defines COMPILE_TEST so gets compiled on different archs.
      This causes issue as few archs like x86 etc don't define it.
      So use readl/writel which is defined in all archs
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      2abd4198
    • K
      dmaengine: at_xdmac: fix semicolon.cocci warnings · 5ac7d582
      kbuild test robot 提交于
      drivers/dma/at_xdmac.c:702:3-4: Unneeded semicolon
      
       Removes unneeded semicolon.
      
      Generated by: scripts/coccinelle/misc/semicolon.cocci
      Signed-off-by: NFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      5ac7d582
  3. 06 11月, 2014 1 次提交