From e65af3ee24270a59fb800b34680ac20db55844e9 Mon Sep 17 00:00:00 2001 From: Lee Yongjin Date: Fri, 13 Sep 2013 14:39:19 +0900 Subject: [PATCH] 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 --- drivers/dma/pl330.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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++) -- 2.20.1