aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos/dma.c
diff options
context:
space:
mode:
authorThomas Abraham <thomas.abraham@linaro.org>2011-10-24 07:57:43 -0400
committerKukjin Kim <kgene.kim@samsung.com>2011-12-22 20:07:06 -0500
commitfca3de6ab9bfc6f3b5beebd8f9792357c4e4d441 (patch)
tree00719e0bc9681aa7474a2079789364085a32a139 /arch/arm/mach-exynos/dma.c
parent4972a80e16a206149729be887285f4494b6826dc (diff)
ARM: EXYNOS: Limit usage of pl330 device instance to non-dt build
The pl330 device instances and associated platform data is required only for non-device-tree builds. With device tree enabled, the data about the platform is obtained from the device tree. For images that include both dt and non-dt platforms, an addditional check is added to ensure that static amba device registrations is applicable to only non-dt platforms. Cc: Kukjin Kim <kgene.kim@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-exynos/dma.c')
-rw-r--r--arch/arm/mach-exynos/dma.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos/dma.c b/arch/arm/mach-exynos/dma.c
index 141093d60d0d..b10fcd270f07 100644
--- a/arch/arm/mach-exynos/dma.c
+++ b/arch/arm/mach-exynos/dma.c
@@ -24,6 +24,7 @@
24#include <linux/dma-mapping.h> 24#include <linux/dma-mapping.h>
25#include <linux/amba/bus.h> 25#include <linux/amba/bus.h>
26#include <linux/amba/pl330.h> 26#include <linux/amba/pl330.h>
27#include <linux/of.h>
27 28
28#include <asm/irq.h> 29#include <asm/irq.h>
29#include <plat/devs.h> 30#include <plat/devs.h>
@@ -140,6 +141,9 @@ struct amba_device exynos4_device_pdma1 = {
140 141
141static int __init exynos4_dma_init(void) 142static int __init exynos4_dma_init(void)
142{ 143{
144 if (of_have_populated_dt())
145 return 0;
146
143 dma_cap_set(DMA_SLAVE, exynos4_pdma0_pdata.cap_mask); 147 dma_cap_set(DMA_SLAVE, exynos4_pdma0_pdata.cap_mask);
144 dma_cap_set(DMA_CYCLIC, exynos4_pdma0_pdata.cap_mask); 148 dma_cap_set(DMA_CYCLIC, exynos4_pdma0_pdata.cap_mask);
145 amba_device_register(&exynos4_device_pdma0, &iomem_resource); 149 amba_device_register(&exynos4_device_pdma0, &iomem_resource);