diff options
author | Vinod Koul <vinod.koul@intel.com> | 2017-05-04 13:38:10 +0300 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2017-05-04 13:38:10 +0300 |
commit | 3378e7a49fda9537d48953cd41cf7836c472ba2f (patch) | |
tree | 5e3fa26a0f83c91bf5115ad4295f74ac8ae8a056 /drivers | |
parent | dd2b9ff8a9f992b4c85842e8b7c0b6f08f9e7e7c (diff) | |
parent | dc7c733acb04307563da357af6118b12948c3f50 (diff) | |
download | linux-3378e7a49fda9537d48953cd41cf7836c472ba2f.tar.xz |
Merge branch 'topic/qcom' into for-linus
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/qcom/hidma.c | 15 | ||||
-rw-r--r-- | drivers/dma/qcom/hidma_ll.c | 6 |
2 files changed, 21 insertions, 0 deletions
diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c index 3c982c96b4b7..5072a7d306d4 100644 --- a/drivers/dma/qcom/hidma.c +++ b/drivers/dma/qcom/hidma.c @@ -865,6 +865,20 @@ bailout: return rc; } +static void hidma_shutdown(struct platform_device *pdev) +{ + struct hidma_dev *dmadev = platform_get_drvdata(pdev); + + dev_info(dmadev->ddev.dev, "HI-DMA engine shutdown\n"); + + pm_runtime_get_sync(dmadev->ddev.dev); + if (hidma_ll_disable(dmadev->lldev)) + dev_warn(dmadev->ddev.dev, "channel did not stop\n"); + pm_runtime_mark_last_busy(dmadev->ddev.dev); + pm_runtime_put_autosuspend(dmadev->ddev.dev); + +} + static int hidma_remove(struct platform_device *pdev) { struct hidma_dev *dmadev = platform_get_drvdata(pdev); @@ -908,6 +922,7 @@ MODULE_DEVICE_TABLE(of, hidma_match); static struct platform_driver hidma_driver = { .probe = hidma_probe, .remove = hidma_remove, + .shutdown = hidma_shutdown, .driver = { .name = "hidma", .of_match_table = hidma_match, diff --git a/drivers/dma/qcom/hidma_ll.c b/drivers/dma/qcom/hidma_ll.c index 6645bdf0d151..1530a661518d 100644 --- a/drivers/dma/qcom/hidma_ll.c +++ b/drivers/dma/qcom/hidma_ll.c @@ -499,6 +499,9 @@ int hidma_ll_enable(struct hidma_lldev *lldev) lldev->trch_state = HIDMA_CH_ENABLED; lldev->evch_state = HIDMA_CH_ENABLED; + /* enable irqs */ + writel(ENABLE_IRQS, lldev->evca + HIDMA_EVCA_IRQ_EN_REG); + return 0; } @@ -596,6 +599,9 @@ int hidma_ll_disable(struct hidma_lldev *lldev) lldev->trch_state = HIDMA_CH_SUSPENDED; lldev->evch_state = HIDMA_CH_SUSPENDED; + + /* disable interrupts */ + writel(0, lldev->evca + HIDMA_EVCA_IRQ_EN_REG); return 0; } |