diff mbox

ARM: zynq: Move of_clk_init from clock driver

Message ID 572af6e4eaaaa1c74ea62364f8fa7ac5834cc754.1391612175.git.michal.simek@xilinx.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michal Simek Feb. 5, 2014, 2:56 p.m. UTC
Move of_clk_init() from clock driver to enable
options not to use zynq clock driver.
Use for example fixed clock setting.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

Based on http://www.spinics.net/lists/arm-kernel/msg298287.html
series

---
 arch/arm/mach-zynq/common.c | 1 +
 drivers/clk/zynq/clkc.c     | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

--
1.8.2.3

Comments

Soren Brinkmann Feb. 5, 2014, 3:41 p.m. UTC | #1
On Wed, Feb 05, 2014 at 03:56:37PM +0100, Michal Simek wrote:
> Move of_clk_init() from clock driver to enable
> options not to use zynq clock driver.
> Use for example fixed clock setting.
What is the use-case? Zynq w/o this driver makes no sense, IMHO. And
even if you wanna fake clocks, why would this driver prevent it? Just
replace all the input clocks with different ones and don't care about
what this driver does?

> 
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
> 
> Based on http://www.spinics.net/lists/arm-kernel/msg298287.html
> series
> 
> ---
>  arch/arm/mach-zynq/common.c | 1 +
>  drivers/clk/zynq/clkc.c     | 2 --
>  2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
> index 93ea19b..8df35f3 100644
> --- a/arch/arm/mach-zynq/common.c
> +++ b/arch/arm/mach-zynq/common.c
> @@ -68,6 +68,7 @@ static void __init zynq_timer_init(void)
>  	zynq_early_slcr_init();
> 
>  	zynq_clock_init();
> +	of_clk_init(NULL);
Now you have two clock init functions...

	Sören
Michal Simek Feb. 5, 2014, 3:52 p.m. UTC | #2
On 02/05/2014 04:41 PM, Sören Brinkmann wrote:
> On Wed, Feb 05, 2014 at 03:56:37PM +0100, Michal Simek wrote:
>> Move of_clk_init() from clock driver to enable
>> options not to use zynq clock driver.
>> Use for example fixed clock setting.
> What is the use-case? Zynq w/o this driver makes no sense, IMHO. And
> even if you wanna fake clocks, why would this driver prevent it? Just
> replace all the input clocks with different ones and don't care about
> what this driver does?

One case is supervisor for example.

> 
>>
>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>> ---
>>
>> Based on http://www.spinics.net/lists/arm-kernel/msg298287.html
>> series
>>
>> ---
>>  arch/arm/mach-zynq/common.c | 1 +
>>  drivers/clk/zynq/clkc.c     | 2 --
>>  2 files changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
>> index 93ea19b..8df35f3 100644
>> --- a/arch/arm/mach-zynq/common.c
>> +++ b/arch/arm/mach-zynq/common.c
>> @@ -68,6 +68,7 @@ static void __init zynq_timer_init(void)
>>  	zynq_early_slcr_init();
>>
>>  	zynq_clock_init();
>> +	of_clk_init(NULL);
> Now you have two clock init functions...

If I have two clock init functions now, what I had before?
You were calling of_clk_init from zynq_clock_init.

Thanks,
Michal
diff mbox

Patch

diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
index 93ea19b..8df35f3 100644
--- a/arch/arm/mach-zynq/common.c
+++ b/arch/arm/mach-zynq/common.c
@@ -68,6 +68,7 @@  static void __init zynq_timer_init(void)
 	zynq_early_slcr_init();

 	zynq_clock_init();
+	of_clk_init(NULL);
 	clocksource_of_init();
 }

diff --git a/drivers/clk/zynq/clkc.c b/drivers/clk/zynq/clkc.c
index 03052d6..c812b93 100644
--- a/drivers/clk/zynq/clkc.c
+++ b/drivers/clk/zynq/clkc.c
@@ -602,8 +602,6 @@  void __init zynq_clock_init(void)
 	of_node_put(slcr);
 	of_node_put(np);

-	of_clk_init(NULL);
-
 	return;

 np_err: