dmaengine: k3dma: Add support for dma-channel-mask
authorLi Yu <liyu65@hisilicon.com>
Thu, 24 Jan 2019 20:24:20 +0000 (12:24 -0800)
committerVinod Koul <vkoul@kernel.org>
Mon, 4 Feb 2019 09:00:57 +0000 (14:30 +0530)
commitc4994a98faf2797d8977c0d075222962d71c4112
tree56dd85d250b901851e95ce411bf7eed54e191f29
parent1200e070d6cc5ae4ab702c460b48fefc6668eafa
dmaengine: k3dma: Add support for dma-channel-mask

Add dma-channel-mask as a property for k3dma, it defines
available dma channels which a non-secure mode driver can use.

One sample usage of this is in Hi3660 SoC. DMA channel 0 is
reserved to lpm3, which is a coprocessor for power management. So
as a result, any request in kernel (which runs on main processor
and in non-secure mode) should start from at least channel 1.

Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: Tanglei Han <hantanglei@huawei.com>
Cc: Zhuangluan Su <suzhuangluan@hisilicon.com>
Cc: Ryan Grachek <ryan@edited.us>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: Guodong Xu <guodong.xu@linaro.org>
Cc: dmaengine@vger.kernel.org
Signed-off-by: Li Yu <liyu65@hisilicon.com>
[jstultz: Reworked to use a channel mask]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/k3dma.c