clk: at91: move DT compatibility code to its own file
Move all the DT backward compatibility code to its own file so it can be deleted later. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
此提交包含在:
@@ -17,8 +17,6 @@
|
||||
|
||||
#include "pmc.h"
|
||||
|
||||
#define SMD_SOURCE_MAX 2
|
||||
|
||||
#define SMD_DIV_SHIFT 8
|
||||
#define SMD_MAX_DIV 0xf
|
||||
|
||||
@@ -142,33 +140,3 @@ at91sam9x5_clk_register_smd(struct regmap *regmap, const char *name,
|
||||
|
||||
return hw;
|
||||
}
|
||||
|
||||
static void __init of_at91sam9x5_clk_smd_setup(struct device_node *np)
|
||||
{
|
||||
struct clk_hw *hw;
|
||||
unsigned int num_parents;
|
||||
const char *parent_names[SMD_SOURCE_MAX];
|
||||
const char *name = np->name;
|
||||
struct regmap *regmap;
|
||||
|
||||
num_parents = of_clk_get_parent_count(np);
|
||||
if (num_parents == 0 || num_parents > SMD_SOURCE_MAX)
|
||||
return;
|
||||
|
||||
of_clk_parent_fill(np, parent_names, num_parents);
|
||||
|
||||
of_property_read_string(np, "clock-output-names", &name);
|
||||
|
||||
regmap = syscon_node_to_regmap(of_get_parent(np));
|
||||
if (IS_ERR(regmap))
|
||||
return;
|
||||
|
||||
hw = at91sam9x5_clk_register_smd(regmap, name, parent_names,
|
||||
num_parents);
|
||||
if (IS_ERR(hw))
|
||||
return;
|
||||
|
||||
of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw);
|
||||
}
|
||||
CLK_OF_DECLARE(at91sam9x5_clk_smd, "atmel,at91sam9x5-clk-smd",
|
||||
of_at91sam9x5_clk_smd_setup);
|
||||
|
新增問題並參考
封鎖使用者