Neither clk_register_mux_table() nor clk_hw_register_mux_table()
are called outside of clk-mux.c , fold both into clk_register_mux().
No functional change.

Signed-off-by: Marek Vasut <ma...@denx.de>
---
Cc: Adam Ford <aford...@gmail.com>
Cc: Christoph Niedermaier <cniederma...@dh-electronics.com>
Cc: Dong Aisheng <aisheng.d...@nxp.com>
Cc: Fabio Estevam <feste...@denx.de>
Cc: Hou Zhiqiang <zhiqiang....@nxp.com>
Cc: Michael Trimarchi <mich...@amarulasolutions.com>
Cc: Peng Fan <peng....@nxp.com>
Cc: Tim Harvey <thar...@gateworks.com>
Cc: Tom Rini <tr...@konsulko.com>
Cc: u-boot@lists.denx.de
Cc: uboot-...@nxp.com
---
V2: Rebase on u-boot/next with additional clock patches
---
 drivers/clk/clk-mux.c | 39 +++++----------------------------------
 1 file changed, 5 insertions(+), 34 deletions(-)

diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c
index 62477e15d27..9507a779525 100644
--- a/drivers/clk/clk-mux.c
+++ b/drivers/clk/clk-mux.c
@@ -159,15 +159,15 @@ const struct clk_ops clk_mux_ops = {
        .set_parent = clk_mux_set_parent,
 };
 
-struct clk *clk_hw_register_mux_table(struct device *dev, const char *name,
+struct clk *clk_register_mux(struct device *dev, const char *name,
                const char * const *parent_names, u8 num_parents,
                unsigned long flags,
-               void __iomem *reg, u8 shift, u32 mask,
-               u8 clk_mux_flags, u32 *table)
+               void __iomem *reg, u8 shift, u8 width,
+               u8 clk_mux_flags)
 {
+       u32 mask = BIT(width) - 1;
        struct clk_mux *mux;
        struct clk *clk;
-       u8 width = 0;
        int ret;
 
        if (clk_mux_flags & CLK_MUX_HIWORD_MASK) {
@@ -192,7 +192,7 @@ struct clk *clk_hw_register_mux_table(struct device *dev, 
const char *name,
        mux->shift = shift;
        mux->mask = mask;
        mux->flags = clk_mux_flags;
-       mux->table = table;
+       mux->table = NULL;
 #if IS_ENABLED(CONFIG_SANDBOX_CLK_CCF)
        mux->io_mux_val = *(u32 *)reg;
 #endif
@@ -216,35 +216,6 @@ struct clk *clk_hw_register_mux_table(struct device *dev, 
const char *name,
        return clk;
 }
 
-struct clk *clk_register_mux_table(struct device *dev, const char *name,
-               const char * const *parent_names, u8 num_parents,
-               unsigned long flags,
-               void __iomem *reg, u8 shift, u32 mask,
-               u8 clk_mux_flags, u32 *table)
-{
-       struct clk *clk;
-
-       clk = clk_hw_register_mux_table(dev, name, parent_names, num_parents,
-                                      flags, reg, shift, mask, clk_mux_flags,
-                                      table);
-       if (IS_ERR(clk))
-               return ERR_CAST(clk);
-       return clk;
-}
-
-struct clk *clk_register_mux(struct device *dev, const char *name,
-               const char * const *parent_names, u8 num_parents,
-               unsigned long flags,
-               void __iomem *reg, u8 shift, u8 width,
-               u8 clk_mux_flags)
-{
-       u32 mask = BIT(width) - 1;
-
-       return clk_register_mux_table(dev, name, parent_names, num_parents,
-                                     flags, reg, shift, mask, clk_mux_flags,
-                                     NULL);
-}
-
 U_BOOT_DRIVER(ccf_clk_mux) = {
        .name   = UBOOT_DM_CLK_CCF_MUX,
        .id     = UCLASS_CLK,
-- 
2.47.2

Reply via email to