From: Lee Yongjin Date: Fri, 13 Sep 2013 05:39:19 +0000 (+0900) Subject: dma: pl330: support the arm_exynos_dma_mcode_ops in device tree X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e65af3ee24270a59fb800b34680ac20db55844e9;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git dma: pl330: support the arm_exynos_dma_mcode_ops in device tree This patch is dma micro code allocation in special memory area. Change-Id: Ic40c162e3a6ec317e70d8af675304304f2e5886c Signed-off-by: Lee Yongjin Signed-off-by: Seokju Yoon --- diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 719abf671257..86c3a449b2b1 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -1789,6 +1789,15 @@ static int dmac_alloc_resources(struct pl330_dmac *pl330) { int chans = pl330->pcfg.num_chan; int ret; + dma_addr_t addr; + + if (pl330->ddma.dev->of_node) { + addr = of_dma_get_mcode_addr(pl330->ddma.dev->of_node); + if (addr) { + set_dma_ops(pl330->ddma.dev, &arm_exynos_dma_mcode_ops); + pl330->mcode_bus = addr; + } + } /* * Alloc MicroCode buffer for 'chans' Channel threads. @@ -2850,7 +2859,6 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) pd = &pl330->ddma; pd->dev = &adev->dev; - pl330->mcbufsz = 0; /* get quirk */ for (i = 0; i < ARRAY_SIZE(of_quirks); i++)