[PATCH v3 6/6] ARM: EXYNOS4: Limit usage of pl330 device instance to non-dt build
Grant Likely
grant.likely at secretlab.ca
Wed Sep 14 12:26:33 EDT 2011
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 <kgene.kim at samsung.com>
> Cc: Kyungmin Park <kyungmin.park at samsung.com>
> Signed-off-by: Thomas Abraham <thomas.abraham at linaro.org>
> ---
> 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 <linux/dma-mapping.h>
> #include <linux/amba/bus.h>
> #include <linux/amba/pl330.h>
> +#include <linux/of.h>
>
> #include <asm/irq.h>
> #include <plat/devs.h>
> @@ -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.
More information about the linux-arm-kernel
mailing list