[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230727053156.13587-42-claudiu.beznea@tuxon.dev>
Date: Thu, 27 Jul 2023 08:31:55 +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 41/42] clk: at91: clk-usb: remove parent_names support
Remove parent_names support as parent_hw support is now available on all
platforms using clk-usb driver.
Signed-off-by: Claudiu Beznea <claudiu.beznea@...on.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/at91sam9x5.c | 2 +-
drivers/clk/at91/clk-usb.c | 35 ++++++++++++----------------------
drivers/clk/at91/dt-compat.c | 6 +++---
drivers/clk/at91/pmc.h | 8 ++++----
drivers/clk/at91/sam9x60.c | 2 +-
drivers/clk/at91/sama5d2.c | 2 +-
drivers/clk/at91/sama5d3.c | 2 +-
drivers/clk/at91/sama5d4.c | 2 +-
12 files changed, 28 insertions(+), 39 deletions(-)
diff --git a/drivers/clk/at91/at91rm9200.c b/drivers/clk/at91/at91rm9200.c
index 4b8a9c27cc9e..05060b72acab 100644
--- a/drivers/clk/at91/at91rm9200.c
+++ b/drivers/clk/at91/at91rm9200.c
@@ -163,7 +163,7 @@ static void __init at91rm9200_pmc_setup(struct device_node *np)
at91rm9200_pmc->chws[PMC_MCK] = hw;
- usbck_hw = at91rm9200_clk_register_usb(regmap, "usbck", NULL,
+ usbck_hw = at91rm9200_clk_register_usb(regmap, "usbck",
at91rm9200_pmc->chws[PMC_PLLBCK], usb_div);
if (IS_ERR(usbck_hw))
goto err_free;
diff --git a/drivers/clk/at91/at91sam9260.c b/drivers/clk/at91/at91sam9260.c
index 71002ada33dd..2b0ffcee9e40 100644
--- a/drivers/clk/at91/at91sam9260.c
+++ b/drivers/clk/at91/at91sam9260.c
@@ -436,7 +436,7 @@ static void __init at91sam926x_pmc_setup(struct device_node *np,
at91sam9260_pmc->chws[PMC_MCK] = hw;
- usbck_hw = at91rm9200_clk_register_usb(regmap, "usbck", NULL,
+ usbck_hw = at91rm9200_clk_register_usb(regmap, "usbck",
at91sam9260_pmc->chws[PMC_PLLBCK], usb_div);
if (IS_ERR(usbck_hw))
goto err_free;
diff --git a/drivers/clk/at91/at91sam9g45.c b/drivers/clk/at91/at91sam9g45.c
index bf5951097fca..1e5262b678f5 100644
--- a/drivers/clk/at91/at91sam9g45.c
+++ b/drivers/clk/at91/at91sam9g45.c
@@ -182,7 +182,7 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np)
parent_hws[0] = at91sam9g45_pmc->chws[PMC_PLLACK];
parent_hws[1] = at91sam9g45_pmc->chws[PMC_UTMI];
- usbck_hw = at91sam9x5_clk_register_usb(regmap, "usbck", NULL, parent_hws, 2);
+ usbck_hw = at91sam9x5_clk_register_usb(regmap, "usbck", parent_hws, 2);
if (IS_ERR(usbck_hw))
goto err_free;
diff --git a/drivers/clk/at91/at91sam9n12.c b/drivers/clk/at91/at91sam9n12.c
index fa7daab2793b..9b4e28b9f21b 100644
--- a/drivers/clk/at91/at91sam9n12.c
+++ b/drivers/clk/at91/at91sam9n12.c
@@ -207,7 +207,7 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np)
at91sam9n12_pmc->chws[PMC_MCK] = hw;
- usbck_hw = at91sam9n12_clk_register_usb(regmap, "usbck", NULL,
+ usbck_hw = at91sam9n12_clk_register_usb(regmap, "usbck",
at91sam9n12_pmc->chws[PMC_PLLBCK]);
if (IS_ERR(usbck_hw))
goto err_free;
diff --git a/drivers/clk/at91/at91sam9x5.c b/drivers/clk/at91/at91sam9x5.c
index 994010f1cf03..1968dd69fbf7 100644
--- a/drivers/clk/at91/at91sam9x5.c
+++ b/drivers/clk/at91/at91sam9x5.c
@@ -228,7 +228,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np,
parent_hws[0] = at91sam9x5_pmc->chws[PMC_PLLACK];
parent_hws[1] = at91sam9x5_pmc->chws[PMC_UTMI];
- usbck_hw = at91sam9x5_clk_register_usb(regmap, "usbck", NULL, parent_hws, 2);
+ usbck_hw = at91sam9x5_clk_register_usb(regmap, "usbck", parent_hws, 2);
if (IS_ERR(usbck_hw))
goto err_free;
diff --git a/drivers/clk/at91/clk-usb.c b/drivers/clk/at91/clk-usb.c
index 21f50914c63e..37ea588cb534 100644
--- a/drivers/clk/at91/clk-usb.c
+++ b/drivers/clk/at91/clk-usb.c
@@ -221,7 +221,7 @@ static const struct clk_ops at91sam9n12_usb_ops = {
static struct clk_hw * __init
_at91sam9x5_clk_register_usb(struct regmap *regmap, const char *name,
- const char **parent_names, struct clk_hw **parent_hws,
+ struct clk_hw **parent_hws,
u8 num_parents, u32 usbs_mask)
{
struct at91sam9x5_clk_usb *usb;
@@ -235,10 +235,7 @@ _at91sam9x5_clk_register_usb(struct regmap *regmap, const char *name,
init.name = name;
init.ops = &at91sam9x5_usb_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 |
CLK_SET_RATE_PARENT;
@@ -260,26 +257,25 @@ _at91sam9x5_clk_register_usb(struct regmap *regmap, const char *name,
struct clk_hw * __init
at91sam9x5_clk_register_usb(struct regmap *regmap, const char *name,
- const char **parent_names, struct clk_hw **parent_hws,
+ struct clk_hw **parent_hws,
u8 num_parents)
{
- return _at91sam9x5_clk_register_usb(regmap, name, parent_names,
- parent_hws, num_parents, SAM9X5_USBS_MASK);
+ return _at91sam9x5_clk_register_usb(regmap, name, parent_hws,
+ num_parents, SAM9X5_USBS_MASK);
}
struct clk_hw * __init
sam9x60_clk_register_usb(struct regmap *regmap, const char *name,
- const char **parent_names, struct clk_hw **parent_hws,
+ struct clk_hw **parent_hws,
u8 num_parents)
{
- return _at91sam9x5_clk_register_usb(regmap, name, parent_names,
- parent_hws, num_parents,
- SAM9X60_USBS_MASK);
+ return _at91sam9x5_clk_register_usb(regmap, name, parent_hws,
+ num_parents, SAM9X60_USBS_MASK);
}
struct clk_hw * __init
at91sam9n12_clk_register_usb(struct regmap *regmap, const char *name,
- const char *parent_name, struct clk_hw *parent_hw)
+ struct clk_hw *parent_hw)
{
struct at91sam9x5_clk_usb *usb;
struct clk_hw *hw;
@@ -292,10 +288,7 @@ at91sam9n12_clk_register_usb(struct regmap *regmap, const char *name,
init.name = name;
init.ops = &at91sam9n12_usb_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_GATE | CLK_SET_RATE_PARENT;
@@ -399,8 +392,7 @@ static const struct clk_ops at91rm9200_usb_ops = {
struct clk_hw * __init
at91rm9200_clk_register_usb(struct regmap *regmap, const char *name,
- const char *parent_name, struct clk_hw *parent_hw,
- const u32 *divisors)
+ struct clk_hw *parent_hw, const u32 *divisors)
{
struct at91rm9200_clk_usb *usb;
struct clk_hw *hw;
@@ -413,10 +405,7 @@ at91rm9200_clk_register_usb(struct regmap *regmap, const char *name,
init.name = name;
init.ops = &at91rm9200_usb_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;
diff --git a/drivers/clk/at91/dt-compat.c b/drivers/clk/at91/dt-compat.c
index dc8eb6036643..285ede5d6702 100644
--- a/drivers/clk/at91/dt-compat.c
+++ b/drivers/clk/at91/dt-compat.c
@@ -1065,7 +1065,7 @@ static void __init of_at91sam9x5_clk_usb_setup(struct device_node *np)
if (IS_ERR(regmap))
return;
- hw = at91sam9x5_clk_register_usb(regmap, name, NULL, parent_hws,
+ hw = at91sam9x5_clk_register_usb(regmap, name, parent_hws,
num_parents);
if (IS_ERR(hw))
return;
@@ -1099,7 +1099,7 @@ static void __init of_at91sam9n12_clk_usb_setup(struct device_node *np)
if (IS_ERR(regmap))
return;
- hw = at91sam9n12_clk_register_usb(regmap, name, NULL, parent_hw);
+ hw = at91sam9n12_clk_register_usb(regmap, name, parent_hw);
if (IS_ERR(hw))
return;
@@ -1136,7 +1136,7 @@ static void __init of_at91rm9200_clk_usb_setup(struct device_node *np)
of_node_put(parent_np);
if (IS_ERR(regmap))
return;
- hw = at91rm9200_clk_register_usb(regmap, name, NULL, parent_hw, divisors);
+ hw = at91rm9200_clk_register_usb(regmap, name, parent_hw, divisors);
if (IS_ERR(hw))
return;
diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h
index bdb2dfb8fa86..5e65f5b59536 100644
--- a/drivers/clk/at91/pmc.h
+++ b/drivers/clk/at91/pmc.h
@@ -247,18 +247,18 @@ at91_clk_register_system(struct regmap *regmap, const char *name,
struct clk_hw * __init
at91sam9x5_clk_register_usb(struct regmap *regmap, const char *name,
- const char **parent_names, struct clk_hw **parent_hws,
+ struct clk_hw **parent_hws,
u8 num_parents);
struct clk_hw * __init
at91sam9n12_clk_register_usb(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_usb(struct regmap *regmap, const char *name,
- const char **parent_names, struct clk_hw **parent_hws,
+ struct clk_hw **parent_hws,
u8 num_parents);
struct clk_hw * __init
at91rm9200_clk_register_usb(struct regmap *regmap, const char *name,
- const char *parent_name, struct clk_hw *parent_hw,
+ struct clk_hw *parent_hw,
const u32 *divisors);
struct clk_hw * __init
diff --git a/drivers/clk/at91/sam9x60.c b/drivers/clk/at91/sam9x60.c
index f344cbbc9c25..b3dfdcbc950f 100644
--- a/drivers/clk/at91/sam9x60.c
+++ b/drivers/clk/at91/sam9x60.c
@@ -302,7 +302,7 @@ static void __init sam9x60_pmc_setup(struct device_node *np)
parent_hws[0] = sam9x60_pmc->chws[PMC_PLLACK];
parent_hws[1] = sam9x60_pmc->chws[PMC_UTMI];
parent_hws[2] = main_osc_hw;
- usbck_hw = sam9x60_clk_register_usb(regmap, "usbck", NULL, parent_hws, 3);
+ usbck_hw = sam9x60_clk_register_usb(regmap, "usbck", parent_hws, 3);
if (IS_ERR(usbck_hw))
goto err_free;
diff --git a/drivers/clk/at91/sama5d2.c b/drivers/clk/at91/sama5d2.c
index 0fce17af769e..fa14c6f7d37a 100644
--- a/drivers/clk/at91/sama5d2.c
+++ b/drivers/clk/at91/sama5d2.c
@@ -288,7 +288,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np)
parent_hws[0] = sama5d2_pmc->chws[PMC_PLLACK];
parent_hws[1] = sama5d2_pmc->chws[PMC_UTMI];
- usbck_hw = at91sam9x5_clk_register_usb(regmap, "usbck", NULL, parent_hws, 2);
+ usbck_hw = at91sam9x5_clk_register_usb(regmap, "usbck", parent_hws, 2);
if (IS_ERR(usbck_hw))
goto err_free;
diff --git a/drivers/clk/at91/sama5d3.c b/drivers/clk/at91/sama5d3.c
index c00380ed0000..0713a6b21c8a 100644
--- a/drivers/clk/at91/sama5d3.c
+++ b/drivers/clk/at91/sama5d3.c
@@ -207,7 +207,7 @@ static void __init sama5d3_pmc_setup(struct device_node *np)
parent_hws[0] = sama5d3_pmc->chws[PMC_PLLACK];
parent_hws[1] = sama5d3_pmc->chws[PMC_UTMI];
- usbck_hw = at91sam9x5_clk_register_usb(regmap, "usbck", NULL, parent_hws, 2);
+ usbck_hw = at91sam9x5_clk_register_usb(regmap, "usbck", parent_hws, 2);
if (IS_ERR(usbck_hw))
goto err_free;
diff --git a/drivers/clk/at91/sama5d4.c b/drivers/clk/at91/sama5d4.c
index 0d2a834a5903..d0bd025876ac 100644
--- a/drivers/clk/at91/sama5d4.c
+++ b/drivers/clk/at91/sama5d4.c
@@ -228,7 +228,7 @@ static void __init sama5d4_pmc_setup(struct device_node *np)
parent_hws[0] = sama5d4_pmc->chws[PMC_PLLACK];
parent_hws[1] = sama5d4_pmc->chws[PMC_UTMI];
- usbck_hw = at91sam9x5_clk_register_usb(regmap, "usbck", NULL, parent_hws, 2);
+ usbck_hw = at91sam9x5_clk_register_usb(regmap, "usbck", parent_hws, 2);
if (IS_ERR(usbck_hw))
goto err_free;
--
2.39.2
Powered by blists - more mailing lists