* [PATCH 0/3] davinci: device tree - small simplifications
@ 2016-02-29 22:33 David Lechner
2016-02-29 22:33 ` [PATCH 1/3] arm: davinci: simplify call to of populate David Lechner
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: David Lechner @ 2016-02-29 22:33 UTC (permalink / raw)
To: linux-arm-kernel
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
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 1/3] arm: davinci: simplify call to of populate 2016-02-29 22:33 [PATCH 0/3] davinci: device tree - small simplifications David Lechner @ 2016-02-29 22:33 ` David Lechner 2016-02-29 22:33 ` [PATCH 2/3] arm: davinci: remove unused DA8XX_NUM_UARTS David Lechner ` (2 subsequent siblings) 3 siblings, 0 replies; 6+ messages in thread From: David Lechner @ 2016-02-29 22:33 UTC (permalink / raw) To: linux-arm-kernel 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 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] arm: davinci: remove unused DA8XX_NUM_UARTS 2016-02-29 22:33 [PATCH 0/3] davinci: device tree - small simplifications David Lechner 2016-02-29 22:33 ` [PATCH 1/3] arm: davinci: simplify call to of populate David Lechner @ 2016-02-29 22:33 ` David Lechner 2016-02-29 22:33 ` [PATCH 3/3] arm: davinci: use IRQCHIP_DECLARE for cp_intc David Lechner 2016-03-01 15:30 ` [PATCH 0/3] davinci: device tree - small simplifications Sekhar Nori 3 siblings, 0 replies; 6+ messages in thread From: David Lechner @ 2016-02-29 22:33 UTC (permalink / raw) To: linux-arm-kernel 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 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] arm: davinci: use IRQCHIP_DECLARE for cp_intc 2016-02-29 22:33 [PATCH 0/3] davinci: device tree - small simplifications David Lechner 2016-02-29 22:33 ` [PATCH 1/3] arm: davinci: simplify call to of populate David Lechner 2016-02-29 22:33 ` [PATCH 2/3] arm: davinci: remove unused DA8XX_NUM_UARTS David Lechner @ 2016-02-29 22:33 ` David Lechner 2016-03-01 15:30 ` [PATCH 0/3] davinci: device tree - small simplifications Sekhar Nori 3 siblings, 0 replies; 6+ messages in thread From: David Lechner @ 2016-02-29 22:33 UTC (permalink / raw) To: linux-arm-kernel 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 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 0/3] davinci: device tree - small simplifications 2016-02-29 22:33 [PATCH 0/3] davinci: device tree - small simplifications David Lechner ` (2 preceding siblings ...) 2016-02-29 22:33 ` [PATCH 3/3] arm: davinci: use IRQCHIP_DECLARE for cp_intc David Lechner @ 2016-03-01 15:30 ` Sekhar Nori 2016-04-12 9:14 ` Sekhar Nori 3 siblings, 1 reply; 6+ messages in thread From: Sekhar Nori @ 2016-03-01 15:30 UTC (permalink / raw) To: linux-arm-kernel 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 0/3] davinci: device tree - small simplifications 2016-03-01 15:30 ` [PATCH 0/3] davinci: device tree - small simplifications Sekhar Nori @ 2016-04-12 9:14 ` Sekhar Nori 0 siblings, 0 replies; 6+ messages in thread From: Sekhar Nori @ 2016-04-12 9:14 UTC (permalink / raw) To: linux-arm-kernel On Tuesday 01 March 2016 09:00 PM, Sekhar Nori wrote: > 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 All applied for v4.7. I capitalized the "arm: " prefix while applying. Thanks, Sekhar ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-04-12 9:14 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-02-29 22:33 [PATCH 0/3] davinci: device tree - small simplifications David Lechner 2016-02-29 22:33 ` [PATCH 1/3] arm: davinci: simplify call to of populate David Lechner 2016-02-29 22:33 ` [PATCH 2/3] arm: davinci: remove unused DA8XX_NUM_UARTS David Lechner 2016-02-29 22:33 ` [PATCH 3/3] arm: davinci: use IRQCHIP_DECLARE for cp_intc David Lechner 2016-03-01 15:30 ` [PATCH 0/3] davinci: device tree - small simplifications Sekhar Nori 2016-04-12 9:14 ` Sekhar Nori
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).