Commit 3dad5c5f authored by Rhyland Klein's avatar Rhyland Klein Committed by Thierry Reding

clk: tegra: Fix pllx dyn step calculation

The logic for calculating the input rate used when figuring out the
proper dynamic steps for pllx was incorrect. It is supposed to be
calculated using parent_rate / m but it was just using the parent rate
directly, therefore using the wrong step values.
Signed-off-by: default avatarRhyland Klein <rklein@nvidia.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 3eb61566
...@@ -780,13 +780,13 @@ static void pllx_get_dyn_steps(struct clk_hw *hw, u32 *step_a, u32 *step_b) ...@@ -780,13 +780,13 @@ static void pllx_get_dyn_steps(struct clk_hw *hw, u32 *step_a, u32 *step_b)
{ {
unsigned long input_rate; unsigned long input_rate;
if (!IS_ERR_OR_NULL(hw->clk)) { /* cf rate */
if (!IS_ERR_OR_NULL(hw->clk))
input_rate = clk_hw_get_rate(clk_hw_get_parent(hw)); input_rate = clk_hw_get_rate(clk_hw_get_parent(hw));
/* cf rate */ else
input_rate /= tegra_pll_get_fixed_mdiv(hw, input_rate);
} else {
input_rate = 38400000; input_rate = 38400000;
}
input_rate /= tegra_pll_get_fixed_mdiv(hw, input_rate);
switch (input_rate) { switch (input_rate) {
case 12000000: case 12000000:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment