diff options
author | Thomas Abraham <thomas.abraham@linaro.org> | 2011-10-24 07:57:43 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-12-22 20:07:06 -0500 |
commit | fca3de6ab9bfc6f3b5beebd8f9792357c4e4d441 (patch) | |
tree | 00719e0bc9681aa7474a2079789364085a32a139 | |
parent | 4972a80e16a206149729be887285f4494b6826dc (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>
-rw-r--r-- | arch/arm/mach-exynos/Kconfig | 10 | ||||
-rw-r--r-- | arch/arm/mach-exynos/Makefile | 3 | ||||
-rw-r--r-- | arch/arm/mach-exynos/dma.c | 4 |
3 files changed, 16 insertions, 1 deletions
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 724ec0f3560d..68e4ab0c9375 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig | |||
@@ -57,6 +57,11 @@ config EXYNOS4_MCT | |||
57 | help | 57 | help |
58 | Use MCT (Multi Core Timer) as kernel timers | 58 | Use MCT (Multi Core Timer) as kernel timers |
59 | 59 | ||
60 | config EXYNOS4_DEV_DMA | ||
61 | bool | ||
62 | help | ||
63 | Compile in amba device definitions for DMA controller | ||
64 | |||
60 | config EXYNOS4_DEV_AHCI | 65 | config EXYNOS4_DEV_AHCI |
61 | bool | 66 | bool |
62 | help | 67 | help |
@@ -177,6 +182,7 @@ config MACH_SMDKV310 | |||
177 | select SAMSUNG_DEV_BACKLIGHT | 182 | select SAMSUNG_DEV_BACKLIGHT |
178 | select EXYNOS4_DEV_AHCI | 183 | select EXYNOS4_DEV_AHCI |
179 | select SAMSUNG_DEV_KEYPAD | 184 | select SAMSUNG_DEV_KEYPAD |
185 | select EXYNOS4_DEV_DMA | ||
180 | select EXYNOS4_DEV_PD | 186 | select EXYNOS4_DEV_PD |
181 | select SAMSUNG_DEV_PWM | 187 | select SAMSUNG_DEV_PWM |
182 | select EXYNOS4_DEV_SYSMMU | 188 | select EXYNOS4_DEV_SYSMMU |
@@ -197,6 +203,7 @@ config MACH_ARMLEX4210 | |||
197 | select S3C_DEV_HSMMC2 | 203 | select S3C_DEV_HSMMC2 |
198 | select S3C_DEV_HSMMC3 | 204 | select S3C_DEV_HSMMC3 |
199 | select EXYNOS4_DEV_AHCI | 205 | select EXYNOS4_DEV_AHCI |
206 | select EXYNOS4_DEV_DMA | ||
200 | select EXYNOS4_DEV_SYSMMU | 207 | select EXYNOS4_DEV_SYSMMU |
201 | select EXYNOS4_SETUP_SDHCI | 208 | select EXYNOS4_SETUP_SDHCI |
202 | help | 209 | help |
@@ -222,6 +229,7 @@ config MACH_UNIVERSAL_C210 | |||
222 | select S5P_DEV_MFC | 229 | select S5P_DEV_MFC |
223 | select S5P_DEV_ONENAND | 230 | select S5P_DEV_ONENAND |
224 | select S5P_DEV_TV | 231 | select S5P_DEV_TV |
232 | select EXYNOS4_DEV_DMA | ||
225 | select EXYNOS4_DEV_PD | 233 | select EXYNOS4_DEV_PD |
226 | select EXYNOS4_SETUP_FIMD0 | 234 | select EXYNOS4_SETUP_FIMD0 |
227 | select EXYNOS4_SETUP_I2C1 | 235 | select EXYNOS4_SETUP_I2C1 |
@@ -255,6 +263,7 @@ config MACH_NURI | |||
255 | select S5P_DEV_MFC | 263 | select S5P_DEV_MFC |
256 | select S5P_DEV_USB_EHCI | 264 | select S5P_DEV_USB_EHCI |
257 | select S5P_SETUP_MIPIPHY | 265 | select S5P_SETUP_MIPIPHY |
266 | select EXYNOS4_DEV_DMA | ||
258 | select EXYNOS4_DEV_PD | 267 | select EXYNOS4_DEV_PD |
259 | select EXYNOS4_SETUP_FIMC | 268 | select EXYNOS4_SETUP_FIMC |
260 | select EXYNOS4_SETUP_FIMD0 | 269 | select EXYNOS4_SETUP_FIMD0 |
@@ -287,6 +296,7 @@ config MACH_ORIGEN | |||
287 | select S5P_DEV_USB_EHCI | 296 | select S5P_DEV_USB_EHCI |
288 | select SAMSUNG_DEV_BACKLIGHT | 297 | select SAMSUNG_DEV_BACKLIGHT |
289 | select SAMSUNG_DEV_PWM | 298 | select SAMSUNG_DEV_PWM |
299 | select EXYNOS4_DEV_DMA | ||
290 | select EXYNOS4_DEV_PD | 300 | select EXYNOS4_DEV_PD |
291 | select EXYNOS4_SETUP_FIMD0 | 301 | select EXYNOS4_SETUP_FIMD0 |
292 | select EXYNOS4_SETUP_SDHCI | 302 | select EXYNOS4_SETUP_SDHCI |
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index 59069a35e40b..cb6fb0e8bcaf 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile | |||
@@ -13,7 +13,7 @@ obj- := | |||
13 | # Core support for EXYNOS4 system | 13 | # Core support for EXYNOS4 system |
14 | 14 | ||
15 | obj-$(CONFIG_ARCH_EXYNOS4) += cpu.o init.o clock.o irq-combiner.o setup-i2c0.o | 15 | obj-$(CONFIG_ARCH_EXYNOS4) += cpu.o init.o clock.o irq-combiner.o setup-i2c0.o |
16 | obj-$(CONFIG_ARCH_EXYNOS4) += irq-eint.o dma.o pmu.o | 16 | obj-$(CONFIG_ARCH_EXYNOS4) += irq-eint.o pmu.o |
17 | obj-$(CONFIG_CPU_EXYNOS4210) += clock-exynos4210.o | 17 | obj-$(CONFIG_CPU_EXYNOS4210) += clock-exynos4210.o |
18 | obj-$(CONFIG_SOC_EXYNOS4212) += clock-exynos4212.o | 18 | obj-$(CONFIG_SOC_EXYNOS4212) += clock-exynos4212.o |
19 | obj-$(CONFIG_PM) += pm.o | 19 | obj-$(CONFIG_PM) += pm.o |
@@ -44,6 +44,7 @@ obj-$(CONFIG_EXYNOS4_DEV_AHCI) += dev-ahci.o | |||
44 | obj-$(CONFIG_EXYNOS4_DEV_PD) += dev-pd.o | 44 | obj-$(CONFIG_EXYNOS4_DEV_PD) += dev-pd.o |
45 | obj-$(CONFIG_EXYNOS4_DEV_SYSMMU) += dev-sysmmu.o | 45 | obj-$(CONFIG_EXYNOS4_DEV_SYSMMU) += dev-sysmmu.o |
46 | obj-$(CONFIG_EXYNOS4_DEV_DWMCI) += dev-dwmci.o | 46 | obj-$(CONFIG_EXYNOS4_DEV_DWMCI) += dev-dwmci.o |
47 | obj-$(CONFIG_EXYNOS4_DEV_DMA) += dma.o | ||
47 | 48 | ||
48 | obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o | 49 | obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o |
49 | obj-$(CONFIG_EXYNOS4_SETUP_FIMD0) += setup-fimd0.o | 50 | obj-$(CONFIG_EXYNOS4_SETUP_FIMD0) += setup-fimd0.o |
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 | ||
141 | static int __init exynos4_dma_init(void) | 142 | static 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); |