Commit 54edba9
clk: thead: th1520-ap: Describe mux clocks with clk_mux
Mux clocks are now described with a customized ccu_mux structure
consisting of ccu_internal and ccu_common substructures, and registered
later with devm_clk_hw_register_mux_parent_data_table(). As this helper
always allocates a new clk_hw structure, it's extremely hard to use mux
clocks as parents statically by clk_hw pointers, since CCF has no
knowledge about the clk_hw structure embedded in ccu_mux.
This scheme already causes issues for clock c910, which takes a mux
clock, c910-i0, as a possible parent. With mainline U-Boot that
reparents c910 to c910-i0 at boottime, c910 is considered as an orphan
by CCF.
This patch refactors handling of mux clocks, embeds a clk_mux structure
in ccu_mux directly. Instead of calling devm_clk_hw_register_mux_*(),
we could register mux clocks on our own without allocating any new
clk_hw pointer, fixing c910 clock's issue.
Fixes: ae81b69 ("clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks")
Signed-off-by: Yao Zi <[email protected]>
Signed-off-by: Drew Fustini <[email protected]>1 parent d274c77 commit 54edba9
1 file changed
+37
-58
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
78 | 90 | | |
79 | 91 | | |
80 | 92 | | |
| |||
94 | 106 | | |
95 | 107 | | |
96 | 108 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | 109 | | |
105 | 110 | | |
106 | 111 | | |
| |||
415 | 420 | | |
416 | 421 | | |
417 | 422 | | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
427 | 426 | | |
428 | 427 | | |
429 | 428 | | |
430 | | - | |
| 429 | + | |
431 | 430 | | |
432 | 431 | | |
433 | 432 | | |
434 | 433 | | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
444 | 437 | | |
445 | 438 | | |
446 | 439 | | |
| |||
925 | 918 | | |
926 | 919 | | |
927 | 920 | | |
928 | | - | |
929 | | - | |
930 | | - | |
931 | | - | |
932 | | - | |
933 | | - | |
934 | | - | |
935 | | - | |
936 | | - | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
937 | 924 | | |
938 | 925 | | |
939 | 926 | | |
| |||
970 | 957 | | |
971 | 958 | | |
972 | 959 | | |
973 | | - | |
974 | | - | |
975 | | - | |
976 | | - | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
977 | 964 | | |
978 | 965 | | |
979 | 966 | | |
| |||
1075 | 1062 | | |
1076 | 1063 | | |
1077 | 1064 | | |
1078 | | - | |
| 1065 | + | |
1079 | 1066 | | |
1080 | 1067 | | |
1081 | 1068 | | |
| |||
1162 | 1149 | | |
1163 | 1150 | | |
1164 | 1151 | | |
1165 | | - | |
1166 | | - | |
1167 | | - | |
1168 | | - | |
1169 | | - | |
1170 | | - | |
1171 | | - | |
1172 | | - | |
1173 | | - | |
1174 | | - | |
1175 | | - | |
1176 | | - | |
1177 | | - | |
1178 | | - | |
1179 | | - | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
1180 | 1159 | | |
1181 | | - | |
| 1160 | + | |
1182 | 1161 | | |
1183 | 1162 | | |
1184 | 1163 | | |
| |||
0 commit comments