diff options
Diffstat (limited to 'drivers/clk/rockchip/clk-half-divider.c')
-rw-r--r-- | drivers/clk/rockchip/clk-half-divider.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/clk/rockchip/clk-half-divider.c b/drivers/clk/rockchip/clk-half-divider.c index b8da6e799423..ba9f00dc9740 100644 --- a/drivers/clk/rockchip/clk-half-divider.c +++ b/drivers/clk/rockchip/clk-half-divider.c @@ -3,8 +3,9 @@ * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd */ -#include <linux/slab.h> #include <linux/clk-provider.h> +#include <linux/io.h> +#include <linux/slab.h> #include "clk.h" #define div_mask(width) ((1 << (width)) - 1) @@ -24,7 +25,7 @@ static unsigned long clk_half_divider_recalc_rate(struct clk_hw *hw, struct clk_divider *divider = to_clk_divider(hw); unsigned int val; - val = clk_readl(divider->reg) >> divider->shift; + val = readl(divider->reg) >> divider->shift; val &= div_mask(divider->width); val = val * 2 + 3; @@ -124,11 +125,11 @@ static int clk_half_divider_set_rate(struct clk_hw *hw, unsigned long rate, if (divider->flags & CLK_DIVIDER_HIWORD_MASK) { val = div_mask(divider->width) << (divider->shift + 16); } else { - val = clk_readl(divider->reg); + val = readl(divider->reg); val &= ~(div_mask(divider->width) << divider->shift); } val |= value << divider->shift; - clk_writel(val, divider->reg); + writel(val, divider->reg); if (divider->lock) spin_unlock_irqrestore(divider->lock, flags); |