Message ID | 1373352166-10064-3-git-send-email-zhangwm@marvell.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Dear Neil Zhang, On Tue, 9 Jul 2013 14:42:45 +0800, Neil Zhang wrote: > support CLOCKSOURCE OF DECLARE for mmp timer. > > Signed-off-by: Neil Zhang <zhangwm@marvell.com> > --- > arch/arm/mach-mmp/mmp-dt.c | 5 ++--- > arch/arm/mach-mmp/mmp2-dt.c | 3 +-- > arch/arm/mach-mmp/time.c | 15 ++------------- > 3 files changed, 5 insertions(+), 18 deletions(-) Maybe it would be good to take this opportunity to move arch/arm/mach-mmp/time.c into drivers/clocksource/. Thomas
On Tuesday 09 July 2013, Thomas Petazzoni wrote: > Dear Neil Zhang, > > On Tue, 9 Jul 2013 14:42:45 +0800, Neil Zhang wrote: > > support CLOCKSOURCE OF DECLARE for mmp timer. > > > > Signed-off-by: Neil Zhang <zhangwm@marvell.com> > > --- > > arch/arm/mach-mmp/mmp-dt.c | 5 ++--- > > arch/arm/mach-mmp/mmp2-dt.c | 3 +-- > > arch/arm/mach-mmp/time.c | 15 ++------------- > > 3 files changed, 5 insertions(+), 18 deletions(-) > > Maybe it would be good to take this opportunity to move > arch/arm/mach-mmp/time.c into drivers/clocksource/. +1 Or we might want to have a more coordinated move of all clocksource drivers in arch/arm to drivers/clocksource now, as we have done for some other subsystems. Arnd
On Wed, Jul 10, 2013 at 5:16 AM, Arnd Bergmann <arnd@arndb.de> wrote: > On Tuesday 09 July 2013, Thomas Petazzoni wrote: >> Dear Neil Zhang, >> >> On Tue, 9 Jul 2013 14:42:45 +0800, Neil Zhang wrote: >> > support CLOCKSOURCE OF DECLARE for mmp timer. >> > >> > Signed-off-by: Neil Zhang <zhangwm@marvell.com> >> > --- >> > arch/arm/mach-mmp/mmp-dt.c | 5 ++--- >> > arch/arm/mach-mmp/mmp2-dt.c | 3 +-- >> > arch/arm/mach-mmp/time.c | 15 ++------------- >> > 3 files changed, 5 insertions(+), 18 deletions(-) >> >> Maybe it would be good to take this opportunity to move >> arch/arm/mach-mmp/time.c into drivers/clocksource/. > > +1 > > Or we might want to have a more coordinated move of all clocksource > drivers in arch/arm to drivers/clocksource now, as we have done for some > other subsystems. > > Arnd I already sent some patches on this. But I didn't get response yet. I'll rebase them and send them again. I hope that they could be merged in this cycle. Regards Haojian
Haojian, > -----Original Message----- > From: Haojian Zhuang [mailto:haojian.zhuang@gmail.com] > Sent: 2013?7?10? 13:59 > To: Arnd Bergmann > Cc: Thomas Petazzoni; Neil Zhang; Grant Likely; > devicetree-discuss@lists.ozlabs.org; linux-kernel@vger.kernel.org; > linux-arm-kernel@lists.infradead.org > Subject: Re: [PATCH V3 2/3] clocksource: mmp: support CLOCKSOURCE OF > DECLARE > > On Wed, Jul 10, 2013 at 5:16 AM, Arnd Bergmann <arnd@arndb.de> wrote: > > On Tuesday 09 July 2013, Thomas Petazzoni wrote: > >> Dear Neil Zhang, > >> > >> On Tue, 9 Jul 2013 14:42:45 +0800, Neil Zhang wrote: > >> > support CLOCKSOURCE OF DECLARE for mmp timer. > >> > > >> > Signed-off-by: Neil Zhang <zhangwm@marvell.com> > >> > --- > >> > arch/arm/mach-mmp/mmp-dt.c | 5 ++--- > >> > arch/arm/mach-mmp/mmp2-dt.c | 3 +-- > >> > arch/arm/mach-mmp/time.c | 15 ++------------- > >> > 3 files changed, 5 insertions(+), 18 deletions(-) > >> > >> Maybe it would be good to take this opportunity to move > >> arch/arm/mach-mmp/time.c into drivers/clocksource/. > > > > +1 > > > > Or we might want to have a more coordinated move of all clocksource > > drivers in arch/arm to drivers/clocksource now, as we have done for > > some other subsystems. > > > > Arnd > > I already sent some patches on this. But I didn't get response yet. I'll rebase > them and send them again. I hope that they could be merged in this cycle. > > Regards > Haojian Will you submit a patch to move it by yourself or let me update the patch to move it to drivers/clocksource in next version? Best Regards, Neil Zhang
On Thu, Jul 11, 2013 at 7:23 PM, Neil Zhang <zhangwm@marvell.com> wrote: > Haojian, > > >> -----Original Message----- >> From: Haojian Zhuang [mailto:haojian.zhuang@gmail.com] >> Sent: 2013?7?10? 13:59 >> To: Arnd Bergmann >> Cc: Thomas Petazzoni; Neil Zhang; Grant Likely; >> devicetree-discuss@lists.ozlabs.org; linux-kernel@vger.kernel.org; >> linux-arm-kernel@lists.infradead.org >> Subject: Re: [PATCH V3 2/3] clocksource: mmp: support CLOCKSOURCE OF >> DECLARE >> >> On Wed, Jul 10, 2013 at 5:16 AM, Arnd Bergmann <arnd@arndb.de> wrote: >> > On Tuesday 09 July 2013, Thomas Petazzoni wrote: >> >> Dear Neil Zhang, >> >> >> >> On Tue, 9 Jul 2013 14:42:45 +0800, Neil Zhang wrote: >> >> > support CLOCKSOURCE OF DECLARE for mmp timer. >> >> > >> >> > Signed-off-by: Neil Zhang <zhangwm@marvell.com> >> >> > --- >> >> > arch/arm/mach-mmp/mmp-dt.c | 5 ++--- >> >> > arch/arm/mach-mmp/mmp2-dt.c | 3 +-- >> >> > arch/arm/mach-mmp/time.c | 15 ++------------- >> >> > 3 files changed, 5 insertions(+), 18 deletions(-) >> >> >> >> Maybe it would be good to take this opportunity to move >> >> arch/arm/mach-mmp/time.c into drivers/clocksource/. >> > >> > +1 >> > >> > Or we might want to have a more coordinated move of all clocksource >> > drivers in arch/arm to drivers/clocksource now, as we have done for >> > some other subsystems. >> > >> > Arnd >> >> I already sent some patches on this. But I didn't get response yet. I'll rebase >> them and send them again. I hope that they could be merged in this cycle. >> >> Regards >> Haojian > > Will you submit a patch to move it by yourself or let me update the patch to > move it to drivers/clocksource in next version? > > Best Regards, > Neil Zhang Not one patch. There're a couples of patches. They are depandant each other. I don't have time to rebase them in these two weeks. Go ahead to rebase all your patches on mine. Regards Haojian
diff --git a/arch/arm/mach-mmp/mmp-dt.c b/arch/arm/mach-mmp/mmp-dt.c index 62c5adb..87ab5ff 100644 --- a/arch/arm/mach-mmp/mmp-dt.c +++ b/arch/arm/mach-mmp/mmp-dt.c @@ -20,7 +20,6 @@ #include "common.h" extern void __init mmp_dt_irq_init(void); -extern void __init mmp_dt_init_timer(void); static const struct of_dev_auxdata pxa168_auxdata_lookup[] __initconst = { OF_DEV_AUXDATA("marvell,mmp-uart", 0xd4017000, "pxa2xx-uart.0", NULL), @@ -65,7 +64,7 @@ static const char *mmp_dt_board_compat[] __initdata = { DT_MACHINE_START(PXA168_DT, "Marvell PXA168 (Device Tree Support)") .map_io = mmp_map_io, .init_irq = mmp_dt_irq_init, - .init_time = mmp_dt_init_timer, + .init_time = clocksource_of_init, .init_machine = pxa168_dt_init, .dt_compat = mmp_dt_board_compat, MACHINE_END @@ -73,7 +72,7 @@ MACHINE_END DT_MACHINE_START(PXA910_DT, "Marvell PXA910 (Device Tree Support)") .map_io = mmp_map_io, .init_irq = mmp_dt_irq_init, - .init_time = mmp_dt_init_timer, + .init_time = clocksource_of_init, .init_machine = pxa910_dt_init, .dt_compat = mmp_dt_board_compat, MACHINE_END diff --git a/arch/arm/mach-mmp/mmp2-dt.c b/arch/arm/mach-mmp/mmp2-dt.c index 6523ecf..0ce46f1 100644 --- a/arch/arm/mach-mmp/mmp2-dt.c +++ b/arch/arm/mach-mmp/mmp2-dt.c @@ -22,7 +22,6 @@ #include "common.h" extern void __init mmp_dt_irq_init(void); -extern void __init mmp_dt_init_timer(void); static const struct of_dev_auxdata mmp2_auxdata_lookup[] __initconst = { OF_DEV_AUXDATA("marvell,mmp-uart", 0xd4030000, "pxa2xx-uart.0", NULL), @@ -50,7 +49,7 @@ static const char *mmp2_dt_board_compat[] __initdata = { DT_MACHINE_START(MMP2_DT, "Marvell MMP2 (Device Tree Support)") .map_io = mmp_map_io, .init_irq = mmp_dt_irq_init, - .init_time = mmp_dt_init_timer, + .init_time = clocksource_of_init, .init_machine = mmp2_dt_init, .dt_compat = mmp2_dt_board_compat, MACHINE_END diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c index 67e7d5c..8f5d612 100644 --- a/arch/arm/mach-mmp/time.c +++ b/arch/arm/mach-mmp/time.c @@ -207,22 +207,10 @@ void __init timer_init(int irq) } #ifdef CONFIG_OF -static struct of_device_id mmp_timer_dt_ids[] = { - { .compatible = "marvell,mmp-timer", }, - {} -}; - -void __init mmp_dt_init_timer(void) +static void __init mmp_of_init_timer(struct device_node *np) { - struct device_node *np; int irq, ret; - np = of_find_matching_node(NULL, mmp_timer_dt_ids); - if (!np) { - ret = -ENODEV; - goto out; - } - irq = irq_of_parse_and_map(np, 0); if (!irq) { ret = -EINVAL; @@ -238,4 +226,5 @@ void __init mmp_dt_init_timer(void) out: pr_err("Failed to get timer from device tree with error:%d\n", ret); } +CLOCKSOURCE_OF_DECLARE(mmp_timer, "marvell,mmp-timer", mmp_of_init_timer); #endif
support CLOCKSOURCE OF DECLARE for mmp timer. Signed-off-by: Neil Zhang <zhangwm@marvell.com> --- arch/arm/mach-mmp/mmp-dt.c | 5 ++--- arch/arm/mach-mmp/mmp2-dt.c | 3 +-- arch/arm/mach-mmp/time.c | 15 ++------------- 3 files changed, 5 insertions(+), 18 deletions(-)