Skip to content

Commit b4bbce6

Browse files
jernejskmripard
authored andcommitted
clk: sunxi-ng: sun8i-de2: Add rotation core clocks and reset for A64
A64 has rotation core which needs clocks and reset. Because there is no appropriate structures available, make a separate, A64 specific structures. Fixes: cf4881c ("clk: sunxi-ng: fix the A64/H5 clock description of DE2 CCU") Signed-off-by: Jernej Skrabec <[email protected]> Signed-off-by: Maxime Ripard <[email protected]>
1 parent 2b48dcb commit b4bbce6

File tree

1 file changed

+42
-3
lines changed

1 file changed

+42
-3
lines changed

drivers/clk/sunxi-ng/ccu-sun8i-de2.c

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,24 @@ static struct ccu_common *sun8i_v3s_de2_clks[] = {
108108
&wb_div_clk.common,
109109
};
110110

111+
static struct ccu_common *sun50i_a64_de2_clks[] = {
112+
&mixer0_clk.common,
113+
&mixer1_clk.common,
114+
&wb_clk.common,
115+
116+
&bus_mixer0_clk.common,
117+
&bus_mixer1_clk.common,
118+
&bus_wb_clk.common,
119+
120+
&mixer0_div_clk.common,
121+
&mixer1_div_clk.common,
122+
&wb_div_clk.common,
123+
124+
&bus_rot_clk.common,
125+
&rot_clk.common,
126+
&rot_div_clk.common,
127+
};
128+
111129
static struct clk_hw_onecell_data sun8i_a83t_de2_hw_clks = {
112130
.hws = {
113131
[CLK_MIXER0] = &mixer0_clk.common.hw,
@@ -156,6 +174,26 @@ static struct clk_hw_onecell_data sun8i_v3s_de2_hw_clks = {
156174
.num = CLK_NUMBER_WITHOUT_ROT,
157175
};
158176

177+
static struct clk_hw_onecell_data sun50i_a64_de2_hw_clks = {
178+
.hws = {
179+
[CLK_MIXER0] = &mixer0_clk.common.hw,
180+
[CLK_MIXER1] = &mixer1_clk.common.hw,
181+
[CLK_WB] = &wb_clk.common.hw,
182+
[CLK_ROT] = &rot_clk.common.hw,
183+
184+
[CLK_BUS_MIXER0] = &bus_mixer0_clk.common.hw,
185+
[CLK_BUS_MIXER1] = &bus_mixer1_clk.common.hw,
186+
[CLK_BUS_WB] = &bus_wb_clk.common.hw,
187+
[CLK_BUS_ROT] = &bus_rot_clk.common.hw,
188+
189+
[CLK_MIXER0_DIV] = &mixer0_div_clk.common.hw,
190+
[CLK_MIXER1_DIV] = &mixer1_div_clk.common.hw,
191+
[CLK_WB_DIV] = &wb_div_clk.common.hw,
192+
[CLK_ROT_DIV] = &rot_div_clk.common.hw,
193+
},
194+
.num = CLK_NUMBER_WITH_ROT,
195+
};
196+
159197
static struct clk_hw_onecell_data sun50i_h6_de3_hw_clks = {
160198
.hws = {
161199
[CLK_MIXER0] = &mixer0_clk.common.hw,
@@ -190,6 +228,7 @@ static struct ccu_reset_map sun50i_a64_de2_resets[] = {
190228
[RST_MIXER0] = { 0x08, BIT(0) },
191229
[RST_MIXER1] = { 0x08, BIT(1) },
192230
[RST_WB] = { 0x08, BIT(2) },
231+
[RST_ROT] = { 0x08, BIT(3) },
193232
};
194233

195234
static struct ccu_reset_map sun50i_h5_de2_resets[] = {
@@ -226,10 +265,10 @@ static const struct sunxi_ccu_desc sun8i_h3_de2_clk_desc = {
226265
};
227266

228267
static const struct sunxi_ccu_desc sun50i_a64_de2_clk_desc = {
229-
.ccu_clks = sun8i_h3_de2_clks,
230-
.num_ccu_clks = ARRAY_SIZE(sun8i_h3_de2_clks),
268+
.ccu_clks = sun50i_a64_de2_clks,
269+
.num_ccu_clks = ARRAY_SIZE(sun50i_a64_de2_clks),
231270

232-
.hw_clks = &sun8i_h3_de2_hw_clks,
271+
.hw_clks = &sun50i_a64_de2_hw_clks,
233272

234273
.resets = sun50i_a64_de2_resets,
235274
.num_resets = ARRAY_SIZE(sun50i_a64_de2_resets),

0 commit comments

Comments
 (0)