提交 156342a1 编写于 作者: Z Zhangfei Gao 提交者: Haojian Zhuang

clk: hisi: use clk_register_mux_table in hisi_clk_register_mux

Platform hix5hd2 use mux table, so use clk_register_mux_table instead
Signed-off-by: NZhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: NHaojian Zhuang <haojian.zhuang@linaro.org>
上级 c9eaa447
...@@ -127,11 +127,14 @@ void __init hisi_clk_register_mux(struct hisi_mux_clock *clks, ...@@ -127,11 +127,14 @@ void __init hisi_clk_register_mux(struct hisi_mux_clock *clks,
int i; int i;
for (i = 0; i < nums; i++) { for (i = 0; i < nums; i++) {
clk = clk_register_mux(NULL, clks[i].name, clks[i].parent_names, u32 mask = BIT(clks[i].width) - 1;
clks[i].num_parents, clks[i].flags,
base + clks[i].offset, clks[i].shift, clk = clk_register_mux_table(NULL, clks[i].name,
clks[i].width, clks[i].mux_flags, clks[i].parent_names,
&hisi_clk_lock); clks[i].num_parents, clks[i].flags,
base + clks[i].offset, clks[i].shift,
mask, clks[i].mux_flags,
clks[i].table, &hisi_clk_lock);
if (IS_ERR(clk)) { if (IS_ERR(clk)) {
pr_err("%s: failed to register clock %s\n", pr_err("%s: failed to register clock %s\n",
__func__, clks[i].name); __func__, clks[i].name);
......
...@@ -62,6 +62,7 @@ struct hisi_mux_clock { ...@@ -62,6 +62,7 @@ struct hisi_mux_clock {
u8 shift; u8 shift;
u8 width; u8 width;
u8 mux_flags; u8 mux_flags;
u32 *table;
const char *alias; const char *alias;
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册