Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1670856 > unrolled thread

[PATCH v2 02/17] clk: ingenic: Fix recalc_rate for clocks with fixed divider

Started byPaul Cercueil <paul@crapouillou.net>
First post2017-06-20 17:20 +0200
Last post2017-06-20 17:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 02/17] clk: ingenic: Fix recalc_rate for clocks with fixed divider Paul Cercueil <paul@crapouillou.net> - 2017-06-20 17:20 +0200

#1670856 — [PATCH v2 02/17] clk: ingenic: Fix recalc_rate for clocks with fixed divider

FromPaul Cercueil <paul@crapouillou.net>
Date2017-06-20 17:20 +0200
Subject[PATCH v2 02/17] clk: ingenic: Fix recalc_rate for clocks with fixed divider
Message-ID<tUt6G-1QX-35@gated-at.bofh.it>
Previously, the clocks with a fixed divider would report their rate
as being the same as the one of their parent, independently of the
divider in use. This commit fixes this behaviour.

This went unnoticed as neither the jz4740 nor the jz4780 CGU code
have clocks with fixed dividers yet.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 drivers/clk/ingenic/cgu.c | 2 ++
 1 file changed, 2 insertions(+)

 v2: No changes

diff --git a/drivers/clk/ingenic/cgu.c b/drivers/clk/ingenic/cgu.c
index e8248f9185f7..eb9002ccf3fc 100644
--- a/drivers/clk/ingenic/cgu.c
+++ b/drivers/clk/ingenic/cgu.c
@@ -328,6 +328,8 @@ ingenic_clk_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
 		div *= clk_info->div.div;
 
 		rate /= div;
+	} else if (clk_info->type & CGU_CLK_FIXDIV) {
+		rate /= clk_info->fixdiv.div;
 	}
 
 	return rate;
-- 
2.11.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web