Skip to content

Commit

Permalink
fixup over ("LiteX: driver for MMCM")
Browse files Browse the repository at this point in the history
FIXME: if possible, replace calls to '_litex_[get|set]_reg()' with
the appropriate 'litex_[read|write][8|16|32|64]()'. If the size of
a LiteX CSR access can't be determined at compile time, we should
make available a set of public 'litex_[get|set]_reg()' methods that
add 'BUG_ON(reg_size > sizeof(u64) || reg_size < 1)' on top of the
call to '_litex_[get|set]_reg()'.
  • Loading branch information
gsomlo committed Jan 10, 2021
1 parent e3b9394 commit 7d6b20b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/clk/clk-litex.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,14 @@ static inline void litex_clk_set_reg(struct clk_hw *clk_hw, u32 reg, u32 val)
{
struct litex_clk_clkout *l_clk = clk_hw_to_litex_clk_clkout(clk_hw);

litex_set_reg(l_clk->base + drp[reg].offset, drp[reg].size, val);
_litex_set_reg(l_clk->base + drp[reg].offset, drp[reg].size, val);
}

static inline u32 litex_clk_get_reg(struct clk_hw *clk_hw, u32 reg)
{
struct litex_clk_clkout *l_clk = clk_hw_to_litex_clk_clkout(clk_hw);

return litex_get_reg(l_clk->base + drp[reg].offset, drp[reg].size);
return _litex_get_reg(l_clk->base + drp[reg].offset, drp[reg].size);
}

static inline void litex_clk_assert_reg(struct clk_hw *clk_hw, u32 reg)
Expand Down

0 comments on commit 7d6b20b

Please sign in to comment.