@@ -152,7 +152,7 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np)
at91sam9g45_pmc->chws[PMC_PLLACK] = hw;
- hw = at91_clk_register_utmi(regmap, NULL, "utmick", NULL, at91sam9g45_pmc->chws[PMC_MAIN]);
+ hw = at91_clk_register_utmi(regmap, NULL, "utmick", at91sam9g45_pmc->chws[PMC_MAIN]);
if (IS_ERR(hw))
goto err_free;
@@ -112,7 +112,7 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np)
at91sam9rl_pmc->chws[PMC_PLLACK] = hw;
- hw = at91_clk_register_utmi(regmap, NULL, "utmick", NULL, at91sam9rl_pmc->chws[PMC_MAIN]);
+ hw = at91_clk_register_utmi(regmap, NULL, "utmick", at91sam9rl_pmc->chws[PMC_MAIN]);
if (IS_ERR(hw))
goto err_free;
@@ -200,7 +200,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np,
at91sam9x5_pmc->chws[PMC_PLLACK] = hw;
- hw = at91_clk_register_utmi(regmap, NULL, "utmick", NULL, at91sam9x5_pmc->chws[PMC_MAIN]);
+ hw = at91_clk_register_utmi(regmap, NULL, "utmick", at91sam9x5_pmc->chws[PMC_MAIN]);
if (IS_ERR(hw))
goto err_free;
@@ -143,8 +143,7 @@ static const struct clk_ops utmi_ops = {
static struct clk_hw * __init
at91_clk_register_utmi_internal(struct regmap *regmap_pmc,
struct regmap *regmap_sfr,
- const char *name, const char *parent_name,
- struct clk_hw *parent_hw,
+ const char *name, struct clk_hw *parent_hw,
const struct clk_ops *ops, unsigned long flags)
{
struct clk_utmi *utmi;
@@ -152,7 +151,7 @@ at91_clk_register_utmi_internal(struct regmap *regmap_pmc,
struct clk_init_data init = {};
int ret;
- if (!(parent_name || parent_hw))
+ if (!parent_hw)
return ERR_PTR(-EINVAL);
utmi = kzalloc(sizeof(*utmi), GFP_KERNEL);
@@ -161,13 +160,8 @@ at91_clk_register_utmi_internal(struct regmap *regmap_pmc,
init.name = name;
init.ops = ops;
- if (parent_hw) {
- init.parent_hws = parent_hw ? (const struct clk_hw **)&parent_hw : NULL;
- init.num_parents = parent_hw ? 1 : 0;
- } 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 = flags;
utmi->hw.init = &init;
@@ -186,11 +180,10 @@ at91_clk_register_utmi_internal(struct regmap *regmap_pmc,
struct clk_hw * __init
at91_clk_register_utmi(struct regmap *regmap_pmc, struct regmap *regmap_sfr,
- const char *name, const char *parent_name,
- struct clk_hw *parent_hw)
+ const char *name, struct clk_hw *parent_hw)
{
return at91_clk_register_utmi_internal(regmap_pmc, regmap_sfr, name,
- parent_name, parent_hw, &utmi_ops, CLK_SET_RATE_GATE);
+ parent_hw, &utmi_ops, CLK_SET_RATE_GATE);
}
static int clk_utmi_sama7g5_prepare(struct clk_hw *hw)
@@ -289,8 +282,8 @@ static const struct clk_ops sama7g5_utmi_ops = {
struct clk_hw * __init
at91_clk_sama7g5_register_utmi(struct regmap *regmap_pmc, const char *name,
- const char *parent_name, struct clk_hw *parent_hw)
+ struct clk_hw *parent_hw)
{
return at91_clk_register_utmi_internal(regmap_pmc, NULL, name,
- parent_name, parent_hw, &sama7g5_utmi_ops, 0);
+ parent_hw, &sama7g5_utmi_ops, 0);
}
@@ -1189,7 +1189,7 @@ static void __init of_at91sam9x5_clk_utmi_setup(struct device_node *np)
regmap_sfr = NULL;
}
- hw = at91_clk_register_utmi(regmap_pmc, regmap_sfr, name, NULL, parent_hw);
+ hw = at91_clk_register_utmi(regmap_pmc, regmap_sfr, name, parent_hw);
if (IS_ERR(hw))
return;
@@ -263,11 +263,10 @@ at91rm9200_clk_register_usb(struct regmap *regmap, const char *name,
struct clk_hw * __init
at91_clk_register_utmi(struct regmap *regmap_pmc, struct regmap *regmap_sfr,
- const char *name, const char *parent_name,
- struct clk_hw *parent_hw);
+ const char *name, struct clk_hw *parent_hw);
struct clk_hw * __init
at91_clk_sama7g5_register_utmi(struct regmap *regmap, const char *name,
- const char *parent_name, struct clk_hw *parent_hw);
+ struct clk_hw *parent_hw);
#endif /* __PMC_H_ */
@@ -253,7 +253,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np)
if (IS_ERR(regmap_sfr))
regmap_sfr = NULL;
- hw = at91_clk_register_utmi(regmap, regmap_sfr, "utmick", NULL,
+ hw = at91_clk_register_utmi(regmap, regmap_sfr, "utmick",
sama5d2_pmc->chws[PMC_MAIN]);
if (IS_ERR(hw))
goto err_free;
@@ -179,7 +179,7 @@ static void __init sama5d3_pmc_setup(struct device_node *np)
sama5d3_pmc->chws[PMC_PLLACK] = hw;
- hw = at91_clk_register_utmi(regmap, NULL, "utmick", NULL, mainck_hw);
+ hw = at91_clk_register_utmi(regmap, NULL, "utmick", mainck_hw);
if (IS_ERR(hw))
goto err_free;
@@ -194,7 +194,7 @@ static void __init sama5d4_pmc_setup(struct device_node *np)
sama5d4_pmc->chws[PMC_PLLACK] = hw;
- hw = at91_clk_register_utmi(regmap, NULL, "utmick", NULL, mainck_hw);
+ hw = at91_clk_register_utmi(regmap, NULL, "utmick", mainck_hw);
if (IS_ERR(hw))
goto err_free;
@@ -1151,7 +1151,7 @@ static void __init sama7g5_pmc_setup(struct device_node *np)
sama7g5_pmc->chws[sama7g5_mckx[i].eid] = hw;
}
- hw = at91_clk_sama7g5_register_utmi(regmap, "utmick", NULL, main_xtal_hw);
+ hw = at91_clk_sama7g5_register_utmi(regmap, "utmick", main_xtal_hw);
if (IS_ERR(hw))
goto err_free;
Remove parent_names support as parent_hw support is now available on all platforms using clk-utmi driver. Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> --- drivers/clk/at91/at91sam9g45.c | 2 +- drivers/clk/at91/at91sam9rl.c | 2 +- drivers/clk/at91/at91sam9x5.c | 2 +- drivers/clk/at91/clk-utmi.c | 23 ++++++++--------------- drivers/clk/at91/dt-compat.c | 2 +- drivers/clk/at91/pmc.h | 5 ++--- drivers/clk/at91/sama5d2.c | 2 +- drivers/clk/at91/sama5d3.c | 2 +- drivers/clk/at91/sama5d4.c | 2 +- drivers/clk/at91/sama7g5.c | 2 +- 10 files changed, 18 insertions(+), 26 deletions(-)