linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clocksource: tegra: move to of_clk_get
@ 2013-02-04 13:40 Peter De Schrijver
  2013-02-04 22:09 ` Stephen Warren
  2013-03-06 20:38 ` Stephen Warren
  0 siblings, 2 replies; 3+ messages in thread
From: Peter De Schrijver @ 2013-02-04 13:40 UTC (permalink / raw)
  To: linux-arm-kernel

The new clockframework introduced DT IDs for each clock. To be able to remove
the device registrations, this driver needs to be updated to use the DT IDs.
Note that the actual removal of the clk_register_clkdev() calls will be done
in a later series.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
---
 arch/arm/boot/dts/tegra20.dtsi      |    2 ++
 arch/arm/boot/dts/tegra30.dtsi      |    2 ++
 drivers/clocksource/tegra20_timer.c |    4 ++--
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index 63b0d81..6e41a4f 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -144,6 +144,7 @@
 			      0 1 0x04
 			      0 41 0x04
 			      0 42 0x04>;
+		clocks = <&tegra_car 5>;
 	};
 
 	tegra_car: clock {
@@ -308,6 +309,7 @@
 		compatible = "nvidia,tegra20-rtc";
 		reg = <0x7000e000 0x100>;
 		interrupts = <0 2 0x04>;
+		clocks = <&tegra_car 4>;
 	};
 
 	i2c at 7000c000 {
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi
index 313fa71..7bc07e6 100644
--- a/arch/arm/boot/dts/tegra30.dtsi
+++ b/arch/arm/boot/dts/tegra30.dtsi
@@ -147,6 +147,7 @@
 			      0 42 0x04
 			      0 121 0x04
 			      0 122 0x04>;
+		clocks = <&tegra_car 5>;
 	};
 
 	tegra_car: clock {
@@ -295,6 +296,7 @@
 		compatible = "nvidia,tegra30-rtc", "nvidia,tegra20-rtc";
 		reg = <0x7000e000 0x100>;
 		interrupts = <0 2 0x04>;
+		clocks = <&tegra_car 4>;
 	};
 
 	i2c at 7000c000 {
diff --git a/drivers/clocksource/tegra20_timer.c b/drivers/clocksource/tegra20_timer.c
index 5bc1429..546c537 100644
--- a/drivers/clocksource/tegra20_timer.c
+++ b/drivers/clocksource/tegra20_timer.c
@@ -189,7 +189,7 @@ static void __init tegra20_init_timer(void)
 		BUG();
 	}
 
-	clk = clk_get_sys("timer", NULL);
+	clk = of_clk_get(np, 0);
 	if (IS_ERR(clk)) {
 		pr_warn("Unable to get timer clock. Assuming 12Mhz input clock.\n");
 		rate = 12000000;
@@ -216,7 +216,7 @@ static void __init tegra20_init_timer(void)
 	 * rtc registers are used by read_persistent_clock, keep the rtc clock
 	 * enabled
 	 */
-	clk = clk_get_sys("rtc-tegra", NULL);
+	clk = of_clk_get(np, 0);
 	if (IS_ERR(clk))
 		pr_warn("Unable to get rtc-tegra clock\n");
 	else

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] clocksource: tegra: move to of_clk_get
  2013-02-04 13:40 [PATCH] clocksource: tegra: move to of_clk_get Peter De Schrijver
@ 2013-02-04 22:09 ` Stephen Warren
  2013-03-06 20:38 ` Stephen Warren
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Warren @ 2013-02-04 22:09 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/04/2013 06:40 AM, Peter De Schrijver wrote:
> The new clockframework introduced DT IDs for each clock. To be able to remove
> the device registrations, this driver needs to be updated to use the DT IDs.
> Note that the actual removal of the clk_register_clkdev() calls will be done
> in a later series.

This seems fine for 3.10, but I wonder about dependencies. Will there be
a bunch of other similar changes? I guess this patch is a dependency of
some changes to drivers/clk/tegra/ to remove the non-DT clock
registrations? It'd be good to get a clear idea of all the dependencies,
so we can see what's the best tree to apply the changes to; perhaps this
should go through the drivers/clk tree, or Tegra's clk driver changes
need to go through the Tegra tree again in 3.10?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] clocksource: tegra: move to of_clk_get
  2013-02-04 13:40 [PATCH] clocksource: tegra: move to of_clk_get Peter De Schrijver
  2013-02-04 22:09 ` Stephen Warren
@ 2013-03-06 20:38 ` Stephen Warren
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Warren @ 2013-03-06 20:38 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/04/2013 06:40 AM, Peter De Schrijver wrote:
> The new clockframework introduced DT IDs for each clock. To be able to remove
> the device registrations, this driver needs to be updated to use the DT IDs.
> Note that the actual removal of the clk_register_clkdev() calls will be done
> in a later series.

I've applied this to Tegra's for-3.10/cleanup branch.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-06 20:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-04 13:40 [PATCH] clocksource: tegra: move to of_clk_get Peter De Schrijver
2013-02-04 22:09 ` Stephen Warren
2013-03-06 20:38 ` Stephen Warren

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).