All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] clk: tegra: Fix clock rate computation
@ 2013-11-18 15:11 Thierry Reding
       [not found] ` <1384787499-26994-1-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Thierry Reding @ 2013-11-18 15:11 UTC (permalink / raw)
  To: Peter De Schrijver
  Cc: Mike Turquette, Stephen Warren,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

The PLL output frequency is multiplied during the P-divider computation,
so it needs to be divided by the P-divider again before returning.

This fixes an issue where clk_round_rate() would return the multiplied
frequency instead of the real one after the P-divider.

Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 drivers/clk/tegra/clk-pll.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/tegra/clk-pll.c b/drivers/clk/tegra/clk-pll.c
index 193457b81a90..7aec773a5ca6 100644
--- a/drivers/clk/tegra/clk-pll.c
+++ b/drivers/clk/tegra/clk-pll.c
@@ -441,6 +441,8 @@ static int _calc_rate(struct clk_hw *hw, struct tegra_clk_pll_freq_table *cfg,
 		return -EINVAL;
 	}
 
+	cfg->output_rate >>= p_div;
+
 	if (pll->params->pdiv_tohw) {
 		ret = _p_div_to_hw(hw, 1 << p_div);
 		if (ret < 0)
-- 
1.8.4.2

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

end of thread, other threads:[~2013-11-25 17:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-18 15:11 [PATCH 1/5] clk: tegra: Fix clock rate computation Thierry Reding
     [not found] ` <1384787499-26994-1-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-11-18 15:11   ` [PATCH 2/5] clk: tegra: Initialize DSI low-power clocks Thierry Reding
2013-11-18 15:11   ` [PATCH 3/5] clk: tegra: add locking to periph clks Thierry Reding
2013-11-18 15:11   ` [PATCH 4/5] clk: tegra: add TEGRA_PERIPH_NO_GATE Thierry Reding
2013-11-18 15:11   ` [PATCH 5/5] clk: tegra: rework sor0 clock for Tegra124 Thierry Reding
2013-11-25 14:09   ` [PATCH 1/5] clk: tegra: Fix clock rate computation Peter De Schrijver
     [not found]     ` <20131125140910.GI26617-Rysk9IDjsxmJz7etNGeUX8VPkgjIgRvpAL8bYrjMMd8@public.gmane.org>
2013-11-25 17:16       ` Stephen Warren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.