@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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
@@ -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;
@@ -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;
@@ -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;
@@ -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;
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@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/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(-)