WSL2-Linux-Kernel/drivers/dma/qcom
Stephan Gerhold 9502ffcda0 dmaengine: qcom: bam_dma: Add "powered remotely" mode
In some configurations, the BAM DMA controller is set up by a remote
processor and the local processor can simply start making use of it
without setting up the BAM. This is already supported using the
"qcom,controlled-remotely" property.

However, for some reason another possible configuration is that the
remote processor is responsible for powering up the BAM, but we are
still responsible for initializing it (e.g. resetting it etc).

This configuration is quite challenging to handle properly because
the power control is handled through separate channels
(e.g. device-specific SMSM interrupts / smem-states). Great care
must be taken to ensure the BAM registers are not accessed while
the BAM is powered off since this results in a bus stall.

Attempt to support this configuration with minimal device-specific
code in the bam_dma driver by tracking the number of requested
channels. Consumers of DMA channels are responsible to only request
DMA channels when the BAM was powered on by the remote processor,
and to release them before the BAM is powered off.

When the first channel is requested the BAM is initialized (reset)
and it is also put into reset when the last channel was released.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
Link: https://lore.kernel.org/r/20211018102421.19848-3-stephan@gerhold.net
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2021-10-28 22:42:30 +05:30
..
Kconfig dmaengine: QCOM_HIDMA_MGMT depends on HAS_IOMEM 2021-05-31 09:44:14 +05:30
Makefile dmaengine: qcom: Add GPI dma driver 2020-11-24 21:42:07 +05:30
bam_dma.c dmaengine: qcom: bam_dma: Add "powered remotely" mode 2021-10-28 22:42:30 +05:30
gpi.c dmaengine: qcom: gpi: Add SM8250 compatible 2021-06-16 16:06:10 +05:30
hidma.c dmaengine: qcom_hidma: remove unused code 2021-04-12 17:14:09 +05:30
hidma.h dmaengine updates for v5.3-rc1 2019-07-17 09:55:43 -07:00
hidma_dbg.c dmaengine updates for v5.3-rc1 2019-07-17 09:55:43 -07:00
hidma_ll.c dmaengine: qcom: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:07 +05:30
hidma_mgmt.c dmaengine: qcom_hidma: comment platform_driver_register call 2021-05-13 18:32:29 +02:00
hidma_mgmt.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
hidma_mgmt_sys.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
qcom_adm.c dmaengine: qcom: Fix ADM driver kerneldoc markup 2020-12-11 19:06:47 +05:30