1. 05 7月, 2013 8 次提交
  2. 12 6月, 2013 2 次提交
    • L
      dma: of: Remove check on always true condition · 8552bb4f
      Lars-Peter Clausen 提交于
      Both of_dma_nbcells field of the of_dma_controller and the args_count field of
      the dma_spec are initialized by parsing the #dma-cells attribute of their device
      tree node. So if the device tree nodes of a DMA controller and the dma_spec
      match this means that of_dma_nbcells and args_count will also match. So the
      second test in the of_dma_find_controller loop is redundant because given the
      first test yields true the second test will also yield true. So we can safely
      remove the test whether of_dma_nbcells matches args_count. Since this was the
      last user of the of_dma_nbcells field we can remove it altogether.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      8552bb4f
    • L
      dma: of: Remove restriction that #dma-cells can't be 0 · ff0e0f4f
      Lars-Peter Clausen 提交于
      There is no sensible reason why #dma-cells shouldn't be allowed to be 0. It is
      completely up to the DMA controller how many additional parameters, besides the
      phandle, it needs to identify a channel. E.g. for DMA controller with only one
      channel or for DMA controllers which don't have a restriction on which channel
      can be used for which peripheral it completely legitimate to not require any
      additional parameters.
      
      Also fixes the following warning:
      	drivers/dma/of-dma.c: In function 'of_dma_controller_register':
      	drivers/dma/of-dma.c:67:7: warning: 'nbcells' may be used uninitialized in this function
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      ff0e0f4f
  3. 08 6月, 2013 1 次提交
  4. 27 5月, 2013 1 次提交
  5. 18 5月, 2013 1 次提交
  6. 14 5月, 2013 1 次提交
  7. 03 5月, 2013 3 次提交
    • L
      dma: tegra: implement suspend/resume callbacks · 3065c194
      Laxman Dewangan 提交于
      Implement suspend/resume callbacks to store APB DMA channel's
      register on suspend and restore APB DMA channel's register on
      resume.
      Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      3065c194
    • L
      dma:of: Use a mutex to protect the of_dma_list · de61608a
      Lars-Peter Clausen 提交于
      Currently the OF DMA code uses a spin lock to protect the of_dma_list from
      concurrent access and a per controller reference count to protect the controller
      from being freed while a request operation is in progress. If
      of_dma_controller_free() is called for a controller who's reference count is not
      zero it will return -EBUSY and not remove the controller. This is fine up until
      here, but leaves the question what the caller of of_dma_controller_free() is
      supposed to do if the controller couldn't be freed.  The only viable solution
      for the caller is to spin on of_dma_controller_free() until it returns success.
      E.g.
      
      	do {
      		ret = of_dma_controller_free(dev->of_node)
      	} while (ret != -EBUSY);
      
      This is rather ugly and unnecessary and none of the current users of
      of_dma_controller_free() check it's return value anyway. Instead protect the
      list by a mutex. The mutex will be held as long as a request operation is in
      progress. So if of_dma_controller_free() is called while a request operation is
      in progress it will be put to sleep and only wake up once the request operation
      has finished.
      
      This means that it is no longer possible to register or unregister OF DMA
      controllers from a context where it's not possible to sleep. But I doubt that
      we'll ever need this.
      
      Also rename of_dma_get_controller back to of_dma_find_controller.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      de61608a
    • L
      dma: of: Fix of_node reference leak · f22eb140
      Lars-Peter Clausen 提交于
      of_dma_request_slave_channel() currently does not drop the reference to the
      dma_spec of_node if no DMA controller matching the of_node could be found. This
      patch fixes it by always calling of_node_put().
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NJon Hunter <jon-hunter@ti.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      f22eb140
  8. 02 5月, 2013 1 次提交
  9. 30 4月, 2013 3 次提交
  10. 18 4月, 2013 1 次提交
  11. 16 4月, 2013 8 次提交
  12. 15 4月, 2013 10 次提交