Skip to content

Commit 1dc5da9

Browse files
Dr. David Alan Gilbertbebarino
authored andcommitted
clk: bcm: kona: Remove unused scaled_div_build
scaled_div_build() was added in 2014 by commit 1f27f15 ("clk: bcm281xx: add initial clock framework support") but hasn't been used. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://lore.kernel.org/r/20250505013545.359745-1-linux@treblig.org Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 0af2f6b commit 1dc5da9

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

drivers/clk/bcm/clk-kona.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,6 @@ static inline u64 scaled_div_value(struct bcm_clk_div *div, u32 reg_div)
5353
return (u64)reg_div + ((u64)1 << div->u.s.frac_width);
5454
}
5555

56-
/*
57-
* Build a scaled divider value as close as possible to the
58-
* given whole part (div_value) and fractional part (expressed
59-
* in billionths).
60-
*/
61-
u64 scaled_div_build(struct bcm_clk_div *div, u32 div_value, u32 billionths)
62-
{
63-
u64 combined;
64-
65-
BUG_ON(!div_value);
66-
BUG_ON(billionths >= BILLION);
67-
68-
combined = (u64)div_value * BILLION + billionths;
69-
combined <<= div->u.s.frac_width;
70-
71-
return DIV_ROUND_CLOSEST_ULL(combined, BILLION);
72-
}
73-
7456
/* The scaled minimum divisor representable by a divider */
7557
static inline u64
7658
scaled_div_min(struct bcm_clk_div *div)

drivers/clk/bcm/clk-kona.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,6 @@ extern struct clk_ops kona_peri_clk_ops;
492492
/* Externally visible functions */
493493

494494
extern u64 scaled_div_max(struct bcm_clk_div *div);
495-
extern u64 scaled_div_build(struct bcm_clk_div *div, u32 div_value,
496-
u32 billionths);
497495

498496
extern void __init kona_dt_ccu_setup(struct ccu_data *ccu,
499497
struct device_node *node);

0 commit comments

Comments
 (0)