]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
clocksource: tegra: move to of_clk_get
authorPeter De Schrijver <pdeschrijver@nvidia.com>
Mon, 4 Feb 2013 13:40:30 +0000 (15:40 +0200)
committerStephen Warren <swarren@nvidia.com>
Mon, 11 Mar 2013 20:29:43 +0000 (14:29 -0600)
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>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
arch/arm/boot/dts/tegra20.dtsi
arch/arm/boot/dts/tegra30.dtsi
drivers/clocksource/tegra20_timer.c

index 9a428931d0429d2befef3d6d3084b7499eeb3a02..37701d8727d81b4571aa0a538c33e20406d3384b 100644 (file)
                              0 1 0x04
                              0 41 0x04
                              0 42 0x04>;
+               clocks = <&tegra_car 5>;
        };
 
        tegra_car: clock {
                compatible = "nvidia,tegra20-rtc";
                reg = <0x7000e000 0x100>;
                interrupts = <0 2 0x04>;
+               clocks = <&tegra_car 4>;
        };
 
        i2c@7000c000 {
index 767803e1fd55f2d6e75053527e47a26d536e4f77..7effa93ea9d9fc7d1a63d97443794bf8bc9b44f0 100644 (file)
                              0 42 0x04
                              0 121 0x04
                              0 122 0x04>;
+               clocks = <&tegra_car 5>;
        };
 
        tegra_car: clock {
                compatible = "nvidia,tegra30-rtc", "nvidia,tegra20-rtc";
                reg = <0x7000e000 0x100>;
                interrupts = <0 2 0x04>;
+               clocks = <&tegra_car 4>;
        };
 
        i2c@7000c000 {
index 0bde03feb095365602af6fe0239a5d13b26181b3..bc4b8ad78aea3273c3d5805da722c02a51221da8 100644 (file)
@@ -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