@@ -178,7 +178,7 @@ static void __init at91rm9200_pmc_setup(struct device_node *np)
snprintf(name, sizeof(name), "prog%d", i);
hw = at91_clk_register_programmable(regmap, name,
- NULL, parent_hws, 4, i,
+ parent_hws, 4, i,
&at91rm9200_programmable_layout,
NULL);
if (IS_ERR(hw))
@@ -451,7 +451,7 @@ static void __init at91sam926x_pmc_setup(struct device_node *np,
snprintf(name, sizeof(name), "prog%d", i);
hw = at91_clk_register_programmable(regmap, name,
- NULL, parent_hws, 4, i,
+ parent_hws, 4, i,
&at91rm9200_programmable_layout,
NULL);
if (IS_ERR(hw))
@@ -197,7 +197,7 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np)
snprintf(name, sizeof(name), "prog%d", i);
hw = at91_clk_register_programmable(regmap, name,
- NULL, parent_hws, 5, i,
+ parent_hws, 5, i,
&at91sam9g45_programmable_layout,
NULL);
if (IS_ERR(hw))
@@ -223,7 +223,7 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np)
snprintf(name, sizeof(name), "prog%d", i);
hw = at91_clk_register_programmable(regmap, name,
- NULL, parent_hws, 5, i,
+ parent_hws, 5, i,
&at91sam9x5_programmable_layout,
NULL);
if (IS_ERR(hw))
@@ -150,7 +150,7 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np)
snprintf(name, sizeof(name), "prog%d", i);
hw = at91_clk_register_programmable(regmap, name,
- NULL, parent_hws, 5, i,
+ parent_hws, 5, i,
&at91rm9200_programmable_layout,
NULL);
if (IS_ERR(hw))
@@ -247,7 +247,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np,
snprintf(name, sizeof(name), "prog%d", i);
hw = at91_clk_register_programmable(regmap, name,
- NULL, parent_hws, 5, i,
+ parent_hws, 5, i,
&at91sam9x5_programmable_layout,
NULL);
if (IS_ERR(hw))
@@ -213,8 +213,7 @@ static const struct clk_ops programmable_ops = {
};
struct clk_hw * __init
-at91_clk_register_programmable(struct regmap *regmap,
- const char *name, const char **parent_names,
+at91_clk_register_programmable(struct regmap *regmap, const char *name,
struct clk_hw **parent_hws, u8 num_parents, u8 id,
const struct clk_programmable_layout *layout,
u32 *mux_table)
@@ -224,7 +223,7 @@ at91_clk_register_programmable(struct regmap *regmap,
struct clk_init_data init = {};
int ret;
- if (id > PROG_ID_MAX || !(parent_names || parent_hws))
+ if (id > PROG_ID_MAX || !parent_hws)
return ERR_PTR(-EINVAL);
prog = kzalloc(sizeof(*prog), GFP_KERNEL);
@@ -233,10 +232,7 @@ at91_clk_register_programmable(struct regmap *regmap,
init.name = name;
init.ops = &programmable_ops;
- if (parent_hws)
- init.parent_hws = (const struct clk_hw **)parent_hws;
- else
- init.parent_names = parent_names;
+ init.parent_hws = (const struct clk_hw **)parent_hws;
init.num_parents = num_parents;
init.flags = CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE;
@@ -860,7 +860,7 @@ of_at91_clk_prog_setup(struct device_node *np,
name = progclknp->name;
hw = at91_clk_register_programmable(regmap, name,
- NULL, parent_hws, num_parents,
+ parent_hws, num_parents,
id, layout, mux_table);
if (IS_ERR(hw))
continue;
@@ -226,7 +226,7 @@ sam9x60_clk_register_frac_pll(struct regmap *regmap, spinlock_t *lock,
struct clk_hw * __init
at91_clk_register_programmable(struct regmap *regmap, const char *name,
- const char **parent_names, struct clk_hw **parent_hws,
+ struct clk_hw **parent_hws,
u8 num_parents, u8 id,
const struct clk_programmable_layout *layout,
u32 *mux_table);
@@ -318,7 +318,7 @@ static void __init sam9x60_pmc_setup(struct device_node *np)
snprintf(name, sizeof(name), "prog%d", i);
hw = at91_clk_register_programmable(regmap, name,
- NULL, parent_hws, 6, i,
+ parent_hws, 6, i,
&sam9x60_programmable_layout,
NULL);
if (IS_ERR(hw))
@@ -304,7 +304,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np)
snprintf(name, sizeof(name), "prog%d", i);
hw = at91_clk_register_programmable(regmap, name,
- NULL, parent_hws, 6, i,
+ parent_hws, 6, i,
&sama5d2_programmable_layout,
NULL);
if (IS_ERR(hw))
@@ -226,7 +226,7 @@ static void __init sama5d3_pmc_setup(struct device_node *np)
snprintf(name, sizeof(name), "prog%d", i);
hw = at91_clk_register_programmable(regmap, name,
- NULL, parent_hws, 5, i,
+ parent_hws, 5, i,
&at91sam9x5_programmable_layout,
NULL);
if (IS_ERR(hw))
@@ -249,7 +249,7 @@ static void __init sama5d4_pmc_setup(struct device_node *np)
snprintf(name, sizeof(name), "prog%d", i);
hw = at91_clk_register_programmable(regmap, name,
- NULL, parent_hws, 5, i,
+ parent_hws, 5, i,
&at91sam9x5_programmable_layout,
NULL);
if (IS_ERR(hw))
@@ -1171,7 +1171,7 @@ static void __init sama7g5_pmc_setup(struct device_node *np)
snprintf(name, sizeof(name), "prog%d", i);
- hw = at91_clk_register_programmable(regmap, name, NULL, parent_hws,
+ hw = at91_clk_register_programmable(regmap, name, parent_hws,
9, i,
&programmable_layout,
sama7g5_prog_mux_table);
Remove parent_names support as parent_hw support is now available on all platforms using clk-programmable driver. Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> --- drivers/clk/at91/at91rm9200.c | 2 +- drivers/clk/at91/at91sam9260.c | 2 +- drivers/clk/at91/at91sam9g45.c | 2 +- drivers/clk/at91/at91sam9n12.c | 2 +- drivers/clk/at91/at91sam9rl.c | 2 +- drivers/clk/at91/at91sam9x5.c | 2 +- drivers/clk/at91/clk-programmable.c | 10 +++------- drivers/clk/at91/dt-compat.c | 2 +- drivers/clk/at91/pmc.h | 2 +- drivers/clk/at91/sam9x60.c | 2 +- drivers/clk/at91/sama5d2.c | 2 +- drivers/clk/at91/sama5d3.c | 2 +- drivers/clk/at91/sama5d4.c | 2 +- drivers/clk/at91/sama7g5.c | 2 +- 14 files changed, 16 insertions(+), 20 deletions(-)