Commit b5105e37 authored by Claudiu Beznea's avatar Claudiu Beznea
Browse files

clk: at91: clk-main: add support for parent_data/parent_hw



Add support for parent_data and parent_hw in main oscillator clock drivers.
With this parent-child relations are described with pointers rather
than strings making registration a bit faster.

All the SoC based drivers that rely on clk-main were adapted
to the new API change. The switch itself for SoCs will be done
in subsequent patches.

Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
Reviewed-by: default avatarMaxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20230615093227.576102-2-claudiu.beznea@microchip.com
parent 9a7b0101
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -108,12 +108,12 @@ static void __init at91rm9200_pmc_setup(struct device_node *np)

	bypass = of_property_read_bool(np, "atmel,osc-bypass");

	hw = at91_clk_register_main_osc(regmap, "main_osc", mainxtal_name,
	hw = at91_clk_register_main_osc(regmap, "main_osc", mainxtal_name, NULL,
					bypass);
	if (IS_ERR(hw))
		goto err_free;

	hw = at91_clk_register_rm9200_main(regmap, "mainck", "main_osc");
	hw = at91_clk_register_rm9200_main(regmap, "mainck", "main_osc", NULL);
	if (IS_ERR(hw))
		goto err_free;

+2 −2
Original line number Diff line number Diff line
@@ -363,12 +363,12 @@ static void __init at91sam926x_pmc_setup(struct device_node *np,

	bypass = of_property_read_bool(np, "atmel,osc-bypass");

	hw = at91_clk_register_main_osc(regmap, "main_osc", mainxtal_name,
	hw = at91_clk_register_main_osc(regmap, "main_osc", mainxtal_name, NULL,
					bypass);
	if (IS_ERR(hw))
		goto err_free;

	hw = at91_clk_register_rm9200_main(regmap, "mainck", "main_osc");
	hw = at91_clk_register_rm9200_main(regmap, "mainck", "main_osc", NULL);
	if (IS_ERR(hw))
		goto err_free;

+2 −2
Original line number Diff line number Diff line
@@ -123,12 +123,12 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np)

	bypass = of_property_read_bool(np, "atmel,osc-bypass");

	hw = at91_clk_register_main_osc(regmap, "main_osc", mainxtal_name,
	hw = at91_clk_register_main_osc(regmap, "main_osc", mainxtal_name, NULL,
					bypass);
	if (IS_ERR(hw))
		goto err_free;

	hw = at91_clk_register_rm9200_main(regmap, "mainck", "main_osc");
	hw = at91_clk_register_rm9200_main(regmap, "mainck", "main_osc", NULL);
	if (IS_ERR(hw))
		goto err_free;

+2 −2
Original line number Diff line number Diff line
@@ -147,14 +147,14 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np)

	bypass = of_property_read_bool(np, "atmel,osc-bypass");

	hw = at91_clk_register_main_osc(regmap, "main_osc", mainxtal_name,
	hw = at91_clk_register_main_osc(regmap, "main_osc", mainxtal_name, NULL,
					bypass);
	if (IS_ERR(hw))
		goto err_free;

	parent_names[0] = "main_rc_osc";
	parent_names[1] = "main_osc";
	hw = at91_clk_register_sam9x5_main(regmap, "mainck", parent_names, 2);
	hw = at91_clk_register_sam9x5_main(regmap, "mainck", parent_names, NULL, 2);
	if (IS_ERR(hw))
		goto err_free;

+1 −1
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np)
	if (!at91sam9rl_pmc)
		return;

	hw = at91_clk_register_rm9200_main(regmap, "mainck", mainxtal_name);
	hw = at91_clk_register_rm9200_main(regmap, "mainck", mainxtal_name, NULL);
	if (IS_ERR(hw))
		goto err_free;

Loading