diff mbox

[v2,03/10] Clocksource: add nuc970 clocksource driver

Message ID 3277576.eNgdG7zPqq@wuerfel (mailing list archive)
State Not Applicable, archived
Delegated to: Stephen Boyd
Headers show

Commit Message

Arnd Bergmann July 11, 2016, 3:36 p.m. UTC
On Sunday, July 10, 2016 3:27:23 PM CEST Wan Zongshun wrote:
> 
> +config NUC900_TIMER
> +        bool "Clocksource timer for nuc900 platform" if COMPILE_TEST
> +        depends on ARM
> +        select CLKSRC_OF if OF
> +        select CLKSRC_MMIO
> +        help
> +          Enables the clocksource for the NUC900 platform.
> 

I have put this patch into my randconfig build system and found that
it lacks a dependency:



	

Also the init function has changed its return type in linux-next:

> +static void __init nuc970_timer_of_init(struct device_node *node)

This now needs to return an error code or we get:

../include/linux/of.h:1004:20: error: comparison of distinct pointer types lacks a cast [-Werror]
        .data = (fn == (fn_type)NULL) ? fn : fn  }

Daniel Lezcano seems to have implemented a migration strategy, but I
can't see what you are supposed to do here, since the
CLOCKSOURCE_OF_DECLARE_RET macro is no longer part of linux-next.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-clk" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Wan Zongshun July 12, 2016, 7:32 a.m. UTC | #1
On 2016年07月11日 23:36, Arnd Bergmann wrote:
> On Sunday, July 10, 2016 3:27:23 PM CEST Wan Zongshun wrote:
>>
>> +config NUC900_TIMER
>> +        bool "Clocksource timer for nuc900 platform" if COMPILE_TEST
>> +        depends on ARM
>> +        select CLKSRC_OF if OF
>> +        select CLKSRC_MMIO
>> +        help
>> +          Enables the clocksource for the NUC900 platform.
>>
>
> I have put this patch into my randconfig build system and found that
> it lacks a dependency:
>
>
>
> diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> index e18ef32776a3..59b9251eef37 100644
> --- a/drivers/clocksource/Kconfig
> +++ b/drivers/clocksource/Kconfig
> @@ -523,7 +523,7 @@ config CLKSRC_ST_LPC
>
>   config NUC900_TIMER
>           bool "Clocksource timer for nuc900 platform" if COMPILE_TEST
> -        depends on ARM
> +        depends on ARM && GENERIC_CLOCKEVENTS
>           select CLKSRC_OF if OF
>           select CLKSRC_MMIO
>           help
> 	

So this patch, I still need submit or you have merged it?

>
> Also the init function has changed its return type in linux-next:
>
>> +static void __init nuc970_timer_of_init(struct device_node *node)
>
> This now needs to return an error code or we get:
>
> ../include/linux/of.h:1004:20: error: comparison of distinct pointer types lacks a cast [-Werror]
>          .data = (fn == (fn_type)NULL) ? fn : fn  }
>
> Daniel Lezcano seems to have implemented a migration strategy, but I
> can't see what you are supposed to do here, since the
> CLOCKSOURCE_OF_DECLARE_RET macro is no longer part of linux-next.

Wait for Daniel's comments? or what should I do now?

>
> 	Arnd
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-clk" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Arnd Bergmann July 12, 2016, 8:28 a.m. UTC | #2
On Tuesday, July 12, 2016 3:32:59 PM CEST Wan Zongshun wrote:
> 
> On 2016年07月11日 23:36, Arnd Bergmann wrote:
> > On Sunday, July 10, 2016 3:27:23 PM CEST Wan Zongshun wrote:
> >>
> >> +config NUC900_TIMER
> >> +        bool "Clocksource timer for nuc900 platform" if COMPILE_TEST
> >> +        depends on ARM
> >> +        select CLKSRC_OF if OF
> >> +        select CLKSRC_MMIO
> >> +        help
> >> +          Enables the clocksource for the NUC900 platform.
> >>
> >
> > I have put this patch into my randconfig build system and found that
> > it lacks a dependency:
> >
> >
> >
> > diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> > index e18ef32776a3..59b9251eef37 100644
> > --- a/drivers/clocksource/Kconfig
> > +++ b/drivers/clocksource/Kconfig
> > @@ -523,7 +523,7 @@ config CLKSRC_ST_LPC
> >
> >   config NUC900_TIMER
> >           bool "Clocksource timer for nuc900 platform" if COMPILE_TEST
> > -        depends on ARM
> > +        depends on ARM && GENERIC_CLOCKEVENTS
> >           select CLKSRC_OF if OF
> >           select CLKSRC_MMIO
> >           help
> > 	
> 
> So this patch, I still need submit or you have merged it?

