diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 17:35:05 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 17:39:31 +0000 |
commit | 85c675d0d09a45a135bddd15d7b385f8758c32fb (patch) | |
tree | 76267dbc9b9a130337be3640948fe397b04ac629 /drivers/clk/sprd/div.c | |
parent | Adding upstream version 6.6.15. (diff) | |
download | linux-85c675d0d09a45a135bddd15d7b385f8758c32fb.tar.xz linux-85c675d0d09a45a135bddd15d7b385f8758c32fb.zip |
Adding upstream version 6.7.7.upstream/6.7.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/clk/sprd/div.c')
-rw-r--r-- | drivers/clk/sprd/div.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/clk/sprd/div.c b/drivers/clk/sprd/div.c index c7261630ca..936782c241 100644 --- a/drivers/clk/sprd/div.c +++ b/drivers/clk/sprd/div.c @@ -25,7 +25,7 @@ unsigned long sprd_div_helper_recalc_rate(struct sprd_clk_common *common, unsigned long val; unsigned int reg; - regmap_read(common->regmap, common->reg, ®); + regmap_read(common->regmap, common->reg + div->offset, ®); val = reg >> div->shift; val &= (1 << div->width) - 1; @@ -53,10 +53,10 @@ int sprd_div_helper_set_rate(const struct sprd_clk_common *common, val = divider_get_val(rate, parent_rate, NULL, div->width, 0); - regmap_read(common->regmap, common->reg, ®); + regmap_read(common->regmap, common->reg + div->offset, ®); reg &= ~GENMASK(div->width + div->shift - 1, div->shift); - regmap_write(common->regmap, common->reg, + regmap_write(common->regmap, common->reg + div->offset, reg | (val << div->shift)); return 0; |