Commit 4d34497e authored by Chen-Yu Tsai's avatar Chen-Yu Tsai

clk: sunxi-ng: f1c100s: Use local parent references for CLK_FIXED_FACTOR

With the new clk parenting code and CLK_FIXED_FACTOR_{HW,FW_NAME}
macros, we can reference parents locally via pointers to struct clk_hw
or DT clock-names.

Convert existing CLK_FIXED_FACTOR definitions to either the _HW or
_FW_NAME variant based on whether the parent clock is internal or
external to the CCU.
Acked-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
parent 45d0706e
...@@ -374,16 +374,25 @@ static struct ccu_common *suniv_ccu_clks[] = { ...@@ -374,16 +374,25 @@ static struct ccu_common *suniv_ccu_clks[] = {
&avs_clk.common, &avs_clk.common,
}; };
static CLK_FIXED_FACTOR(pll_audio_clk, "pll-audio", static const struct clk_hw *clk_parent_pll_audio[] = {
"pll-audio-base", 4, 1, CLK_SET_RATE_PARENT); &pll_audio_base_clk.common.hw
static CLK_FIXED_FACTOR(pll_audio_2x_clk, "pll-audio-2x", };
"pll-audio-base", 2, 1, CLK_SET_RATE_PARENT);
static CLK_FIXED_FACTOR(pll_audio_4x_clk, "pll-audio-4x", static CLK_FIXED_FACTOR_HWS(pll_audio_clk, "pll-audio",
"pll-audio-base", 1, 1, CLK_SET_RATE_PARENT); clk_parent_pll_audio,
static CLK_FIXED_FACTOR(pll_audio_8x_clk, "pll-audio-8x", 4, 1, CLK_SET_RATE_PARENT);
"pll-audio-base", 1, 2, CLK_SET_RATE_PARENT); static CLK_FIXED_FACTOR_HWS(pll_audio_2x_clk, "pll-audio-2x",
static CLK_FIXED_FACTOR(pll_video_2x_clk, "pll-video-2x", clk_parent_pll_audio,
"pll-video", 1, 2, 0); 2, 1, CLK_SET_RATE_PARENT);
static CLK_FIXED_FACTOR_HWS(pll_audio_4x_clk, "pll-audio-4x",
clk_parent_pll_audio,
1, 1, CLK_SET_RATE_PARENT);
static CLK_FIXED_FACTOR_HWS(pll_audio_8x_clk, "pll-audio-8x",
clk_parent_pll_audio,
1, 2, CLK_SET_RATE_PARENT);
static CLK_FIXED_FACTOR_HW(pll_video_2x_clk, "pll-video-2x",
&pll_video_clk.common.hw,
1, 2, 0);
static struct clk_hw_onecell_data suniv_hw_clks = { static struct clk_hw_onecell_data suniv_hw_clks = {
.hws = { .hws = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment