Skip to content

Commit

Permalink
powerpc/512x: mark clocks as big endian
Browse files Browse the repository at this point in the history
These clocks' registers are accessed as big endian, so mark them as
such.

Signed-off-by: Jonas Gorski <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
  • Loading branch information
KanjiMonster authored and bebarino committed Apr 23, 2019
1 parent 3a72751 commit ce0c890
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions arch/powerpc/platforms/512x/clock-commonclk.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ static inline struct clk *mpc512x_clk_divider(
const char *name, const char *parent_name, u8 clkflags,
u32 __iomem *reg, u8 pos, u8 len, int divflags)
{
divflags |= CLK_DIVIDER_BIG_ENDIAN;
return clk_register_divider(NULL, name, parent_name, clkflags,
reg, pos, len, divflags, &clklock);
}
Expand All @@ -250,7 +251,7 @@ static inline struct clk *mpc512x_clk_divtable(
{
u8 divflags;

divflags = 0;
divflags = CLK_DIVIDER_BIG_ENDIAN;
return clk_register_divider_table(NULL, name, parent_name, 0,
reg, pos, len, divflags,
divtab, &clklock);
Expand All @@ -261,10 +262,12 @@ static inline struct clk *mpc512x_clk_gated(
u32 __iomem *reg, u8 pos)
{
int clkflags;
u8 gateflags;

clkflags = CLK_SET_RATE_PARENT;
gateflags = CLK_GATE_BIG_ENDIAN;
return clk_register_gate(NULL, name, parent_name, clkflags,
reg, pos, 0, &clklock);
reg, pos, gateflags, &clklock);
}

static inline struct clk *mpc512x_clk_muxed(const char *name,
Expand All @@ -275,7 +278,7 @@ static inline struct clk *mpc512x_clk_muxed(const char *name,
u8 muxflags;

clkflags = CLK_SET_RATE_PARENT;
muxflags = 0;
muxflags = CLK_MUX_BIG_ENDIAN;
return clk_register_mux(NULL, name,
parent_names, parent_count, clkflags,
reg, pos, len, muxflags, &clklock);
Expand Down

0 comments on commit ce0c890

Please sign in to comment.