diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2016-09-30 22:16:51 +0200 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2016-10-25 12:40:25 +0200 |
commit | 2beaa601c849e72683a2dd0fe6fd77763f19f051 (patch) | |
tree | 5c13edaa94dd1b5e876e8294c478d571826fde25 /drivers/clk/sunxi-ng/ccu_nkm.c | |
parent | 6e0d50daa97f4bf9706e343b4f71171e88921209 (diff) | |
download | linux-2beaa601c849e72683a2dd0fe6fd77763f19f051.tar.bz2 |
clk: sunxi-ng: Implement minimum for multipliers
Allow the CCU drivers to specify a multiplier for their clocks.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Diffstat (limited to 'drivers/clk/sunxi-ng/ccu_nkm.c')
-rw-r--r-- | drivers/clk/sunxi-ng/ccu_nkm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/clk/sunxi-ng/ccu_nkm.c b/drivers/clk/sunxi-ng/ccu_nkm.c index 42177320930d..9b840a47a94d 100644 --- a/drivers/clk/sunxi-ng/ccu_nkm.c +++ b/drivers/clk/sunxi-ng/ccu_nkm.c @@ -100,9 +100,9 @@ static unsigned long ccu_nkm_round_rate(struct ccu_mux_internal *mux, struct ccu_nkm *nkm = data; struct _ccu_nkm _nkm; - _nkm.min_n = 1; + _nkm.min_n = nkm->n.min; _nkm.max_n = 1 << nkm->n.width; - _nkm.min_k = 1; + _nkm.min_k = nkm->k.min; _nkm.max_k = 1 << nkm->k.width; _nkm.min_m = 1; _nkm.max_m = nkm->m.max ?: 1 << nkm->m.width; @@ -129,9 +129,9 @@ static int ccu_nkm_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long flags; u32 reg; - _nkm.min_n = 1; + _nkm.min_n = nkm->n.min; _nkm.max_n = 1 << nkm->n.width; - _nkm.min_k = 1; + _nkm.min_k = nkm->k.min; _nkm.max_k = 1 << nkm->k.width; _nkm.min_m = 1; _nkm.max_m = nkm->m.max ?: 1 << nkm->m.width; |