Skip to content

Commit

Permalink
clk: sunxi-ng: mux: Increase fixed pre-divider div size
Browse files Browse the repository at this point in the history
Some clocks have a predivider value that is larger than what u8 can
store. One such example is the OUT clk found on A20/A31, which has
a /750 pre-divider on one of the osc24M parents.

Increase the size of the div field to u16.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
  • Loading branch information
Chen-Yu Tsai authored and Maxime Ripard committed Aug 8, 2016
1 parent 29b4817 commit 178ca53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/clk/sunxi-ng/ccu_mux.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void ccu_mux_helper_adjust_parent_for_prediv(struct ccu_common *common,
int parent_index,
unsigned long *parent_rate)
{
u8 prediv = 1;
u16 prediv = 1;
u32 reg;

if (!((common->features & CCU_FEATURE_FIXED_PREDIV) ||
Expand Down
2 changes: 1 addition & 1 deletion drivers/clk/sunxi-ng/ccu_mux.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct ccu_mux_internal {

struct {
u8 index;
u8 div;
u16 div;
} fixed_prediv;

struct {
Expand Down

0 comments on commit 178ca53

Please sign in to comment.