dmaengine: k3dma: Upgrade k3dma driver to support hisi_asp_dma hardware
authorYoulin Wang <wwx575822@notesmail.huawei.com>
Thu, 24 Jan 2019 20:24:18 +0000 (12:24 -0800)
committerVinod Koul <vkoul@kernel.org>
Mon, 4 Feb 2019 09:00:40 +0000 (14:30 +0530)
commitd4bdc39f5bd00a2fbeb0fbd29c9cb3b595df38a2
tree1afcae7e6d80cb771a3ac53aa02966e93a566d08
parente2d896c08ca3136f1f4c0cd225cdf09f87fa528b
dmaengine: k3dma: Upgrade k3dma driver to support hisi_asp_dma hardware

On the hi3660 hardware there are two (at least) DMA controllers,
the DMA-P (Peripheral DMA) and the DMA-A (Audio DMA). The
two blocks are similar, but have some slight differences. This
resulted in the vendor implementing two separate drivers, which
after review, they have been able to condense and re-use the
existing k3dma driver.

Thus, this patch adds support for the new "hisi-pcm-asp-dma-1.0"
compatible string in the binding.

One difference with the DMA-A controller, is that it does not
need to initialize a clock. So we skip this by adding and using
soc data flags.

After above this driver will support both k3 and hisi_asp dma
hardware.

Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: Zhuangluan Su <suzhuangluan@hisilicon.com>
Cc: Ryan Grachek <ryan@edited.us>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: dmaengine@vger.kernel.org
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Youlin Wang <wwx575822@notesmail.huawei.com>
Signed-off-by: Tanglei Han <hantanglei@huawei.com>
[jstultz: Reworked to use of_match_data, commit msg improvements]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/k3dma.c