@@ -44,14 +44,21 @@ enum {
4444 P_XO ,
4545};
4646
47+ static const struct parent_map gcc_parent_map_1 [] = {
48+ { P_XO , 0 },
49+ };
50+
51+ static const struct clk_parent_data gcc_parent_data_1 [] = {
52+ { .index = DT_XO , .name = "xo-board" },
53+ };
54+
4755static struct clk_fixed_factor cxo = {
4856 .mult = 1 ,
4957 .div = 1 ,
5058 .hw .init = & (struct clk_init_data ){
5159 .name = "cxo" ,
52- .parent_data = & (const struct clk_parent_data ) {
53- .name = "xo-board" ,
54- },
60+ .parent_data = gcc_parent_data_1 ,
61+ .num_parents = ARRAY_SIZE (gcc_parent_data_1 ),
5562 .num_parents = 1 ,
5663 .ops = & clk_fixed_factor_ops ,
5764 },
@@ -66,10 +73,8 @@ static struct clk_alpha_pll gpll0_sleep_clk_src = {
6673 .enable_is_inverted = true,
6774 .hw .init = & (struct clk_init_data ){
6875 .name = "gpll0_sleep_clk_src" ,
69- .parent_data = & (const struct clk_parent_data ) {
70- .hw = & cxo .hw ,
71- },
72- .num_parents = 1 ,
76+ .parent_data = gcc_parent_data_1 ,
77+ .num_parents = ARRAY_SIZE (gcc_parent_data_1 ),
7378 .ops = & clk_alpha_pll_ops ,
7479 },
7580 },
@@ -84,10 +89,8 @@ static struct clk_alpha_pll gpll0_out_main = {
8489 .enable_mask = BIT (0 ),
8590 .hw .init = & (struct clk_init_data ){
8691 .name = "gpll0_out_main" ,
87- .parent_data = & (const struct clk_parent_data ) {
88- .hw = & cxo .hw ,
89- },
90- .num_parents = 1 ,
92+ .parent_data = gcc_parent_data_1 ,
93+ .num_parents = ARRAY_SIZE (gcc_parent_data_1 ),
9194 .ops = & clk_alpha_pll_ops ,
9295 },
9396 },
@@ -102,10 +105,8 @@ static struct clk_alpha_pll gpll0_ao_out_main = {
102105 .enable_mask = BIT (0 ),
103106 .hw .init = & (struct clk_init_data ){
104107 .name = "gpll0_ao_out_main" ,
105- .parent_data = & (const struct clk_parent_data ) {
106- .hw = & cxo .hw ,
107- },
108- .num_parents = 1 ,
108+ .parent_data = gcc_parent_data_1 ,
109+ .num_parents = ARRAY_SIZE (gcc_parent_data_1 ),
109110 .flags = CLK_IS_CRITICAL ,
110111 .ops = & clk_alpha_pll_fixed_ops ,
111112 },
@@ -120,10 +121,8 @@ static struct clk_alpha_pll gpll1_out_main = {
120121 .enable_mask = BIT (1 ),
121122 .hw .init = & (struct clk_init_data ){
122123 .name = "gpll1_out_main" ,
123- .parent_data = & (const struct clk_parent_data ) {
124- .hw = & cxo .hw ,
125- },
126- .num_parents = 1 ,
124+ .parent_data = gcc_parent_data_1 ,
125+ .num_parents = ARRAY_SIZE (gcc_parent_data_1 ),
127126 .ops = & clk_alpha_pll_ops ,
128127 },
129128 },
@@ -153,10 +152,8 @@ static struct clk_alpha_pll gpll3_out_main = {
153152 .clkr = {
154153 .hw .init = & (struct clk_init_data ){
155154 .name = "gpll3_out_main" ,
156- .parent_data = & (const struct clk_parent_data ) {
157- .hw = & cxo .hw ,
158- },
159- .num_parents = 1 ,
155+ .parent_data = gcc_parent_data_1 ,
156+ .num_parents = ARRAY_SIZE (gcc_parent_data_1 ),
160157 .ops = & clk_alpha_pll_ops ,
161158 },
162159 },
@@ -170,10 +167,8 @@ static struct clk_alpha_pll gpll4_out_main = {
170167 .enable_mask = BIT (5 ),
171168 .hw .init = & (struct clk_init_data ){
172169 .name = "gpll4_out_main" ,
173- .parent_data = & (const struct clk_parent_data ) {
174- .hw = & cxo .hw ,
175- },
176- .num_parents = 1 ,
170+ .parent_data = gcc_parent_data_1 ,
171+ .num_parents = ARRAY_SIZE (gcc_parent_data_1 ),
177172 .ops = & clk_alpha_pll_ops ,
178173 },
179174 },
@@ -189,10 +184,8 @@ static struct clk_pll gpll6 = {
189184 .status_bit = 17 ,
190185 .clkr .hw .init = & (struct clk_init_data ){
191186 .name = "gpll6" ,
192- .parent_data = & (const struct clk_parent_data ) {
193- .hw = & cxo .hw ,
194- },
195- .num_parents = 1 ,
187+ .parent_data = gcc_parent_data_1 ,
188+ .num_parents = ARRAY_SIZE (gcc_parent_data_1 ),
196189 .ops = & clk_pll_ops ,
197190 },
198191};
@@ -216,23 +209,15 @@ static const struct parent_map gcc_parent_map_0[] = {
216209};
217210
218211static const struct clk_parent_data gcc_parent_data_0 [] = {
219- { .hw = & cxo . hw },
212+ { .index = DT_XO , . name = "xo-board" },
220213 { .hw = & gpll0_out_main .clkr .hw },
221214};
222215
223216static const struct clk_parent_data gcc_parent_data_ao_0 [] = {
224- { .hw = & cxo . hw },
217+ { .index = DT_XO , . name = "xo-board" },
225218 { .hw = & gpll0_ao_out_main .clkr .hw },
226219};
227220
228- static const struct parent_map gcc_parent_map_1 [] = {
229- { P_XO , 0 },
230- };
231-
232- static const struct clk_parent_data gcc_parent_data_1 [] = {
233- { .hw = & cxo .hw },
234- };
235-
236221static const struct parent_map gcc_parent_map_2 [] = {
237222 { P_XO , 0 },
238223 { P_GPLL0_OUT_MAIN , 1 },
@@ -241,7 +226,7 @@ static const struct parent_map gcc_parent_map_2[] = {
241226};
242227
243228static const struct clk_parent_data gcc_parent_data_2 [] = {
244- { .hw = & cxo . hw },
229+ { .index = DT_XO , . name = "xo-board" },
245230 { .hw = & gpll0_out_main .clkr .hw },
246231 { .hw = & gpll6_out_aux .hw },
247232 { .index = DT_SLEEP_CLK , .name = "sleep_clk" },
@@ -254,7 +239,7 @@ static const struct parent_map gcc_parent_map_3[] = {
254239};
255240
256241static const struct clk_parent_data gcc_parent_data_3 [] = {
257- { .hw = & cxo . hw },
242+ { .index = DT_XO , . name = "xo-board" },
258243 { .hw = & gpll0_out_main .clkr .hw },
259244 { .hw = & gpll6_out_aux .hw },
260245};
@@ -265,7 +250,7 @@ static const struct parent_map gcc_parent_map_4[] = {
265250};
266251
267252static const struct clk_parent_data gcc_parent_data_4 [] = {
268- { .hw = & cxo . hw },
253+ { .index = DT_XO , . name = "xo-board" },
269254 { .hw = & gpll1_out_main .clkr .hw },
270255};
271256
@@ -275,7 +260,7 @@ static const struct parent_map gcc_parent_map_5[] = {
275260};
276261
277262static const struct clk_parent_data gcc_parent_data_5 [] = {
278- { .hw = & cxo . hw },
263+ { .index = DT_XO , . name = "xo-board" },
279264 { .index = DT_DSI0_PHY_PLL_OUT_BYTECLK , .name = "dsi0pllbyte" },
280265};
281266
@@ -285,7 +270,7 @@ static const struct parent_map gcc_parent_map_6[] = {
285270};
286271
287272static const struct clk_parent_data gcc_parent_data_6 [] = {
288- { .hw = & cxo . hw },
273+ { .index = DT_XO , . name = "xo-board" },
289274 { .index = DT_DSI0_PHY_PLL_OUT_BYTECLK , .name = "dsi0pllbyte" },
290275};
291276
@@ -297,7 +282,7 @@ static const struct parent_map gcc_parent_map_7[] = {
297282};
298283
299284static const struct clk_parent_data gcc_parent_data_7 [] = {
300- { .hw = & cxo . hw },
285+ { .index = DT_XO , . name = "xo-board" },
301286 { .hw = & gpll0_out_main .clkr .hw },
302287 { .hw = & gpll3_out_main .clkr .hw },
303288 { .hw = & gpll6_out_aux .hw },
@@ -309,7 +294,7 @@ static const struct parent_map gcc_parent_map_8[] = {
309294};
310295
311296static const struct clk_parent_data gcc_parent_data_8 [] = {
312- { .hw = & cxo . hw },
297+ { .index = DT_XO , . name = "xo-board" },
313298 { .index = DT_HDMI_PHY_PLL_CLK , .name = "hdmi_pll" },
314299};
315300
@@ -321,7 +306,7 @@ static const struct parent_map gcc_parent_map_9[] = {
321306};
322307
323308static const struct clk_parent_data gcc_parent_data_9 [] = {
324- { .hw = & cxo . hw },
309+ { .index = DT_XO , . name = "xo-board" },
325310 { .hw = & gpll0_out_main .clkr .hw },
326311 { .index = DT_DSI0_PHY_PLL_OUT_DSICLK , .name = "dsi0pll" },
327312 { .hw = & gpll6_out_aux .hw },
@@ -333,7 +318,7 @@ static const struct parent_map gcc_parent_map_10[] = {
333318};
334319
335320static const struct clk_parent_data gcc_parent_data_10 [] = {
336- { .hw = & cxo . hw },
321+ { .index = DT_XO , . name = "xo-board" },
337322 { .index = DT_SLEEP_CLK , .name = "sleep_clk" },
338323};
339324
@@ -343,7 +328,7 @@ static const struct parent_map gcc_parent_map_11[] = {
343328};
344329
345330static const struct clk_parent_data gcc_parent_data_11 [] = {
346- { .hw = & cxo . hw },
331+ { .index = DT_XO , . name = "xo-board" },
347332 { .fw_name = "pcie_0_pipe_clk" , .name = "pcie_0_pipe_clk" },
348333};
349334
@@ -353,7 +338,7 @@ static const struct parent_map gcc_parent_map_12[] = {
353338};
354339
355340static const struct clk_parent_data gcc_parent_data_12 [] = {
356- { .hw = & cxo . hw },
341+ { .index = DT_XO , . name = "xo-board" },
357342 { .index = DT_DSI0_PHY_PLL_OUT_DSICLK , .name = "dsi0pll" },
358343};
359344
@@ -365,7 +350,7 @@ static const struct parent_map gcc_parent_map_13[] = {
365350};
366351
367352static const struct clk_parent_data gcc_parent_data_13 [] = {
368- { .hw = & cxo . hw },
353+ { .index = DT_XO , . name = "xo-board" },
369354 { .hw = & gpll0_out_main .clkr .hw },
370355 { .hw = & gpll4_out_main .clkr .hw },
371356 { .hw = & gpll6_out_aux .hw },
@@ -377,7 +362,7 @@ static const struct parent_map gcc_parent_map_14[] = {
377362};
378363
379364static const struct clk_parent_data gcc_parent_data_14 [] = {
380- { .hw = & cxo . hw },
365+ { .index = DT_XO , . name = "xo-board" },
381366 { .hw = & gpll0_out_main .clkr .hw },
382367};
383368
@@ -386,7 +371,7 @@ static const struct parent_map gcc_parent_map_15[] = {
386371};
387372
388373static const struct clk_parent_data gcc_parent_data_15 [] = {
389- { .hw = & cxo . hw },
374+ { .index = DT_XO , . name = "xo-board" },
390375};
391376
392377static const struct parent_map gcc_parent_map_16 [] = {
@@ -395,7 +380,7 @@ static const struct parent_map gcc_parent_map_16[] = {
395380};
396381
397382static const struct clk_parent_data gcc_parent_data_16 [] = {
398- { .hw = & cxo . hw },
383+ { .index = DT_XO , . name = "xo-board" },
399384 { .hw = & gpll0_out_main .clkr .hw },
400385};
401386
0 commit comments