* [RESEND] clk: ppc-corenet: Add Freescale ARM-based platforms CLK_OF_DECLARE support
@ 2014-08-22 9:34 Jingchang Lu
2014-08-26 22:51 ` Scott Wood
0 siblings, 1 reply; 8+ messages in thread
From: Jingchang Lu @ 2014-08-22 9:34 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Jingchang Lu <jingchang.lu@freescale.com>
---
drivers/clk/Kconfig | 7 ++++---
drivers/clk/clk-ppc-corenet.c | 5 +++++
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index cfd3af7..8784704 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -82,11 +82,12 @@ config COMMON_CLK_AXI_CLKGEN
FPGAs. It is commonly used in Analog Devices' reference designs.
config CLK_PPC_CORENET
- bool "Clock driver for PowerPC corenet platforms"
- depends on PPC_E500MC && OF
+ bool "Clock driver for PowerPC corenet and compatible ARM-based platforms"
+ depends on (PPC_E500MC || ARM) && OF
---help---
This adds the clock driver support for Freescale PowerPC corenet
- platforms using common clock framework.
+ platforms and compatible Freescale ARM based platforms using common
+ clock framework.
config COMMON_CLK_XGENE
bool "Clock driver for APM XGene SoC"
diff --git a/drivers/clk/clk-ppc-corenet.c b/drivers/clk/clk-ppc-corenet.c
index 8e58edf..7692cac 100644
--- a/drivers/clk/clk-ppc-corenet.c
+++ b/drivers/clk/clk-ppc-corenet.c
@@ -305,3 +305,8 @@ static int __init ppc_corenet_clk_init(void)
return platform_driver_register(&ppc_corenet_clk_driver);
}
subsys_initcall(ppc_corenet_clk_init);
+
+CLK_OF_DECLARE(ppc_core_pll_v1, "fsl,qoriq-core-pll-1.0", core_pll_init);
+CLK_OF_DECLARE(ppc_core_pll_v2, "fsl,qoriq-core-pll-2.0", core_pll_init);
+CLK_OF_DECLARE(ppc_core_mux_v1, "fsl,qoriq-core-mux-1.0", core_mux_init);
+CLK_OF_DECLARE(ppc_core_mux_v2, "fsl,qoriq-core-mux-2.0", core_mux_init);
--
1.8.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [RESEND] clk: ppc-corenet: Add Freescale ARM-based platforms CLK_OF_DECLARE support
2014-08-22 9:34 [RESEND] clk: ppc-corenet: Add Freescale ARM-based platforms CLK_OF_DECLARE support Jingchang Lu
@ 2014-08-26 22:51 ` Scott Wood
2014-08-27 2:19 ` Jingchang Lu
0 siblings, 1 reply; 8+ messages in thread
From: Scott Wood @ 2014-08-26 22:51 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, 2014-08-22 at 17:34 +0800, Jingchang Lu wrote:
> Signed-off-by: Jingchang Lu <jingchang.lu@freescale.com>
> ---
> drivers/clk/Kconfig | 7 ++++---
> drivers/clk/clk-ppc-corenet.c | 5 +++++
> 2 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index cfd3af7..8784704 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -82,11 +82,12 @@ config COMMON_CLK_AXI_CLKGEN
> FPGAs. It is commonly used in Analog Devices' reference designs.
>
> config CLK_PPC_CORENET
> - bool "Clock driver for PowerPC corenet platforms"
> - depends on PPC_E500MC && OF
> + bool "Clock driver for PowerPC corenet and compatible ARM-based platforms"
> + depends on (PPC_E500MC || ARM) && OF
Should the symbol and driver be renamed to something like CLK_FSL_QORIQ?
> diff --git a/drivers/clk/clk-ppc-corenet.c b/drivers/clk/clk-ppc-corenet.c
> index 8e58edf..7692cac 100644
> --- a/drivers/clk/clk-ppc-corenet.c
> +++ b/drivers/clk/clk-ppc-corenet.c
> @@ -305,3 +305,8 @@ static int __init ppc_corenet_clk_init(void)
> return platform_driver_register(&ppc_corenet_clk_driver);
> }
> subsys_initcall(ppc_corenet_clk_init);
> +
> +CLK_OF_DECLARE(ppc_core_pll_v1, "fsl,qoriq-core-pll-1.0", core_pll_init);
> +CLK_OF_DECLARE(ppc_core_pll_v2, "fsl,qoriq-core-pll-2.0", core_pll_init);
> +CLK_OF_DECLARE(ppc_core_mux_v1, "fsl,qoriq-core-mux-1.0", core_mux_init);
> +CLK_OF_DECLARE(ppc_core_mux_v2, "fsl,qoriq-core-mux-2.0", core_mux_init);
What does this do that the existing platform driver and match table
don't? Why is it needed for ARM when PPC didn't need it?
-Scott
^ permalink raw reply [flat|nested] 8+ messages in thread
* [RESEND] clk: ppc-corenet: Add Freescale ARM-based platforms CLK_OF_DECLARE support
2014-08-26 22:51 ` Scott Wood
@ 2014-08-27 2:19 ` Jingchang Lu
2014-08-27 23:33 ` Scott Wood
0 siblings, 1 reply; 8+ messages in thread
From: Jingchang Lu @ 2014-08-27 2:19 UTC (permalink / raw)
To: linux-arm-kernel
>-----Original Message-----
>From: Wood Scott-B07421
>Sent: Wednesday, August 27, 2014 6:51 AM
>To: Lu Jingchang-B35083
>Cc: mturquette at linaro.org; linuxppc-dev at lists.ozlabs.org; linux-
>kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org
>Subject: Re: [RESEND] clk: ppc-corenet: Add Freescale ARM-based platforms
>CLK_OF_DECLARE support
>
>On Fri, 2014-08-22 at 17:34 +0800, Jingchang Lu wrote:
>> Signed-off-by: Jingchang Lu <jingchang.lu@freescale.com>
>> ---
>> drivers/clk/Kconfig | 7 ++++---
>> drivers/clk/clk-ppc-corenet.c | 5 +++++
>> 2 files changed, 9 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
>> index cfd3af7..8784704 100644
>> --- a/drivers/clk/Kconfig
>> +++ b/drivers/clk/Kconfig
>> @@ -82,11 +82,12 @@ config COMMON_CLK_AXI_CLKGEN
>> FPGAs. It is commonly used in Analog Devices' reference designs.
>>
>> config CLK_PPC_CORENET
>> - bool "Clock driver for PowerPC corenet platforms"
>> - depends on PPC_E500MC && OF
>> + bool "Clock driver for PowerPC corenet and compatible ARM-based
>platforms"
>> + depends on (PPC_E500MC || ARM) && OF
>
>Should the symbol and driver be renamed to something like CLK_FSL_QORIQ?
>
This name is better for sharing on ARM and PowerPC, I will rename them. Thanks.
>> diff --git a/drivers/clk/clk-ppc-corenet.c b/drivers/clk/clk-ppc-
>corenet.c
>> index 8e58edf..7692cac 100644
>> --- a/drivers/clk/clk-ppc-corenet.c
>> +++ b/drivers/clk/clk-ppc-corenet.c
>> @@ -305,3 +305,8 @@ static int __init ppc_corenet_clk_init(void)
>> return platform_driver_register(&ppc_corenet_clk_driver);
>> }
>> subsys_initcall(ppc_corenet_clk_init);
>> +
>> +CLK_OF_DECLARE(ppc_core_pll_v1, "fsl,qoriq-core-pll-1.0",
>core_pll_init);
>> +CLK_OF_DECLARE(ppc_core_pll_v2, "fsl,qoriq-core-pll-2.0",
>core_pll_init);
>> +CLK_OF_DECLARE(ppc_core_mux_v1, "fsl,qoriq-core-mux-1.0",
>core_mux_init);
>> +CLK_OF_DECLARE(ppc_core_mux_v2, "fsl,qoriq-core-mux-2.0",
>core_mux_init);
>
>What does this do that the existing platform driver and match table
>don't? Why is it needed for ARM when PPC didn't need it?
>
>-Scott
>
Common clk init on ARM platform is initialized earlier via of_clk_init() instead of
driver probe method, the of_clk_init will walk a __clk_of_table to init each clk provider
in the table, the CLK_OF_DECLARE() macro puts a supported clk in the __clk_of_table for
it initializing on starup, and the clk system has added some common clk such as "fixed-clk"
to this table already.
So here I add our specific clk init declaration to consist this framework, and the driver
probe function will not be needed on ARM.
Best Regards,
Jingchang
^ permalink raw reply [flat|nested] 8+ messages in thread
* [RESEND] clk: ppc-corenet: Add Freescale ARM-based platforms CLK_OF_DECLARE support
2014-08-27 2:19 ` Jingchang Lu
@ 2014-08-27 23:33 ` Scott Wood
2014-08-28 10:05 ` Jingchang Lu
0 siblings, 1 reply; 8+ messages in thread
From: Scott Wood @ 2014-08-27 23:33 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, 2014-08-26 at 21:19 -0500, Lu Jingchang-B35083 wrote:
> >-----Original Message-----
> >From: Wood Scott-B07421
> >Sent: Wednesday, August 27, 2014 6:51 AM
> >To: Lu Jingchang-B35083
> >Cc: mturquette at linaro.org; linuxppc-dev at lists.ozlabs.org; linux-
> >kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org
> >Subject: Re: [RESEND] clk: ppc-corenet: Add Freescale ARM-based platforms
> >CLK_OF_DECLARE support
> >
> >On Fri, 2014-08-22 at 17:34 +0800, Jingchang Lu wrote:
> >> +CLK_OF_DECLARE(ppc_core_pll_v1, "fsl,qoriq-core-pll-1.0",
> >core_pll_init);
> >> +CLK_OF_DECLARE(ppc_core_pll_v2, "fsl,qoriq-core-pll-2.0",
> >core_pll_init);
> >> +CLK_OF_DECLARE(ppc_core_mux_v1, "fsl,qoriq-core-mux-1.0",
> >core_mux_init);
> >> +CLK_OF_DECLARE(ppc_core_mux_v2, "fsl,qoriq-core-mux-2.0",
> >core_mux_init);
> >
> >What does this do that the existing platform driver and match table
> >don't? Why is it needed for ARM when PPC didn't need it?
> >
> >-Scott
> >
> Common clk init on ARM platform is initialized earlier via of_clk_init() instead of
> driver probe method, the of_clk_init will walk a __clk_of_table to init each clk provider
> in the table, the CLK_OF_DECLARE() macro puts a supported clk in the __clk_of_table for
> it initializing on starup, and the clk system has added some common clk such as "fixed-clk"
> to this table already.
> So here I add our specific clk init declaration to consist this framework, and the driver
> probe function will not be needed on ARM.
OK... Is there any reason why the new method won't work on PPC?
-Scott
^ permalink raw reply [flat|nested] 8+ messages in thread
* [RESEND] clk: ppc-corenet: Add Freescale ARM-based platforms CLK_OF_DECLARE support
2014-08-27 23:33 ` Scott Wood
@ 2014-08-28 10:05 ` Jingchang Lu
2014-08-28 16:25 ` Scott Wood
0 siblings, 1 reply; 8+ messages in thread
From: Jingchang Lu @ 2014-08-28 10:05 UTC (permalink / raw)
To: linux-arm-kernel
>-----Original Message-----
>From: Wood Scott-B07421
>Sent: Thursday, August 28, 2014 7:34 AM
>To: Lu Jingchang-B35083
>Cc: mturquette at linaro.org; linuxppc-dev at lists.ozlabs.org; linux-
>kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org
>Subject: Re: [RESEND] clk: ppc-corenet: Add Freescale ARM-based platforms
>CLK_OF_DECLARE support
>
>On Tue, 2014-08-26 at 21:19 -0500, Lu Jingchang-B35083 wrote:
>> >-----Original Message-----
>> >From: Wood Scott-B07421
>> >Sent: Wednesday, August 27, 2014 6:51 AM
>> >To: Lu Jingchang-B35083
>> >Cc: mturquette at linaro.org; linuxppc-dev at lists.ozlabs.org; linux-
>> >kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org
>> >Subject: Re: [RESEND] clk: ppc-corenet: Add Freescale ARM-based
>> >platforms CLK_OF_DECLARE support
>> >
>> >On Fri, 2014-08-22 at 17:34 +0800, Jingchang Lu wrote:
>> >> +CLK_OF_DECLARE(ppc_core_pll_v1, "fsl,qoriq-core-pll-1.0",
>> >core_pll_init);
>> >> +CLK_OF_DECLARE(ppc_core_pll_v2, "fsl,qoriq-core-pll-2.0",
>> >core_pll_init);
>> >> +CLK_OF_DECLARE(ppc_core_mux_v1, "fsl,qoriq-core-mux-1.0",
>> >core_mux_init);
>> >> +CLK_OF_DECLARE(ppc_core_mux_v2, "fsl,qoriq-core-mux-2.0",
>> >core_mux_init);
>> >
>> >What does this do that the existing platform driver and match table
>> >don't? Why is it needed for ARM when PPC didn't need it?
>> >
>> >-Scott
>> >
>> Common clk init on ARM platform is initialized earlier via
>> of_clk_init() instead of driver probe method, the of_clk_init will
>> walk a __clk_of_table to init each clk provider in the table, the
>> CLK_OF_DECLARE() macro puts a supported clk in the __clk_of_table for it
>initializing on starup, and the clk system has added some common clk such
>as "fixed-clk"
>> to this table already.
>> So here I add our specific clk init declaration to consist this
>> framework, and the driver probe function will not be needed on ARM.
>
>OK... Is there any reason why the new method won't work on PPC?
>
PPC has little dependence on the clock tree but frequency, it will work well
if adopted I think.
Best Regards,
Jingchang
^ permalink raw reply [flat|nested] 8+ messages in thread
* [RESEND] clk: ppc-corenet: Add Freescale ARM-based platforms CLK_OF_DECLARE support
2014-08-28 10:05 ` Jingchang Lu
@ 2014-08-28 16:25 ` Scott Wood
2014-08-29 7:17 ` Jingchang Lu
0 siblings, 1 reply; 8+ messages in thread
From: Scott Wood @ 2014-08-28 16:25 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 2014-08-28 at 05:05 -0500, Lu Jingchang-B35083 wrote:
> >-----Original Message-----
> >From: Wood Scott-B07421
> >Sent: Thursday, August 28, 2014 7:34 AM
> >To: Lu Jingchang-B35083
> >Cc: mturquette at linaro.org; linuxppc-dev at lists.ozlabs.org; linux-
> >kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org
> >Subject: Re: [RESEND] clk: ppc-corenet: Add Freescale ARM-based platforms
> >CLK_OF_DECLARE support
> >
> >On Tue, 2014-08-26 at 21:19 -0500, Lu Jingchang-B35083 wrote:
> >> >-----Original Message-----
> >> >From: Wood Scott-B07421
> >> >Sent: Wednesday, August 27, 2014 6:51 AM
> >> >To: Lu Jingchang-B35083
> >> >Cc: mturquette at linaro.org; linuxppc-dev at lists.ozlabs.org; linux-
> >> >kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org
> >> >Subject: Re: [RESEND] clk: ppc-corenet: Add Freescale ARM-based
> >> >platforms CLK_OF_DECLARE support
> >> >
> >> >On Fri, 2014-08-22 at 17:34 +0800, Jingchang Lu wrote:
> >> >> +CLK_OF_DECLARE(ppc_core_pll_v1, "fsl,qoriq-core-pll-1.0",
> >> >core_pll_init);
> >> >> +CLK_OF_DECLARE(ppc_core_pll_v2, "fsl,qoriq-core-pll-2.0",
> >> >core_pll_init);
> >> >> +CLK_OF_DECLARE(ppc_core_mux_v1, "fsl,qoriq-core-mux-1.0",
> >> >core_mux_init);
> >> >> +CLK_OF_DECLARE(ppc_core_mux_v2, "fsl,qoriq-core-mux-2.0",
> >> >core_mux_init);
> >> >
> >> >What does this do that the existing platform driver and match table
> >> >don't? Why is it needed for ARM when PPC didn't need it?
> >> >
> >> >-Scott
> >> >
> >> Common clk init on ARM platform is initialized earlier via
> >> of_clk_init() instead of driver probe method, the of_clk_init will
> >> walk a __clk_of_table to init each clk provider in the table, the
> >> CLK_OF_DECLARE() macro puts a supported clk in the __clk_of_table for it
> >initializing on starup, and the clk system has added some common clk such
> >as "fixed-clk"
> >> to this table already.
> >> So here I add our specific clk init declaration to consist this
> >> framework, and the driver probe function will not be needed on ARM.
> >
> >OK... Is there any reason why the new method won't work on PPC?
> >
> PPC has little dependence on the clock tree but frequency, it will work well
> if adopted I think.
I'm just saying it seems redundant to have both. Even on ARM, won't
this result in the clock getting registered twice (albeit with one of
those times being too late)?
Regardless of what dependence PPC has on the clock tree, what stops this
method of enumeration from working on PPC? Is there anything required
other than inserting a call to of_clk_init(NULL) in the arch init code?
-Scott
^ permalink raw reply [flat|nested] 8+ messages in thread
* [RESEND] clk: ppc-corenet: Add Freescale ARM-based platforms CLK_OF_DECLARE support
2014-08-28 16:25 ` Scott Wood
@ 2014-08-29 7:17 ` Jingchang Lu
2014-08-30 1:00 ` Scott Wood
0 siblings, 1 reply; 8+ messages in thread
From: Jingchang Lu @ 2014-08-29 7:17 UTC (permalink / raw)
To: linux-arm-kernel
>-----Original Message-----
>From: Wood Scott-B07421
>Sent: Friday, August 29, 2014 12:26 AM
>To: Lu Jingchang-B35083
>Cc: mturquette at linaro.org; linuxppc-dev at lists.ozlabs.org; linux-
>kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org
>Subject: Re: [RESEND] clk: ppc-corenet: Add Freescale ARM-based platforms
>CLK_OF_DECLARE support
>
>On Thu, 2014-08-28 at 05:05 -0500, Lu Jingchang-B35083 wrote:
>> >-----Original Message-----
>> >From: Wood Scott-B07421
>> >Sent: Thursday, August 28, 2014 7:34 AM
>> >To: Lu Jingchang-B35083
>> >Cc: mturquette at linaro.org; linuxppc-dev at lists.ozlabs.org; linux-
>> >kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org
>> >Subject: Re: [RESEND] clk: ppc-corenet: Add Freescale ARM-based
>> >platforms CLK_OF_DECLARE support
>> >
>> >On Tue, 2014-08-26 at 21:19 -0500, Lu Jingchang-B35083 wrote:
>> >> >-----Original Message-----
>> >> >From: Wood Scott-B07421
>> >> >Sent: Wednesday, August 27, 2014 6:51 AM
>> >> >To: Lu Jingchang-B35083
>> >> >Cc: mturquette at linaro.org; linuxppc-dev at lists.ozlabs.org; linux-
>> >> >kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org
>> >> >Subject: Re: [RESEND] clk: ppc-corenet: Add Freescale ARM-based
>> >> >platforms CLK_OF_DECLARE support
>> >> >
>> >> >On Fri, 2014-08-22 at 17:34 +0800, Jingchang Lu wrote:
>> >> >> +CLK_OF_DECLARE(ppc_core_pll_v1, "fsl,qoriq-core-pll-1.0",
>> >> >core_pll_init);
>> >> >> +CLK_OF_DECLARE(ppc_core_pll_v2, "fsl,qoriq-core-pll-2.0",
>> >> >core_pll_init);
>> >> >> +CLK_OF_DECLARE(ppc_core_mux_v1, "fsl,qoriq-core-mux-1.0",
>> >> >core_mux_init);
>> >> >> +CLK_OF_DECLARE(ppc_core_mux_v2, "fsl,qoriq-core-mux-2.0",
>> >> >core_mux_init);
>> >> >
>> >> >What does this do that the existing platform driver and match
>> >> >table don't? Why is it needed for ARM when PPC didn't need it?
>> >> >
>> >> >-Scott
>> >> >
>> >> Common clk init on ARM platform is initialized earlier via
>> >> of_clk_init() instead of driver probe method, the of_clk_init will
>> >> walk a __clk_of_table to init each clk provider in the table, the
>> >> CLK_OF_DECLARE() macro puts a supported clk in the __clk_of_table
>> >> for it
>> >initializing on starup, and the clk system has added some common clk
>> >such as "fixed-clk"
>> >> to this table already.
>> >> So here I add our specific clk init declaration to consist this
>> >> framework, and the driver probe function will not be needed on ARM.
>> >
>> >OK... Is there any reason why the new method won't work on PPC?
>> >
>> PPC has little dependence on the clock tree but frequency, it will
>> work well if adopted I think.
>
>I'm just saying it seems redundant to have both. Even on ARM, won't this
>result in the clock getting registered twice (albeit with one of those
>times being too late)?
>
>Regardless of what dependence PPC has on the clock tree, what stops this
>method of enumeration from working on PPC? Is there anything required
>other than inserting a call to of_clk_init(NULL) in the arch init code?
>
>-Scott
>
The of_clk_init is an alternative way to the legacy driver.
Latest ARM standard support a default call to of_clk_init(NULL) in its time_init().
So this is the general way for ARM-based platform.
The clk register layer can detect the twice registration of a same clk and
avoid the duplicate registration. The dtb should select the compatible for either,
but not both. On LS1021A the driver probe method will not be triggered.
And for support of of_clk_init on PPC, I think just add a call to it as ARM do
in time_init()[arch/arm/kernel/time.c] would be ok.
Best Regards,
Jingchang
^ permalink raw reply [flat|nested] 8+ messages in thread
* [RESEND] clk: ppc-corenet: Add Freescale ARM-based platforms CLK_OF_DECLARE support
2014-08-29 7:17 ` Jingchang Lu
@ 2014-08-30 1:00 ` Scott Wood
0 siblings, 0 replies; 8+ messages in thread
From: Scott Wood @ 2014-08-30 1:00 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, 2014-08-29 at 02:17 -0500, Lu Jingchang-B35083 wrote:
> >-----Original Message-----
> >From: Wood Scott-B07421
> >Sent: Friday, August 29, 2014 12:26 AM
> >To: Lu Jingchang-B35083
> >Cc: mturquette at linaro.org; linuxppc-dev at lists.ozlabs.org; linux-
> >kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org
> >Subject: Re: [RESEND] clk: ppc-corenet: Add Freescale ARM-based platforms
> >CLK_OF_DECLARE support
> >
> >On Thu, 2014-08-28 at 05:05 -0500, Lu Jingchang-B35083 wrote:
> >> >-----Original Message-----
> >> >From: Wood Scott-B07421
> >> >Sent: Thursday, August 28, 2014 7:34 AM
> >> >To: Lu Jingchang-B35083
> >> >Cc: mturquette at linaro.org; linuxppc-dev at lists.ozlabs.org; linux-
> >> >kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org
> >> >Subject: Re: [RESEND] clk: ppc-corenet: Add Freescale ARM-based
> >> >platforms CLK_OF_DECLARE support
> >> >
> >> >On Tue, 2014-08-26 at 21:19 -0500, Lu Jingchang-B35083 wrote:
> >> >> >-----Original Message-----
> >> >> >From: Wood Scott-B07421
> >> >> >Sent: Wednesday, August 27, 2014 6:51 AM
> >> >> >To: Lu Jingchang-B35083
> >> >> >Cc: mturquette at linaro.org; linuxppc-dev at lists.ozlabs.org; linux-
> >> >> >kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org
> >> >> >Subject: Re: [RESEND] clk: ppc-corenet: Add Freescale ARM-based
> >> >> >platforms CLK_OF_DECLARE support
> >> >> >
> >> >> >On Fri, 2014-08-22 at 17:34 +0800, Jingchang Lu wrote:
> >> >> >> +CLK_OF_DECLARE(ppc_core_pll_v1, "fsl,qoriq-core-pll-1.0",
> >> >> >core_pll_init);
> >> >> >> +CLK_OF_DECLARE(ppc_core_pll_v2, "fsl,qoriq-core-pll-2.0",
> >> >> >core_pll_init);
> >> >> >> +CLK_OF_DECLARE(ppc_core_mux_v1, "fsl,qoriq-core-mux-1.0",
> >> >> >core_mux_init);
> >> >> >> +CLK_OF_DECLARE(ppc_core_mux_v2, "fsl,qoriq-core-mux-2.0",
> >> >> >core_mux_init);
> >> >> >
> >> >> >What does this do that the existing platform driver and match
> >> >> >table don't? Why is it needed for ARM when PPC didn't need it?
> >> >> >
> >> >> >-Scott
> >> >> >
> >> >> Common clk init on ARM platform is initialized earlier via
> >> >> of_clk_init() instead of driver probe method, the of_clk_init will
> >> >> walk a __clk_of_table to init each clk provider in the table, the
> >> >> CLK_OF_DECLARE() macro puts a supported clk in the __clk_of_table
> >> >> for it
> >> >initializing on starup, and the clk system has added some common clk
> >> >such as "fixed-clk"
> >> >> to this table already.
> >> >> So here I add our specific clk init declaration to consist this
> >> >> framework, and the driver probe function will not be needed on ARM.
> >> >
> >> >OK... Is there any reason why the new method won't work on PPC?
> >> >
> >> PPC has little dependence on the clock tree but frequency, it will
> >> work well if adopted I think.
> >
> >I'm just saying it seems redundant to have both. Even on ARM, won't this
> >result in the clock getting registered twice (albeit with one of those
> >times being too late)?
> >
> >Regardless of what dependence PPC has on the clock tree, what stops this
> >method of enumeration from working on PPC? Is there anything required
> >other than inserting a call to of_clk_init(NULL) in the arch init code?
> >
> >-Scott
> >
> The of_clk_init is an alternative way to the legacy driver.
> Latest ARM standard support a default call to of_clk_init(NULL) in its time_init().
> So this is the general way for ARM-based platform.
Why are such things dependent on CPU architecture?
> The clk register layer can detect the twice registration of a same clk and
> avoid the duplicate registration. The dtb should select the compatible for either,
> but not both.
Either but not both of what?
> On LS1021A the driver probe method will not be triggered.
> And for support of of_clk_init on PPC, I think just add a call to it as ARM do
> in time_init()[arch/arm/kernel/time.c] would be ok.
I'd rather see this happen than have the driver have to register itself
differently on different architectures.
-Scott
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-08-30 1:00 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-22 9:34 [RESEND] clk: ppc-corenet: Add Freescale ARM-based platforms CLK_OF_DECLARE support Jingchang Lu
2014-08-26 22:51 ` Scott Wood
2014-08-27 2:19 ` Jingchang Lu
2014-08-27 23:33 ` Scott Wood
2014-08-28 10:05 ` Jingchang Lu
2014-08-28 16:25 ` Scott Wood
2014-08-29 7:17 ` Jingchang Lu
2014-08-30 1:00 ` Scott Wood
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).