]> git.karo-electronics.de Git - karo-tx-linux.git/commit
clk: sunxi-ng: div: Allow to set a maximum
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 6 Sep 2016 10:29:04 +0000 (12:29 +0200)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Sat, 10 Sep 2016 09:41:18 +0000 (11:41 +0200)
commit87ba9e5962f3f6e9a9a44cc332d1ad222d1c0302
treec56ffb140f8b9f7604e431369852c5732fa72f4c
parente9c959a6d17cd4fddc766bc182dd98478101c00c
clk: sunxi-ng: div: Allow to set a maximum

Some dividers might have a maximum value that is lower than the width of
the register.

Add a field to _ccu_div to handle those case properly. If the field is set
to 0, the code will assume that the maximum value is the maximum one that
can be used with the field register width.

Otherwise, we'll use whatever value has been set.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
drivers/clk/sunxi-ng/ccu_div.h
drivers/clk/sunxi-ng/ccu_mp.c
drivers/clk/sunxi-ng/ccu_nkm.c
drivers/clk/sunxi-ng/ccu_nkmp.c
drivers/clk/sunxi-ng/ccu_nm.c