Thread (13 messages) 13 messages, 3 authors, 2011-09-14

[PATCH v3 6/6] ARM: EXYNOS4: Limit usage of pl330 device instance to non-dt build

From: Thomas Abraham <hidden>
Date: 2011-09-14 17:56:49
Also in: linux-devicetree, linux-samsung-soc

Hi Grant,

On 14 September 2011 21:56, Grant Likely [off-list ref] wrote:
On Mon, Sep 12, 2011 at 11:59:25PM +0530, Thomas Abraham wrote:
quoted
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 <redacted>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Thomas Abraham <redacted>
---
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. ?:-)
Ok. I will drop the #ifdef. Well, I actually learnt from you on not
breaking non-dt support because of your comments on my earlier patches
which did break non-dt support. Thanks.
The other patches in this series look good to me too.

g.
Thanks for your review. I will do the changes you have recommended for
the pl330 dt support patches and resubmit. I would like to add your
Ack to the patches when resubmitting.

Regards,
Thomas.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help