From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Likely Subject: Re: [PATCH v3 6/6] ARM: EXYNOS4: Limit usage of pl330 device instance to non-dt build Date: Wed, 14 Sep 2011 10:26:33 -0600 Message-ID: <20110914162633.GL3134@ponder.secretlab.ca> 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> <1315852165-32402-7-git-send-email-thomas.abraham@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1315852165-32402-7-git-send-email-thomas.abraham@linaro.org> Sender: linux-samsung-soc-owner@vger.kernel.org To: Thomas Abraham Cc: devicetree-discuss@lists.ozlabs.org, 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 List-Id: devicetree@vger.kernel.org On Mon, Sep 12, 2011 at 11:59:25PM +0530, Thomas Abraham wrote: > 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 > --- > 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 > + Drop the #ifdef. of_have_populated_dt() has an empty stub for !CONFIG_OF. Otherwise looks good to me. Well done not breaking non-DT support when CONFIG_OF is enabled. :-) The other patches in this series look good to me too. g.