summaryrefslogtreecommitdiffstats
path: root/drivers/dma/img-mdc-dma.c
Commit message (Collapse)AuthorAgeFilesLines
* dmaengine: img-mdc: remove unused ‘prev_phys’Vinod Koul2016-12-121-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | In mdc_prep_dma_memcpy(), mdc_prep_dma_cyclic() and mdc_prep_slave_sg() variable ‘prev_phys’ is initialized but never used, which leads to warning with W=1 drivers/dma/img-mdc-dma.c: In function ‘mdc_prep_dma_memcpy’: drivers/dma/img-mdc-dma.c:295:24: warning: variable ‘prev_phys’ set but not used [-Wunused-but-set-variable] dma_addr_t curr_phys, prev_phys; drivers/dma/img-mdc-dma.c: In function ‘mdc_prep_dma_cyclic’: drivers/dma/img-mdc-dma.c:378:24: warning: variable ‘prev_phys’ set but not used [-Wunused-but-set-variable] dma_addr_t curr_phys, prev_phys; drivers/dma/img-mdc-dma.c: In function ‘mdc_prep_slave_sg’: drivers/dma/img-mdc-dma.c:461:24: warning: variable ‘prev_phys’ set but not used [-Wunused-but-set-variable] dma_addr_t curr_phys, prev_phys; So remove it. Cc: Damien.Horsley <Damien.Horsley@imgtec.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* dmaengine: img-mdc: fix a possible NULL dereferenceLABBE Corentin2016-08-221-3/+1
| | | | | | | | | | | | | | | of_match_device could return NULL, and so cause a NULL pointer dereference later at line 850: mdma->soc = match->data; For fixing this problem, we use of_device_get_match_data(), this will simplify the code a little by using a standard function for getting the match data. This was reported by coverity (CID 1324134) Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* dmaengine: mdc: Correct terminate_all handlingDamien.Horsley2015-12-181-26/+51
| | | | | | | | | | | | | | | | | | | Use of the CANCEL bit in mdc_terminate_all creates an additional 'command done' to appear in the registers (in addition to an interrupt). In addition, there is a potential race between mdc_terminate_all and the irq handler if a transfer completes at the same time as the terminate all (presently this results in an inappropriate warning). To handle these issues, any outstanding 'command done' events are cleared during mdc_terminate_all and the irq handler takes no action when there are no new 'command done' events. Signed-off-by: Damien.Horsley <Damien.Horsley@imgtec.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* dmaengine: img-mdc: Remove unnecessary synchronize_irq() before devm_free_irq()Lars-Peter Clausen2015-12-051-1/+0
| | | | | | | | | | | | | | | | | | | | Calling synchronize_irq() right before devm_free_irq() is quite useless. On one hand the IRQ can easily fire again before devm_free_irq() is entered, on the other hand devm_free_irq() itself calls synchronize_irq() internally (in a race condition free way), before any state associated with the IRQ is freed. Patch was generated using the following semantic patch: // <smpl> @@ expression irq, dev; @@ -synchronize_irq(irq); devm_free_irq(dev, irq, ...); // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* dmaengine: img-mdc: remove device_alloc_chan_resources handlerVinod Koul2015-03-181-6/+0
| | | | | | | | Now that device_alloc_chan_resources handler in not mandatory, remove dummy implementations Acked-by: Andrew Bresticker <abrestic@chromium.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* dmaengine: Add driver for IMG MDCAndrew Bresticker2015-02-041-0/+1011
Add support for the IMG Multi-threaded DMA Controller (MDC) found on certain IMG SoCs. Currently this driver supports the variant present on the MIPS-based Pistachio SoC. Signed-off-by: Andrew Bresticker <abrestic@chromium.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
OpenPOWER on IntegriCloud