From patchwork Mon Sep 12 18:29:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: thomas.abraham@linaro.org X-Patchwork-Id: 4034 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 0E60523EF7 for ; Mon, 12 Sep 2011 18:30:19 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id 03BB0A18332 for ; Mon, 12 Sep 2011 18:30:19 +0000 (UTC) Received: by mail-fx0-f52.google.com with SMTP id 23so2209234fxe.11 for ; Mon, 12 Sep 2011 11:30:18 -0700 (PDT) Received: by 10.223.5.76 with SMTP id 12mr367532fau.103.1315852218821; Mon, 12 Sep 2011 11:30:18 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.11.8 with SMTP id m8cs9569lab; Mon, 12 Sep 2011 11:30:16 -0700 (PDT) Received: by 10.150.169.1 with SMTP id r1mr500914ybe.103.1315852215323; Mon, 12 Sep 2011 11:30:15 -0700 (PDT) Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by mx.google.com with ESMTP id g20si8926010ybf.19.2011.09.12.11.30.14; Mon, 12 Sep 2011 11:30:15 -0700 (PDT) Received-SPF: neutral (google.com: 203.254.224.33 is neither permitted nor denied by best guess record for domain of thomas.abraham@linaro.org) client-ip=203.254.224.33; Authentication-Results: mx.google.com; spf=neutral (google.com: 203.254.224.33 is neither permitted nor denied by best guess record for domain of thomas.abraham@linaro.org) smtp.mail=thomas.abraham@linaro.org Received: from epcpsbgm1.samsung.com (mailout3.samsung.com [203.254.224.33]) by mailout3.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0LRF005STA20V590@mailout3.samsung.com> for patches@linaro.org; Tue, 13 Sep 2011 03:30:13 +0900 (KST) X-AuditID: cbfee61a-b7cf1ae00000208e-48-4e6e4fb51cc4 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (MMPCPMTA) with SMTP id 3F.8D.08334.5BF4E6E4; Tue, 13 Sep 2011 03:30:13 +0900 (KST) Received: from localhost.localdomain ([107.108.73.37]) by mmp1.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTPA id <0LRF00IKLA1VQ250@mmp1.samsung.com> for patches@linaro.org; Tue, 13 Sep 2011 03:30:13 +0900 (KST) From: Thomas Abraham To: devicetree-discuss@lists.ozlabs.org Cc: grant.likely@secretlab.ca, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, kgene.kim@samsung.com, robherring2@gmail.com, vinod.koul@intel.com, patches@linaro.org, jassisinghbrar@gmail.com, boojin.kim@samsung.com, Kyungmin Park Subject: [PATCH v3 6/6] ARM: EXYNOS4: Limit usage of pl330 device instance to non-dt build Date: Mon, 12 Sep 2011 23:59:25 +0530 Message-id: <1315852165-32402-7-git-send-email-thomas.abraham@linaro.org> X-Mailer: git-send-email 1.6.6.rc2 In-reply-to: <1315852165-32402-6-git-send-email-thomas.abraham@linaro.org> References: <1315852165-32402-1-git-send-email-thomas.abraham@linaro.org> <1315852165-32402-2-git-send-email-thomas.abraham@linaro.org> <1315852165-32402-3-git-send-email-thomas.abraham@linaro.org> <1315852165-32402-4-git-send-email-thomas.abraham@linaro.org> <1315852165-32402-5-git-send-email-thomas.abraham@linaro.org> <1315852165-32402-6-git-send-email-thomas.abraham@linaro.org> X-Brightmail-Tracker: AAAAAA== 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 Cc: Kyungmin Park Signed-off-by: Thomas Abraham --- arch/arm/mach-exynos4/Kconfig | 10 ++++++++++ arch/arm/mach-exynos4/Makefile | 3 ++- arch/arm/mach-exynos4/dma.c | 6 ++++++ 3 files changed, 18 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig index d4d401c..679ba48 100644 --- a/arch/arm/mach-exynos4/Kconfig +++ b/arch/arm/mach-exynos4/Kconfig @@ -21,6 +21,11 @@ config EXYNOS4_MCT help Use MCT (Multi Core Timer) as kernel timers +config EXYNOS4_DEV_DMA + bool + help + Compile in amba device definitions for DMA controller + config EXYNOS4_DEV_AHCI bool help @@ -129,6 +134,7 @@ config MACH_SMDKC210 select EXYNOS4_SETUP_FIMD0 select EXYNOS4_SETUP_I2C1 select EXYNOS4_SETUP_SDHCI + select EXYNOS4_DEV_DMA help Machine support for Samsung SMDKC210 @@ -153,6 +159,7 @@ config MACH_SMDKV310 select EXYNOS4_SETUP_I2C1 select EXYNOS4_SETUP_KEYPAD select EXYNOS4_SETUP_SDHCI + select EXYNOS4_DEV_DMA help Machine support for Samsung SMDKV310 @@ -191,6 +198,7 @@ config MACH_UNIVERSAL_C210 select EXYNOS4_SETUP_I2C3 select EXYNOS4_SETUP_I2C5 select EXYNOS4_SETUP_SDHCI + select EXYNOS4_DEV_DMA help Machine support for Samsung Mobile Universal S5PC210 Reference Board. @@ -215,6 +223,7 @@ config MACH_NURI select EXYNOS4_SETUP_USB_PHY select SAMSUNG_DEV_PWM select SAMSUNG_DEV_ADC + select EXYNOS4_DEV_DMA help Machine support for Samsung Mobile NURI Board. @@ -222,6 +231,7 @@ config MACH_EXYNOS4_DT bool "Samsung Exynos4 Machine using device tree" select CPU_EXYNOS4210 select USE_OF + select ARM_AMBA help Machine support for Samsung Exynos4 machine with device tree enabled. diff --git a/arch/arm/mach-exynos4/Makefile b/arch/arm/mach-exynos4/Makefile index d2bf5bf..a2f33dc 100644 --- a/arch/arm/mach-exynos4/Makefile +++ b/arch/arm/mach-exynos4/Makefile @@ -13,7 +13,8 @@ obj- := # Core support for EXYNOS4 system obj-$(CONFIG_CPU_EXYNOS4210) += cpu.o init.o clock.o irq-combiner.o -obj-$(CONFIG_CPU_EXYNOS4210) += setup-i2c0.o irq-eint.o dma.o pmu.o +obj-$(CONFIG_CPU_EXYNOS4210) += setup-i2c0.o irq-eint.o pmu.o +obj-$(CONFIG_EXYNOS4_DEV_DMA) += dma.o obj-$(CONFIG_PM) += pm.o sleep.o obj-$(CONFIG_CPU_IDLE) += cpuidle.o diff --git a/arch/arm/mach-exynos4/dma.c b/arch/arm/mach-exynos4/dma.c index c3c0d17..3203a31 100644 --- a/arch/arm/mach-exynos4/dma.c +++ b/arch/arm/mach-exynos4/dma.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -138,6 +139,11 @@ struct amba_device exynos4_device_pdma1 = { static int __init exynos4_dma_init(void) { +#ifdef CONFIG_OF + if (of_have_populated_dt()) + return 0; +#endif + dma_cap_set(DMA_SLAVE, exynos4_pdma0_pdata.cap_mask); dma_cap_set(DMA_CYCLIC, exynos4_pdma0_pdata.cap_mask); amba_device_register(&exynos4_device_pdma0, &iomem_resource);