@@ -196,7 +196,7 @@ static void __init at91rm9200_pmc_setup(struct device_node *np)
at91rm9200_systemck[5].parent_hw = at91rm9200_pmc->pchws[3];
for (i = 0; i < ARRAY_SIZE(at91rm9200_systemck); i++) {
hw = at91_clk_register_system(regmap, at91rm9200_systemck[i].n,
- NULL, at91rm9200_systemck[i].parent_hw,
+ at91rm9200_systemck[i].parent_hw,
at91rm9200_systemck[i].id, 0);
if (IS_ERR(hw))
goto err_free;
@@ -475,7 +475,7 @@ static void __init at91sam926x_pmc_setup(struct device_node *np,
}
for (i = 0; i < data->num_sck; i++) {
hw = at91_clk_register_system(regmap, data->sck[i].n,
- NULL, data->sck[i].parent_hw,
+ data->sck[i].parent_hw,
data->sck[i].id, 0);
if (IS_ERR(hw))
goto err_free;
@@ -213,7 +213,7 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np)
at91sam9g45_systemck[3].parent_hw = at91sam9g45_pmc->pchws[1];
for (i = 0; i < ARRAY_SIZE(at91sam9g45_systemck); i++) {
hw = at91_clk_register_system(regmap, at91sam9g45_systemck[i].n,
- NULL, at91sam9g45_systemck[i].parent_hw,
+ at91sam9g45_systemck[i].parent_hw,
at91sam9g45_systemck[i].id,
at91sam9g45_systemck[i].flags);
if (IS_ERR(hw))
@@ -241,7 +241,7 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np)
at91sam9n12_systemck[5].parent_hw = at91sam9n12_pmc->pchws[1];
for (i = 0; i < ARRAY_SIZE(at91sam9n12_systemck); i++) {
hw = at91_clk_register_system(regmap, at91sam9n12_systemck[i].n,
- NULL, at91sam9n12_systemck[i].parent_hw,
+ at91sam9n12_systemck[i].parent_hw,
at91sam9n12_systemck[i].id,
at91sam9n12_systemck[i].flags);
if (IS_ERR(hw))
@@ -164,7 +164,7 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np)
at91sam9rl_systemck[1].parent_hw = at91sam9rl_pmc->pchws[1];
for (i = 0; i < ARRAY_SIZE(at91sam9rl_systemck); i++) {
hw = at91_clk_register_system(regmap, at91sam9rl_systemck[i].n,
- NULL, at91sam9rl_systemck[i].parent_hw,
+ at91sam9rl_systemck[i].parent_hw,
at91sam9rl_systemck[i].id, 0);
if (IS_ERR(hw))
goto err_free;
@@ -265,7 +265,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np,
at91sam9x5_systemck[5].parent_hw = at91sam9x5_pmc->pchws[1];
for (i = 0; i < ARRAY_SIZE(at91sam9x5_systemck); i++) {
hw = at91_clk_register_system(regmap, at91sam9x5_systemck[i].n,
- NULL, at91sam9x5_systemck[i].parent_hw,
+ at91sam9x5_systemck[i].parent_hw,
at91sam9x5_systemck[i].id,
at91sam9x5_systemck[i].flags);
if (IS_ERR(hw))
@@ -275,7 +275,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np,
}
if (has_lcdck) {
- hw = at91_clk_register_system(regmap, "lcdck", NULL,
+ hw = at91_clk_register_system(regmap, "lcdck",
at91sam9x5_pmc->chws[PMC_MCK], 3, 0);
if (IS_ERR(hw))
goto err_free;
@@ -105,7 +105,7 @@ static const struct clk_ops system_ops = {
struct clk_hw * __init
at91_clk_register_system(struct regmap *regmap, const char *name,
- const char *parent_name, struct clk_hw *parent_hw, u8 id,
+ struct clk_hw *parent_hw, u8 id,
unsigned long flags)
{
struct clk_system *sys;
@@ -113,7 +113,7 @@ at91_clk_register_system(struct regmap *regmap, const char *name,
struct clk_init_data init = {};
int ret;
- if (!(parent_name || parent_hw) || id > SYSTEM_MAX_ID)
+ if (!parent_hw || id > SYSTEM_MAX_ID)
return ERR_PTR(-EINVAL);
sys = kzalloc(sizeof(*sys), GFP_KERNEL);
@@ -122,10 +122,7 @@ at91_clk_register_system(struct regmap *regmap, const char *name,
init.name = name;
init.ops = &system_ops;
- if (parent_hw)
- init.parent_hws = (const struct clk_hw **)&parent_hw;
- else
- init.parent_names = &parent_name;
+ init.parent_hws = (const struct clk_hw **)&parent_hw;
init.num_parents = 1;
init.flags = CLK_SET_RATE_PARENT | flags;
@@ -1020,7 +1020,7 @@ static void __init of_at91rm9200_clk_sys_setup(struct device_node *np)
if (!strcmp(sysclknp->name, "ddrck"))
flags = CLK_IS_CRITICAL;
- hw = at91_clk_register_system(regmap, name, NULL, parent_hw,
+ hw = at91_clk_register_system(regmap, name, parent_hw,
id, flags);
if (IS_ERR(hw))
continue;
@@ -242,7 +242,7 @@ at91sam9x5_clk_register_smd(struct regmap *regmap, const char *name,
struct clk_hw * __init
at91_clk_register_system(struct regmap *regmap, const char *name,
- const char *parent_name, struct clk_hw *parent_hw,
+ struct clk_hw *parent_hw,
u8 id, unsigned long flags);
struct clk_hw * __init
@@ -335,7 +335,7 @@ static void __init sam9x60_pmc_setup(struct device_node *np)
sam9x60_systemck[4].parent_hw = sam9x60_pmc->chws[PMC_MCK];
for (i = 0; i < ARRAY_SIZE(sam9x60_systemck); i++) {
hw = at91_clk_register_system(regmap, sam9x60_systemck[i].n,
- NULL, sam9x60_systemck[i].parent_hw,
+ sam9x60_systemck[i].parent_hw,
sam9x60_systemck[i].id,
sam9x60_systemck[i].flags);
if (IS_ERR(hw))
@@ -324,7 +324,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np)
sama5d2_systemck[7].parent_hw = sama5d2_pmc->chws[PMC_MCK];
for (i = 0; i < ARRAY_SIZE(sama5d2_systemck); i++) {
hw = at91_clk_register_system(regmap, sama5d2_systemck[i].n,
- NULL, sama5d2_systemck[i].parent_hw,
+ sama5d2_systemck[i].parent_hw,
sama5d2_systemck[i].id,
sama5d2_systemck[i].flags);
if (IS_ERR(hw))
@@ -246,7 +246,7 @@ static void __init sama5d3_pmc_setup(struct device_node *np)
sama5d3_systemck[7].parent_hw = sama5d3_pmc->pchws[2];
for (i = 0; i < ARRAY_SIZE(sama5d3_systemck); i++) {
hw = at91_clk_register_system(regmap, sama5d3_systemck[i].n,
- NULL, sama5d3_systemck[i].parent_hw,
+ sama5d3_systemck[i].parent_hw,
sama5d3_systemck[i].id,
sama5d3_systemck[i].flags);
if (IS_ERR(hw))
@@ -269,7 +269,7 @@ static void __init sama5d4_pmc_setup(struct device_node *np)
sama5d4_systemck[7].parent_hw = sama5d4_pmc->pchws[2];
for (i = 0; i < ARRAY_SIZE(sama5d4_systemck); i++) {
hw = at91_clk_register_system(regmap, sama5d4_systemck[i].n,
- NULL, sama5d4_systemck[i].parent_hw,
+ sama5d4_systemck[i].parent_hw,
sama5d4_systemck[i].id,
sama5d4_systemck[i].flags);
if (IS_ERR(hw))
@@ -1183,7 +1183,7 @@ static void __init sama7g5_pmc_setup(struct device_node *np)
for (i = 0; i < ARRAY_SIZE(sama7g5_systemck); i++) {
hw = at91_clk_register_system(regmap, sama7g5_systemck[i].n,
- NULL, sama7g5_pmc->pchws[i],
+ sama7g5_pmc->pchws[i],
sama7g5_systemck[i].id, 0);
if (IS_ERR(hw))
goto err_free;
Remove parent_names support as parent_hw support is now available on all platforms using clk-system 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 | 4 ++-- drivers/clk/at91/clk-system.c | 9 +++------ 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, 17 insertions(+), 20 deletions(-)