@@ -83,7 +83,7 @@ static const struct clk_ops h32mx_ops = {
struct clk_hw * __init
at91_clk_register_h32mx(struct regmap *regmap, const char *name,
- const char *parent_name, struct clk_hw *parent_hw)
+ struct clk_hw *parent_hw)
{
struct clk_sama5d4_h32mx *h32mxclk;
struct clk_init_data init = {};
@@ -95,13 +95,8 @@ at91_clk_register_h32mx(struct regmap *regmap, const char *name,
init.name = name;
init.ops = &h32mx_ops;
- if (parent_hw) {
- init.parent_hws = (const struct clk_hw **)&parent_hw;
- init.num_parents = 1;
- } else {
- init.parent_names = parent_name ? &parent_name : NULL;
- init.num_parents = parent_name ? 1 : 0;
- }
+ init.parent_hws = parent_hw ? (const struct clk_hw **)&parent_hw : NULL;
+ init.num_parents = parent_hw ? 1 : 0;
init.flags = CLK_SET_RATE_GATE;
h32mxclk->hw.init = &init;
@@ -234,7 +234,7 @@ static void __init of_sama5d4_clk_h32mx_setup(struct device_node *np)
if (!parent_hw)
return;
- hw = at91_clk_register_h32mx(regmap, name, NULL, parent_hw);
+ hw = at91_clk_register_h32mx(regmap, name, parent_hw);
if (IS_ERR(hw))
return;
@@ -149,7 +149,7 @@ at91_clk_register_generated(struct regmap *regmap, spinlock_t *lock,
struct clk_hw * __init
at91_clk_register_h32mx(struct regmap *regmap, const char *name,
- const char *parent_name, struct clk_hw *parent_hw);
+ struct clk_hw *parent_hw);
struct clk_hw * __init
at91_clk_i2s_mux_register(struct regmap *regmap, const char *name,
@@ -280,7 +280,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np)
sama5d2_pmc->chws[PMC_MCK] = hw;
- hw = at91_clk_register_h32mx(regmap, "h32mxck", NULL, sama5d2_pmc->chws[PMC_MCK]);
+ hw = at91_clk_register_h32mx(regmap, "h32mxck", sama5d2_pmc->chws[PMC_MCK]);
if (IS_ERR(hw))
goto err_free;
@@ -220,7 +220,7 @@ static void __init sama5d4_pmc_setup(struct device_node *np)
sama5d4_pmc->chws[PMC_MCK] = hw;
- hw = at91_clk_register_h32mx(regmap, "h32mxck", NULL, sama5d4_pmc->chws[PMC_MCK]);
+ hw = at91_clk_register_h32mx(regmap, "h32mxck", sama5d4_pmc->chws[PMC_MCK]);
if (IS_ERR(hw))
goto err_free;
Remove parent_names support as parent_hw support is now available on all platforms using clk-h32mx driver. Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> --- drivers/clk/at91/clk-h32mx.c | 11 +++-------- drivers/clk/at91/dt-compat.c | 2 +- drivers/clk/at91/pmc.h | 2 +- drivers/clk/at91/sama5d2.c | 2 +- drivers/clk/at91/sama5d4.c | 2 +- 5 files changed, 7 insertions(+), 12 deletions(-)