[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230727053156.13587-36-claudiu.beznea@tuxon.dev>
Date: Thu, 27 Jul 2023 08:31:49 +0300
From: Claudiu Beznea <claudiu.beznea@...on.dev>
To: mturquette@...libre.com, sboyd@...nel.org,
nicolas.ferre@...rochip.com, alexandre.belloni@...tlin.com,
mripard@...nel.org
Cc: linux-clk@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, varshini.rajendran@...rochip.com,
Claudiu Beznea <claudiu.beznea@...on.dev>
Subject: [PATCH 35/42] clk: at91: clk-plldiv: remove parent_names support
Remove parent_names support as parent_hw support is now available on all
platforms using clk-plldiv driver.
Signed-off-by: Claudiu Beznea <claudiu.beznea@...on.dev>
---
drivers/clk/at91/at91sam9g45.c | 2 +-
drivers/clk/at91/at91sam9n12.c | 2 +-
drivers/clk/at91/at91sam9x5.c | 2 +-
drivers/clk/at91/clk-plldiv.c | 11 +++--------
drivers/clk/at91/dt-compat.c | 2 +-
drivers/clk/at91/pmc.h | 2 +-
drivers/clk/at91/sama5d2.c | 2 +-
drivers/clk/at91/sama5d3.c | 2 +-
drivers/clk/at91/sama5d4.c | 2 +-
9 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/drivers/clk/at91/at91sam9g45.c b/drivers/clk/at91/at91sam9g45.c
index ca585440c54f..2bda11df7f0d 100644
--- a/drivers/clk/at91/at91sam9g45.c
+++ b/drivers/clk/at91/at91sam9g45.c
@@ -146,7 +146,7 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np)
if (IS_ERR(hw))
goto err_free;
- hw = at91_clk_register_plldiv(regmap, "plladivck", NULL, hw);
+ hw = at91_clk_register_plldiv(regmap, "plladivck", hw);
if (IS_ERR(hw))
goto err_free;
diff --git a/drivers/clk/at91/at91sam9n12.c b/drivers/clk/at91/at91sam9n12.c
index 2109b8cdf4ad..0c22b82ef368 100644
--- a/drivers/clk/at91/at91sam9n12.c
+++ b/drivers/clk/at91/at91sam9n12.c
@@ -172,7 +172,7 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np)
if (IS_ERR(hw))
goto err_free;
- hw = at91_clk_register_plldiv(regmap, "plladivck", NULL, hw);
+ hw = at91_clk_register_plldiv(regmap, "plladivck", hw);
if (IS_ERR(hw))
goto err_free;
diff --git a/drivers/clk/at91/at91sam9x5.c b/drivers/clk/at91/at91sam9x5.c
index 4cbb72a29f14..c2c5e9fe669c 100644
--- a/drivers/clk/at91/at91sam9x5.c
+++ b/drivers/clk/at91/at91sam9x5.c
@@ -194,7 +194,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np,
if (IS_ERR(hw))
goto err_free;
- hw = at91_clk_register_plldiv(regmap, "plladivck", NULL, hw);
+ hw = at91_clk_register_plldiv(regmap, "plladivck", hw);
if (IS_ERR(hw))
goto err_free;
diff --git a/drivers/clk/at91/clk-plldiv.c b/drivers/clk/at91/clk-plldiv.c
index 1d5a0a6d299d..e4efb4ccab33 100644
--- a/drivers/clk/at91/clk-plldiv.c
+++ b/drivers/clk/at91/clk-plldiv.c
@@ -72,7 +72,7 @@ static const struct clk_ops plldiv_ops = {
struct clk_hw * __init
at91_clk_register_plldiv(struct regmap *regmap, const char *name,
- const char *parent_name, struct clk_hw *parent_hw)
+ struct clk_hw *parent_hw)
{
struct clk_plldiv *plldiv;
struct clk_hw *hw;
@@ -85,13 +85,8 @@ at91_clk_register_plldiv(struct regmap *regmap, const char *name,
init.name = name;
init.ops = &plldiv_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;
plldiv->hw.init = &init;
diff --git a/drivers/clk/at91/dt-compat.c b/drivers/clk/at91/dt-compat.c
index 13e251e59853..85193e4656b9 100644
--- a/drivers/clk/at91/dt-compat.c
+++ b/drivers/clk/at91/dt-compat.c
@@ -805,7 +805,7 @@ of_at91sam9x5_clk_plldiv_setup(struct device_node *np)
if (IS_ERR(regmap))
return;
- hw = at91_clk_register_plldiv(regmap, name, NULL, parent_hw);
+ hw = at91_clk_register_plldiv(regmap, name, parent_hw);
if (IS_ERR(hw))
return;
diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h
index 5fd1e76b3ec7..eed88a480b11 100644
--- a/drivers/clk/at91/pmc.h
+++ b/drivers/clk/at91/pmc.h
@@ -207,7 +207,7 @@ at91_clk_register_pll(struct regmap *regmap, const char *name,
const struct clk_pll_characteristics *characteristics);
struct clk_hw * __init
at91_clk_register_plldiv(struct regmap *regmap, const char *name,
- const char *parent_name, struct clk_hw *parent_hw);
+ struct clk_hw *parent_hw);
struct clk_hw * __init
sam9x60_clk_register_div_pll(struct regmap *regmap, spinlock_t *lock,
diff --git a/drivers/clk/at91/sama5d2.c b/drivers/clk/at91/sama5d2.c
index b99a8bb9bf9a..75d5b1a3733b 100644
--- a/drivers/clk/at91/sama5d2.c
+++ b/drivers/clk/at91/sama5d2.c
@@ -226,7 +226,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np)
if (IS_ERR(hw))
goto err_free;
- hw = at91_clk_register_plldiv(regmap, "plladivck", NULL, hw);
+ hw = at91_clk_register_plldiv(regmap, "plladivck", hw);
if (IS_ERR(hw))
goto err_free;
diff --git a/drivers/clk/at91/sama5d3.c b/drivers/clk/at91/sama5d3.c
index 35a9dfd0e66d..a50e82460e70 100644
--- a/drivers/clk/at91/sama5d3.c
+++ b/drivers/clk/at91/sama5d3.c
@@ -173,7 +173,7 @@ static void __init sama5d3_pmc_setup(struct device_node *np)
if (IS_ERR(hw))
goto err_free;
- hw = at91_clk_register_plldiv(regmap, "plladivck", NULL, hw);
+ hw = at91_clk_register_plldiv(regmap, "plladivck", hw);
if (IS_ERR(hw))
goto err_free;
diff --git a/drivers/clk/at91/sama5d4.c b/drivers/clk/at91/sama5d4.c
index ae76c59c7d42..b6b41ceae13c 100644
--- a/drivers/clk/at91/sama5d4.c
+++ b/drivers/clk/at91/sama5d4.c
@@ -188,7 +188,7 @@ static void __init sama5d4_pmc_setup(struct device_node *np)
if (IS_ERR(hw))
goto err_free;
- hw = at91_clk_register_plldiv(regmap, "plladivck", NULL, hw);
+ hw = at91_clk_register_plldiv(regmap, "plladivck", hw);
if (IS_ERR(hw))
goto err_free;
--
2.39.2
Powered by blists - more mailing lists