Skip to content

Commit 1ba5395

Browse files
ziyao233bebarino
authored andcommitted
clk: loongson2: Allow zero divisors for dividers
LS2K0300 and LS2K0500 ship divider clocks which allows zero divisors, in which case the divider acts the same as one is specified. Let's pass CLK_DIVIDER_ALLOW_ZERO when registering divider clocks to prepare for future introduction of these clocks. Signed-off-by: Yao Zi <ziyao@disroot.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 897117e commit 1ba5395

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/clk/clk-loongson2.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,8 @@ static int loongson2_clk_probe(struct platform_device *pdev)
361361
p->parent_name, 0,
362362
clp->base + p->reg_offset,
363363
p->div_shift, p->div_width,
364-
CLK_DIVIDER_ONE_BASED,
364+
CLK_DIVIDER_ONE_BASED |
365+
CLK_DIVIDER_ALLOW_ZERO,
365366
&clp->clk_lock);
366367
break;
367368
case CLK_TYPE_GATE:

0 commit comments

Comments
 (0)