2 * Copyright (c) 2013, The Linux Foundation. All rights reserved.
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
14 #include <linux/kernel.h>
15 #include <linux/bitops.h>
16 #include <linux/err.h>
17 #include <linux/platform_device.h>
18 #include <linux/module.h>
20 #include <linux/of_device.h>
21 #include <linux/clk-provider.h>
22 #include <linux/regmap.h>
23 #include <linux/reset-controller.h>
25 #include <dt-bindings/clock/qcom,gcc-msm8974.h>
26 #include <dt-bindings/reset/qcom,gcc-msm8974.h>
28 #include "clk-regmap.h"
31 #include "clk-branch.h"
38 static const u8 gcc_xo_gpll0_map
[] = {
43 static const char *gcc_xo_gpll0
[] = {
48 #define F(f, s, h, m, n) { (f), (s), (2 * (h) - 1), (m), (n) }
50 static struct clk_pll gpll0
= {
58 .clkr
.hw
.init
= &(struct clk_init_data
){
60 .parent_names
= (const char *[]){ "xo" },
66 static struct clk_regmap gpll0_vote
= {
68 .enable_mask
= BIT(0),
69 .hw
.init
= &(struct clk_init_data
){
71 .parent_names
= (const char *[]){ "gpll0" },
73 .ops
= &clk_pll_vote_ops
,
77 static struct clk_rcg2 config_noc_clk_src
= {
80 .parent_map
= gcc_xo_gpll0_map
,
81 .clkr
.hw
.init
= &(struct clk_init_data
){
82 .name
= "config_noc_clk_src",
83 .parent_names
= gcc_xo_gpll0
,
89 static struct clk_rcg2 periph_noc_clk_src
= {
92 .parent_map
= gcc_xo_gpll0_map
,
93 .clkr
.hw
.init
= &(struct clk_init_data
){
94 .name
= "periph_noc_clk_src",
95 .parent_names
= gcc_xo_gpll0
,
101 static struct clk_rcg2 system_noc_clk_src
= {
104 .parent_map
= gcc_xo_gpll0_map
,
105 .clkr
.hw
.init
= &(struct clk_init_data
){
106 .name
= "system_noc_clk_src",
107 .parent_names
= gcc_xo_gpll0
,
109 .ops
= &clk_rcg2_ops
,
113 static struct clk_pll gpll1
= {
117 .config_reg
= 0x0054,
119 .status_reg
= 0x005c,
121 .clkr
.hw
.init
= &(struct clk_init_data
){
123 .parent_names
= (const char *[]){ "xo" },
129 static struct clk_regmap gpll1_vote
= {
130 .enable_reg
= 0x1480,
131 .enable_mask
= BIT(1),
132 .hw
.init
= &(struct clk_init_data
){
133 .name
= "gpll1_vote",
134 .parent_names
= (const char *[]){ "gpll1" },
136 .ops
= &clk_pll_vote_ops
,
140 static const struct freq_tbl ftbl_gcc_usb30_master_clk
[] = {
141 F(125000000, P_GPLL0
, 1, 5, 24),
145 static struct clk_rcg2 usb30_master_clk_src
= {
149 .parent_map
= gcc_xo_gpll0_map
,
150 .freq_tbl
= ftbl_gcc_usb30_master_clk
,
151 .clkr
.hw
.init
= &(struct clk_init_data
){
152 .name
= "usb30_master_clk_src",
153 .parent_names
= gcc_xo_gpll0
,
155 .ops
= &clk_rcg2_ops
,
159 static const struct freq_tbl ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
[] = {
160 F(19200000, P_XO
, 1, 0, 0),
161 F(37500000, P_GPLL0
, 16, 0, 0),
162 F(50000000, P_GPLL0
, 12, 0, 0),
166 static struct clk_rcg2 blsp1_qup1_i2c_apps_clk_src
= {
169 .parent_map
= gcc_xo_gpll0_map
,
170 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
171 .clkr
.hw
.init
= &(struct clk_init_data
){
172 .name
= "blsp1_qup1_i2c_apps_clk_src",
173 .parent_names
= gcc_xo_gpll0
,
175 .ops
= &clk_rcg2_ops
,
179 static const struct freq_tbl ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
[] = {
180 F(960000, P_XO
, 10, 1, 2),
181 F(4800000, P_XO
, 4, 0, 0),
182 F(9600000, P_XO
, 2, 0, 0),
183 F(15000000, P_GPLL0
, 10, 1, 4),
184 F(19200000, P_XO
, 1, 0, 0),
185 F(25000000, P_GPLL0
, 12, 1, 2),
186 F(50000000, P_GPLL0
, 12, 0, 0),
190 static struct clk_rcg2 blsp1_qup1_spi_apps_clk_src
= {
194 .parent_map
= gcc_xo_gpll0_map
,
195 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
196 .clkr
.hw
.init
= &(struct clk_init_data
){
197 .name
= "blsp1_qup1_spi_apps_clk_src",
198 .parent_names
= gcc_xo_gpll0
,
200 .ops
= &clk_rcg2_ops
,
204 static struct clk_rcg2 blsp1_qup2_i2c_apps_clk_src
= {
207 .parent_map
= gcc_xo_gpll0_map
,
208 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
209 .clkr
.hw
.init
= &(struct clk_init_data
){
210 .name
= "blsp1_qup2_i2c_apps_clk_src",
211 .parent_names
= gcc_xo_gpll0
,
213 .ops
= &clk_rcg2_ops
,
217 static struct clk_rcg2 blsp1_qup2_spi_apps_clk_src
= {
221 .parent_map
= gcc_xo_gpll0_map
,
222 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
223 .clkr
.hw
.init
= &(struct clk_init_data
){
224 .name
= "blsp1_qup2_spi_apps_clk_src",
225 .parent_names
= gcc_xo_gpll0
,
227 .ops
= &clk_rcg2_ops
,
231 static struct clk_rcg2 blsp1_qup3_i2c_apps_clk_src
= {
234 .parent_map
= gcc_xo_gpll0_map
,
235 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
236 .clkr
.hw
.init
= &(struct clk_init_data
){
237 .name
= "blsp1_qup3_i2c_apps_clk_src",
238 .parent_names
= gcc_xo_gpll0
,
240 .ops
= &clk_rcg2_ops
,
244 static struct clk_rcg2 blsp1_qup3_spi_apps_clk_src
= {
248 .parent_map
= gcc_xo_gpll0_map
,
249 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
250 .clkr
.hw
.init
= &(struct clk_init_data
){
251 .name
= "blsp1_qup3_spi_apps_clk_src",
252 .parent_names
= gcc_xo_gpll0
,
254 .ops
= &clk_rcg2_ops
,
258 static struct clk_rcg2 blsp1_qup4_i2c_apps_clk_src
= {
261 .parent_map
= gcc_xo_gpll0_map
,
262 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
263 .clkr
.hw
.init
= &(struct clk_init_data
){
264 .name
= "blsp1_qup4_i2c_apps_clk_src",
265 .parent_names
= gcc_xo_gpll0
,
267 .ops
= &clk_rcg2_ops
,
271 static struct clk_rcg2 blsp1_qup4_spi_apps_clk_src
= {
275 .parent_map
= gcc_xo_gpll0_map
,
276 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
277 .clkr
.hw
.init
= &(struct clk_init_data
){
278 .name
= "blsp1_qup4_spi_apps_clk_src",
279 .parent_names
= gcc_xo_gpll0
,
281 .ops
= &clk_rcg2_ops
,
285 static struct clk_rcg2 blsp1_qup5_i2c_apps_clk_src
= {
288 .parent_map
= gcc_xo_gpll0_map
,
289 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
290 .clkr
.hw
.init
= &(struct clk_init_data
){
291 .name
= "blsp1_qup5_i2c_apps_clk_src",
292 .parent_names
= gcc_xo_gpll0
,
294 .ops
= &clk_rcg2_ops
,
298 static struct clk_rcg2 blsp1_qup5_spi_apps_clk_src
= {
302 .parent_map
= gcc_xo_gpll0_map
,
303 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
304 .clkr
.hw
.init
= &(struct clk_init_data
){
305 .name
= "blsp1_qup5_spi_apps_clk_src",
306 .parent_names
= gcc_xo_gpll0
,
308 .ops
= &clk_rcg2_ops
,
312 static struct clk_rcg2 blsp1_qup6_i2c_apps_clk_src
= {
315 .parent_map
= gcc_xo_gpll0_map
,
316 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
317 .clkr
.hw
.init
= &(struct clk_init_data
){
318 .name
= "blsp1_qup6_i2c_apps_clk_src",
319 .parent_names
= gcc_xo_gpll0
,
321 .ops
= &clk_rcg2_ops
,
325 static struct clk_rcg2 blsp1_qup6_spi_apps_clk_src
= {
329 .parent_map
= gcc_xo_gpll0_map
,
330 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
331 .clkr
.hw
.init
= &(struct clk_init_data
){
332 .name
= "blsp1_qup6_spi_apps_clk_src",
333 .parent_names
= gcc_xo_gpll0
,
335 .ops
= &clk_rcg2_ops
,
339 static const struct freq_tbl ftbl_gcc_blsp1_2_uart1_6_apps_clk
[] = {
340 F(3686400, P_GPLL0
, 1, 96, 15625),
341 F(7372800, P_GPLL0
, 1, 192, 15625),
342 F(14745600, P_GPLL0
, 1, 384, 15625),
343 F(16000000, P_GPLL0
, 5, 2, 15),
344 F(19200000, P_XO
, 1, 0, 0),
345 F(24000000, P_GPLL0
, 5, 1, 5),
346 F(32000000, P_GPLL0
, 1, 4, 75),
347 F(40000000, P_GPLL0
, 15, 0, 0),
348 F(46400000, P_GPLL0
, 1, 29, 375),
349 F(48000000, P_GPLL0
, 12.5, 0, 0),
350 F(51200000, P_GPLL0
, 1, 32, 375),
351 F(56000000, P_GPLL0
, 1, 7, 75),
352 F(58982400, P_GPLL0
, 1, 1536, 15625),
353 F(60000000, P_GPLL0
, 10, 0, 0),
354 F(63160000, P_GPLL0
, 9.5, 0, 0),
358 static struct clk_rcg2 blsp1_uart1_apps_clk_src
= {
362 .parent_map
= gcc_xo_gpll0_map
,
363 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
364 .clkr
.hw
.init
= &(struct clk_init_data
){
365 .name
= "blsp1_uart1_apps_clk_src",
366 .parent_names
= gcc_xo_gpll0
,
368 .ops
= &clk_rcg2_ops
,
372 static struct clk_rcg2 blsp1_uart2_apps_clk_src
= {
376 .parent_map
= gcc_xo_gpll0_map
,
377 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
378 .clkr
.hw
.init
= &(struct clk_init_data
){
379 .name
= "blsp1_uart2_apps_clk_src",
380 .parent_names
= gcc_xo_gpll0
,
382 .ops
= &clk_rcg2_ops
,
386 static struct clk_rcg2 blsp1_uart3_apps_clk_src
= {
390 .parent_map
= gcc_xo_gpll0_map
,
391 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
392 .clkr
.hw
.init
= &(struct clk_init_data
){
393 .name
= "blsp1_uart3_apps_clk_src",
394 .parent_names
= gcc_xo_gpll0
,
396 .ops
= &clk_rcg2_ops
,
400 static struct clk_rcg2 blsp1_uart4_apps_clk_src
= {
404 .parent_map
= gcc_xo_gpll0_map
,
405 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
406 .clkr
.hw
.init
= &(struct clk_init_data
){
407 .name
= "blsp1_uart4_apps_clk_src",
408 .parent_names
= gcc_xo_gpll0
,
410 .ops
= &clk_rcg2_ops
,
414 static struct clk_rcg2 blsp1_uart5_apps_clk_src
= {
418 .parent_map
= gcc_xo_gpll0_map
,
419 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
420 .clkr
.hw
.init
= &(struct clk_init_data
){
421 .name
= "blsp1_uart5_apps_clk_src",
422 .parent_names
= gcc_xo_gpll0
,
424 .ops
= &clk_rcg2_ops
,
428 static struct clk_rcg2 blsp1_uart6_apps_clk_src
= {
432 .parent_map
= gcc_xo_gpll0_map
,
433 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
434 .clkr
.hw
.init
= &(struct clk_init_data
){
435 .name
= "blsp1_uart6_apps_clk_src",
436 .parent_names
= gcc_xo_gpll0
,
438 .ops
= &clk_rcg2_ops
,
442 static struct clk_rcg2 blsp2_qup1_i2c_apps_clk_src
= {
445 .parent_map
= gcc_xo_gpll0_map
,
446 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
447 .clkr
.hw
.init
= &(struct clk_init_data
){
448 .name
= "blsp2_qup1_i2c_apps_clk_src",
449 .parent_names
= gcc_xo_gpll0
,
451 .ops
= &clk_rcg2_ops
,
455 static struct clk_rcg2 blsp2_qup1_spi_apps_clk_src
= {
459 .parent_map
= gcc_xo_gpll0_map
,
460 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
461 .clkr
.hw
.init
= &(struct clk_init_data
){
462 .name
= "blsp2_qup1_spi_apps_clk_src",
463 .parent_names
= gcc_xo_gpll0
,
465 .ops
= &clk_rcg2_ops
,
469 static struct clk_rcg2 blsp2_qup2_i2c_apps_clk_src
= {
472 .parent_map
= gcc_xo_gpll0_map
,
473 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
474 .clkr
.hw
.init
= &(struct clk_init_data
){
475 .name
= "blsp2_qup2_i2c_apps_clk_src",
476 .parent_names
= gcc_xo_gpll0
,
478 .ops
= &clk_rcg2_ops
,
482 static struct clk_rcg2 blsp2_qup2_spi_apps_clk_src
= {
486 .parent_map
= gcc_xo_gpll0_map
,
487 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
488 .clkr
.hw
.init
= &(struct clk_init_data
){
489 .name
= "blsp2_qup2_spi_apps_clk_src",
490 .parent_names
= gcc_xo_gpll0
,
492 .ops
= &clk_rcg2_ops
,
496 static struct clk_rcg2 blsp2_qup3_i2c_apps_clk_src
= {
499 .parent_map
= gcc_xo_gpll0_map
,
500 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
501 .clkr
.hw
.init
= &(struct clk_init_data
){
502 .name
= "blsp2_qup3_i2c_apps_clk_src",
503 .parent_names
= gcc_xo_gpll0
,
505 .ops
= &clk_rcg2_ops
,
509 static struct clk_rcg2 blsp2_qup3_spi_apps_clk_src
= {
513 .parent_map
= gcc_xo_gpll0_map
,
514 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
515 .clkr
.hw
.init
= &(struct clk_init_data
){
516 .name
= "blsp2_qup3_spi_apps_clk_src",
517 .parent_names
= gcc_xo_gpll0
,
519 .ops
= &clk_rcg2_ops
,
523 static struct clk_rcg2 blsp2_qup4_i2c_apps_clk_src
= {
526 .parent_map
= gcc_xo_gpll0_map
,
527 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
528 .clkr
.hw
.init
= &(struct clk_init_data
){
529 .name
= "blsp2_qup4_i2c_apps_clk_src",
530 .parent_names
= gcc_xo_gpll0
,
532 .ops
= &clk_rcg2_ops
,
536 static struct clk_rcg2 blsp2_qup4_spi_apps_clk_src
= {
540 .parent_map
= gcc_xo_gpll0_map
,
541 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
542 .clkr
.hw
.init
= &(struct clk_init_data
){
543 .name
= "blsp2_qup4_spi_apps_clk_src",
544 .parent_names
= gcc_xo_gpll0
,
546 .ops
= &clk_rcg2_ops
,
550 static struct clk_rcg2 blsp2_qup5_i2c_apps_clk_src
= {
553 .parent_map
= gcc_xo_gpll0_map
,
554 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
555 .clkr
.hw
.init
= &(struct clk_init_data
){
556 .name
= "blsp2_qup5_i2c_apps_clk_src",
557 .parent_names
= gcc_xo_gpll0
,
559 .ops
= &clk_rcg2_ops
,
563 static struct clk_rcg2 blsp2_qup5_spi_apps_clk_src
= {
567 .parent_map
= gcc_xo_gpll0_map
,
568 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
569 .clkr
.hw
.init
= &(struct clk_init_data
){
570 .name
= "blsp2_qup5_spi_apps_clk_src",
571 .parent_names
= gcc_xo_gpll0
,
573 .ops
= &clk_rcg2_ops
,
577 static struct clk_rcg2 blsp2_qup6_i2c_apps_clk_src
= {
580 .parent_map
= gcc_xo_gpll0_map
,
581 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_i2c_apps_clk
,
582 .clkr
.hw
.init
= &(struct clk_init_data
){
583 .name
= "blsp2_qup6_i2c_apps_clk_src",
584 .parent_names
= gcc_xo_gpll0
,
586 .ops
= &clk_rcg2_ops
,
590 static struct clk_rcg2 blsp2_qup6_spi_apps_clk_src
= {
594 .parent_map
= gcc_xo_gpll0_map
,
595 .freq_tbl
= ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk
,
596 .clkr
.hw
.init
= &(struct clk_init_data
){
597 .name
= "blsp2_qup6_spi_apps_clk_src",
598 .parent_names
= gcc_xo_gpll0
,
600 .ops
= &clk_rcg2_ops
,
604 static struct clk_rcg2 blsp2_uart1_apps_clk_src
= {
608 .parent_map
= gcc_xo_gpll0_map
,
609 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
610 .clkr
.hw
.init
= &(struct clk_init_data
){
611 .name
= "blsp2_uart1_apps_clk_src",
612 .parent_names
= gcc_xo_gpll0
,
614 .ops
= &clk_rcg2_ops
,
618 static struct clk_rcg2 blsp2_uart2_apps_clk_src
= {
622 .parent_map
= gcc_xo_gpll0_map
,
623 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
624 .clkr
.hw
.init
= &(struct clk_init_data
){
625 .name
= "blsp2_uart2_apps_clk_src",
626 .parent_names
= gcc_xo_gpll0
,
628 .ops
= &clk_rcg2_ops
,
632 static struct clk_rcg2 blsp2_uart3_apps_clk_src
= {
636 .parent_map
= gcc_xo_gpll0_map
,
637 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
638 .clkr
.hw
.init
= &(struct clk_init_data
){
639 .name
= "blsp2_uart3_apps_clk_src",
640 .parent_names
= gcc_xo_gpll0
,
642 .ops
= &clk_rcg2_ops
,
646 static struct clk_rcg2 blsp2_uart4_apps_clk_src
= {
650 .parent_map
= gcc_xo_gpll0_map
,
651 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
652 .clkr
.hw
.init
= &(struct clk_init_data
){
653 .name
= "blsp2_uart4_apps_clk_src",
654 .parent_names
= gcc_xo_gpll0
,
656 .ops
= &clk_rcg2_ops
,
660 static struct clk_rcg2 blsp2_uart5_apps_clk_src
= {
664 .parent_map
= gcc_xo_gpll0_map
,
665 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
666 .clkr
.hw
.init
= &(struct clk_init_data
){
667 .name
= "blsp2_uart5_apps_clk_src",
668 .parent_names
= gcc_xo_gpll0
,
670 .ops
= &clk_rcg2_ops
,
674 static struct clk_rcg2 blsp2_uart6_apps_clk_src
= {
678 .parent_map
= gcc_xo_gpll0_map
,
679 .freq_tbl
= ftbl_gcc_blsp1_2_uart1_6_apps_clk
,
680 .clkr
.hw
.init
= &(struct clk_init_data
){
681 .name
= "blsp2_uart6_apps_clk_src",
682 .parent_names
= gcc_xo_gpll0
,
684 .ops
= &clk_rcg2_ops
,
688 static const struct freq_tbl ftbl_gcc_ce1_clk
[] = {
689 F(50000000, P_GPLL0
, 12, 0, 0),
690 F(75000000, P_GPLL0
, 8, 0, 0),
691 F(100000000, P_GPLL0
, 6, 0, 0),
692 F(150000000, P_GPLL0
, 4, 0, 0),
696 static struct clk_rcg2 ce1_clk_src
= {
699 .parent_map
= gcc_xo_gpll0_map
,
700 .freq_tbl
= ftbl_gcc_ce1_clk
,
701 .clkr
.hw
.init
= &(struct clk_init_data
){
702 .name
= "ce1_clk_src",
703 .parent_names
= gcc_xo_gpll0
,
705 .ops
= &clk_rcg2_ops
,
709 static const struct freq_tbl ftbl_gcc_ce2_clk
[] = {
710 F(50000000, P_GPLL0
, 12, 0, 0),
711 F(75000000, P_GPLL0
, 8, 0, 0),
712 F(100000000, P_GPLL0
, 6, 0, 0),
713 F(150000000, P_GPLL0
, 4, 0, 0),
717 static struct clk_rcg2 ce2_clk_src
= {
720 .parent_map
= gcc_xo_gpll0_map
,
721 .freq_tbl
= ftbl_gcc_ce2_clk
,
722 .clkr
.hw
.init
= &(struct clk_init_data
){
723 .name
= "ce2_clk_src",
724 .parent_names
= gcc_xo_gpll0
,
726 .ops
= &clk_rcg2_ops
,
730 static const struct freq_tbl ftbl_gcc_gp_clk
[] = {
731 F(4800000, P_XO
, 4, 0, 0),
732 F(6000000, P_GPLL0
, 10, 1, 10),
733 F(6750000, P_GPLL0
, 1, 1, 89),
734 F(8000000, P_GPLL0
, 15, 1, 5),
735 F(9600000, P_XO
, 2, 0, 0),
736 F(16000000, P_GPLL0
, 1, 2, 75),
737 F(19200000, P_XO
, 1, 0, 0),
738 F(24000000, P_GPLL0
, 5, 1, 5),
743 static struct clk_rcg2 gp1_clk_src
= {
747 .parent_map
= gcc_xo_gpll0_map
,
748 .freq_tbl
= ftbl_gcc_gp_clk
,
749 .clkr
.hw
.init
= &(struct clk_init_data
){
750 .name
= "gp1_clk_src",
751 .parent_names
= gcc_xo_gpll0
,
753 .ops
= &clk_rcg2_ops
,
757 static struct clk_rcg2 gp2_clk_src
= {
761 .parent_map
= gcc_xo_gpll0_map
,
762 .freq_tbl
= ftbl_gcc_gp_clk
,
763 .clkr
.hw
.init
= &(struct clk_init_data
){
764 .name
= "gp2_clk_src",
765 .parent_names
= gcc_xo_gpll0
,
767 .ops
= &clk_rcg2_ops
,
771 static struct clk_rcg2 gp3_clk_src
= {
775 .parent_map
= gcc_xo_gpll0_map
,
776 .freq_tbl
= ftbl_gcc_gp_clk
,
777 .clkr
.hw
.init
= &(struct clk_init_data
){
778 .name
= "gp3_clk_src",
779 .parent_names
= gcc_xo_gpll0
,
781 .ops
= &clk_rcg2_ops
,
785 static const struct freq_tbl ftbl_gcc_pdm2_clk
[] = {
786 F(60000000, P_GPLL0
, 10, 0, 0),
790 static struct clk_rcg2 pdm2_clk_src
= {
793 .parent_map
= gcc_xo_gpll0_map
,
794 .freq_tbl
= ftbl_gcc_pdm2_clk
,
795 .clkr
.hw
.init
= &(struct clk_init_data
){
796 .name
= "pdm2_clk_src",
797 .parent_names
= gcc_xo_gpll0
,
799 .ops
= &clk_rcg2_ops
,
803 static const struct freq_tbl ftbl_gcc_sdcc1_4_apps_clk
[] = {
804 F(144000, P_XO
, 16, 3, 25),
805 F(400000, P_XO
, 12, 1, 4),
806 F(20000000, P_GPLL0
, 15, 1, 2),
807 F(25000000, P_GPLL0
, 12, 1, 2),
808 F(50000000, P_GPLL0
, 12, 0, 0),
809 F(100000000, P_GPLL0
, 6, 0, 0),
810 F(200000000, P_GPLL0
, 3, 0, 0),
814 static struct clk_rcg2 sdcc1_apps_clk_src
= {
818 .parent_map
= gcc_xo_gpll0_map
,
819 .freq_tbl
= ftbl_gcc_sdcc1_4_apps_clk
,
820 .clkr
.hw
.init
= &(struct clk_init_data
){
821 .name
= "sdcc1_apps_clk_src",
822 .parent_names
= gcc_xo_gpll0
,
824 .ops
= &clk_rcg2_ops
,
828 static struct clk_rcg2 sdcc2_apps_clk_src
= {
832 .parent_map
= gcc_xo_gpll0_map
,
833 .freq_tbl
= ftbl_gcc_sdcc1_4_apps_clk
,
834 .clkr
.hw
.init
= &(struct clk_init_data
){
835 .name
= "sdcc2_apps_clk_src",
836 .parent_names
= gcc_xo_gpll0
,
838 .ops
= &clk_rcg2_ops
,
842 static struct clk_rcg2 sdcc3_apps_clk_src
= {
846 .parent_map
= gcc_xo_gpll0_map
,
847 .freq_tbl
= ftbl_gcc_sdcc1_4_apps_clk
,
848 .clkr
.hw
.init
= &(struct clk_init_data
){
849 .name
= "sdcc3_apps_clk_src",
850 .parent_names
= gcc_xo_gpll0
,
852 .ops
= &clk_rcg2_ops
,
856 static struct clk_rcg2 sdcc4_apps_clk_src
= {
860 .parent_map
= gcc_xo_gpll0_map
,
861 .freq_tbl
= ftbl_gcc_sdcc1_4_apps_clk
,
862 .clkr
.hw
.init
= &(struct clk_init_data
){
863 .name
= "sdcc4_apps_clk_src",
864 .parent_names
= gcc_xo_gpll0
,
866 .ops
= &clk_rcg2_ops
,
870 static const struct freq_tbl ftbl_gcc_tsif_ref_clk
[] = {
871 F(105000, P_XO
, 2, 1, 91),
875 static struct clk_rcg2 tsif_ref_clk_src
= {
879 .parent_map
= gcc_xo_gpll0_map
,
880 .freq_tbl
= ftbl_gcc_tsif_ref_clk
,
881 .clkr
.hw
.init
= &(struct clk_init_data
){
882 .name
= "tsif_ref_clk_src",
883 .parent_names
= gcc_xo_gpll0
,
885 .ops
= &clk_rcg2_ops
,
889 static const struct freq_tbl ftbl_gcc_usb30_mock_utmi_clk
[] = {
890 F(60000000, P_GPLL0
, 10, 0, 0),
894 static struct clk_rcg2 usb30_mock_utmi_clk_src
= {
897 .parent_map
= gcc_xo_gpll0_map
,
898 .freq_tbl
= ftbl_gcc_usb30_mock_utmi_clk
,
899 .clkr
.hw
.init
= &(struct clk_init_data
){
900 .name
= "usb30_mock_utmi_clk_src",
901 .parent_names
= gcc_xo_gpll0
,
903 .ops
= &clk_rcg2_ops
,
907 static const struct freq_tbl ftbl_gcc_usb_hs_system_clk
[] = {
908 F(60000000, P_GPLL0
, 10, 0, 0),
909 F(75000000, P_GPLL0
, 8, 0, 0),
913 static struct clk_rcg2 usb_hs_system_clk_src
= {
916 .parent_map
= gcc_xo_gpll0_map
,
917 .freq_tbl
= ftbl_gcc_usb_hs_system_clk
,
918 .clkr
.hw
.init
= &(struct clk_init_data
){
919 .name
= "usb_hs_system_clk_src",
920 .parent_names
= gcc_xo_gpll0
,
922 .ops
= &clk_rcg2_ops
,
926 static const struct freq_tbl ftbl_gcc_usb_hsic_clk
[] = {
927 F(480000000, P_GPLL1
, 1, 0, 0),
931 static u8 usb_hsic_clk_src_map
[] = {
936 static struct clk_rcg2 usb_hsic_clk_src
= {
939 .parent_map
= usb_hsic_clk_src_map
,
940 .freq_tbl
= ftbl_gcc_usb_hsic_clk
,
941 .clkr
.hw
.init
= &(struct clk_init_data
){
942 .name
= "usb_hsic_clk_src",
943 .parent_names
= (const char *[]){
948 .ops
= &clk_rcg2_ops
,
952 static const struct freq_tbl ftbl_gcc_usb_hsic_io_cal_clk
[] = {
953 F(9600000, P_XO
, 2, 0, 0),
957 static struct clk_rcg2 usb_hsic_io_cal_clk_src
= {
960 .parent_map
= gcc_xo_gpll0_map
,
961 .freq_tbl
= ftbl_gcc_usb_hsic_io_cal_clk
,
962 .clkr
.hw
.init
= &(struct clk_init_data
){
963 .name
= "usb_hsic_io_cal_clk_src",
964 .parent_names
= gcc_xo_gpll0
,
966 .ops
= &clk_rcg2_ops
,
970 static const struct freq_tbl ftbl_gcc_usb_hsic_system_clk
[] = {
971 F(60000000, P_GPLL0
, 10, 0, 0),
972 F(75000000, P_GPLL0
, 8, 0, 0),
976 static struct clk_rcg2 usb_hsic_system_clk_src
= {
979 .parent_map
= gcc_xo_gpll0_map
,
980 .freq_tbl
= ftbl_gcc_usb_hsic_system_clk
,
981 .clkr
.hw
.init
= &(struct clk_init_data
){
982 .name
= "usb_hsic_system_clk_src",
983 .parent_names
= gcc_xo_gpll0
,
985 .ops
= &clk_rcg2_ops
,
989 static struct clk_regmap gcc_mmss_gpll0_clk_src
= {
990 .enable_reg
= 0x1484,
991 .enable_mask
= BIT(26),
992 .hw
.init
= &(struct clk_init_data
){
993 .name
= "mmss_gpll0_vote",
994 .parent_names
= (const char *[]){
998 .ops
= &clk_branch_simple_ops
,
1002 static struct clk_branch gcc_bam_dma_ahb_clk
= {
1004 .halt_check
= BRANCH_HALT_VOTED
,
1006 .enable_reg
= 0x1484,
1007 .enable_mask
= BIT(12),
1008 .hw
.init
= &(struct clk_init_data
){
1009 .name
= "gcc_bam_dma_ahb_clk",
1010 .parent_names
= (const char *[]){
1011 "periph_noc_clk_src",
1014 .ops
= &clk_branch2_ops
,
1019 static struct clk_branch gcc_blsp1_ahb_clk
= {
1021 .halt_check
= BRANCH_HALT_VOTED
,
1023 .enable_reg
= 0x1484,
1024 .enable_mask
= BIT(17),
1025 .hw
.init
= &(struct clk_init_data
){
1026 .name
= "gcc_blsp1_ahb_clk",
1027 .parent_names
= (const char *[]){
1028 "periph_noc_clk_src",
1031 .ops
= &clk_branch2_ops
,
1036 static struct clk_branch gcc_blsp1_qup1_i2c_apps_clk
= {
1039 .enable_reg
= 0x0648,
1040 .enable_mask
= BIT(0),
1041 .hw
.init
= &(struct clk_init_data
){
1042 .name
= "gcc_blsp1_qup1_i2c_apps_clk",
1043 .parent_names
= (const char *[]){
1044 "blsp1_qup1_i2c_apps_clk_src",
1047 .flags
= CLK_SET_RATE_PARENT
,
1048 .ops
= &clk_branch2_ops
,
1053 static struct clk_branch gcc_blsp1_qup1_spi_apps_clk
= {
1056 .enable_reg
= 0x0644,
1057 .enable_mask
= BIT(0),
1058 .hw
.init
= &(struct clk_init_data
){
1059 .name
= "gcc_blsp1_qup1_spi_apps_clk",
1060 .parent_names
= (const char *[]){
1061 "blsp1_qup1_spi_apps_clk_src",
1064 .flags
= CLK_SET_RATE_PARENT
,
1065 .ops
= &clk_branch2_ops
,
1070 static struct clk_branch gcc_blsp1_qup2_i2c_apps_clk
= {
1073 .enable_reg
= 0x06c8,
1074 .enable_mask
= BIT(0),
1075 .hw
.init
= &(struct clk_init_data
){
1076 .name
= "gcc_blsp1_qup2_i2c_apps_clk",
1077 .parent_names
= (const char *[]){
1078 "blsp1_qup2_i2c_apps_clk_src",
1081 .flags
= CLK_SET_RATE_PARENT
,
1082 .ops
= &clk_branch2_ops
,
1087 static struct clk_branch gcc_blsp1_qup2_spi_apps_clk
= {
1090 .enable_reg
= 0x06c4,
1091 .enable_mask
= BIT(0),
1092 .hw
.init
= &(struct clk_init_data
){
1093 .name
= "gcc_blsp1_qup2_spi_apps_clk",
1094 .parent_names
= (const char *[]){
1095 "blsp1_qup2_spi_apps_clk_src",
1098 .flags
= CLK_SET_RATE_PARENT
,
1099 .ops
= &clk_branch2_ops
,
1104 static struct clk_branch gcc_blsp1_qup3_i2c_apps_clk
= {
1107 .enable_reg
= 0x0748,
1108 .enable_mask
= BIT(0),
1109 .hw
.init
= &(struct clk_init_data
){
1110 .name
= "gcc_blsp1_qup3_i2c_apps_clk",
1111 .parent_names
= (const char *[]){
1112 "blsp1_qup3_i2c_apps_clk_src",
1115 .flags
= CLK_SET_RATE_PARENT
,
1116 .ops
= &clk_branch2_ops
,
1121 static struct clk_branch gcc_blsp1_qup3_spi_apps_clk
= {
1124 .enable_reg
= 0x0744,
1125 .enable_mask
= BIT(0),
1126 .hw
.init
= &(struct clk_init_data
){
1127 .name
= "gcc_blsp1_qup3_spi_apps_clk",
1128 .parent_names
= (const char *[]){
1129 "blsp1_qup3_spi_apps_clk_src",
1132 .flags
= CLK_SET_RATE_PARENT
,
1133 .ops
= &clk_branch2_ops
,
1138 static struct clk_branch gcc_blsp1_qup4_i2c_apps_clk
= {
1141 .enable_reg
= 0x07c8,
1142 .enable_mask
= BIT(0),
1143 .hw
.init
= &(struct clk_init_data
){
1144 .name
= "gcc_blsp1_qup4_i2c_apps_clk",
1145 .parent_names
= (const char *[]){
1146 "blsp1_qup4_i2c_apps_clk_src",
1149 .flags
= CLK_SET_RATE_PARENT
,
1150 .ops
= &clk_branch2_ops
,
1155 static struct clk_branch gcc_blsp1_qup4_spi_apps_clk
= {
1158 .enable_reg
= 0x07c4,
1159 .enable_mask
= BIT(0),
1160 .hw
.init
= &(struct clk_init_data
){
1161 .name
= "gcc_blsp1_qup4_spi_apps_clk",
1162 .parent_names
= (const char *[]){
1163 "blsp1_qup4_spi_apps_clk_src",
1166 .flags
= CLK_SET_RATE_PARENT
,
1167 .ops
= &clk_branch2_ops
,
1172 static struct clk_branch gcc_blsp1_qup5_i2c_apps_clk
= {
1175 .enable_reg
= 0x0848,
1176 .enable_mask
= BIT(0),
1177 .hw
.init
= &(struct clk_init_data
){
1178 .name
= "gcc_blsp1_qup5_i2c_apps_clk",
1179 .parent_names
= (const char *[]){
1180 "blsp1_qup5_i2c_apps_clk_src",
1183 .flags
= CLK_SET_RATE_PARENT
,
1184 .ops
= &clk_branch2_ops
,
1189 static struct clk_branch gcc_blsp1_qup5_spi_apps_clk
= {
1192 .enable_reg
= 0x0844,
1193 .enable_mask
= BIT(0),
1194 .hw
.init
= &(struct clk_init_data
){
1195 .name
= "gcc_blsp1_qup5_spi_apps_clk",
1196 .parent_names
= (const char *[]){
1197 "blsp1_qup5_spi_apps_clk_src",
1200 .flags
= CLK_SET_RATE_PARENT
,
1201 .ops
= &clk_branch2_ops
,
1206 static struct clk_branch gcc_blsp1_qup6_i2c_apps_clk
= {
1209 .enable_reg
= 0x08c8,
1210 .enable_mask
= BIT(0),
1211 .hw
.init
= &(struct clk_init_data
){
1212 .name
= "gcc_blsp1_qup6_i2c_apps_clk",
1213 .parent_names
= (const char *[]){
1214 "blsp1_qup6_i2c_apps_clk_src",
1217 .flags
= CLK_SET_RATE_PARENT
,
1218 .ops
= &clk_branch2_ops
,
1223 static struct clk_branch gcc_blsp1_qup6_spi_apps_clk
= {
1226 .enable_reg
= 0x08c4,
1227 .enable_mask
= BIT(0),
1228 .hw
.init
= &(struct clk_init_data
){
1229 .name
= "gcc_blsp1_qup6_spi_apps_clk",
1230 .parent_names
= (const char *[]){
1231 "blsp1_qup6_spi_apps_clk_src",
1234 .flags
= CLK_SET_RATE_PARENT
,
1235 .ops
= &clk_branch2_ops
,
1240 static struct clk_branch gcc_blsp1_uart1_apps_clk
= {
1243 .enable_reg
= 0x0684,
1244 .enable_mask
= BIT(0),
1245 .hw
.init
= &(struct clk_init_data
){
1246 .name
= "gcc_blsp1_uart1_apps_clk",
1247 .parent_names
= (const char *[]){
1248 "blsp1_uart1_apps_clk_src",
1251 .flags
= CLK_SET_RATE_PARENT
,
1252 .ops
= &clk_branch2_ops
,
1257 static struct clk_branch gcc_blsp1_uart2_apps_clk
= {
1260 .enable_reg
= 0x0704,
1261 .enable_mask
= BIT(0),
1262 .hw
.init
= &(struct clk_init_data
){
1263 .name
= "gcc_blsp1_uart2_apps_clk",
1264 .parent_names
= (const char *[]){
1265 "blsp1_uart2_apps_clk_src",
1268 .flags
= CLK_SET_RATE_PARENT
,
1269 .ops
= &clk_branch2_ops
,
1274 static struct clk_branch gcc_blsp1_uart3_apps_clk
= {
1277 .enable_reg
= 0x0784,
1278 .enable_mask
= BIT(0),
1279 .hw
.init
= &(struct clk_init_data
){
1280 .name
= "gcc_blsp1_uart3_apps_clk",
1281 .parent_names
= (const char *[]){
1282 "blsp1_uart3_apps_clk_src",
1285 .flags
= CLK_SET_RATE_PARENT
,
1286 .ops
= &clk_branch2_ops
,
1291 static struct clk_branch gcc_blsp1_uart4_apps_clk
= {
1294 .enable_reg
= 0x0804,
1295 .enable_mask
= BIT(0),
1296 .hw
.init
= &(struct clk_init_data
){
1297 .name
= "gcc_blsp1_uart4_apps_clk",
1298 .parent_names
= (const char *[]){
1299 "blsp1_uart4_apps_clk_src",
1302 .flags
= CLK_SET_RATE_PARENT
,
1303 .ops
= &clk_branch2_ops
,
1308 static struct clk_branch gcc_blsp1_uart5_apps_clk
= {
1311 .enable_reg
= 0x0884,
1312 .enable_mask
= BIT(0),
1313 .hw
.init
= &(struct clk_init_data
){
1314 .name
= "gcc_blsp1_uart5_apps_clk",
1315 .parent_names
= (const char *[]){
1316 "blsp1_uart5_apps_clk_src",
1319 .flags
= CLK_SET_RATE_PARENT
,
1320 .ops
= &clk_branch2_ops
,
1325 static struct clk_branch gcc_blsp1_uart6_apps_clk
= {
1328 .enable_reg
= 0x0904,
1329 .enable_mask
= BIT(0),
1330 .hw
.init
= &(struct clk_init_data
){
1331 .name
= "gcc_blsp1_uart6_apps_clk",
1332 .parent_names
= (const char *[]){
1333 "blsp1_uart6_apps_clk_src",
1336 .flags
= CLK_SET_RATE_PARENT
,
1337 .ops
= &clk_branch2_ops
,
1342 static struct clk_branch gcc_blsp2_ahb_clk
= {
1344 .halt_check
= BRANCH_HALT_VOTED
,
1346 .enable_reg
= 0x1484,
1347 .enable_mask
= BIT(15),
1348 .hw
.init
= &(struct clk_init_data
){
1349 .name
= "gcc_blsp2_ahb_clk",
1350 .parent_names
= (const char *[]){
1351 "periph_noc_clk_src",
1354 .ops
= &clk_branch2_ops
,
1359 static struct clk_branch gcc_blsp2_qup1_i2c_apps_clk
= {
1362 .enable_reg
= 0x0988,
1363 .enable_mask
= BIT(0),
1364 .hw
.init
= &(struct clk_init_data
){
1365 .name
= "gcc_blsp2_qup1_i2c_apps_clk",
1366 .parent_names
= (const char *[]){
1367 "blsp2_qup1_i2c_apps_clk_src",
1370 .flags
= CLK_SET_RATE_PARENT
,
1371 .ops
= &clk_branch2_ops
,
1376 static struct clk_branch gcc_blsp2_qup1_spi_apps_clk
= {
1379 .enable_reg
= 0x0984,
1380 .enable_mask
= BIT(0),
1381 .hw
.init
= &(struct clk_init_data
){
1382 .name
= "gcc_blsp2_qup1_spi_apps_clk",
1383 .parent_names
= (const char *[]){
1384 "blsp2_qup1_spi_apps_clk_src",
1387 .flags
= CLK_SET_RATE_PARENT
,
1388 .ops
= &clk_branch2_ops
,
1393 static struct clk_branch gcc_blsp2_qup2_i2c_apps_clk
= {
1396 .enable_reg
= 0x0a08,
1397 .enable_mask
= BIT(0),
1398 .hw
.init
= &(struct clk_init_data
){
1399 .name
= "gcc_blsp2_qup2_i2c_apps_clk",
1400 .parent_names
= (const char *[]){
1401 "blsp2_qup2_i2c_apps_clk_src",
1404 .flags
= CLK_SET_RATE_PARENT
,
1405 .ops
= &clk_branch2_ops
,
1410 static struct clk_branch gcc_blsp2_qup2_spi_apps_clk
= {
1413 .enable_reg
= 0x0a04,
1414 .enable_mask
= BIT(0),
1415 .hw
.init
= &(struct clk_init_data
){
1416 .name
= "gcc_blsp2_qup2_spi_apps_clk",
1417 .parent_names
= (const char *[]){
1418 "blsp2_qup2_spi_apps_clk_src",
1421 .flags
= CLK_SET_RATE_PARENT
,
1422 .ops
= &clk_branch2_ops
,
1427 static struct clk_branch gcc_blsp2_qup3_i2c_apps_clk
= {
1430 .enable_reg
= 0x0a88,
1431 .enable_mask
= BIT(0),
1432 .hw
.init
= &(struct clk_init_data
){
1433 .name
= "gcc_blsp2_qup3_i2c_apps_clk",
1434 .parent_names
= (const char *[]){
1435 "blsp2_qup3_i2c_apps_clk_src",
1438 .flags
= CLK_SET_RATE_PARENT
,
1439 .ops
= &clk_branch2_ops
,
1444 static struct clk_branch gcc_blsp2_qup3_spi_apps_clk
= {
1447 .enable_reg
= 0x0a84,
1448 .enable_mask
= BIT(0),
1449 .hw
.init
= &(struct clk_init_data
){
1450 .name
= "gcc_blsp2_qup3_spi_apps_clk",
1451 .parent_names
= (const char *[]){
1452 "blsp2_qup3_spi_apps_clk_src",
1455 .flags
= CLK_SET_RATE_PARENT
,
1456 .ops
= &clk_branch2_ops
,
1461 static struct clk_branch gcc_blsp2_qup4_i2c_apps_clk
= {
1464 .enable_reg
= 0x0b08,
1465 .enable_mask
= BIT(0),
1466 .hw
.init
= &(struct clk_init_data
){
1467 .name
= "gcc_blsp2_qup4_i2c_apps_clk",
1468 .parent_names
= (const char *[]){
1469 "blsp2_qup4_i2c_apps_clk_src",
1472 .flags
= CLK_SET_RATE_PARENT
,
1473 .ops
= &clk_branch2_ops
,
1478 static struct clk_branch gcc_blsp2_qup4_spi_apps_clk
= {
1481 .enable_reg
= 0x0b04,
1482 .enable_mask
= BIT(0),
1483 .hw
.init
= &(struct clk_init_data
){
1484 .name
= "gcc_blsp2_qup4_spi_apps_clk",
1485 .parent_names
= (const char *[]){
1486 "blsp2_qup4_spi_apps_clk_src",
1489 .flags
= CLK_SET_RATE_PARENT
,
1490 .ops
= &clk_branch2_ops
,
1495 static struct clk_branch gcc_blsp2_qup5_i2c_apps_clk
= {
1498 .enable_reg
= 0x0b88,
1499 .enable_mask
= BIT(0),
1500 .hw
.init
= &(struct clk_init_data
){
1501 .name
= "gcc_blsp2_qup5_i2c_apps_clk",
1502 .parent_names
= (const char *[]){
1503 "blsp2_qup5_i2c_apps_clk_src",
1506 .flags
= CLK_SET_RATE_PARENT
,
1507 .ops
= &clk_branch2_ops
,
1512 static struct clk_branch gcc_blsp2_qup5_spi_apps_clk
= {
1515 .enable_reg
= 0x0b84,
1516 .enable_mask
= BIT(0),
1517 .hw
.init
= &(struct clk_init_data
){
1518 .name
= "gcc_blsp2_qup5_spi_apps_clk",
1519 .parent_names
= (const char *[]){
1520 "blsp2_qup5_spi_apps_clk_src",
1523 .flags
= CLK_SET_RATE_PARENT
,
1524 .ops
= &clk_branch2_ops
,
1529 static struct clk_branch gcc_blsp2_qup6_i2c_apps_clk
= {
1532 .enable_reg
= 0x0c08,
1533 .enable_mask
= BIT(0),
1534 .hw
.init
= &(struct clk_init_data
){
1535 .name
= "gcc_blsp2_qup6_i2c_apps_clk",
1536 .parent_names
= (const char *[]){
1537 "blsp2_qup6_i2c_apps_clk_src",
1540 .flags
= CLK_SET_RATE_PARENT
,
1541 .ops
= &clk_branch2_ops
,
1546 static struct clk_branch gcc_blsp2_qup6_spi_apps_clk
= {
1549 .enable_reg
= 0x0c04,
1550 .enable_mask
= BIT(0),
1551 .hw
.init
= &(struct clk_init_data
){
1552 .name
= "gcc_blsp2_qup6_spi_apps_clk",
1553 .parent_names
= (const char *[]){
1554 "blsp2_qup6_spi_apps_clk_src",
1557 .flags
= CLK_SET_RATE_PARENT
,
1558 .ops
= &clk_branch2_ops
,
1563 static struct clk_branch gcc_blsp2_uart1_apps_clk
= {
1566 .enable_reg
= 0x09c4,
1567 .enable_mask
= BIT(0),
1568 .hw
.init
= &(struct clk_init_data
){
1569 .name
= "gcc_blsp2_uart1_apps_clk",
1570 .parent_names
= (const char *[]){
1571 "blsp2_uart1_apps_clk_src",
1574 .flags
= CLK_SET_RATE_PARENT
,
1575 .ops
= &clk_branch2_ops
,
1580 static struct clk_branch gcc_blsp2_uart2_apps_clk
= {
1583 .enable_reg
= 0x0a44,
1584 .enable_mask
= BIT(0),
1585 .hw
.init
= &(struct clk_init_data
){
1586 .name
= "gcc_blsp2_uart2_apps_clk",
1587 .parent_names
= (const char *[]){
1588 "blsp2_uart2_apps_clk_src",
1591 .flags
= CLK_SET_RATE_PARENT
,
1592 .ops
= &clk_branch2_ops
,
1597 static struct clk_branch gcc_blsp2_uart3_apps_clk
= {
1600 .enable_reg
= 0x0ac4,
1601 .enable_mask
= BIT(0),
1602 .hw
.init
= &(struct clk_init_data
){
1603 .name
= "gcc_blsp2_uart3_apps_clk",
1604 .parent_names
= (const char *[]){
1605 "blsp2_uart3_apps_clk_src",
1608 .flags
= CLK_SET_RATE_PARENT
,
1609 .ops
= &clk_branch2_ops
,
1614 static struct clk_branch gcc_blsp2_uart4_apps_clk
= {
1617 .enable_reg
= 0x0b44,
1618 .enable_mask
= BIT(0),
1619 .hw
.init
= &(struct clk_init_data
){
1620 .name
= "gcc_blsp2_uart4_apps_clk",
1621 .parent_names
= (const char *[]){
1622 "blsp2_uart4_apps_clk_src",
1625 .flags
= CLK_SET_RATE_PARENT
,
1626 .ops
= &clk_branch2_ops
,
1631 static struct clk_branch gcc_blsp2_uart5_apps_clk
= {
1634 .enable_reg
= 0x0bc4,
1635 .enable_mask
= BIT(0),
1636 .hw
.init
= &(struct clk_init_data
){
1637 .name
= "gcc_blsp2_uart5_apps_clk",
1638 .parent_names
= (const char *[]){
1639 "blsp2_uart5_apps_clk_src",
1642 .flags
= CLK_SET_RATE_PARENT
,
1643 .ops
= &clk_branch2_ops
,
1648 static struct clk_branch gcc_blsp2_uart6_apps_clk
= {
1651 .enable_reg
= 0x0c44,
1652 .enable_mask
= BIT(0),
1653 .hw
.init
= &(struct clk_init_data
){
1654 .name
= "gcc_blsp2_uart6_apps_clk",
1655 .parent_names
= (const char *[]){
1656 "blsp2_uart6_apps_clk_src",
1659 .flags
= CLK_SET_RATE_PARENT
,
1660 .ops
= &clk_branch2_ops
,
1665 static struct clk_branch gcc_boot_rom_ahb_clk
= {
1667 .halt_check
= BRANCH_HALT_VOTED
,
1669 .enable_reg
= 0x1484,
1670 .enable_mask
= BIT(10),
1671 .hw
.init
= &(struct clk_init_data
){
1672 .name
= "gcc_boot_rom_ahb_clk",
1673 .parent_names
= (const char *[]){
1674 "config_noc_clk_src",
1677 .ops
= &clk_branch2_ops
,
1682 static struct clk_branch gcc_ce1_ahb_clk
= {
1684 .halt_check
= BRANCH_HALT_VOTED
,
1686 .enable_reg
= 0x1484,
1687 .enable_mask
= BIT(3),
1688 .hw
.init
= &(struct clk_init_data
){
1689 .name
= "gcc_ce1_ahb_clk",
1690 .parent_names
= (const char *[]){
1691 "config_noc_clk_src",
1694 .ops
= &clk_branch2_ops
,
1699 static struct clk_branch gcc_ce1_axi_clk
= {
1701 .halt_check
= BRANCH_HALT_VOTED
,
1703 .enable_reg
= 0x1484,
1704 .enable_mask
= BIT(4),
1705 .hw
.init
= &(struct clk_init_data
){
1706 .name
= "gcc_ce1_axi_clk",
1707 .parent_names
= (const char *[]){
1708 "system_noc_clk_src",
1711 .ops
= &clk_branch2_ops
,
1716 static struct clk_branch gcc_ce1_clk
= {
1718 .halt_check
= BRANCH_HALT_VOTED
,
1720 .enable_reg
= 0x1484,
1721 .enable_mask
= BIT(5),
1722 .hw
.init
= &(struct clk_init_data
){
1723 .name
= "gcc_ce1_clk",
1724 .parent_names
= (const char *[]){
1728 .ops
= &clk_branch2_ops
,
1733 static struct clk_branch gcc_ce2_ahb_clk
= {
1735 .halt_check
= BRANCH_HALT_VOTED
,
1737 .enable_reg
= 0x1484,
1738 .enable_mask
= BIT(0),
1739 .hw
.init
= &(struct clk_init_data
){
1740 .name
= "gcc_ce2_ahb_clk",
1741 .parent_names
= (const char *[]){
1742 "config_noc_clk_src",
1745 .ops
= &clk_branch2_ops
,
1750 static struct clk_branch gcc_ce2_axi_clk
= {
1752 .halt_check
= BRANCH_HALT_VOTED
,
1754 .enable_reg
= 0x1484,
1755 .enable_mask
= BIT(1),
1756 .hw
.init
= &(struct clk_init_data
){
1757 .name
= "gcc_ce2_axi_clk",
1758 .parent_names
= (const char *[]){
1759 "system_noc_clk_src",
1762 .ops
= &clk_branch2_ops
,
1767 static struct clk_branch gcc_ce2_clk
= {
1769 .halt_check
= BRANCH_HALT_VOTED
,
1771 .enable_reg
= 0x1484,
1772 .enable_mask
= BIT(2),
1773 .hw
.init
= &(struct clk_init_data
){
1774 .name
= "gcc_ce2_clk",
1775 .parent_names
= (const char *[]){
1779 .flags
= CLK_SET_RATE_PARENT
,
1780 .ops
= &clk_branch2_ops
,
1785 static struct clk_branch gcc_gp1_clk
= {
1788 .enable_reg
= 0x1900,
1789 .enable_mask
= BIT(0),
1790 .hw
.init
= &(struct clk_init_data
){
1791 .name
= "gcc_gp1_clk",
1792 .parent_names
= (const char *[]){
1796 .flags
= CLK_SET_RATE_PARENT
,
1797 .ops
= &clk_branch2_ops
,
1802 static struct clk_branch gcc_gp2_clk
= {
1805 .enable_reg
= 0x1940,
1806 .enable_mask
= BIT(0),
1807 .hw
.init
= &(struct clk_init_data
){
1808 .name
= "gcc_gp2_clk",
1809 .parent_names
= (const char *[]){
1813 .flags
= CLK_SET_RATE_PARENT
,
1814 .ops
= &clk_branch2_ops
,
1819 static struct clk_branch gcc_gp3_clk
= {
1822 .enable_reg
= 0x1980,
1823 .enable_mask
= BIT(0),
1824 .hw
.init
= &(struct clk_init_data
){
1825 .name
= "gcc_gp3_clk",
1826 .parent_names
= (const char *[]){
1830 .flags
= CLK_SET_RATE_PARENT
,
1831 .ops
= &clk_branch2_ops
,
1836 static struct clk_branch gcc_lpass_q6_axi_clk
= {
1839 .enable_reg
= 0x11c0,
1840 .enable_mask
= BIT(0),
1841 .hw
.init
= &(struct clk_init_data
){
1842 .name
= "gcc_lpass_q6_axi_clk",
1843 .parent_names
= (const char *[]){
1844 "system_noc_clk_src",
1847 .ops
= &clk_branch2_ops
,
1852 static struct clk_branch gcc_mmss_noc_cfg_ahb_clk
= {
1855 .enable_reg
= 0x024c,
1856 .enable_mask
= BIT(0),
1857 .hw
.init
= &(struct clk_init_data
){
1858 .name
= "gcc_mmss_noc_cfg_ahb_clk",
1859 .parent_names
= (const char *[]){
1860 "config_noc_clk_src",
1863 .ops
= &clk_branch2_ops
,
1864 .flags
= CLK_IGNORE_UNUSED
,
1869 static struct clk_branch gcc_ocmem_noc_cfg_ahb_clk
= {
1872 .enable_reg
= 0x0248,
1873 .enable_mask
= BIT(0),
1874 .hw
.init
= &(struct clk_init_data
){
1875 .name
= "gcc_ocmem_noc_cfg_ahb_clk",
1876 .parent_names
= (const char *[]){
1877 "config_noc_clk_src",
1880 .ops
= &clk_branch2_ops
,
1885 static struct clk_branch gcc_mss_cfg_ahb_clk
= {
1888 .enable_reg
= 0x0280,
1889 .enable_mask
= BIT(0),
1890 .hw
.init
= &(struct clk_init_data
){
1891 .name
= "gcc_mss_cfg_ahb_clk",
1892 .parent_names
= (const char *[]){
1893 "config_noc_clk_src",
1896 .ops
= &clk_branch2_ops
,
1901 static struct clk_branch gcc_mss_q6_bimc_axi_clk
= {
1904 .enable_reg
= 0x0284,
1905 .enable_mask
= BIT(0),
1906 .hw
.init
= &(struct clk_init_data
){
1907 .name
= "gcc_mss_q6_bimc_axi_clk",
1908 .flags
= CLK_IS_ROOT
,
1909 .ops
= &clk_branch2_ops
,
1914 static struct clk_branch gcc_pdm2_clk
= {
1917 .enable_reg
= 0x0ccc,
1918 .enable_mask
= BIT(0),
1919 .hw
.init
= &(struct clk_init_data
){
1920 .name
= "gcc_pdm2_clk",
1921 .parent_names
= (const char *[]){
1925 .flags
= CLK_SET_RATE_PARENT
,
1926 .ops
= &clk_branch2_ops
,
1931 static struct clk_branch gcc_pdm_ahb_clk
= {
1934 .enable_reg
= 0x0cc4,
1935 .enable_mask
= BIT(0),
1936 .hw
.init
= &(struct clk_init_data
){
1937 .name
= "gcc_pdm_ahb_clk",
1938 .parent_names
= (const char *[]){
1939 "periph_noc_clk_src",
1942 .ops
= &clk_branch2_ops
,
1947 static struct clk_branch gcc_prng_ahb_clk
= {
1949 .halt_check
= BRANCH_HALT_VOTED
,
1951 .enable_reg
= 0x1484,
1952 .enable_mask
= BIT(13),
1953 .hw
.init
= &(struct clk_init_data
){
1954 .name
= "gcc_prng_ahb_clk",
1955 .parent_names
= (const char *[]){
1956 "periph_noc_clk_src",
1959 .ops
= &clk_branch2_ops
,
1964 static struct clk_branch gcc_sdcc1_ahb_clk
= {
1967 .enable_reg
= 0x04c8,
1968 .enable_mask
= BIT(0),
1969 .hw
.init
= &(struct clk_init_data
){
1970 .name
= "gcc_sdcc1_ahb_clk",
1971 .parent_names
= (const char *[]){
1972 "periph_noc_clk_src",
1975 .ops
= &clk_branch2_ops
,
1980 static struct clk_branch gcc_sdcc1_apps_clk
= {
1983 .enable_reg
= 0x04c4,
1984 .enable_mask
= BIT(0),
1985 .hw
.init
= &(struct clk_init_data
){
1986 .name
= "gcc_sdcc1_apps_clk",
1987 .parent_names
= (const char *[]){
1988 "sdcc1_apps_clk_src",
1991 .flags
= CLK_SET_RATE_PARENT
,
1992 .ops
= &clk_branch2_ops
,
1997 static struct clk_branch gcc_sdcc2_ahb_clk
= {
2000 .enable_reg
= 0x0508,
2001 .enable_mask
= BIT(0),
2002 .hw
.init
= &(struct clk_init_data
){
2003 .name
= "gcc_sdcc2_ahb_clk",
2004 .parent_names
= (const char *[]){
2005 "periph_noc_clk_src",
2008 .ops
= &clk_branch2_ops
,
2013 static struct clk_branch gcc_sdcc2_apps_clk
= {
2016 .enable_reg
= 0x0504,
2017 .enable_mask
= BIT(0),
2018 .hw
.init
= &(struct clk_init_data
){
2019 .name
= "gcc_sdcc2_apps_clk",
2020 .parent_names
= (const char *[]){
2021 "sdcc2_apps_clk_src",
2024 .flags
= CLK_SET_RATE_PARENT
,
2025 .ops
= &clk_branch2_ops
,
2030 static struct clk_branch gcc_sdcc3_ahb_clk
= {
2033 .enable_reg
= 0x0548,
2034 .enable_mask
= BIT(0),
2035 .hw
.init
= &(struct clk_init_data
){
2036 .name
= "gcc_sdcc3_ahb_clk",
2037 .parent_names
= (const char *[]){
2038 "periph_noc_clk_src",
2041 .ops
= &clk_branch2_ops
,
2046 static struct clk_branch gcc_sdcc3_apps_clk
= {
2049 .enable_reg
= 0x0544,
2050 .enable_mask
= BIT(0),
2051 .hw
.init
= &(struct clk_init_data
){
2052 .name
= "gcc_sdcc3_apps_clk",
2053 .parent_names
= (const char *[]){
2054 "sdcc3_apps_clk_src",
2057 .flags
= CLK_SET_RATE_PARENT
,
2058 .ops
= &clk_branch2_ops
,
2063 static struct clk_branch gcc_sdcc4_ahb_clk
= {
2066 .enable_reg
= 0x0588,
2067 .enable_mask
= BIT(0),
2068 .hw
.init
= &(struct clk_init_data
){
2069 .name
= "gcc_sdcc4_ahb_clk",
2070 .parent_names
= (const char *[]){
2071 "periph_noc_clk_src",
2074 .ops
= &clk_branch2_ops
,
2079 static struct clk_branch gcc_sdcc4_apps_clk
= {
2082 .enable_reg
= 0x0584,
2083 .enable_mask
= BIT(0),
2084 .hw
.init
= &(struct clk_init_data
){
2085 .name
= "gcc_sdcc4_apps_clk",
2086 .parent_names
= (const char *[]){
2087 "sdcc4_apps_clk_src",
2090 .flags
= CLK_SET_RATE_PARENT
,
2091 .ops
= &clk_branch2_ops
,
2096 static struct clk_branch gcc_sys_noc_usb3_axi_clk
= {
2099 .enable_reg
= 0x0108,
2100 .enable_mask
= BIT(0),
2101 .hw
.init
= &(struct clk_init_data
){
2102 .name
= "gcc_sys_noc_usb3_axi_clk",
2103 .parent_names
= (const char *[]){
2104 "usb30_master_clk_src",
2107 .flags
= CLK_SET_RATE_PARENT
,
2108 .ops
= &clk_branch2_ops
,
2113 static struct clk_branch gcc_tsif_ahb_clk
= {
2116 .enable_reg
= 0x0d84,
2117 .enable_mask
= BIT(0),
2118 .hw
.init
= &(struct clk_init_data
){
2119 .name
= "gcc_tsif_ahb_clk",
2120 .parent_names
= (const char *[]){
2121 "periph_noc_clk_src",
2124 .ops
= &clk_branch2_ops
,
2129 static struct clk_branch gcc_tsif_ref_clk
= {
2132 .enable_reg
= 0x0d88,
2133 .enable_mask
= BIT(0),
2134 .hw
.init
= &(struct clk_init_data
){
2135 .name
= "gcc_tsif_ref_clk",
2136 .parent_names
= (const char *[]){
2140 .flags
= CLK_SET_RATE_PARENT
,
2141 .ops
= &clk_branch2_ops
,
2146 static struct clk_branch gcc_usb2a_phy_sleep_clk
= {
2149 .enable_reg
= 0x04ac,
2150 .enable_mask
= BIT(0),
2151 .hw
.init
= &(struct clk_init_data
){
2152 .name
= "gcc_usb2a_phy_sleep_clk",
2153 .parent_names
= (const char *[]){
2157 .ops
= &clk_branch2_ops
,
2162 static struct clk_branch gcc_usb2b_phy_sleep_clk
= {
2165 .enable_reg
= 0x04b4,
2166 .enable_mask
= BIT(0),
2167 .hw
.init
= &(struct clk_init_data
){
2168 .name
= "gcc_usb2b_phy_sleep_clk",
2169 .parent_names
= (const char *[]){
2173 .ops
= &clk_branch2_ops
,
2178 static struct clk_branch gcc_usb30_master_clk
= {
2181 .enable_reg
= 0x03c8,
2182 .enable_mask
= BIT(0),
2183 .hw
.init
= &(struct clk_init_data
){
2184 .name
= "gcc_usb30_master_clk",
2185 .parent_names
= (const char *[]){
2186 "usb30_master_clk_src",
2189 .flags
= CLK_SET_RATE_PARENT
,
2190 .ops
= &clk_branch2_ops
,
2195 static struct clk_branch gcc_usb30_mock_utmi_clk
= {
2198 .enable_reg
= 0x03d0,
2199 .enable_mask
= BIT(0),
2200 .hw
.init
= &(struct clk_init_data
){
2201 .name
= "gcc_usb30_mock_utmi_clk",
2202 .parent_names
= (const char *[]){
2203 "usb30_mock_utmi_clk_src",
2206 .flags
= CLK_SET_RATE_PARENT
,
2207 .ops
= &clk_branch2_ops
,
2212 static struct clk_branch gcc_usb30_sleep_clk
= {
2215 .enable_reg
= 0x03cc,
2216 .enable_mask
= BIT(0),
2217 .hw
.init
= &(struct clk_init_data
){
2218 .name
= "gcc_usb30_sleep_clk",
2219 .parent_names
= (const char *[]){
2223 .ops
= &clk_branch2_ops
,
2228 static struct clk_branch gcc_usb_hs_ahb_clk
= {
2231 .enable_reg
= 0x0488,
2232 .enable_mask
= BIT(0),
2233 .hw
.init
= &(struct clk_init_data
){
2234 .name
= "gcc_usb_hs_ahb_clk",
2235 .parent_names
= (const char *[]){
2236 "periph_noc_clk_src",
2239 .ops
= &clk_branch2_ops
,
2244 static struct clk_branch gcc_usb_hs_system_clk
= {
2247 .enable_reg
= 0x0484,
2248 .enable_mask
= BIT(0),
2249 .hw
.init
= &(struct clk_init_data
){
2250 .name
= "gcc_usb_hs_system_clk",
2251 .parent_names
= (const char *[]){
2252 "usb_hs_system_clk_src",
2255 .flags
= CLK_SET_RATE_PARENT
,
2256 .ops
= &clk_branch2_ops
,
2261 static struct clk_branch gcc_usb_hsic_ahb_clk
= {
2264 .enable_reg
= 0x0408,
2265 .enable_mask
= BIT(0),
2266 .hw
.init
= &(struct clk_init_data
){
2267 .name
= "gcc_usb_hsic_ahb_clk",
2268 .parent_names
= (const char *[]){
2269 "periph_noc_clk_src",
2272 .ops
= &clk_branch2_ops
,
2277 static struct clk_branch gcc_usb_hsic_clk
= {
2280 .enable_reg
= 0x0410,
2281 .enable_mask
= BIT(0),
2282 .hw
.init
= &(struct clk_init_data
){
2283 .name
= "gcc_usb_hsic_clk",
2284 .parent_names
= (const char *[]){
2288 .flags
= CLK_SET_RATE_PARENT
,
2289 .ops
= &clk_branch2_ops
,
2294 static struct clk_branch gcc_usb_hsic_io_cal_clk
= {
2297 .enable_reg
= 0x0414,
2298 .enable_mask
= BIT(0),
2299 .hw
.init
= &(struct clk_init_data
){
2300 .name
= "gcc_usb_hsic_io_cal_clk",
2301 .parent_names
= (const char *[]){
2302 "usb_hsic_io_cal_clk_src",
2305 .flags
= CLK_SET_RATE_PARENT
,
2306 .ops
= &clk_branch2_ops
,
2311 static struct clk_branch gcc_usb_hsic_io_cal_sleep_clk
= {
2314 .enable_reg
= 0x0418,
2315 .enable_mask
= BIT(0),
2316 .hw
.init
= &(struct clk_init_data
){
2317 .name
= "gcc_usb_hsic_io_cal_sleep_clk",
2318 .parent_names
= (const char *[]){
2322 .ops
= &clk_branch2_ops
,
2327 static struct clk_branch gcc_usb_hsic_system_clk
= {
2330 .enable_reg
= 0x040c,
2331 .enable_mask
= BIT(0),
2332 .hw
.init
= &(struct clk_init_data
){
2333 .name
= "gcc_usb_hsic_system_clk",
2334 .parent_names
= (const char *[]){
2335 "usb_hsic_system_clk_src",
2338 .flags
= CLK_SET_RATE_PARENT
,
2339 .ops
= &clk_branch2_ops
,
2344 static struct clk_regmap
*gcc_msm8974_clocks
[] = {
2345 [GPLL0
] = &gpll0
.clkr
,
2346 [GPLL0_VOTE
] = &gpll0_vote
,
2347 [CONFIG_NOC_CLK_SRC
] = &config_noc_clk_src
.clkr
,
2348 [PERIPH_NOC_CLK_SRC
] = &periph_noc_clk_src
.clkr
,
2349 [SYSTEM_NOC_CLK_SRC
] = &system_noc_clk_src
.clkr
,
2350 [GPLL1
] = &gpll1
.clkr
,
2351 [GPLL1_VOTE
] = &gpll1_vote
,
2352 [USB30_MASTER_CLK_SRC
] = &usb30_master_clk_src
.clkr
,
2353 [BLSP1_QUP1_I2C_APPS_CLK_SRC
] = &blsp1_qup1_i2c_apps_clk_src
.clkr
,
2354 [BLSP1_QUP1_SPI_APPS_CLK_SRC
] = &blsp1_qup1_spi_apps_clk_src
.clkr
,
2355 [BLSP1_QUP2_I2C_APPS_CLK_SRC
] = &blsp1_qup2_i2c_apps_clk_src
.clkr
,
2356 [BLSP1_QUP2_SPI_APPS_CLK_SRC
] = &blsp1_qup2_spi_apps_clk_src
.clkr
,
2357 [BLSP1_QUP3_I2C_APPS_CLK_SRC
] = &blsp1_qup3_i2c_apps_clk_src
.clkr
,
2358 [BLSP1_QUP3_SPI_APPS_CLK_SRC
] = &blsp1_qup3_spi_apps_clk_src
.clkr
,
2359 [BLSP1_QUP4_I2C_APPS_CLK_SRC
] = &blsp1_qup4_i2c_apps_clk_src
.clkr
,
2360 [BLSP1_QUP4_SPI_APPS_CLK_SRC
] = &blsp1_qup4_spi_apps_clk_src
.clkr
,
2361 [BLSP1_QUP5_I2C_APPS_CLK_SRC
] = &blsp1_qup5_i2c_apps_clk_src
.clkr
,
2362 [BLSP1_QUP5_SPI_APPS_CLK_SRC
] = &blsp1_qup5_spi_apps_clk_src
.clkr
,
2363 [BLSP1_QUP6_I2C_APPS_CLK_SRC
] = &blsp1_qup6_i2c_apps_clk_src
.clkr
,
2364 [BLSP1_QUP6_SPI_APPS_CLK_SRC
] = &blsp1_qup6_spi_apps_clk_src
.clkr
,
2365 [BLSP1_UART1_APPS_CLK_SRC
] = &blsp1_uart1_apps_clk_src
.clkr
,
2366 [BLSP1_UART2_APPS_CLK_SRC
] = &blsp1_uart2_apps_clk_src
.clkr
,
2367 [BLSP1_UART3_APPS_CLK_SRC
] = &blsp1_uart3_apps_clk_src
.clkr
,
2368 [BLSP1_UART4_APPS_CLK_SRC
] = &blsp1_uart4_apps_clk_src
.clkr
,
2369 [BLSP1_UART5_APPS_CLK_SRC
] = &blsp1_uart5_apps_clk_src
.clkr
,
2370 [BLSP1_UART6_APPS_CLK_SRC
] = &blsp1_uart6_apps_clk_src
.clkr
,
2371 [BLSP2_QUP1_I2C_APPS_CLK_SRC
] = &blsp2_qup1_i2c_apps_clk_src
.clkr
,
2372 [BLSP2_QUP1_SPI_APPS_CLK_SRC
] = &blsp2_qup1_spi_apps_clk_src
.clkr
,
2373 [BLSP2_QUP2_I2C_APPS_CLK_SRC
] = &blsp2_qup2_i2c_apps_clk_src
.clkr
,
2374 [BLSP2_QUP2_SPI_APPS_CLK_SRC
] = &blsp2_qup2_spi_apps_clk_src
.clkr
,
2375 [BLSP2_QUP3_I2C_APPS_CLK_SRC
] = &blsp2_qup3_i2c_apps_clk_src
.clkr
,
2376 [BLSP2_QUP3_SPI_APPS_CLK_SRC
] = &blsp2_qup3_spi_apps_clk_src
.clkr
,
2377 [BLSP2_QUP4_I2C_APPS_CLK_SRC
] = &blsp2_qup4_i2c_apps_clk_src
.clkr
,
2378 [BLSP2_QUP4_SPI_APPS_CLK_SRC
] = &blsp2_qup4_spi_apps_clk_src
.clkr
,
2379 [BLSP2_QUP5_I2C_APPS_CLK_SRC
] = &blsp2_qup5_i2c_apps_clk_src
.clkr
,
2380 [BLSP2_QUP5_SPI_APPS_CLK_SRC
] = &blsp2_qup5_spi_apps_clk_src
.clkr
,
2381 [BLSP2_QUP6_I2C_APPS_CLK_SRC
] = &blsp2_qup6_i2c_apps_clk_src
.clkr
,
2382 [BLSP2_QUP6_SPI_APPS_CLK_SRC
] = &blsp2_qup6_spi_apps_clk_src
.clkr
,
2383 [BLSP2_UART1_APPS_CLK_SRC
] = &blsp2_uart1_apps_clk_src
.clkr
,
2384 [BLSP2_UART2_APPS_CLK_SRC
] = &blsp2_uart2_apps_clk_src
.clkr
,
2385 [BLSP2_UART3_APPS_CLK_SRC
] = &blsp2_uart3_apps_clk_src
.clkr
,
2386 [BLSP2_UART4_APPS_CLK_SRC
] = &blsp2_uart4_apps_clk_src
.clkr
,
2387 [BLSP2_UART5_APPS_CLK_SRC
] = &blsp2_uart5_apps_clk_src
.clkr
,
2388 [BLSP2_UART6_APPS_CLK_SRC
] = &blsp2_uart6_apps_clk_src
.clkr
,
2389 [CE1_CLK_SRC
] = &ce1_clk_src
.clkr
,
2390 [CE2_CLK_SRC
] = &ce2_clk_src
.clkr
,
2391 [GP1_CLK_SRC
] = &gp1_clk_src
.clkr
,
2392 [GP2_CLK_SRC
] = &gp2_clk_src
.clkr
,
2393 [GP3_CLK_SRC
] = &gp3_clk_src
.clkr
,
2394 [PDM2_CLK_SRC
] = &pdm2_clk_src
.clkr
,
2395 [SDCC1_APPS_CLK_SRC
] = &sdcc1_apps_clk_src
.clkr
,
2396 [SDCC2_APPS_CLK_SRC
] = &sdcc2_apps_clk_src
.clkr
,
2397 [SDCC3_APPS_CLK_SRC
] = &sdcc3_apps_clk_src
.clkr
,
2398 [SDCC4_APPS_CLK_SRC
] = &sdcc4_apps_clk_src
.clkr
,
2399 [TSIF_REF_CLK_SRC
] = &tsif_ref_clk_src
.clkr
,
2400 [USB30_MOCK_UTMI_CLK_SRC
] = &usb30_mock_utmi_clk_src
.clkr
,
2401 [USB_HS_SYSTEM_CLK_SRC
] = &usb_hs_system_clk_src
.clkr
,
2402 [USB_HSIC_CLK_SRC
] = &usb_hsic_clk_src
.clkr
,
2403 [USB_HSIC_IO_CAL_CLK_SRC
] = &usb_hsic_io_cal_clk_src
.clkr
,
2404 [USB_HSIC_SYSTEM_CLK_SRC
] = &usb_hsic_system_clk_src
.clkr
,
2405 [GCC_BAM_DMA_AHB_CLK
] = &gcc_bam_dma_ahb_clk
.clkr
,
2406 [GCC_BLSP1_AHB_CLK
] = &gcc_blsp1_ahb_clk
.clkr
,
2407 [GCC_BLSP1_QUP1_I2C_APPS_CLK
] = &gcc_blsp1_qup1_i2c_apps_clk
.clkr
,
2408 [GCC_BLSP1_QUP1_SPI_APPS_CLK
] = &gcc_blsp1_qup1_spi_apps_clk
.clkr
,
2409 [GCC_BLSP1_QUP2_I2C_APPS_CLK
] = &gcc_blsp1_qup2_i2c_apps_clk
.clkr
,
2410 [GCC_BLSP1_QUP2_SPI_APPS_CLK
] = &gcc_blsp1_qup2_spi_apps_clk
.clkr
,
2411 [GCC_BLSP1_QUP3_I2C_APPS_CLK
] = &gcc_blsp1_qup3_i2c_apps_clk
.clkr
,
2412 [GCC_BLSP1_QUP3_SPI_APPS_CLK
] = &gcc_blsp1_qup3_spi_apps_clk
.clkr
,
2413 [GCC_BLSP1_QUP4_I2C_APPS_CLK
] = &gcc_blsp1_qup4_i2c_apps_clk
.clkr
,
2414 [GCC_BLSP1_QUP4_SPI_APPS_CLK
] = &gcc_blsp1_qup4_spi_apps_clk
.clkr
,
2415 [GCC_BLSP1_QUP5_I2C_APPS_CLK
] = &gcc_blsp1_qup5_i2c_apps_clk
.clkr
,
2416 [GCC_BLSP1_QUP5_SPI_APPS_CLK
] = &gcc_blsp1_qup5_spi_apps_clk
.clkr
,
2417 [GCC_BLSP1_QUP6_I2C_APPS_CLK
] = &gcc_blsp1_qup6_i2c_apps_clk
.clkr
,
2418 [GCC_BLSP1_QUP6_SPI_APPS_CLK
] = &gcc_blsp1_qup6_spi_apps_clk
.clkr
,
2419 [GCC_BLSP1_UART1_APPS_CLK
] = &gcc_blsp1_uart1_apps_clk
.clkr
,
2420 [GCC_BLSP1_UART2_APPS_CLK
] = &gcc_blsp1_uart2_apps_clk
.clkr
,
2421 [GCC_BLSP1_UART3_APPS_CLK
] = &gcc_blsp1_uart3_apps_clk
.clkr
,
2422 [GCC_BLSP1_UART4_APPS_CLK
] = &gcc_blsp1_uart4_apps_clk
.clkr
,
2423 [GCC_BLSP1_UART5_APPS_CLK
] = &gcc_blsp1_uart5_apps_clk
.clkr
,
2424 [GCC_BLSP1_UART6_APPS_CLK
] = &gcc_blsp1_uart6_apps_clk
.clkr
,
2425 [GCC_BLSP2_AHB_CLK
] = &gcc_blsp2_ahb_clk
.clkr
,
2426 [GCC_BLSP2_QUP1_I2C_APPS_CLK
] = &gcc_blsp2_qup1_i2c_apps_clk
.clkr
,
2427 [GCC_BLSP2_QUP1_SPI_APPS_CLK
] = &gcc_blsp2_qup1_spi_apps_clk
.clkr
,
2428 [GCC_BLSP2_QUP2_I2C_APPS_CLK
] = &gcc_blsp2_qup2_i2c_apps_clk
.clkr
,
2429 [GCC_BLSP2_QUP2_SPI_APPS_CLK
] = &gcc_blsp2_qup2_spi_apps_clk
.clkr
,
2430 [GCC_BLSP2_QUP3_I2C_APPS_CLK
] = &gcc_blsp2_qup3_i2c_apps_clk
.clkr
,
2431 [GCC_BLSP2_QUP3_SPI_APPS_CLK
] = &gcc_blsp2_qup3_spi_apps_clk
.clkr
,
2432 [GCC_BLSP2_QUP4_I2C_APPS_CLK
] = &gcc_blsp2_qup4_i2c_apps_clk
.clkr
,
2433 [GCC_BLSP2_QUP4_SPI_APPS_CLK
] = &gcc_blsp2_qup4_spi_apps_clk
.clkr
,
2434 [GCC_BLSP2_QUP5_I2C_APPS_CLK
] = &gcc_blsp2_qup5_i2c_apps_clk
.clkr
,
2435 [GCC_BLSP2_QUP5_SPI_APPS_CLK
] = &gcc_blsp2_qup5_spi_apps_clk
.clkr
,
2436 [GCC_BLSP2_QUP6_I2C_APPS_CLK
] = &gcc_blsp2_qup6_i2c_apps_clk
.clkr
,
2437 [GCC_BLSP2_QUP6_SPI_APPS_CLK
] = &gcc_blsp2_qup6_spi_apps_clk
.clkr
,
2438 [GCC_BLSP2_UART1_APPS_CLK
] = &gcc_blsp2_uart1_apps_clk
.clkr
,
2439 [GCC_BLSP2_UART2_APPS_CLK
] = &gcc_blsp2_uart2_apps_clk
.clkr
,
2440 [GCC_BLSP2_UART3_APPS_CLK
] = &gcc_blsp2_uart3_apps_clk
.clkr
,
2441 [GCC_BLSP2_UART4_APPS_CLK
] = &gcc_blsp2_uart4_apps_clk
.clkr
,
2442 [GCC_BLSP2_UART5_APPS_CLK
] = &gcc_blsp2_uart5_apps_clk
.clkr
,
2443 [GCC_BLSP2_UART6_APPS_CLK
] = &gcc_blsp2_uart6_apps_clk
.clkr
,
2444 [GCC_BOOT_ROM_AHB_CLK
] = &gcc_boot_rom_ahb_clk
.clkr
,
2445 [GCC_CE1_AHB_CLK
] = &gcc_ce1_ahb_clk
.clkr
,
2446 [GCC_CE1_AXI_CLK
] = &gcc_ce1_axi_clk
.clkr
,
2447 [GCC_CE1_CLK
] = &gcc_ce1_clk
.clkr
,
2448 [GCC_CE2_AHB_CLK
] = &gcc_ce2_ahb_clk
.clkr
,
2449 [GCC_CE2_AXI_CLK
] = &gcc_ce2_axi_clk
.clkr
,
2450 [GCC_CE2_CLK
] = &gcc_ce2_clk
.clkr
,
2451 [GCC_GP1_CLK
] = &gcc_gp1_clk
.clkr
,
2452 [GCC_GP2_CLK
] = &gcc_gp2_clk
.clkr
,
2453 [GCC_GP3_CLK
] = &gcc_gp3_clk
.clkr
,
2454 [GCC_LPASS_Q6_AXI_CLK
] = &gcc_lpass_q6_axi_clk
.clkr
,
2455 [GCC_MMSS_NOC_CFG_AHB_CLK
] = &gcc_mmss_noc_cfg_ahb_clk
.clkr
,
2456 [GCC_OCMEM_NOC_CFG_AHB_CLK
] = &gcc_ocmem_noc_cfg_ahb_clk
.clkr
,
2457 [GCC_MSS_CFG_AHB_CLK
] = &gcc_mss_cfg_ahb_clk
.clkr
,
2458 [GCC_MSS_Q6_BIMC_AXI_CLK
] = &gcc_mss_q6_bimc_axi_clk
.clkr
,
2459 [GCC_PDM2_CLK
] = &gcc_pdm2_clk
.clkr
,
2460 [GCC_PDM_AHB_CLK
] = &gcc_pdm_ahb_clk
.clkr
,
2461 [GCC_PRNG_AHB_CLK
] = &gcc_prng_ahb_clk
.clkr
,
2462 [GCC_SDCC1_AHB_CLK
] = &gcc_sdcc1_ahb_clk
.clkr
,
2463 [GCC_SDCC1_APPS_CLK
] = &gcc_sdcc1_apps_clk
.clkr
,
2464 [GCC_SDCC2_AHB_CLK
] = &gcc_sdcc2_ahb_clk
.clkr
,
2465 [GCC_SDCC2_APPS_CLK
] = &gcc_sdcc2_apps_clk
.clkr
,
2466 [GCC_SDCC3_AHB_CLK
] = &gcc_sdcc3_ahb_clk
.clkr
,
2467 [GCC_SDCC3_APPS_CLK
] = &gcc_sdcc3_apps_clk
.clkr
,
2468 [GCC_SDCC4_AHB_CLK
] = &gcc_sdcc4_ahb_clk
.clkr
,
2469 [GCC_SDCC4_APPS_CLK
] = &gcc_sdcc4_apps_clk
.clkr
,
2470 [GCC_SYS_NOC_USB3_AXI_CLK
] = &gcc_sys_noc_usb3_axi_clk
.clkr
,
2471 [GCC_TSIF_AHB_CLK
] = &gcc_tsif_ahb_clk
.clkr
,
2472 [GCC_TSIF_REF_CLK
] = &gcc_tsif_ref_clk
.clkr
,
2473 [GCC_USB2A_PHY_SLEEP_CLK
] = &gcc_usb2a_phy_sleep_clk
.clkr
,
2474 [GCC_USB2B_PHY_SLEEP_CLK
] = &gcc_usb2b_phy_sleep_clk
.clkr
,
2475 [GCC_USB30_MASTER_CLK
] = &gcc_usb30_master_clk
.clkr
,
2476 [GCC_USB30_MOCK_UTMI_CLK
] = &gcc_usb30_mock_utmi_clk
.clkr
,
2477 [GCC_USB30_SLEEP_CLK
] = &gcc_usb30_sleep_clk
.clkr
,
2478 [GCC_USB_HS_AHB_CLK
] = &gcc_usb_hs_ahb_clk
.clkr
,
2479 [GCC_USB_HS_SYSTEM_CLK
] = &gcc_usb_hs_system_clk
.clkr
,
2480 [GCC_USB_HSIC_AHB_CLK
] = &gcc_usb_hsic_ahb_clk
.clkr
,
2481 [GCC_USB_HSIC_CLK
] = &gcc_usb_hsic_clk
.clkr
,
2482 [GCC_USB_HSIC_IO_CAL_CLK
] = &gcc_usb_hsic_io_cal_clk
.clkr
,
2483 [GCC_USB_HSIC_IO_CAL_SLEEP_CLK
] = &gcc_usb_hsic_io_cal_sleep_clk
.clkr
,
2484 [GCC_USB_HSIC_SYSTEM_CLK
] = &gcc_usb_hsic_system_clk
.clkr
,
2485 [GCC_MMSS_GPLL0_CLK_SRC
] = &gcc_mmss_gpll0_clk_src
,
2488 static const struct qcom_reset_map gcc_msm8974_resets
[] = {
2489 [GCC_SYSTEM_NOC_BCR
] = { 0x0100 },
2490 [GCC_CONFIG_NOC_BCR
] = { 0x0140 },
2491 [GCC_PERIPH_NOC_BCR
] = { 0x0180 },
2492 [GCC_IMEM_BCR
] = { 0x0200 },
2493 [GCC_MMSS_BCR
] = { 0x0240 },
2494 [GCC_QDSS_BCR
] = { 0x0300 },
2495 [GCC_USB_30_BCR
] = { 0x03c0 },
2496 [GCC_USB3_PHY_BCR
] = { 0x03fc },
2497 [GCC_USB_HS_HSIC_BCR
] = { 0x0400 },
2498 [GCC_USB_HS_BCR
] = { 0x0480 },
2499 [GCC_USB2A_PHY_BCR
] = { 0x04a8 },
2500 [GCC_USB2B_PHY_BCR
] = { 0x04b0 },
2501 [GCC_SDCC1_BCR
] = { 0x04c0 },
2502 [GCC_SDCC2_BCR
] = { 0x0500 },
2503 [GCC_SDCC3_BCR
] = { 0x0540 },
2504 [GCC_SDCC4_BCR
] = { 0x0580 },
2505 [GCC_BLSP1_BCR
] = { 0x05c0 },
2506 [GCC_BLSP1_QUP1_BCR
] = { 0x0640 },
2507 [GCC_BLSP1_UART1_BCR
] = { 0x0680 },
2508 [GCC_BLSP1_QUP2_BCR
] = { 0x06c0 },
2509 [GCC_BLSP1_UART2_BCR
] = { 0x0700 },
2510 [GCC_BLSP1_QUP3_BCR
] = { 0x0740 },
2511 [GCC_BLSP1_UART3_BCR
] = { 0x0780 },
2512 [GCC_BLSP1_QUP4_BCR
] = { 0x07c0 },
2513 [GCC_BLSP1_UART4_BCR
] = { 0x0800 },
2514 [GCC_BLSP1_QUP5_BCR
] = { 0x0840 },
2515 [GCC_BLSP1_UART5_BCR
] = { 0x0880 },
2516 [GCC_BLSP1_QUP6_BCR
] = { 0x08c0 },
2517 [GCC_BLSP1_UART6_BCR
] = { 0x0900 },
2518 [GCC_BLSP2_BCR
] = { 0x0940 },
2519 [GCC_BLSP2_QUP1_BCR
] = { 0x0980 },
2520 [GCC_BLSP2_UART1_BCR
] = { 0x09c0 },
2521 [GCC_BLSP2_QUP2_BCR
] = { 0x0a00 },
2522 [GCC_BLSP2_UART2_BCR
] = { 0x0a40 },
2523 [GCC_BLSP2_QUP3_BCR
] = { 0x0a80 },
2524 [GCC_BLSP2_UART3_BCR
] = { 0x0ac0 },
2525 [GCC_BLSP2_QUP4_BCR
] = { 0x0b00 },
2526 [GCC_BLSP2_UART4_BCR
] = { 0x0b40 },
2527 [GCC_BLSP2_QUP5_BCR
] = { 0x0b80 },
2528 [GCC_BLSP2_UART5_BCR
] = { 0x0bc0 },
2529 [GCC_BLSP2_QUP6_BCR
] = { 0x0c00 },
2530 [GCC_BLSP2_UART6_BCR
] = { 0x0c40 },
2531 [GCC_PDM_BCR
] = { 0x0cc0 },
2532 [GCC_BAM_DMA_BCR
] = { 0x0d40 },
2533 [GCC_TSIF_BCR
] = { 0x0d80 },
2534 [GCC_TCSR_BCR
] = { 0x0dc0 },
2535 [GCC_BOOT_ROM_BCR
] = { 0x0e00 },
2536 [GCC_MSG_RAM_BCR
] = { 0x0e40 },
2537 [GCC_TLMM_BCR
] = { 0x0e80 },
2538 [GCC_MPM_BCR
] = { 0x0ec0 },
2539 [GCC_SEC_CTRL_BCR
] = { 0x0f40 },
2540 [GCC_SPMI_BCR
] = { 0x0fc0 },
2541 [GCC_SPDM_BCR
] = { 0x1000 },
2542 [GCC_CE1_BCR
] = { 0x1040 },
2543 [GCC_CE2_BCR
] = { 0x1080 },
2544 [GCC_BIMC_BCR
] = { 0x1100 },
2545 [GCC_MPM_NON_AHB_RESET
] = { 0x0ec4, 2 },
2546 [GCC_MPM_AHB_RESET
] = { 0x0ec4, 1 },
2547 [GCC_SNOC_BUS_TIMEOUT0_BCR
] = { 0x1240 },
2548 [GCC_SNOC_BUS_TIMEOUT2_BCR
] = { 0x1248 },
2549 [GCC_PNOC_BUS_TIMEOUT0_BCR
] = { 0x1280 },
2550 [GCC_PNOC_BUS_TIMEOUT1_BCR
] = { 0x1288 },
2551 [GCC_PNOC_BUS_TIMEOUT2_BCR
] = { 0x1290 },
2552 [GCC_PNOC_BUS_TIMEOUT3_BCR
] = { 0x1298 },
2553 [GCC_PNOC_BUS_TIMEOUT4_BCR
] = { 0x12a0 },
2554 [GCC_CNOC_BUS_TIMEOUT0_BCR
] = { 0x12c0 },
2555 [GCC_CNOC_BUS_TIMEOUT1_BCR
] = { 0x12c8 },
2556 [GCC_CNOC_BUS_TIMEOUT2_BCR
] = { 0x12d0 },
2557 [GCC_CNOC_BUS_TIMEOUT3_BCR
] = { 0x12d8 },
2558 [GCC_CNOC_BUS_TIMEOUT4_BCR
] = { 0x12e0 },
2559 [GCC_CNOC_BUS_TIMEOUT5_BCR
] = { 0x12e8 },
2560 [GCC_CNOC_BUS_TIMEOUT6_BCR
] = { 0x12f0 },
2561 [GCC_DEHR_BCR
] = { 0x1300 },
2562 [GCC_RBCPR_BCR
] = { 0x1380 },
2563 [GCC_MSS_RESTART
] = { 0x1680 },
2564 [GCC_LPASS_RESTART
] = { 0x16c0 },
2565 [GCC_WCSS_RESTART
] = { 0x1700 },
2566 [GCC_VENUS_RESTART
] = { 0x1740 },
2569 static const struct regmap_config gcc_msm8974_regmap_config
= {
2573 .max_register
= 0x1fc0,
2577 static const struct of_device_id gcc_msm8974_match_table
[] = {
2578 { .compatible
= "qcom,gcc-msm8974" },
2581 MODULE_DEVICE_TABLE(of
, gcc_msm8974_match_table
);
2584 struct qcom_reset_controller reset
;
2585 struct clk_onecell_data data
;
2589 static int gcc_msm8974_probe(struct platform_device
*pdev
)
2592 struct resource
*res
;
2594 struct device
*dev
= &pdev
->dev
;
2596 struct clk_onecell_data
*data
;
2598 struct regmap
*regmap
;
2600 struct qcom_reset_controller
*reset
;
2603 res
= platform_get_resource(pdev
, IORESOURCE_MEM
, 0);
2604 base
= devm_ioremap_resource(dev
, res
);
2606 return PTR_ERR(base
);
2608 regmap
= devm_regmap_init_mmio(dev
, base
, &gcc_msm8974_regmap_config
);
2610 return PTR_ERR(regmap
);
2612 num_clks
= ARRAY_SIZE(gcc_msm8974_clocks
);
2613 cc
= devm_kzalloc(dev
, sizeof(*cc
) + sizeof(*clks
) * num_clks
,
2621 data
->clk_num
= num_clks
;
2623 /* Temporary until RPM clocks supported */
2624 clk
= clk_register_fixed_rate(dev
, "xo", NULL
, CLK_IS_ROOT
, 19200000);
2626 return PTR_ERR(clk
);
2628 /* Should move to DT node? */
2629 clk
= clk_register_fixed_rate(dev
, "sleep_clk_src", NULL
,
2630 CLK_IS_ROOT
, 32768);
2632 return PTR_ERR(clk
);
2634 for (i
= 0; i
< num_clks
; i
++) {
2635 if (!gcc_msm8974_clocks
[i
])
2637 clk
= devm_clk_register_regmap(dev
, gcc_msm8974_clocks
[i
]);
2639 return PTR_ERR(clk
);
2643 ret
= of_clk_add_provider(dev
->of_node
, of_clk_src_onecell_get
, data
);
2648 reset
->rcdev
.of_node
= dev
->of_node
;
2649 reset
->rcdev
.ops
= &qcom_reset_ops
,
2650 reset
->rcdev
.owner
= THIS_MODULE
,
2651 reset
->rcdev
.nr_resets
= ARRAY_SIZE(gcc_msm8974_resets
),
2652 reset
->regmap
= regmap
;
2653 reset
->reset_map
= gcc_msm8974_resets
,
2654 platform_set_drvdata(pdev
, &reset
->rcdev
);
2656 ret
= reset_controller_register(&reset
->rcdev
);
2658 of_clk_del_provider(dev
->of_node
);
2663 static int gcc_msm8974_remove(struct platform_device
*pdev
)
2665 of_clk_del_provider(pdev
->dev
.of_node
);
2666 reset_controller_unregister(platform_get_drvdata(pdev
));
2670 static struct platform_driver gcc_msm8974_driver
= {
2671 .probe
= gcc_msm8974_probe
,
2672 .remove
= gcc_msm8974_remove
,
2674 .name
= "gcc-msm8974",
2675 .owner
= THIS_MODULE
,
2676 .of_match_table
= gcc_msm8974_match_table
,
2680 static int __init
gcc_msm8974_init(void)
2682 return platform_driver_register(&gcc_msm8974_driver
);
2684 core_initcall(gcc_msm8974_init
);
2686 static void __exit
gcc_msm8974_exit(void)
2688 platform_driver_unregister(&gcc_msm8974_driver
);
2690 module_exit(gcc_msm8974_exit
);
2692 MODULE_DESCRIPTION("QCOM GCC MSM8974 Driver");
2693 MODULE_LICENSE("GPL v2");
2694 MODULE_ALIAS("platform:gcc-msm8974");