dmaengine: dw-edma: Remove runtime PM support
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Sat, 10 Sep 2022 05:47:00 +0000 (11:17 +0530)
committerVinod Koul <vkoul@kernel.org>
Thu, 29 Sep 2022 17:16:08 +0000 (22:46 +0530)
commita0188eb6e71c93ab7dd9bfa4305fac43c70db309
tree407908094cc4bb3a4ea276ff1a8dadf3f804f7f0
parent7ca68fa3c8ab83dfa539f16c5b4b1aec2e33320d
dmaengine: dw-edma: Remove runtime PM support

Currently, the dw-edma driver enables the runtime_pm for parent device
(chip->dev) and increments/decrements the refcount during alloc/free
chan resources callbacks.

This leads to a problem when the eDMA driver has been probed, but the
channels were not used. This scenario can happen when the DW PCIe driver
probes eDMA driver successfully, but the PCI EPF driver decides not to
use eDMA channels and use iATU instead for PCI transfers.

In this case, the underlying device would be runtime suspended due to
pm_runtime_enable() in dw_edma_probe() and the PCI EPF driver would have
no knowledge of it.

Ideally, the eDMA driver should not be the one doing the runtime PM of
the parent device. The responsibility should instead belong to the client
drivers like PCI EPF.

So let's remove the runtime PM support from eDMA driver.

Cc: Serge Semin <fancer.lancer@gmail.com>
Cc: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20220910054700.12205-1-manivannan.sadhasivam@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/dw-edma/dw-edma-core.c