From patchwork Wed Sep 28 09:25: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: 4410 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 27D2423F6E for ; Wed, 28 Sep 2011 09:25:56 +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 1CD58A18B6A for ; Wed, 28 Sep 2011 09:25:56 +0000 (UTC) Received: by mail-fx0-f52.google.com with SMTP id 23so533530fxe.11 for ; Wed, 28 Sep 2011 02:25:56 -0700 (PDT) Received: by 10.223.94.134 with SMTP id z6mr14024675fam.8.1317201955997; Wed, 28 Sep 2011 02:25:55 -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.3.234 with SMTP id f10cs104890laf; Wed, 28 Sep 2011 02:25:55 -0700 (PDT) Received: by 10.151.20.12 with SMTP id x12mr8095142ybi.367.1317201954440; Wed, 28 Sep 2011 02:25:54 -0700 (PDT) Received: from mailout4.samsung.com (mailout4.samsung.com. [203.254.224.34]) by mx.google.com with ESMTP id g38si869593anh.40.2011.09.28.02.25.53; Wed, 28 Sep 2011 02:25:54 -0700 (PDT) Received-SPF: neutral (google.com: 203.254.224.34 is neither permitted nor denied by best guess record for domain of thomas.abraham@linaro.org) client-ip=203.254.224.34; Authentication-Results: mx.google.com; spf=neutral (google.com: 203.254.224.34 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 (mailout4.samsung.com [203.254.224.34]) by mailout4.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0LS8005XJ7I61YJ0@mailout4.samsung.com> for patches@linaro.org; Wed, 28 Sep 2011 18:25:52 +0900 (KST) X-AuditID: cbfee61a-b7cf1ae00000208e-f0-4e82e82022da Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (MMPCPMTA) with SMTP id C6.42.08334.028E28E4; Wed, 28 Sep 2011 18:25:52 +0900 (KST) Received: from localhost.localdomain ([107.108.73.37]) by mmp2.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTPA id <0LS8006X77IKS650@mmp2.samsung.com> for patches@linaro.org; Wed, 28 Sep 2011 18:25:52 +0900 (KST) From: Thomas Abraham To: devicetree-discuss@lists.ozlabs.org, vinod.koul@intel.com Cc: grant.likely@secretlab.ca, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, kgene.kim@samsung.com, robherring2@gmail.com, patches@linaro.org, jassisinghbrar@gmail.com, boojin.kim@samsung.com, Kyungmin Park Subject: [PATCH v5 6/6] ARM: EXYNOS4: Limit usage of pl330 device instance to non-dt build Date: Wed, 28 Sep 2011 14:55:25 +0530 Message-id: <1317201925-25148-7-git-send-email-thomas.abraham@linaro.org> X-Mailer: git-send-email 1.6.6.rc2 In-reply-to: <1317201925-25148-1-git-send-email-thomas.abraham@linaro.org> References: <1317201925-25148-1-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 Acked-by: Grant Likely --- arch/arm/mach-exynos4/Kconfig | 12 ++++++++++++ arch/arm/mach-exynos4/Makefile | 3 ++- arch/arm/mach-exynos4/dma.c | 4 ++++ 3 files changed, 18 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig index 0c964b7..b013907 100644 --- a/arch/arm/mach-exynos4/Kconfig +++ b/arch/arm/mach-exynos4/Kconfig @@ -26,6 +26,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 @@ -144,6 +149,7 @@ config MACH_SMDKV310 select EXYNOS4_DEV_PD select SAMSUNG_DEV_PWM select EXYNOS4_DEV_SYSMMU + select EXYNOS4_DEV_DMA select EXYNOS4_SETUP_FIMD0 select EXYNOS4_SETUP_I2C1 select EXYNOS4_SETUP_KEYPAD @@ -161,6 +167,7 @@ config MACH_ARMLEX4210 select S3C_DEV_HSMMC3 select EXYNOS4_DEV_AHCI select EXYNOS4_DEV_SYSMMU + select EXYNOS4_DEV_DMA select EXYNOS4_SETUP_SDHCI help Machine support for Samsung ARMLEX4210 based on EXYNOS4210 @@ -185,6 +192,7 @@ config MACH_UNIVERSAL_C210 select S5P_DEV_MFC select S5P_DEV_ONENAND select S5P_DEV_TV + select EXYNOS4_DEV_DMA select EXYNOS4_DEV_PD select EXYNOS4_SETUP_FIMD0 select EXYNOS4_SETUP_I2C1 @@ -211,6 +219,7 @@ config MACH_NURI select S3C_DEV_I2C5 select S5P_DEV_MFC select S5P_DEV_USB_EHCI + select EXYNOS4_DEV_DMA select EXYNOS4_DEV_PD select EXYNOS4_SETUP_FIMD0 select EXYNOS4_SETUP_I2C1 @@ -237,6 +246,7 @@ config MACH_ORIGEN select S5P_DEV_I2C_HDMIPHY select S5P_DEV_TV select S5P_DEV_USB_EHCI + select EXYNOS4_DEV_DMA select SAMSUNG_DEV_BACKLIGHT select SAMSUNG_DEV_PWM select EXYNOS4_SETUP_SDHCI @@ -256,6 +266,7 @@ config MACH_SMDK4212 select S3C_DEV_I2C7 select S3C_DEV_RTC select S3C_DEV_WDT + select EXYNOS4_DEV_DMA select SAMSUNG_DEV_BACKLIGHT select SAMSUNG_DEV_KEYPAD select SAMSUNG_DEV_PWM @@ -271,6 +282,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 9e8b7e5..d0c5706 100644 --- a/arch/arm/mach-exynos4/Makefile +++ b/arch/arm/mach-exynos4/Makefile @@ -13,7 +13,7 @@ obj- := # Core support for EXYNOS4 system obj-$(CONFIG_ARCH_EXYNOS4) += cpu.o init.o clock.o irq-combiner.o -obj-$(CONFIG_ARCH_EXYNOS4) += setup-i2c0.o irq-eint.o dma.o pmu.o +obj-$(CONFIG_ARCH_EXYNOS4) += setup-i2c0.o irq-eint.o pmu.o obj-$(CONFIG_CPU_EXYNOS4210) += clock-exynos4210.o obj-$(CONFIG_SOC_EXYNOS4212) += clock-exynos4212.o obj-$(CONFIG_PM) += pm.o sleep.o @@ -44,6 +44,7 @@ obj-$(CONFIG_EXYNOS4_DEV_AHCI) += dev-ahci.o obj-$(CONFIG_EXYNOS4_DEV_PD) += dev-pd.o obj-$(CONFIG_EXYNOS4_DEV_SYSMMU) += dev-sysmmu.o obj-$(CONFIG_EXYNOS4_DEV_DWMCI) += dev-dwmci.o +obj-$(CONFIG_EXYNOS4_DEV_DMA) += dma.o obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o obj-$(CONFIG_EXYNOS4_SETUP_FIMD0) += setup-fimd0.o diff --git a/arch/arm/mach-exynos4/dma.c b/arch/arm/mach-exynos4/dma.c index c3c0d17..921d31d 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,9 @@ struct amba_device exynos4_device_pdma1 = { static int __init exynos4_dma_init(void) { + if (of_have_populated_dt()) + return 0; + 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);