clk: bcm: kona: Remove unused scaled_div_build
authorDr. David Alan Gilbert <linux@treblig.org>
Mon, 5 May 2025 01:35:45 +0000 (02:35 +0100)
committerStephen Boyd <sboyd@kernel.org>
Tue, 6 May 2025 21:35:50 +0000 (14:35 -0700)
scaled_div_build() was added in 2014 by
commit 1f27f15258bf ("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>
drivers/clk/bcm/clk-kona.c
drivers/clk/bcm/clk-kona.h

index 2b0ea882f1e41716722ff67c06ae7d055c350e14..0171e6b2bfcad51a91adc15f41405aeeb351c260 100644 (file)
@@ -53,24 +53,6 @@ static inline u64 scaled_div_value(struct bcm_clk_div *div, u32 reg_div)
        return (u64)reg_div + ((u64)1 << div->u.s.frac_width);
 }
 
-/*
- * Build a scaled divider value as close as possible to the
- * given whole part (div_value) and fractional part (expressed
- * in billionths).
- */
-u64 scaled_div_build(struct bcm_clk_div *div, u32 div_value, u32 billionths)
-{
-       u64 combined;
-
-       BUG_ON(!div_value);
-       BUG_ON(billionths >= BILLION);
-
-       combined = (u64)div_value * BILLION + billionths;
-       combined <<= div->u.s.frac_width;
-
-       return DIV_ROUND_CLOSEST_ULL(combined, BILLION);
-}
-
 /* The scaled minimum divisor representable by a divider */
 static inline u64
 scaled_div_min(struct bcm_clk_div *div)
index e09655024ac2ad42538b924f304b23e87b7db2ce..348a3454ce4013e4e2b06b9542f5895a8397dd8e 100644 (file)
@@ -492,8 +492,6 @@ extern struct clk_ops kona_peri_clk_ops;
 /* Externally visible functions */
 
 extern u64 scaled_div_max(struct bcm_clk_div *div);
-extern u64 scaled_div_build(struct bcm_clk_div *div, u32 div_value,
-                               u32 billionths);
 
 extern void __init kona_dt_ccu_setup(struct ccu_data *ccu,
                                struct device_node *node);