ARM: tegra: clocks: separate tegra_clk_32k_ops from Tegra20 and Tegra30
authorJoseph Lo <josephl@nvidia.com>
Fri, 17 Aug 2012 06:51:21 +0000 (14:51 +0800)
committerStephen Warren <swarren@nvidia.com>
Thu, 6 Sep 2012 17:47:20 +0000 (11:47 -0600)
Currently the tegra20 and tegra30 share the same symbol for
tegra_clk_32k_ops. This will cause a compile error when building
a tegra20-only kernel image. Add tegra_clk_32k_ops for tegra20 and
modify tegra30_clk_32k_ops for tegra30.

Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
arch/arm/mach-tegra/tegra20_clocks.c
arch/arm/mach-tegra/tegra30_clocks.c
arch/arm/mach-tegra/tegra30_clocks.h
arch/arm/mach-tegra/tegra30_clocks_data.c

index a1e0f8a26b3dad42ad3f7eeb9015573664b8fe14..b9124afcca11336ac50d0b3a6382facb10f0fc19 100644 (file)
@@ -231,6 +231,16 @@ static int clk_div16_get_divider(unsigned long parent_rate, unsigned long rate)
        return divider_u16 - 1;
 }
 
+static unsigned long tegra_clk_fixed_recalc_rate(struct clk_hw *hw,
+               unsigned long parent_rate)
+{
+       return to_clk_tegra(hw)->fixed_rate;
+}
+
+struct clk_ops tegra_clk_32k_ops = {
+       .recalc_rate = tegra_clk_fixed_recalc_rate,
+};
+
 /* clk_m functions */
 static unsigned long tegra20_clk_m_recalc_rate(struct clk_hw *hw,
                        unsigned long prate)
index a9fa8ea0b6e0aeef236f19b35610d3d216332820..3129c2f21d81a55caaeeb01d8cf6caad3ad101f5 100644 (file)
@@ -478,7 +478,7 @@ static unsigned long tegra30_clk_fixed_recalc_rate(struct clk_hw *hw,
        return to_clk_tegra(hw)->fixed_rate;
 }
 
-struct clk_ops tegra_clk_32k_ops = {
+struct clk_ops tegra30_clk_32k_ops = {
        .recalc_rate = tegra30_clk_fixed_recalc_rate,
 };
 
index aeb4e963f6329d9ab0688af894c634a89b3b03b2..b08b8d9024a6083a82059edabf752c519d0881f6 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef __MACH_TEGRA30_CLOCK_H
 #define __MACH_TEGRA30_CLOCK_H
 
-extern struct clk_ops tegra_clk_32k_ops;
+extern struct clk_ops tegra30_clk_32k_ops;
 extern struct clk_ops tegra30_clk_m_ops;
 extern struct clk_ops tegra_clk_m_div_ops;
 extern struct clk_ops tegra_pll_ref_ops;
index c924240cb69366757e25c880c6a385d84344f055..267350675a88bfac78c26b639a352bc535716a39 100644 (file)
@@ -57,7 +57,7 @@ static struct clk_tegra tegra_clk_32k_hw = {
 static struct clk tegra_clk_32k = {
        .name = "clk_32k",
        .hw = &tegra_clk_32k_hw.hw,
-       .ops = &tegra_clk_32k_ops,
+       .ops = &tegra30_clk_32k_ops,
        .flags = CLK_IS_ROOT,
 };