|
17 | 17 | #include "clk-regmap.h"
|
18 | 18 | #include "clk-regmap-divider.h"
|
19 | 19 | #include "clk-regmap-mux.h"
|
| 20 | +#include "clk-regmap-phy-mux.h" |
20 | 21 | #include "gdsc.h"
|
21 | 22 | #include "reset.h"
|
22 | 23 |
|
@@ -158,26 +159,6 @@ static const struct clk_parent_data gcc_parent_data_3[] = {
|
158 | 159 | { .fw_name = "bi_tcxo" },
|
159 | 160 | };
|
160 | 161 |
|
161 |
| -static const struct parent_map gcc_parent_map_4[] = { |
162 |
| - { P_PCIE_0_PIPE_CLK, 0 }, |
163 |
| - { P_BI_TCXO, 2 }, |
164 |
| -}; |
165 |
| - |
166 |
| -static const struct clk_parent_data gcc_parent_data_4[] = { |
167 |
| - { .fw_name = "pcie_0_pipe_clk", }, |
168 |
| - { .fw_name = "bi_tcxo" }, |
169 |
| -}; |
170 |
| - |
171 |
| -static const struct parent_map gcc_parent_map_5[] = { |
172 |
| - { P_PCIE_1_PIPE_CLK, 0 }, |
173 |
| - { P_BI_TCXO, 2 }, |
174 |
| -}; |
175 |
| - |
176 |
| -static const struct clk_parent_data gcc_parent_data_5[] = { |
177 |
| - { .fw_name = "pcie_1_pipe_clk" }, |
178 |
| - { .fw_name = "bi_tcxo" }, |
179 |
| -}; |
180 |
| - |
181 | 162 | static const struct parent_map gcc_parent_map_6[] = {
|
182 | 163 | { P_BI_TCXO, 0 },
|
183 | 164 | { P_GCC_GPLL0_OUT_MAIN, 1 },
|
@@ -274,32 +255,30 @@ static const struct clk_parent_data gcc_parent_data_14[] = {
|
274 | 255 | { .fw_name = "bi_tcxo" },
|
275 | 256 | };
|
276 | 257 |
|
277 |
| -static struct clk_regmap_mux gcc_pcie_0_pipe_clk_src = { |
| 258 | +static struct clk_regmap_phy_mux gcc_pcie_0_pipe_clk_src = { |
278 | 259 | .reg = 0x6b054,
|
279 |
| - .shift = 0, |
280 |
| - .width = 2, |
281 |
| - .parent_map = gcc_parent_map_4, |
282 | 260 | .clkr = {
|
283 | 261 | .hw.init = &(struct clk_init_data){
|
284 | 262 | .name = "gcc_pcie_0_pipe_clk_src",
|
285 |
| - .parent_data = gcc_parent_data_4, |
286 |
| - .num_parents = ARRAY_SIZE(gcc_parent_data_4), |
287 |
| - .ops = &clk_regmap_mux_closest_ops, |
| 263 | + .parent_data = &(const struct clk_parent_data){ |
| 264 | + .fw_name = "pcie_0_pipe_clk", |
| 265 | + }, |
| 266 | + .num_parents = 1, |
| 267 | + .ops = &clk_regmap_phy_mux_ops, |
288 | 268 | },
|
289 | 269 | },
|
290 | 270 | };
|
291 | 271 |
|
292 |
| -static struct clk_regmap_mux gcc_pcie_1_pipe_clk_src = { |
| 272 | +static struct clk_regmap_phy_mux gcc_pcie_1_pipe_clk_src = { |
293 | 273 | .reg = 0x8d054,
|
294 |
| - .shift = 0, |
295 |
| - .width = 2, |
296 |
| - .parent_map = gcc_parent_map_5, |
297 | 274 | .clkr = {
|
298 | 275 | .hw.init = &(struct clk_init_data){
|
299 | 276 | .name = "gcc_pcie_1_pipe_clk_src",
|
300 |
| - .parent_data = gcc_parent_data_5, |
301 |
| - .num_parents = ARRAY_SIZE(gcc_parent_data_5), |
302 |
| - .ops = &clk_regmap_mux_closest_ops, |
| 277 | + .parent_data = &(const struct clk_parent_data){ |
| 278 | + .fw_name = "pcie_1_pipe_clk", |
| 279 | + }, |
| 280 | + .num_parents = 1, |
| 281 | + .ops = &clk_regmap_phy_mux_ops, |
303 | 282 | },
|
304 | 283 | },
|
305 | 284 | };
|
|
0 commit comments