Ideally the driver should get submitted through the clocksource
maintainer tree. I have not applied it to any git tree that I
plan to send anywhere.

> >
> > Also the init function has changed its return type in linux-next:
> >
> >> +static void __init nuc970_timer_of_init(struct device_node *node)
> >
> > This now needs to return an error code or we get:
> >
> > ../include/linux/of.h:1004:20: error: comparison of distinct pointer types lacks a cast [-Werror]
> >          .data = (fn == (fn_type)NULL) ? fn : fn  }
> >
> > Daniel Lezcano seems to have implemented a migration strategy, but I
> > can't see what you are supposed to do here, since the
> > CLOCKSOURCE_OF_DECLARE_RET macro is no longer part of linux-next.
> 
> Wait for Daniel's comments? or what should I do now?

Yes, let's see what he says. I guess from the timing, this will probably
have to wait for linux-4.9 anyway, and then we have no problem because the
API change will make it into 4.8.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-clk" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Daniel Lezcano July 21, 2016, 12:52 p.m. UTC | #3
On Tue, Jul 12, 2016 at 10:28:35AM +0200, Arnd Bergmann wrote:

[ ... ]

> > > Also the init function has changed its return type in linux-next:
> > >
> > >> +static void __init nuc970_timer_of_init(struct device_node *node)
> > >
> > > This now needs to return an error code or we get:
> > >
> > > ../include/linux/of.h:1004:20: error: comparison of distinct pointer types lacks a cast [-Werror]
> > >          .data = (fn == (fn_type)NULL) ? fn : fn  }
> > >
> > > Daniel Lezcano seems to have implemented a migration strategy, but I
> > > can't see what you are supposed to do here, since the
> > > CLOCKSOURCE_OF_DECLARE_RET macro is no longer part of linux-next.
> > 
> > Wait for Daniel's comments? or what should I do now?
> 
> Yes, let's see what he says. I guess from the timing, this will probably
> have to wait for linux-4.9 anyway, and then we have no problem because the
> API change will make it into 4.8.

CLOCKSOURCE_OF_DECLARE_RET was renamed back to CLOCKSOURCE_OF_DECLARE but it 
expects now an init function returning an 'int'.

These changes are now in tip/timers/core, so in linux-next.
--
To unsubscribe from this list: send the line "unsubscribe linux-clk" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Arnd Bergmann July 21, 2016, 12:54 p.m. UTC | #4
On Thursday, July 21, 2016 2:52:24 PM CEST Daniel Lezcano wrote:
> On Tue, Jul 12, 2016 at 10:28:35AM +0200, Arnd Bergmann wrote:
> 
> [ ... ]
> 
> > > > Also the init function has changed its return type in linux-next:
> > > >
> > > >> +static void __init nuc970_timer_of_init(struct device_node *node)
> > > >
> > > > This now needs to return an error code or we get:
> > > >
> > > > ../include/linux/of.h:1004:20: error: comparison of distinct pointer types lacks a cast [-Werror]
> > > >          .data = (fn == (fn_type)NULL) ? fn : fn  }
> > > >
> > > > Daniel Lezcano seems to have implemented a migration strategy, but I
> > > > can't see what you are supposed to do here, since the
> > > > CLOCKSOURCE_OF_DECLARE_RET macro is no longer part of linux-next.
> > > 
> > > Wait for Daniel's comments? or what should I do now?
> > 
> > Yes, let's see what he says. I guess from the timing, this will probably
> > have to wait for linux-4.9 anyway, and then we have no problem because the
> > API change will make it into 4.8.
> 
> CLOCKSOURCE_OF_DECLARE_RET was renamed back to CLOCKSOURCE_OF_DECLARE but it 
> expects now an init function returning an 'int'.
> 
> These changes are now in tip/timers/core, so in linux-next.

Ok, so the driver could be merged on top of that, but it's really
late for 4.8 now, so we'd just wait until after the merge window
anyway.

	Arnd

--
To unsubscribe from this list: send the line "unsubscribe linux-clk" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index e18ef32776a3..59b9251eef37 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -523,7 +523,7 @@  config CLKSRC_ST_LPC
 
 config NUC900_TIMER
         bool "Clocksource timer for nuc900 platform" if COMPILE_TEST
-        depends on ARM
+        depends on ARM && GENERIC_CLOCKEVENTS
         select CLKSRC_OF if OF
         select CLKSRC_MMIO
         help