Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b78c030c authored by Joseph Lo's avatar Joseph Lo Committed by Stephen Warren
Browse files

ARM: tegra: clocks: separate tegra_clk_32k_ops from Tegra20 and Tegra30



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: default avatarJoseph Lo <josephl@nvidia.com>
Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
parent 1dfacc16
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -231,6 +231,16 @@ static int clk_div16_get_divider(unsigned long parent_rate, unsigned long rate)
	return divider_u16 - 1;
	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 */
/* clk_m functions */
static unsigned long tegra20_clk_m_recalc_rate(struct clk_hw *hw,
static unsigned long tegra20_clk_m_recalc_rate(struct clk_hw *hw,
			unsigned long prate)
			unsigned long prate)
+1 −1
Original line number Original line Diff line number Diff line
@@ -478,7 +478,7 @@ static unsigned long tegra30_clk_fixed_recalc_rate(struct clk_hw *hw,
	return to_clk_tegra(hw)->fixed_rate;
	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,
	.recalc_rate = tegra30_clk_fixed_recalc_rate,
};
};


+1 −1
Original line number Original line Diff line number Diff line
@@ -17,7 +17,7 @@
#ifndef __MACH_TEGRA30_CLOCK_H
#ifndef __MACH_TEGRA30_CLOCK_H
#define __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 tegra30_clk_m_ops;
extern struct clk_ops tegra_clk_m_div_ops;
extern struct clk_ops tegra_clk_m_div_ops;
extern struct clk_ops tegra_pll_ref_ops;
extern struct clk_ops tegra_pll_ref_ops;
+1 −1
Original line number Original line Diff line number Diff line
@@ -57,7 +57,7 @@ static struct clk_tegra tegra_clk_32k_hw = {
static struct clk tegra_clk_32k = {
static struct clk tegra_clk_32k = {
	.name = "clk_32k",
	.name = "clk_32k",
	.hw = &tegra_clk_32k_hw.hw,
	.hw = &tegra_clk_32k_hw.hw,
	.ops = &tegra_clk_32k_ops,
	.ops = &tegra30_clk_32k_ops,
	.flags = CLK_IS_ROOT,
	.flags = CLK_IS_ROOT,
};
};