[PATCH 0/3] davinci: device tree - small simplifications

STALE3762d

6 messages, 2 authors, 2016-04-12 · open the first message on its own page

[PATCH 0/3] davinci: device tree - small simplifications

From: david@lechnology.com (David Lechner)
Date: 2016-02-29 22:33:23

I have been trying out device tree with mach-davinci. Here are some small
simplifications that I have made.

I would also like to know if anyone is working on getting the clocks and related
soc devices (pll and psc) into device tree as well.

David Lechner (3):
  arm: davinci: simplify call to of populate
  arm: davinci: remove unused DA8XX_NUM_UARTS
  arm: davinci: use IRQCHIP_DECLARE for cp_intc

 arch/arm/mach-davinci/cp_intc.c  |  3 +++
 arch/arm/mach-davinci/da8xx-dt.c | 17 +----------------
 2 files changed, 4 insertions(+), 16 deletions(-)

-- 
1.9.1

[PATCH 1/3] arm: davinci: simplify call to of populate

From: david@lechnology.com (David Lechner)
Date: 2016-02-29 22:33:24

Take advantage of of_platoform_default_populate convience function.

Signed-off-by: David Lechner <david@lechnology.com>
---
 arch/arm/mach-davinci/da8xx-dt.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index c4b5808..358ab34 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -54,9 +54,7 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
 
 static void __init da850_init_machine(void)
 {
-	of_platform_populate(NULL, of_default_bus_match_table,
-			     da850_auxdata_lookup, NULL);
-
+	of_platform_default_populate(NULL, da850_auxdata_lookup, NULL);
 }
 
 static const char *const da850_boards_compat[] __initconst = {
-- 
1.9.1

[PATCH 2/3] arm: davinci: remove unused DA8XX_NUM_UARTS

From: david@lechnology.com (David Lechner)
Date: 2016-02-29 22:33:25

DA8X_NUM_UARTS not used in the code anywhere and should be determined
by DT anyway.

Signed-off-by: David Lechner <david@lechnology.com>
---
 arch/arm/mach-davinci/da8xx-dt.c | 2 --
 1 file changed, 2 deletions(-)
diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index 358ab34..08880e7 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -18,8 +18,6 @@
 #include "cp_intc.h"
 #include <mach/da8xx.h>
 
-#define DA8XX_NUM_UARTS	3
-
 static const struct of_device_id const da8xx_irq_match[] __initconst = {
 	{ .compatible = "ti,cp-intc", .data = cp_intc_of_init, },
 	{ }
-- 
1.9.1

[PATCH 3/3] arm: davinci: use IRQCHIP_DECLARE for cp_intc

From: david@lechnology.com (David Lechner)
Date: 2016-02-29 22:33:26

Remove boilerplate code by using IRQCHIP_DECLARE macro.

Signed-off-by: David Lechner <david@lechnology.com>
---
 arch/arm/mach-davinci/cp_intc.c  |  3 +++
 arch/arm/mach-davinci/da8xx-dt.c | 11 -----------
 2 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/arch/arm/mach-davinci/cp_intc.c b/arch/arm/mach-davinci/cp_intc.c
index 1a68d24..94085d2 100644
--- a/arch/arm/mach-davinci/cp_intc.c
+++ b/arch/arm/mach-davinci/cp_intc.c
@@ -12,6 +12,7 @@
 #include <linux/export.h>
 #include <linux/init.h>
 #include <linux/irq.h>
+#include <linux/irqchip.h>
 #include <linux/irqdomain.h>
 #include <linux/io.h>
 #include <linux/of.h>
@@ -210,3 +211,5 @@ void __init cp_intc_init(void)
 {
 	cp_intc_of_init(NULL, NULL);
 }
+
+IRQCHIP_DECLARE(cp_intc, "ti,cp-intc", cp_intc_of_init);
diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index 08880e7..fac6d43 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -18,16 +18,6 @@
 #include "cp_intc.h"
 #include <mach/da8xx.h>
 
-static const struct of_device_id const da8xx_irq_match[] __initconst = {
-	{ .compatible = "ti,cp-intc", .data = cp_intc_of_init, },
-	{ }
-};
-
-static void __init da8xx_init_irq(void)
-{
-	of_irq_init(da8xx_irq_match);
-}
-
 static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
 	OF_DEV_AUXDATA("ti,davinci-i2c", 0x01c22000, "i2c_davinci.1", NULL),
 	OF_DEV_AUXDATA("ti,davinci-wdt", 0x01c21000, "davinci-wdt", NULL),
@@ -64,7 +54,6 @@ static const char *const da850_boards_compat[] __initconst = {
 
 DT_MACHINE_START(DA850_DT, "Generic DA850/OMAP-L138/AM18x")
 	.map_io		= da850_init,
-	.init_irq	= da8xx_init_irq,
 	.init_time	= davinci_timer_init,
 	.init_machine	= da850_init_machine,
 	.dt_compat	= da850_boards_compat,
-- 
1.9.1

[PATCH 0/3] davinci: device tree - small simplifications

From: Sekhar Nori <hidden>
Date: 2016-03-01 15:30:59

Hi David,

On Tuesday 01 March 2016 04:03 AM, David Lechner wrote:
I have been trying out device tree with mach-davinci. Here are some small
simplifications that I have made.
Thanks! I will take a look. I have already sent my pull request for v4.6
so these would now be targeted to v4.7
I would also like to know if anyone is working on getting the clocks and related
soc devices (pll and psc) into device tree as well.
Not to my knowledge. As you might have noticed, keystone platform has a
(very similar) psc and has a common clock framework driver for that in
mainline. The goal should be to reuse that for DaVinci.

Thanks,
Sekhar

[PATCH 0/3] davinci: device tree - small simplifications

From: Sekhar Nori <hidden>
Date: 2016-04-12 09:14:06

On Tuesday 01 March 2016 09:00 PM, Sekhar Nori wrote:
Hi David,

On Tuesday 01 March 2016 04:03 AM, David Lechner wrote:
quoted
I have been trying out device tree with mach-davinci. Here are some small
simplifications that I have made.
Thanks! I will take a look. I have already sent my pull request for v4.6
so these would now be targeted to v4.7
All applied for v4.7. I capitalized the "arm: " prefix while applying.

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