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-msm8660.h>
26 #include <dt-bindings/reset/qcom,gcc-msm8660.h>
29 #include "clk-regmap.h"
32 #include "clk-branch.h"
35 static struct clk_pll pll8
= {
43 .clkr
.hw
.init
= &(struct clk_init_data
){
45 .parent_names
= (const char *[]){ "pxo" },
51 static struct clk_regmap pll8_vote
= {
53 .enable_mask
= BIT(8),
54 .hw
.init
= &(struct clk_init_data
){
56 .parent_names
= (const char *[]){ "pll8" },
58 .ops
= &clk_pll_vote_ops
,
66 static const u8 gcc_pxo_pll8_map
[] = {
71 static const char *gcc_pxo_pll8
[] = {
76 static const u8 gcc_pxo_pll8_cxo_map
[] = {
82 static const char *gcc_pxo_pll8_cxo
[] = {
88 static struct freq_tbl clk_tbl_gsbi_uart
[] = {
89 { 1843200, P_PLL8
, 2, 6, 625 },
90 { 3686400, P_PLL8
, 2, 12, 625 },
91 { 7372800, P_PLL8
, 2, 24, 625 },
92 { 14745600, P_PLL8
, 2, 48, 625 },
93 { 16000000, P_PLL8
, 4, 1, 6 },
94 { 24000000, P_PLL8
, 4, 1, 4 },
95 { 32000000, P_PLL8
, 4, 1, 3 },
96 { 40000000, P_PLL8
, 1, 5, 48 },
97 { 46400000, P_PLL8
, 1, 29, 240 },
98 { 48000000, P_PLL8
, 4, 1, 2 },
99 { 51200000, P_PLL8
, 1, 2, 15 },
100 { 56000000, P_PLL8
, 1, 7, 48 },
101 { 58982400, P_PLL8
, 1, 96, 625 },
102 { 64000000, P_PLL8
, 2, 1, 3 },
106 static struct clk_rcg gsbi1_uart_src
= {
111 .mnctr_reset_bit
= 7,
112 .mnctr_mode_shift
= 5,
123 .parent_map
= gcc_pxo_pll8_map
,
125 .freq_tbl
= clk_tbl_gsbi_uart
,
127 .enable_reg
= 0x29d4,
128 .enable_mask
= BIT(11),
129 .hw
.init
= &(struct clk_init_data
){
130 .name
= "gsbi1_uart_src",
131 .parent_names
= gcc_pxo_pll8
,
134 .flags
= CLK_SET_PARENT_GATE
,
139 static struct clk_branch gsbi1_uart_clk
= {
143 .enable_reg
= 0x29d4,
144 .enable_mask
= BIT(9),
145 .hw
.init
= &(struct clk_init_data
){
146 .name
= "gsbi1_uart_clk",
147 .parent_names
= (const char *[]){
151 .ops
= &clk_branch_ops
,
152 .flags
= CLK_SET_RATE_PARENT
,
157 static struct clk_rcg gsbi2_uart_src
= {
162 .mnctr_reset_bit
= 7,
163 .mnctr_mode_shift
= 5,
174 .parent_map
= gcc_pxo_pll8_map
,
176 .freq_tbl
= clk_tbl_gsbi_uart
,
178 .enable_reg
= 0x29f4,
179 .enable_mask
= BIT(11),
180 .hw
.init
= &(struct clk_init_data
){
181 .name
= "gsbi2_uart_src",
182 .parent_names
= gcc_pxo_pll8
,
185 .flags
= CLK_SET_PARENT_GATE
,
190 static struct clk_branch gsbi2_uart_clk
= {
194 .enable_reg
= 0x29f4,
195 .enable_mask
= BIT(9),
196 .hw
.init
= &(struct clk_init_data
){
197 .name
= "gsbi2_uart_clk",
198 .parent_names
= (const char *[]){
202 .ops
= &clk_branch_ops
,
203 .flags
= CLK_SET_RATE_PARENT
,
208 static struct clk_rcg gsbi3_uart_src
= {
213 .mnctr_reset_bit
= 7,
214 .mnctr_mode_shift
= 5,
225 .parent_map
= gcc_pxo_pll8_map
,
227 .freq_tbl
= clk_tbl_gsbi_uart
,
229 .enable_reg
= 0x2a14,
230 .enable_mask
= BIT(11),
231 .hw
.init
= &(struct clk_init_data
){
232 .name
= "gsbi3_uart_src",
233 .parent_names
= gcc_pxo_pll8
,
236 .flags
= CLK_SET_PARENT_GATE
,
241 static struct clk_branch gsbi3_uart_clk
= {
245 .enable_reg
= 0x2a14,
246 .enable_mask
= BIT(9),
247 .hw
.init
= &(struct clk_init_data
){
248 .name
= "gsbi3_uart_clk",
249 .parent_names
= (const char *[]){
253 .ops
= &clk_branch_ops
,
254 .flags
= CLK_SET_RATE_PARENT
,
259 static struct clk_rcg gsbi4_uart_src
= {
264 .mnctr_reset_bit
= 7,
265 .mnctr_mode_shift
= 5,
276 .parent_map
= gcc_pxo_pll8_map
,
278 .freq_tbl
= clk_tbl_gsbi_uart
,
280 .enable_reg
= 0x2a34,
281 .enable_mask
= BIT(11),
282 .hw
.init
= &(struct clk_init_data
){
283 .name
= "gsbi4_uart_src",
284 .parent_names
= gcc_pxo_pll8
,
287 .flags
= CLK_SET_PARENT_GATE
,
292 static struct clk_branch gsbi4_uart_clk
= {
296 .enable_reg
= 0x2a34,
297 .enable_mask
= BIT(9),
298 .hw
.init
= &(struct clk_init_data
){
299 .name
= "gsbi4_uart_clk",
300 .parent_names
= (const char *[]){
304 .ops
= &clk_branch_ops
,
305 .flags
= CLK_SET_RATE_PARENT
,
310 static struct clk_rcg gsbi5_uart_src
= {
315 .mnctr_reset_bit
= 7,
316 .mnctr_mode_shift
= 5,
327 .parent_map
= gcc_pxo_pll8_map
,
329 .freq_tbl
= clk_tbl_gsbi_uart
,
331 .enable_reg
= 0x2a54,
332 .enable_mask
= BIT(11),
333 .hw
.init
= &(struct clk_init_data
){
334 .name
= "gsbi5_uart_src",
335 .parent_names
= gcc_pxo_pll8
,
338 .flags
= CLK_SET_PARENT_GATE
,
343 static struct clk_branch gsbi5_uart_clk
= {
347 .enable_reg
= 0x2a54,
348 .enable_mask
= BIT(9),
349 .hw
.init
= &(struct clk_init_data
){
350 .name
= "gsbi5_uart_clk",
351 .parent_names
= (const char *[]){
355 .ops
= &clk_branch_ops
,
356 .flags
= CLK_SET_RATE_PARENT
,
361 static struct clk_rcg gsbi6_uart_src
= {
366 .mnctr_reset_bit
= 7,
367 .mnctr_mode_shift
= 5,
378 .parent_map
= gcc_pxo_pll8_map
,
380 .freq_tbl
= clk_tbl_gsbi_uart
,
382 .enable_reg
= 0x2a74,
383 .enable_mask
= BIT(11),
384 .hw
.init
= &(struct clk_init_data
){
385 .name
= "gsbi6_uart_src",
386 .parent_names
= gcc_pxo_pll8
,
389 .flags
= CLK_SET_PARENT_GATE
,
394 static struct clk_branch gsbi6_uart_clk
= {
398 .enable_reg
= 0x2a74,
399 .enable_mask
= BIT(9),
400 .hw
.init
= &(struct clk_init_data
){
401 .name
= "gsbi6_uart_clk",
402 .parent_names
= (const char *[]){
406 .ops
= &clk_branch_ops
,
407 .flags
= CLK_SET_RATE_PARENT
,
412 static struct clk_rcg gsbi7_uart_src
= {
417 .mnctr_reset_bit
= 7,
418 .mnctr_mode_shift
= 5,
429 .parent_map
= gcc_pxo_pll8_map
,
431 .freq_tbl
= clk_tbl_gsbi_uart
,
433 .enable_reg
= 0x2a94,
434 .enable_mask
= BIT(11),
435 .hw
.init
= &(struct clk_init_data
){
436 .name
= "gsbi7_uart_src",
437 .parent_names
= gcc_pxo_pll8
,
440 .flags
= CLK_SET_PARENT_GATE
,
445 static struct clk_branch gsbi7_uart_clk
= {
449 .enable_reg
= 0x2a94,
450 .enable_mask
= BIT(9),
451 .hw
.init
= &(struct clk_init_data
){
452 .name
= "gsbi7_uart_clk",
453 .parent_names
= (const char *[]){
457 .ops
= &clk_branch_ops
,
458 .flags
= CLK_SET_RATE_PARENT
,
463 static struct clk_rcg gsbi8_uart_src
= {
468 .mnctr_reset_bit
= 7,
469 .mnctr_mode_shift
= 5,
480 .parent_map
= gcc_pxo_pll8_map
,
482 .freq_tbl
= clk_tbl_gsbi_uart
,
484 .enable_reg
= 0x2ab4,
485 .enable_mask
= BIT(11),
486 .hw
.init
= &(struct clk_init_data
){
487 .name
= "gsbi8_uart_src",
488 .parent_names
= gcc_pxo_pll8
,
491 .flags
= CLK_SET_PARENT_GATE
,
496 static struct clk_branch gsbi8_uart_clk
= {
500 .enable_reg
= 0x2ab4,
501 .enable_mask
= BIT(9),
502 .hw
.init
= &(struct clk_init_data
){
503 .name
= "gsbi8_uart_clk",
504 .parent_names
= (const char *[]){ "gsbi8_uart_src" },
506 .ops
= &clk_branch_ops
,
507 .flags
= CLK_SET_RATE_PARENT
,
512 static struct clk_rcg gsbi9_uart_src
= {
517 .mnctr_reset_bit
= 7,
518 .mnctr_mode_shift
= 5,
529 .parent_map
= gcc_pxo_pll8_map
,
531 .freq_tbl
= clk_tbl_gsbi_uart
,
533 .enable_reg
= 0x2ad4,
534 .enable_mask
= BIT(11),
535 .hw
.init
= &(struct clk_init_data
){
536 .name
= "gsbi9_uart_src",
537 .parent_names
= gcc_pxo_pll8
,
540 .flags
= CLK_SET_PARENT_GATE
,
545 static struct clk_branch gsbi9_uart_clk
= {
549 .enable_reg
= 0x2ad4,
550 .enable_mask
= BIT(9),
551 .hw
.init
= &(struct clk_init_data
){
552 .name
= "gsbi9_uart_clk",
553 .parent_names
= (const char *[]){ "gsbi9_uart_src" },
555 .ops
= &clk_branch_ops
,
556 .flags
= CLK_SET_RATE_PARENT
,
561 static struct clk_rcg gsbi10_uart_src
= {
566 .mnctr_reset_bit
= 7,
567 .mnctr_mode_shift
= 5,
578 .parent_map
= gcc_pxo_pll8_map
,
580 .freq_tbl
= clk_tbl_gsbi_uart
,
582 .enable_reg
= 0x2af4,
583 .enable_mask
= BIT(11),
584 .hw
.init
= &(struct clk_init_data
){
585 .name
= "gsbi10_uart_src",
586 .parent_names
= gcc_pxo_pll8
,
589 .flags
= CLK_SET_PARENT_GATE
,
594 static struct clk_branch gsbi10_uart_clk
= {
598 .enable_reg
= 0x2af4,
599 .enable_mask
= BIT(9),
600 .hw
.init
= &(struct clk_init_data
){
601 .name
= "gsbi10_uart_clk",
602 .parent_names
= (const char *[]){ "gsbi10_uart_src" },
604 .ops
= &clk_branch_ops
,
605 .flags
= CLK_SET_RATE_PARENT
,
610 static struct clk_rcg gsbi11_uart_src
= {
615 .mnctr_reset_bit
= 7,
616 .mnctr_mode_shift
= 5,
627 .parent_map
= gcc_pxo_pll8_map
,
629 .freq_tbl
= clk_tbl_gsbi_uart
,
631 .enable_reg
= 0x2b14,
632 .enable_mask
= BIT(11),
633 .hw
.init
= &(struct clk_init_data
){
634 .name
= "gsbi11_uart_src",
635 .parent_names
= gcc_pxo_pll8
,
638 .flags
= CLK_SET_PARENT_GATE
,
643 static struct clk_branch gsbi11_uart_clk
= {
647 .enable_reg
= 0x2b14,
648 .enable_mask
= BIT(9),
649 .hw
.init
= &(struct clk_init_data
){
650 .name
= "gsbi11_uart_clk",
651 .parent_names
= (const char *[]){ "gsbi11_uart_src" },
653 .ops
= &clk_branch_ops
,
654 .flags
= CLK_SET_RATE_PARENT
,
659 static struct clk_rcg gsbi12_uart_src
= {
664 .mnctr_reset_bit
= 7,
665 .mnctr_mode_shift
= 5,
676 .parent_map
= gcc_pxo_pll8_map
,
678 .freq_tbl
= clk_tbl_gsbi_uart
,
680 .enable_reg
= 0x2b34,
681 .enable_mask
= BIT(11),
682 .hw
.init
= &(struct clk_init_data
){
683 .name
= "gsbi12_uart_src",
684 .parent_names
= gcc_pxo_pll8
,
687 .flags
= CLK_SET_PARENT_GATE
,
692 static struct clk_branch gsbi12_uart_clk
= {
696 .enable_reg
= 0x2b34,
697 .enable_mask
= BIT(9),
698 .hw
.init
= &(struct clk_init_data
){
699 .name
= "gsbi12_uart_clk",
700 .parent_names
= (const char *[]){ "gsbi12_uart_src" },
702 .ops
= &clk_branch_ops
,
703 .flags
= CLK_SET_RATE_PARENT
,
708 static struct freq_tbl clk_tbl_gsbi_qup
[] = {
709 { 1100000, P_PXO
, 1, 2, 49 },
710 { 5400000, P_PXO
, 1, 1, 5 },
711 { 10800000, P_PXO
, 1, 2, 5 },
712 { 15060000, P_PLL8
, 1, 2, 51 },
713 { 24000000, P_PLL8
, 4, 1, 4 },
714 { 25600000, P_PLL8
, 1, 1, 15 },
715 { 27000000, P_PXO
, 1, 0, 0 },
716 { 48000000, P_PLL8
, 4, 1, 2 },
717 { 51200000, P_PLL8
, 1, 2, 15 },
721 static struct clk_rcg gsbi1_qup_src
= {
726 .mnctr_reset_bit
= 7,
727 .mnctr_mode_shift
= 5,
738 .parent_map
= gcc_pxo_pll8_map
,
740 .freq_tbl
= clk_tbl_gsbi_qup
,
742 .enable_reg
= 0x29cc,
743 .enable_mask
= BIT(11),
744 .hw
.init
= &(struct clk_init_data
){
745 .name
= "gsbi1_qup_src",
746 .parent_names
= gcc_pxo_pll8
,
749 .flags
= CLK_SET_PARENT_GATE
,
754 static struct clk_branch gsbi1_qup_clk
= {
758 .enable_reg
= 0x29cc,
759 .enable_mask
= BIT(9),
760 .hw
.init
= &(struct clk_init_data
){
761 .name
= "gsbi1_qup_clk",
762 .parent_names
= (const char *[]){ "gsbi1_qup_src" },
764 .ops
= &clk_branch_ops
,
765 .flags
= CLK_SET_RATE_PARENT
,
770 static struct clk_rcg gsbi2_qup_src
= {
775 .mnctr_reset_bit
= 7,
776 .mnctr_mode_shift
= 5,
787 .parent_map
= gcc_pxo_pll8_map
,
789 .freq_tbl
= clk_tbl_gsbi_qup
,
791 .enable_reg
= 0x29ec,
792 .enable_mask
= BIT(11),
793 .hw
.init
= &(struct clk_init_data
){
794 .name
= "gsbi2_qup_src",
795 .parent_names
= gcc_pxo_pll8
,
798 .flags
= CLK_SET_PARENT_GATE
,
803 static struct clk_branch gsbi2_qup_clk
= {
807 .enable_reg
= 0x29ec,
808 .enable_mask
= BIT(9),
809 .hw
.init
= &(struct clk_init_data
){
810 .name
= "gsbi2_qup_clk",
811 .parent_names
= (const char *[]){ "gsbi2_qup_src" },
813 .ops
= &clk_branch_ops
,
814 .flags
= CLK_SET_RATE_PARENT
,
819 static struct clk_rcg gsbi3_qup_src
= {
824 .mnctr_reset_bit
= 7,
825 .mnctr_mode_shift
= 5,
836 .parent_map
= gcc_pxo_pll8_map
,
838 .freq_tbl
= clk_tbl_gsbi_qup
,
840 .enable_reg
= 0x2a0c,
841 .enable_mask
= BIT(11),
842 .hw
.init
= &(struct clk_init_data
){
843 .name
= "gsbi3_qup_src",
844 .parent_names
= gcc_pxo_pll8
,
847 .flags
= CLK_SET_PARENT_GATE
,
852 static struct clk_branch gsbi3_qup_clk
= {
856 .enable_reg
= 0x2a0c,
857 .enable_mask
= BIT(9),
858 .hw
.init
= &(struct clk_init_data
){
859 .name
= "gsbi3_qup_clk",
860 .parent_names
= (const char *[]){ "gsbi3_qup_src" },
862 .ops
= &clk_branch_ops
,
863 .flags
= CLK_SET_RATE_PARENT
,
868 static struct clk_rcg gsbi4_qup_src
= {
873 .mnctr_reset_bit
= 7,
874 .mnctr_mode_shift
= 5,
885 .parent_map
= gcc_pxo_pll8_map
,
887 .freq_tbl
= clk_tbl_gsbi_qup
,
889 .enable_reg
= 0x2a2c,
890 .enable_mask
= BIT(11),
891 .hw
.init
= &(struct clk_init_data
){
892 .name
= "gsbi4_qup_src",
893 .parent_names
= gcc_pxo_pll8
,
896 .flags
= CLK_SET_PARENT_GATE
,
901 static struct clk_branch gsbi4_qup_clk
= {
905 .enable_reg
= 0x2a2c,
906 .enable_mask
= BIT(9),
907 .hw
.init
= &(struct clk_init_data
){
908 .name
= "gsbi4_qup_clk",
909 .parent_names
= (const char *[]){ "gsbi4_qup_src" },
911 .ops
= &clk_branch_ops
,
912 .flags
= CLK_SET_RATE_PARENT
,
917 static struct clk_rcg gsbi5_qup_src
= {
922 .mnctr_reset_bit
= 7,
923 .mnctr_mode_shift
= 5,
934 .parent_map
= gcc_pxo_pll8_map
,
936 .freq_tbl
= clk_tbl_gsbi_qup
,
938 .enable_reg
= 0x2a4c,
939 .enable_mask
= BIT(11),
940 .hw
.init
= &(struct clk_init_data
){
941 .name
= "gsbi5_qup_src",
942 .parent_names
= gcc_pxo_pll8
,
945 .flags
= CLK_SET_PARENT_GATE
,
950 static struct clk_branch gsbi5_qup_clk
= {
954 .enable_reg
= 0x2a4c,
955 .enable_mask
= BIT(9),
956 .hw
.init
= &(struct clk_init_data
){
957 .name
= "gsbi5_qup_clk",
958 .parent_names
= (const char *[]){ "gsbi5_qup_src" },
960 .ops
= &clk_branch_ops
,
961 .flags
= CLK_SET_RATE_PARENT
,
966 static struct clk_rcg gsbi6_qup_src
= {
971 .mnctr_reset_bit
= 7,
972 .mnctr_mode_shift
= 5,
983 .parent_map
= gcc_pxo_pll8_map
,
985 .freq_tbl
= clk_tbl_gsbi_qup
,
987 .enable_reg
= 0x2a6c,
988 .enable_mask
= BIT(11),
989 .hw
.init
= &(struct clk_init_data
){
990 .name
= "gsbi6_qup_src",
991 .parent_names
= gcc_pxo_pll8
,
994 .flags
= CLK_SET_PARENT_GATE
,
999 static struct clk_branch gsbi6_qup_clk
= {
1003 .enable_reg
= 0x2a6c,
1004 .enable_mask
= BIT(9),
1005 .hw
.init
= &(struct clk_init_data
){
1006 .name
= "gsbi6_qup_clk",
1007 .parent_names
= (const char *[]){ "gsbi6_qup_src" },
1009 .ops
= &clk_branch_ops
,
1010 .flags
= CLK_SET_RATE_PARENT
,
1015 static struct clk_rcg gsbi7_qup_src
= {
1020 .mnctr_reset_bit
= 7,
1021 .mnctr_mode_shift
= 5,
1032 .parent_map
= gcc_pxo_pll8_map
,
1034 .freq_tbl
= clk_tbl_gsbi_qup
,
1036 .enable_reg
= 0x2a8c,
1037 .enable_mask
= BIT(11),
1038 .hw
.init
= &(struct clk_init_data
){
1039 .name
= "gsbi7_qup_src",
1040 .parent_names
= gcc_pxo_pll8
,
1042 .ops
= &clk_rcg_ops
,
1043 .flags
= CLK_SET_PARENT_GATE
,
1048 static struct clk_branch gsbi7_qup_clk
= {
1052 .enable_reg
= 0x2a8c,
1053 .enable_mask
= BIT(9),
1054 .hw
.init
= &(struct clk_init_data
){
1055 .name
= "gsbi7_qup_clk",
1056 .parent_names
= (const char *[]){ "gsbi7_qup_src" },
1058 .ops
= &clk_branch_ops
,
1059 .flags
= CLK_SET_RATE_PARENT
,
1064 static struct clk_rcg gsbi8_qup_src
= {
1069 .mnctr_reset_bit
= 7,
1070 .mnctr_mode_shift
= 5,
1081 .parent_map
= gcc_pxo_pll8_map
,
1083 .freq_tbl
= clk_tbl_gsbi_qup
,
1085 .enable_reg
= 0x2aac,
1086 .enable_mask
= BIT(11),
1087 .hw
.init
= &(struct clk_init_data
){
1088 .name
= "gsbi8_qup_src",
1089 .parent_names
= gcc_pxo_pll8
,
1091 .ops
= &clk_rcg_ops
,
1092 .flags
= CLK_SET_PARENT_GATE
,
1097 static struct clk_branch gsbi8_qup_clk
= {
1101 .enable_reg
= 0x2aac,
1102 .enable_mask
= BIT(9),
1103 .hw
.init
= &(struct clk_init_data
){
1104 .name
= "gsbi8_qup_clk",
1105 .parent_names
= (const char *[]){ "gsbi8_qup_src" },
1107 .ops
= &clk_branch_ops
,
1108 .flags
= CLK_SET_RATE_PARENT
,
1113 static struct clk_rcg gsbi9_qup_src
= {
1118 .mnctr_reset_bit
= 7,
1119 .mnctr_mode_shift
= 5,
1130 .parent_map
= gcc_pxo_pll8_map
,
1132 .freq_tbl
= clk_tbl_gsbi_qup
,
1134 .enable_reg
= 0x2acc,
1135 .enable_mask
= BIT(11),
1136 .hw
.init
= &(struct clk_init_data
){
1137 .name
= "gsbi9_qup_src",
1138 .parent_names
= gcc_pxo_pll8
,
1140 .ops
= &clk_rcg_ops
,
1141 .flags
= CLK_SET_PARENT_GATE
,
1146 static struct clk_branch gsbi9_qup_clk
= {
1150 .enable_reg
= 0x2acc,
1151 .enable_mask
= BIT(9),
1152 .hw
.init
= &(struct clk_init_data
){
1153 .name
= "gsbi9_qup_clk",
1154 .parent_names
= (const char *[]){ "gsbi9_qup_src" },
1156 .ops
= &clk_branch_ops
,
1157 .flags
= CLK_SET_RATE_PARENT
,
1162 static struct clk_rcg gsbi10_qup_src
= {
1167 .mnctr_reset_bit
= 7,
1168 .mnctr_mode_shift
= 5,
1179 .parent_map
= gcc_pxo_pll8_map
,
1181 .freq_tbl
= clk_tbl_gsbi_qup
,
1183 .enable_reg
= 0x2aec,
1184 .enable_mask
= BIT(11),
1185 .hw
.init
= &(struct clk_init_data
){
1186 .name
= "gsbi10_qup_src",
1187 .parent_names
= gcc_pxo_pll8
,
1189 .ops
= &clk_rcg_ops
,
1190 .flags
= CLK_SET_PARENT_GATE
,
1195 static struct clk_branch gsbi10_qup_clk
= {
1199 .enable_reg
= 0x2aec,
1200 .enable_mask
= BIT(9),
1201 .hw
.init
= &(struct clk_init_data
){
1202 .name
= "gsbi10_qup_clk",
1203 .parent_names
= (const char *[]){ "gsbi10_qup_src" },
1205 .ops
= &clk_branch_ops
,
1206 .flags
= CLK_SET_RATE_PARENT
,
1211 static struct clk_rcg gsbi11_qup_src
= {
1216 .mnctr_reset_bit
= 7,
1217 .mnctr_mode_shift
= 5,
1228 .parent_map
= gcc_pxo_pll8_map
,
1230 .freq_tbl
= clk_tbl_gsbi_qup
,
1232 .enable_reg
= 0x2b0c,
1233 .enable_mask
= BIT(11),
1234 .hw
.init
= &(struct clk_init_data
){
1235 .name
= "gsbi11_qup_src",
1236 .parent_names
= gcc_pxo_pll8
,
1238 .ops
= &clk_rcg_ops
,
1239 .flags
= CLK_SET_PARENT_GATE
,
1244 static struct clk_branch gsbi11_qup_clk
= {
1248 .enable_reg
= 0x2b0c,
1249 .enable_mask
= BIT(9),
1250 .hw
.init
= &(struct clk_init_data
){
1251 .name
= "gsbi11_qup_clk",
1252 .parent_names
= (const char *[]){ "gsbi11_qup_src" },
1254 .ops
= &clk_branch_ops
,
1255 .flags
= CLK_SET_RATE_PARENT
,
1260 static struct clk_rcg gsbi12_qup_src
= {
1265 .mnctr_reset_bit
= 7,
1266 .mnctr_mode_shift
= 5,
1277 .parent_map
= gcc_pxo_pll8_map
,
1279 .freq_tbl
= clk_tbl_gsbi_qup
,
1281 .enable_reg
= 0x2b2c,
1282 .enable_mask
= BIT(11),
1283 .hw
.init
= &(struct clk_init_data
){
1284 .name
= "gsbi12_qup_src",
1285 .parent_names
= gcc_pxo_pll8
,
1287 .ops
= &clk_rcg_ops
,
1288 .flags
= CLK_SET_PARENT_GATE
,
1293 static struct clk_branch gsbi12_qup_clk
= {
1297 .enable_reg
= 0x2b2c,
1298 .enable_mask
= BIT(9),
1299 .hw
.init
= &(struct clk_init_data
){
1300 .name
= "gsbi12_qup_clk",
1301 .parent_names
= (const char *[]){ "gsbi12_qup_src" },
1303 .ops
= &clk_branch_ops
,
1304 .flags
= CLK_SET_RATE_PARENT
,
1309 static const struct freq_tbl clk_tbl_gp
[] = {
1310 { 9600000, P_CXO
, 2, 0, 0 },
1311 { 13500000, P_PXO
, 2, 0, 0 },
1312 { 19200000, P_CXO
, 1, 0, 0 },
1313 { 27000000, P_PXO
, 1, 0, 0 },
1314 { 64000000, P_PLL8
, 2, 1, 3 },
1315 { 76800000, P_PLL8
, 1, 1, 5 },
1316 { 96000000, P_PLL8
, 4, 0, 0 },
1317 { 128000000, P_PLL8
, 3, 0, 0 },
1318 { 192000000, P_PLL8
, 2, 0, 0 },
1322 static struct clk_rcg gp0_src
= {
1327 .mnctr_reset_bit
= 7,
1328 .mnctr_mode_shift
= 5,
1339 .parent_map
= gcc_pxo_pll8_cxo_map
,
1341 .freq_tbl
= clk_tbl_gp
,
1343 .enable_reg
= 0x2d24,
1344 .enable_mask
= BIT(11),
1345 .hw
.init
= &(struct clk_init_data
){
1347 .parent_names
= gcc_pxo_pll8_cxo
,
1349 .ops
= &clk_rcg_ops
,
1350 .flags
= CLK_SET_PARENT_GATE
,
1355 static struct clk_branch gp0_clk
= {
1359 .enable_reg
= 0x2d24,
1360 .enable_mask
= BIT(9),
1361 .hw
.init
= &(struct clk_init_data
){
1363 .parent_names
= (const char *[]){ "gp0_src" },
1365 .ops
= &clk_branch_ops
,
1366 .flags
= CLK_SET_RATE_PARENT
,
1371 static struct clk_rcg gp1_src
= {
1376 .mnctr_reset_bit
= 7,
1377 .mnctr_mode_shift
= 5,
1388 .parent_map
= gcc_pxo_pll8_cxo_map
,
1390 .freq_tbl
= clk_tbl_gp
,
1392 .enable_reg
= 0x2d44,
1393 .enable_mask
= BIT(11),
1394 .hw
.init
= &(struct clk_init_data
){
1396 .parent_names
= gcc_pxo_pll8_cxo
,
1398 .ops
= &clk_rcg_ops
,
1399 .flags
= CLK_SET_RATE_GATE
,
1404 static struct clk_branch gp1_clk
= {
1408 .enable_reg
= 0x2d44,
1409 .enable_mask
= BIT(9),
1410 .hw
.init
= &(struct clk_init_data
){
1412 .parent_names
= (const char *[]){ "gp1_src" },
1414 .ops
= &clk_branch_ops
,
1415 .flags
= CLK_SET_RATE_PARENT
,
1420 static struct clk_rcg gp2_src
= {
1425 .mnctr_reset_bit
= 7,
1426 .mnctr_mode_shift
= 5,
1437 .parent_map
= gcc_pxo_pll8_cxo_map
,
1439 .freq_tbl
= clk_tbl_gp
,
1441 .enable_reg
= 0x2d64,
1442 .enable_mask
= BIT(11),
1443 .hw
.init
= &(struct clk_init_data
){
1445 .parent_names
= gcc_pxo_pll8_cxo
,
1447 .ops
= &clk_rcg_ops
,
1448 .flags
= CLK_SET_RATE_GATE
,
1453 static struct clk_branch gp2_clk
= {
1457 .enable_reg
= 0x2d64,
1458 .enable_mask
= BIT(9),
1459 .hw
.init
= &(struct clk_init_data
){
1461 .parent_names
= (const char *[]){ "gp2_src" },
1463 .ops
= &clk_branch_ops
,
1464 .flags
= CLK_SET_RATE_PARENT
,
1469 static struct clk_branch pmem_clk
= {
1475 .enable_reg
= 0x25a0,
1476 .enable_mask
= BIT(4),
1477 .hw
.init
= &(struct clk_init_data
){
1479 .ops
= &clk_branch_ops
,
1480 .flags
= CLK_IS_ROOT
,
1485 static struct clk_rcg prng_src
= {
1493 .parent_map
= gcc_pxo_pll8_map
,
1496 .init
= &(struct clk_init_data
){
1498 .parent_names
= gcc_pxo_pll8
,
1500 .ops
= &clk_rcg_ops
,
1505 static struct clk_branch prng_clk
= {
1507 .halt_check
= BRANCH_HALT_VOTED
,
1510 .enable_reg
= 0x3080,
1511 .enable_mask
= BIT(10),
1512 .hw
.init
= &(struct clk_init_data
){
1514 .parent_names
= (const char *[]){ "prng_src" },
1516 .ops
= &clk_branch_ops
,
1521 static const struct freq_tbl clk_tbl_sdc
[] = {
1522 { 144000, P_PXO
, 3, 2, 125 },
1523 { 400000, P_PLL8
, 4, 1, 240 },
1524 { 16000000, P_PLL8
, 4, 1, 6 },
1525 { 17070000, P_PLL8
, 1, 2, 45 },
1526 { 20210000, P_PLL8
, 1, 1, 19 },
1527 { 24000000, P_PLL8
, 4, 1, 4 },
1528 { 48000000, P_PLL8
, 4, 1, 2 },
1532 static struct clk_rcg sdc1_src
= {
1537 .mnctr_reset_bit
= 7,
1538 .mnctr_mode_shift
= 5,
1549 .parent_map
= gcc_pxo_pll8_map
,
1551 .freq_tbl
= clk_tbl_sdc
,
1553 .enable_reg
= 0x282c,
1554 .enable_mask
= BIT(11),
1555 .hw
.init
= &(struct clk_init_data
){
1557 .parent_names
= gcc_pxo_pll8
,
1559 .ops
= &clk_rcg_ops
,
1560 .flags
= CLK_SET_RATE_GATE
,
1565 static struct clk_branch sdc1_clk
= {
1569 .enable_reg
= 0x282c,
1570 .enable_mask
= BIT(9),
1571 .hw
.init
= &(struct clk_init_data
){
1573 .parent_names
= (const char *[]){ "sdc1_src" },
1575 .ops
= &clk_branch_ops
,
1576 .flags
= CLK_SET_RATE_PARENT
,
1581 static struct clk_rcg sdc2_src
= {
1586 .mnctr_reset_bit
= 7,
1587 .mnctr_mode_shift
= 5,
1598 .parent_map
= gcc_pxo_pll8_map
,
1600 .freq_tbl
= clk_tbl_sdc
,
1602 .enable_reg
= 0x284c,
1603 .enable_mask
= BIT(11),
1604 .hw
.init
= &(struct clk_init_data
){
1606 .parent_names
= gcc_pxo_pll8
,
1608 .ops
= &clk_rcg_ops
,
1609 .flags
= CLK_SET_RATE_GATE
,
1614 static struct clk_branch sdc2_clk
= {
1618 .enable_reg
= 0x284c,
1619 .enable_mask
= BIT(9),
1620 .hw
.init
= &(struct clk_init_data
){
1622 .parent_names
= (const char *[]){ "sdc2_src" },
1624 .ops
= &clk_branch_ops
,
1625 .flags
= CLK_SET_RATE_PARENT
,
1630 static struct clk_rcg sdc3_src
= {
1635 .mnctr_reset_bit
= 7,
1636 .mnctr_mode_shift
= 5,
1647 .parent_map
= gcc_pxo_pll8_map
,
1649 .freq_tbl
= clk_tbl_sdc
,
1651 .enable_reg
= 0x286c,
1652 .enable_mask
= BIT(11),
1653 .hw
.init
= &(struct clk_init_data
){
1655 .parent_names
= gcc_pxo_pll8
,
1657 .ops
= &clk_rcg_ops
,
1658 .flags
= CLK_SET_RATE_GATE
,
1663 static struct clk_branch sdc3_clk
= {
1667 .enable_reg
= 0x286c,
1668 .enable_mask
= BIT(9),
1669 .hw
.init
= &(struct clk_init_data
){
1671 .parent_names
= (const char *[]){ "sdc3_src" },
1673 .ops
= &clk_branch_ops
,
1674 .flags
= CLK_SET_RATE_PARENT
,
1679 static struct clk_rcg sdc4_src
= {
1684 .mnctr_reset_bit
= 7,
1685 .mnctr_mode_shift
= 5,
1696 .parent_map
= gcc_pxo_pll8_map
,
1698 .freq_tbl
= clk_tbl_sdc
,
1700 .enable_reg
= 0x288c,
1701 .enable_mask
= BIT(11),
1702 .hw
.init
= &(struct clk_init_data
){
1704 .parent_names
= gcc_pxo_pll8
,
1706 .ops
= &clk_rcg_ops
,
1707 .flags
= CLK_SET_RATE_GATE
,
1712 static struct clk_branch sdc4_clk
= {
1716 .enable_reg
= 0x288c,
1717 .enable_mask
= BIT(9),
1718 .hw
.init
= &(struct clk_init_data
){
1720 .parent_names
= (const char *[]){ "sdc4_src" },
1722 .ops
= &clk_branch_ops
,
1723 .flags
= CLK_SET_RATE_PARENT
,
1728 static struct clk_rcg sdc5_src
= {
1733 .mnctr_reset_bit
= 7,
1734 .mnctr_mode_shift
= 5,
1745 .parent_map
= gcc_pxo_pll8_map
,
1747 .freq_tbl
= clk_tbl_sdc
,
1749 .enable_reg
= 0x28ac,
1750 .enable_mask
= BIT(11),
1751 .hw
.init
= &(struct clk_init_data
){
1753 .parent_names
= gcc_pxo_pll8
,
1755 .ops
= &clk_rcg_ops
,
1756 .flags
= CLK_SET_RATE_GATE
,
1761 static struct clk_branch sdc5_clk
= {
1765 .enable_reg
= 0x28ac,
1766 .enable_mask
= BIT(9),
1767 .hw
.init
= &(struct clk_init_data
){
1769 .parent_names
= (const char *[]){ "sdc5_src" },
1771 .ops
= &clk_branch_ops
,
1772 .flags
= CLK_SET_RATE_PARENT
,
1777 static const struct freq_tbl clk_tbl_tsif_ref
[] = {
1778 { 105000, P_PXO
, 1, 1, 256 },
1782 static struct clk_rcg tsif_ref_src
= {
1787 .mnctr_reset_bit
= 7,
1788 .mnctr_mode_shift
= 5,
1799 .parent_map
= gcc_pxo_pll8_map
,
1801 .freq_tbl
= clk_tbl_tsif_ref
,
1803 .enable_reg
= 0x2710,
1804 .enable_mask
= BIT(11),
1805 .hw
.init
= &(struct clk_init_data
){
1806 .name
= "tsif_ref_src",
1807 .parent_names
= gcc_pxo_pll8
,
1809 .ops
= &clk_rcg_ops
,
1810 .flags
= CLK_SET_RATE_GATE
,
1815 static struct clk_branch tsif_ref_clk
= {
1819 .enable_reg
= 0x2710,
1820 .enable_mask
= BIT(9),
1821 .hw
.init
= &(struct clk_init_data
){
1822 .name
= "tsif_ref_clk",
1823 .parent_names
= (const char *[]){ "tsif_ref_src" },
1825 .ops
= &clk_branch_ops
,
1826 .flags
= CLK_SET_RATE_PARENT
,
1831 static const struct freq_tbl clk_tbl_usb
[] = {
1832 { 60000000, P_PLL8
, 1, 5, 32 },
1836 static struct clk_rcg usb_hs1_xcvr_src
= {
1841 .mnctr_reset_bit
= 7,
1842 .mnctr_mode_shift
= 5,
1853 .parent_map
= gcc_pxo_pll8_map
,
1855 .freq_tbl
= clk_tbl_usb
,
1857 .enable_reg
= 0x290c,
1858 .enable_mask
= BIT(11),
1859 .hw
.init
= &(struct clk_init_data
){
1860 .name
= "usb_hs1_xcvr_src",
1861 .parent_names
= gcc_pxo_pll8
,
1863 .ops
= &clk_rcg_ops
,
1864 .flags
= CLK_SET_RATE_GATE
,
1869 static struct clk_branch usb_hs1_xcvr_clk
= {
1873 .enable_reg
= 0x290c,
1874 .enable_mask
= BIT(9),
1875 .hw
.init
= &(struct clk_init_data
){
1876 .name
= "usb_hs1_xcvr_clk",
1877 .parent_names
= (const char *[]){ "usb_hs1_xcvr_src" },
1879 .ops
= &clk_branch_ops
,
1880 .flags
= CLK_SET_RATE_PARENT
,
1885 static struct clk_rcg usb_fs1_xcvr_fs_src
= {
1890 .mnctr_reset_bit
= 7,
1891 .mnctr_mode_shift
= 5,
1902 .parent_map
= gcc_pxo_pll8_map
,
1904 .freq_tbl
= clk_tbl_usb
,
1906 .enable_reg
= 0x2968,
1907 .enable_mask
= BIT(11),
1908 .hw
.init
= &(struct clk_init_data
){
1909 .name
= "usb_fs1_xcvr_fs_src",
1910 .parent_names
= gcc_pxo_pll8
,
1912 .ops
= &clk_rcg_ops
,
1913 .flags
= CLK_SET_RATE_GATE
,
1918 static const char *usb_fs1_xcvr_fs_src_p
[] = { "usb_fs1_xcvr_fs_src" };
1920 static struct clk_branch usb_fs1_xcvr_fs_clk
= {
1924 .enable_reg
= 0x2968,
1925 .enable_mask
= BIT(9),
1926 .hw
.init
= &(struct clk_init_data
){
1927 .name
= "usb_fs1_xcvr_fs_clk",
1928 .parent_names
= usb_fs1_xcvr_fs_src_p
,
1930 .ops
= &clk_branch_ops
,
1931 .flags
= CLK_SET_RATE_PARENT
,
1936 static struct clk_branch usb_fs1_system_clk
= {
1940 .enable_reg
= 0x296c,
1941 .enable_mask
= BIT(4),
1942 .hw
.init
= &(struct clk_init_data
){
1943 .parent_names
= usb_fs1_xcvr_fs_src_p
,
1945 .name
= "usb_fs1_system_clk",
1946 .ops
= &clk_branch_ops
,
1947 .flags
= CLK_SET_RATE_PARENT
,
1952 static struct clk_rcg usb_fs2_xcvr_fs_src
= {
1957 .mnctr_reset_bit
= 7,
1958 .mnctr_mode_shift
= 5,
1969 .parent_map
= gcc_pxo_pll8_map
,
1971 .freq_tbl
= clk_tbl_usb
,
1973 .enable_reg
= 0x2988,
1974 .enable_mask
= BIT(11),
1975 .hw
.init
= &(struct clk_init_data
){
1976 .name
= "usb_fs2_xcvr_fs_src",
1977 .parent_names
= gcc_pxo_pll8
,
1979 .ops
= &clk_rcg_ops
,
1980 .flags
= CLK_SET_RATE_GATE
,
1985 static const char *usb_fs2_xcvr_fs_src_p
[] = { "usb_fs2_xcvr_fs_src" };
1987 static struct clk_branch usb_fs2_xcvr_fs_clk
= {
1991 .enable_reg
= 0x2988,
1992 .enable_mask
= BIT(9),
1993 .hw
.init
= &(struct clk_init_data
){
1994 .name
= "usb_fs2_xcvr_fs_clk",
1995 .parent_names
= usb_fs2_xcvr_fs_src_p
,
1997 .ops
= &clk_branch_ops
,
1998 .flags
= CLK_SET_RATE_PARENT
,
2003 static struct clk_branch usb_fs2_system_clk
= {
2007 .enable_reg
= 0x298c,
2008 .enable_mask
= BIT(4),
2009 .hw
.init
= &(struct clk_init_data
){
2010 .name
= "usb_fs2_system_clk",
2011 .parent_names
= usb_fs2_xcvr_fs_src_p
,
2013 .ops
= &clk_branch_ops
,
2014 .flags
= CLK_SET_RATE_PARENT
,
2019 static struct clk_branch gsbi1_h_clk
= {
2023 .enable_reg
= 0x29c0,
2024 .enable_mask
= BIT(4),
2025 .hw
.init
= &(struct clk_init_data
){
2026 .name
= "gsbi1_h_clk",
2027 .ops
= &clk_branch_ops
,
2028 .flags
= CLK_IS_ROOT
,
2033 static struct clk_branch gsbi2_h_clk
= {
2037 .enable_reg
= 0x29e0,
2038 .enable_mask
= BIT(4),
2039 .hw
.init
= &(struct clk_init_data
){
2040 .name
= "gsbi2_h_clk",
2041 .ops
= &clk_branch_ops
,
2042 .flags
= CLK_IS_ROOT
,
2047 static struct clk_branch gsbi3_h_clk
= {
2051 .enable_reg
= 0x2a00,
2052 .enable_mask
= BIT(4),
2053 .hw
.init
= &(struct clk_init_data
){
2054 .name
= "gsbi3_h_clk",
2055 .ops
= &clk_branch_ops
,
2056 .flags
= CLK_IS_ROOT
,
2061 static struct clk_branch gsbi4_h_clk
= {
2065 .enable_reg
= 0x2a20,
2066 .enable_mask
= BIT(4),
2067 .hw
.init
= &(struct clk_init_data
){
2068 .name
= "gsbi4_h_clk",
2069 .ops
= &clk_branch_ops
,
2070 .flags
= CLK_IS_ROOT
,
2075 static struct clk_branch gsbi5_h_clk
= {
2079 .enable_reg
= 0x2a40,
2080 .enable_mask
= BIT(4),
2081 .hw
.init
= &(struct clk_init_data
){
2082 .name
= "gsbi5_h_clk",
2083 .ops
= &clk_branch_ops
,
2084 .flags
= CLK_IS_ROOT
,
2089 static struct clk_branch gsbi6_h_clk
= {
2093 .enable_reg
= 0x2a60,
2094 .enable_mask
= BIT(4),
2095 .hw
.init
= &(struct clk_init_data
){
2096 .name
= "gsbi6_h_clk",
2097 .ops
= &clk_branch_ops
,
2098 .flags
= CLK_IS_ROOT
,
2103 static struct clk_branch gsbi7_h_clk
= {
2107 .enable_reg
= 0x2a80,
2108 .enable_mask
= BIT(4),
2109 .hw
.init
= &(struct clk_init_data
){
2110 .name
= "gsbi7_h_clk",
2111 .ops
= &clk_branch_ops
,
2112 .flags
= CLK_IS_ROOT
,
2117 static struct clk_branch gsbi8_h_clk
= {
2121 .enable_reg
= 0x2aa0,
2122 .enable_mask
= BIT(4),
2123 .hw
.init
= &(struct clk_init_data
){
2124 .name
= "gsbi8_h_clk",
2125 .ops
= &clk_branch_ops
,
2126 .flags
= CLK_IS_ROOT
,
2131 static struct clk_branch gsbi9_h_clk
= {
2135 .enable_reg
= 0x2ac0,
2136 .enable_mask
= BIT(4),
2137 .hw
.init
= &(struct clk_init_data
){
2138 .name
= "gsbi9_h_clk",
2139 .ops
= &clk_branch_ops
,
2140 .flags
= CLK_IS_ROOT
,
2145 static struct clk_branch gsbi10_h_clk
= {
2149 .enable_reg
= 0x2ae0,
2150 .enable_mask
= BIT(4),
2151 .hw
.init
= &(struct clk_init_data
){
2152 .name
= "gsbi10_h_clk",
2153 .ops
= &clk_branch_ops
,
2154 .flags
= CLK_IS_ROOT
,
2159 static struct clk_branch gsbi11_h_clk
= {
2163 .enable_reg
= 0x2b00,
2164 .enable_mask
= BIT(4),
2165 .hw
.init
= &(struct clk_init_data
){
2166 .name
= "gsbi11_h_clk",
2167 .ops
= &clk_branch_ops
,
2168 .flags
= CLK_IS_ROOT
,
2173 static struct clk_branch gsbi12_h_clk
= {
2177 .enable_reg
= 0x2b20,
2178 .enable_mask
= BIT(4),
2179 .hw
.init
= &(struct clk_init_data
){
2180 .name
= "gsbi12_h_clk",
2181 .ops
= &clk_branch_ops
,
2182 .flags
= CLK_IS_ROOT
,
2187 static struct clk_branch tsif_h_clk
= {
2191 .enable_reg
= 0x2700,
2192 .enable_mask
= BIT(4),
2193 .hw
.init
= &(struct clk_init_data
){
2194 .name
= "tsif_h_clk",
2195 .ops
= &clk_branch_ops
,
2196 .flags
= CLK_IS_ROOT
,
2201 static struct clk_branch usb_fs1_h_clk
= {
2205 .enable_reg
= 0x2960,
2206 .enable_mask
= BIT(4),
2207 .hw
.init
= &(struct clk_init_data
){
2208 .name
= "usb_fs1_h_clk",
2209 .ops
= &clk_branch_ops
,
2210 .flags
= CLK_IS_ROOT
,
2215 static struct clk_branch usb_fs2_h_clk
= {
2219 .enable_reg
= 0x2980,
2220 .enable_mask
= BIT(4),
2221 .hw
.init
= &(struct clk_init_data
){
2222 .name
= "usb_fs2_h_clk",
2223 .ops
= &clk_branch_ops
,
2224 .flags
= CLK_IS_ROOT
,
2229 static struct clk_branch usb_hs1_h_clk
= {
2233 .enable_reg
= 0x2900,
2234 .enable_mask
= BIT(4),
2235 .hw
.init
= &(struct clk_init_data
){
2236 .name
= "usb_hs1_h_clk",
2237 .ops
= &clk_branch_ops
,
2238 .flags
= CLK_IS_ROOT
,
2243 static struct clk_branch sdc1_h_clk
= {
2247 .enable_reg
= 0x2820,
2248 .enable_mask
= BIT(4),
2249 .hw
.init
= &(struct clk_init_data
){
2250 .name
= "sdc1_h_clk",
2251 .ops
= &clk_branch_ops
,
2252 .flags
= CLK_IS_ROOT
,
2257 static struct clk_branch sdc2_h_clk
= {
2261 .enable_reg
= 0x2840,
2262 .enable_mask
= BIT(4),
2263 .hw
.init
= &(struct clk_init_data
){
2264 .name
= "sdc2_h_clk",
2265 .ops
= &clk_branch_ops
,
2266 .flags
= CLK_IS_ROOT
,
2271 static struct clk_branch sdc3_h_clk
= {
2275 .enable_reg
= 0x2860,
2276 .enable_mask
= BIT(4),
2277 .hw
.init
= &(struct clk_init_data
){
2278 .name
= "sdc3_h_clk",
2279 .ops
= &clk_branch_ops
,
2280 .flags
= CLK_IS_ROOT
,
2285 static struct clk_branch sdc4_h_clk
= {
2289 .enable_reg
= 0x2880,
2290 .enable_mask
= BIT(4),
2291 .hw
.init
= &(struct clk_init_data
){
2292 .name
= "sdc4_h_clk",
2293 .ops
= &clk_branch_ops
,
2294 .flags
= CLK_IS_ROOT
,
2299 static struct clk_branch sdc5_h_clk
= {
2303 .enable_reg
= 0x28a0,
2304 .enable_mask
= BIT(4),
2305 .hw
.init
= &(struct clk_init_data
){
2306 .name
= "sdc5_h_clk",
2307 .ops
= &clk_branch_ops
,
2308 .flags
= CLK_IS_ROOT
,
2313 static struct clk_branch adm0_clk
= {
2315 .halt_check
= BRANCH_HALT_VOTED
,
2318 .enable_reg
= 0x3080,
2319 .enable_mask
= BIT(2),
2320 .hw
.init
= &(struct clk_init_data
){
2322 .ops
= &clk_branch_ops
,
2323 .flags
= CLK_IS_ROOT
,
2328 static struct clk_branch adm0_pbus_clk
= {
2330 .halt_check
= BRANCH_HALT_VOTED
,
2333 .enable_reg
= 0x3080,
2334 .enable_mask
= BIT(3),
2335 .hw
.init
= &(struct clk_init_data
){
2336 .name
= "adm0_pbus_clk",
2337 .ops
= &clk_branch_ops
,
2338 .flags
= CLK_IS_ROOT
,
2343 static struct clk_branch adm1_clk
= {
2346 .halt_check
= BRANCH_HALT_VOTED
,
2348 .enable_reg
= 0x3080,
2349 .enable_mask
= BIT(4),
2350 .hw
.init
= &(struct clk_init_data
){
2352 .ops
= &clk_branch_ops
,
2353 .flags
= CLK_IS_ROOT
,
2358 static struct clk_branch adm1_pbus_clk
= {
2361 .halt_check
= BRANCH_HALT_VOTED
,
2363 .enable_reg
= 0x3080,
2364 .enable_mask
= BIT(5),
2365 .hw
.init
= &(struct clk_init_data
){
2366 .name
= "adm1_pbus_clk",
2367 .ops
= &clk_branch_ops
,
2368 .flags
= CLK_IS_ROOT
,
2373 static struct clk_branch modem_ahb1_h_clk
= {
2376 .halt_check
= BRANCH_HALT_VOTED
,
2378 .enable_reg
= 0x3080,
2379 .enable_mask
= BIT(0),
2380 .hw
.init
= &(struct clk_init_data
){
2381 .name
= "modem_ahb1_h_clk",
2382 .ops
= &clk_branch_ops
,
2383 .flags
= CLK_IS_ROOT
,
2388 static struct clk_branch modem_ahb2_h_clk
= {
2391 .halt_check
= BRANCH_HALT_VOTED
,
2393 .enable_reg
= 0x3080,
2394 .enable_mask
= BIT(1),
2395 .hw
.init
= &(struct clk_init_data
){
2396 .name
= "modem_ahb2_h_clk",
2397 .ops
= &clk_branch_ops
,
2398 .flags
= CLK_IS_ROOT
,
2403 static struct clk_branch pmic_arb0_h_clk
= {
2405 .halt_check
= BRANCH_HALT_VOTED
,
2408 .enable_reg
= 0x3080,
2409 .enable_mask
= BIT(8),
2410 .hw
.init
= &(struct clk_init_data
){
2411 .name
= "pmic_arb0_h_clk",
2412 .ops
= &clk_branch_ops
,
2413 .flags
= CLK_IS_ROOT
,
2418 static struct clk_branch pmic_arb1_h_clk
= {
2420 .halt_check
= BRANCH_HALT_VOTED
,
2423 .enable_reg
= 0x3080,
2424 .enable_mask
= BIT(9),
2425 .hw
.init
= &(struct clk_init_data
){
2426 .name
= "pmic_arb1_h_clk",
2427 .ops
= &clk_branch_ops
,
2428 .flags
= CLK_IS_ROOT
,
2433 static struct clk_branch pmic_ssbi2_clk
= {
2435 .halt_check
= BRANCH_HALT_VOTED
,
2438 .enable_reg
= 0x3080,
2439 .enable_mask
= BIT(7),
2440 .hw
.init
= &(struct clk_init_data
){
2441 .name
= "pmic_ssbi2_clk",
2442 .ops
= &clk_branch_ops
,
2443 .flags
= CLK_IS_ROOT
,
2448 static struct clk_branch rpm_msg_ram_h_clk
= {
2452 .halt_check
= BRANCH_HALT_VOTED
,
2455 .enable_reg
= 0x3080,
2456 .enable_mask
= BIT(6),
2457 .hw
.init
= &(struct clk_init_data
){
2458 .name
= "rpm_msg_ram_h_clk",
2459 .ops
= &clk_branch_ops
,
2460 .flags
= CLK_IS_ROOT
,
2465 static struct clk_regmap
*gcc_msm8660_clks
[] = {
2466 [PLL8
] = &pll8
.clkr
,
2467 [PLL8_VOTE
] = &pll8_vote
,
2468 [GSBI1_UART_SRC
] = &gsbi1_uart_src
.clkr
,
2469 [GSBI1_UART_CLK
] = &gsbi1_uart_clk
.clkr
,
2470 [GSBI2_UART_SRC
] = &gsbi2_uart_src
.clkr
,
2471 [GSBI2_UART_CLK
] = &gsbi2_uart_clk
.clkr
,
2472 [GSBI3_UART_SRC
] = &gsbi3_uart_src
.clkr
,
2473 [GSBI3_UART_CLK
] = &gsbi3_uart_clk
.clkr
,
2474 [GSBI4_UART_SRC
] = &gsbi4_uart_src
.clkr
,
2475 [GSBI4_UART_CLK
] = &gsbi4_uart_clk
.clkr
,
2476 [GSBI5_UART_SRC
] = &gsbi5_uart_src
.clkr
,
2477 [GSBI5_UART_CLK
] = &gsbi5_uart_clk
.clkr
,
2478 [GSBI6_UART_SRC
] = &gsbi6_uart_src
.clkr
,
2479 [GSBI6_UART_CLK
] = &gsbi6_uart_clk
.clkr
,
2480 [GSBI7_UART_SRC
] = &gsbi7_uart_src
.clkr
,
2481 [GSBI7_UART_CLK
] = &gsbi7_uart_clk
.clkr
,
2482 [GSBI8_UART_SRC
] = &gsbi8_uart_src
.clkr
,
2483 [GSBI8_UART_CLK
] = &gsbi8_uart_clk
.clkr
,
2484 [GSBI9_UART_SRC
] = &gsbi9_uart_src
.clkr
,
2485 [GSBI9_UART_CLK
] = &gsbi9_uart_clk
.clkr
,
2486 [GSBI10_UART_SRC
] = &gsbi10_uart_src
.clkr
,
2487 [GSBI10_UART_CLK
] = &gsbi10_uart_clk
.clkr
,
2488 [GSBI11_UART_SRC
] = &gsbi11_uart_src
.clkr
,
2489 [GSBI11_UART_CLK
] = &gsbi11_uart_clk
.clkr
,
2490 [GSBI12_UART_SRC
] = &gsbi12_uart_src
.clkr
,
2491 [GSBI12_UART_CLK
] = &gsbi12_uart_clk
.clkr
,
2492 [GSBI1_QUP_SRC
] = &gsbi1_qup_src
.clkr
,
2493 [GSBI1_QUP_CLK
] = &gsbi1_qup_clk
.clkr
,
2494 [GSBI2_QUP_SRC
] = &gsbi2_qup_src
.clkr
,
2495 [GSBI2_QUP_CLK
] = &gsbi2_qup_clk
.clkr
,
2496 [GSBI3_QUP_SRC
] = &gsbi3_qup_src
.clkr
,
2497 [GSBI3_QUP_CLK
] = &gsbi3_qup_clk
.clkr
,
2498 [GSBI4_QUP_SRC
] = &gsbi4_qup_src
.clkr
,
2499 [GSBI4_QUP_CLK
] = &gsbi4_qup_clk
.clkr
,
2500 [GSBI5_QUP_SRC
] = &gsbi5_qup_src
.clkr
,
2501 [GSBI5_QUP_CLK
] = &gsbi5_qup_clk
.clkr
,
2502 [GSBI6_QUP_SRC
] = &gsbi6_qup_src
.clkr
,
2503 [GSBI6_QUP_CLK
] = &gsbi6_qup_clk
.clkr
,
2504 [GSBI7_QUP_SRC
] = &gsbi7_qup_src
.clkr
,
2505 [GSBI7_QUP_CLK
] = &gsbi7_qup_clk
.clkr
,
2506 [GSBI8_QUP_SRC
] = &gsbi8_qup_src
.clkr
,
2507 [GSBI8_QUP_CLK
] = &gsbi8_qup_clk
.clkr
,
2508 [GSBI9_QUP_SRC
] = &gsbi9_qup_src
.clkr
,
2509 [GSBI9_QUP_CLK
] = &gsbi9_qup_clk
.clkr
,
2510 [GSBI10_QUP_SRC
] = &gsbi10_qup_src
.clkr
,
2511 [GSBI10_QUP_CLK
] = &gsbi10_qup_clk
.clkr
,
2512 [GSBI11_QUP_SRC
] = &gsbi11_qup_src
.clkr
,
2513 [GSBI11_QUP_CLK
] = &gsbi11_qup_clk
.clkr
,
2514 [GSBI12_QUP_SRC
] = &gsbi12_qup_src
.clkr
,
2515 [GSBI12_QUP_CLK
] = &gsbi12_qup_clk
.clkr
,
2516 [GP0_SRC
] = &gp0_src
.clkr
,
2517 [GP0_CLK
] = &gp0_clk
.clkr
,
2518 [GP1_SRC
] = &gp1_src
.clkr
,
2519 [GP1_CLK
] = &gp1_clk
.clkr
,
2520 [GP2_SRC
] = &gp2_src
.clkr
,
2521 [GP2_CLK
] = &gp2_clk
.clkr
,
2522 [PMEM_CLK
] = &pmem_clk
.clkr
,
2523 [PRNG_SRC
] = &prng_src
.clkr
,
2524 [PRNG_CLK
] = &prng_clk
.clkr
,
2525 [SDC1_SRC
] = &sdc1_src
.clkr
,
2526 [SDC1_CLK
] = &sdc1_clk
.clkr
,
2527 [SDC2_SRC
] = &sdc2_src
.clkr
,
2528 [SDC2_CLK
] = &sdc2_clk
.clkr
,
2529 [SDC3_SRC
] = &sdc3_src
.clkr
,
2530 [SDC3_CLK
] = &sdc3_clk
.clkr
,
2531 [SDC4_SRC
] = &sdc4_src
.clkr
,
2532 [SDC4_CLK
] = &sdc4_clk
.clkr
,
2533 [SDC5_SRC
] = &sdc5_src
.clkr
,
2534 [SDC5_CLK
] = &sdc5_clk
.clkr
,
2535 [TSIF_REF_SRC
] = &tsif_ref_src
.clkr
,
2536 [TSIF_REF_CLK
] = &tsif_ref_clk
.clkr
,
2537 [USB_HS1_XCVR_SRC
] = &usb_hs1_xcvr_src
.clkr
,
2538 [USB_HS1_XCVR_CLK
] = &usb_hs1_xcvr_clk
.clkr
,
2539 [USB_FS1_XCVR_FS_SRC
] = &usb_fs1_xcvr_fs_src
.clkr
,
2540 [USB_FS1_XCVR_FS_CLK
] = &usb_fs1_xcvr_fs_clk
.clkr
,
2541 [USB_FS1_SYSTEM_CLK
] = &usb_fs1_system_clk
.clkr
,
2542 [USB_FS2_XCVR_FS_SRC
] = &usb_fs2_xcvr_fs_src
.clkr
,
2543 [USB_FS2_XCVR_FS_CLK
] = &usb_fs2_xcvr_fs_clk
.clkr
,
2544 [USB_FS2_SYSTEM_CLK
] = &usb_fs2_system_clk
.clkr
,
2545 [GSBI1_H_CLK
] = &gsbi1_h_clk
.clkr
,
2546 [GSBI2_H_CLK
] = &gsbi2_h_clk
.clkr
,
2547 [GSBI3_H_CLK
] = &gsbi3_h_clk
.clkr
,
2548 [GSBI4_H_CLK
] = &gsbi4_h_clk
.clkr
,
2549 [GSBI5_H_CLK
] = &gsbi5_h_clk
.clkr
,
2550 [GSBI6_H_CLK
] = &gsbi6_h_clk
.clkr
,
2551 [GSBI7_H_CLK
] = &gsbi7_h_clk
.clkr
,
2552 [GSBI8_H_CLK
] = &gsbi8_h_clk
.clkr
,
2553 [GSBI9_H_CLK
] = &gsbi9_h_clk
.clkr
,
2554 [GSBI10_H_CLK
] = &gsbi10_h_clk
.clkr
,
2555 [GSBI11_H_CLK
] = &gsbi11_h_clk
.clkr
,
2556 [GSBI12_H_CLK
] = &gsbi12_h_clk
.clkr
,
2557 [TSIF_H_CLK
] = &tsif_h_clk
.clkr
,
2558 [USB_FS1_H_CLK
] = &usb_fs1_h_clk
.clkr
,
2559 [USB_FS2_H_CLK
] = &usb_fs2_h_clk
.clkr
,
2560 [USB_HS1_H_CLK
] = &usb_hs1_h_clk
.clkr
,
2561 [SDC1_H_CLK
] = &sdc1_h_clk
.clkr
,
2562 [SDC2_H_CLK
] = &sdc2_h_clk
.clkr
,
2563 [SDC3_H_CLK
] = &sdc3_h_clk
.clkr
,
2564 [SDC4_H_CLK
] = &sdc4_h_clk
.clkr
,
2565 [SDC5_H_CLK
] = &sdc5_h_clk
.clkr
,
2566 [ADM0_CLK
] = &adm0_clk
.clkr
,
2567 [ADM0_PBUS_CLK
] = &adm0_pbus_clk
.clkr
,
2568 [ADM1_CLK
] = &adm1_clk
.clkr
,
2569 [ADM1_PBUS_CLK
] = &adm1_pbus_clk
.clkr
,
2570 [MODEM_AHB1_H_CLK
] = &modem_ahb1_h_clk
.clkr
,
2571 [MODEM_AHB2_H_CLK
] = &modem_ahb2_h_clk
.clkr
,
2572 [PMIC_ARB0_H_CLK
] = &pmic_arb0_h_clk
.clkr
,
2573 [PMIC_ARB1_H_CLK
] = &pmic_arb1_h_clk
.clkr
,
2574 [PMIC_SSBI2_CLK
] = &pmic_ssbi2_clk
.clkr
,
2575 [RPM_MSG_RAM_H_CLK
] = &rpm_msg_ram_h_clk
.clkr
,
2578 static const struct qcom_reset_map gcc_msm8660_resets
[] = {
2579 [AFAB_CORE_RESET
] = { 0x2080, 7 },
2580 [SCSS_SYS_RESET
] = { 0x20b4, 1 },
2581 [SCSS_SYS_POR_RESET
] = { 0x20b4 },
2582 [AFAB_SMPSS_S_RESET
] = { 0x20b8, 2 },
2583 [AFAB_SMPSS_M1_RESET
] = { 0x20b8, 1 },
2584 [AFAB_SMPSS_M0_RESET
] = { 0x20b8 },
2585 [AFAB_EBI1_S_RESET
] = { 0x20c0, 7 },
2586 [SFAB_CORE_RESET
] = { 0x2120, 7 },
2587 [SFAB_ADM0_M0_RESET
] = { 0x21e0, 7 },
2588 [SFAB_ADM0_M1_RESET
] = { 0x21e4, 7 },
2589 [SFAB_ADM0_M2_RESET
] = { 0x21e4, 7 },
2590 [ADM0_C2_RESET
] = { 0x220c, 4 },
2591 [ADM0_C1_RESET
] = { 0x220c, 3 },
2592 [ADM0_C0_RESET
] = { 0x220c, 2 },
2593 [ADM0_PBUS_RESET
] = { 0x220c, 1 },
2594 [ADM0_RESET
] = { 0x220c },
2595 [SFAB_ADM1_M0_RESET
] = { 0x2220, 7 },
2596 [SFAB_ADM1_M1_RESET
] = { 0x2224, 7 },
2597 [SFAB_ADM1_M2_RESET
] = { 0x2228, 7 },
2598 [MMFAB_ADM1_M3_RESET
] = { 0x2240, 7 },
2599 [ADM1_C3_RESET
] = { 0x226c, 5 },
2600 [ADM1_C2_RESET
] = { 0x226c, 4 },
2601 [ADM1_C1_RESET
] = { 0x226c, 3 },
2602 [ADM1_C0_RESET
] = { 0x226c, 2 },
2603 [ADM1_PBUS_RESET
] = { 0x226c, 1 },
2604 [ADM1_RESET
] = { 0x226c },
2605 [IMEM0_RESET
] = { 0x2280, 7 },
2606 [SFAB_LPASS_Q6_RESET
] = { 0x23a0, 7 },
2607 [SFAB_AFAB_M_RESET
] = { 0x23e0, 7 },
2608 [AFAB_SFAB_M0_RESET
] = { 0x2420, 7 },
2609 [AFAB_SFAB_M1_RESET
] = { 0x2424, 7 },
2610 [DFAB_CORE_RESET
] = { 0x24ac, 7 },
2611 [SFAB_DFAB_M_RESET
] = { 0x2500, 7 },
2612 [DFAB_SFAB_M_RESET
] = { 0x2520, 7 },
2613 [DFAB_SWAY0_RESET
] = { 0x2540, 7 },
2614 [DFAB_SWAY1_RESET
] = { 0x2544, 7 },
2615 [DFAB_ARB0_RESET
] = { 0x2560, 7 },
2616 [DFAB_ARB1_RESET
] = { 0x2564, 7 },
2617 [PPSS_PROC_RESET
] = { 0x2594, 1 },
2618 [PPSS_RESET
] = { 0x2594 },
2619 [PMEM_RESET
] = { 0x25a0, 7 },
2620 [DMA_BAM_RESET
] = { 0x25c0, 7 },
2621 [SIC_RESET
] = { 0x25e0, 7 },
2622 [SPS_TIC_RESET
] = { 0x2600, 7 },
2623 [CFBP0_RESET
] = { 0x2650, 7 },
2624 [CFBP1_RESET
] = { 0x2654, 7 },
2625 [CFBP2_RESET
] = { 0x2658, 7 },
2626 [EBI2_RESET
] = { 0x2664, 7 },
2627 [SFAB_CFPB_M_RESET
] = { 0x2680, 7 },
2628 [CFPB_MASTER_RESET
] = { 0x26a0, 7 },
2629 [SFAB_CFPB_S_RESET
] = { 0x26c0, 7 },
2630 [CFPB_SPLITTER_RESET
] = { 0x26e0, 7 },
2631 [TSIF_RESET
] = { 0x2700, 7 },
2632 [CE1_RESET
] = { 0x2720, 7 },
2633 [CE2_RESET
] = { 0x2740, 7 },
2634 [SFAB_SFPB_M_RESET
] = { 0x2780, 7 },
2635 [SFAB_SFPB_S_RESET
] = { 0x27a0, 7 },
2636 [RPM_PROC_RESET
] = { 0x27c0, 7 },
2637 [RPM_BUS_RESET
] = { 0x27c4, 7 },
2638 [RPM_MSG_RAM_RESET
] = { 0x27e0, 7 },
2639 [PMIC_ARB0_RESET
] = { 0x2800, 7 },
2640 [PMIC_ARB1_RESET
] = { 0x2804, 7 },
2641 [PMIC_SSBI2_RESET
] = { 0x280c, 12 },
2642 [SDC1_RESET
] = { 0x2830 },
2643 [SDC2_RESET
] = { 0x2850 },
2644 [SDC3_RESET
] = { 0x2870 },
2645 [SDC4_RESET
] = { 0x2890 },
2646 [SDC5_RESET
] = { 0x28b0 },
2647 [USB_HS1_RESET
] = { 0x2910 },
2648 [USB_HS2_XCVR_RESET
] = { 0x2934, 1 },
2649 [USB_HS2_RESET
] = { 0x2934 },
2650 [USB_FS1_XCVR_RESET
] = { 0x2974, 1 },
2651 [USB_FS1_RESET
] = { 0x2974 },
2652 [USB_FS2_XCVR_RESET
] = { 0x2994, 1 },
2653 [USB_FS2_RESET
] = { 0x2994 },
2654 [GSBI1_RESET
] = { 0x29dc },
2655 [GSBI2_RESET
] = { 0x29fc },
2656 [GSBI3_RESET
] = { 0x2a1c },
2657 [GSBI4_RESET
] = { 0x2a3c },
2658 [GSBI5_RESET
] = { 0x2a5c },
2659 [GSBI6_RESET
] = { 0x2a7c },
2660 [GSBI7_RESET
] = { 0x2a9c },
2661 [GSBI8_RESET
] = { 0x2abc },
2662 [GSBI9_RESET
] = { 0x2adc },
2663 [GSBI10_RESET
] = { 0x2afc },
2664 [GSBI11_RESET
] = { 0x2b1c },
2665 [GSBI12_RESET
] = { 0x2b3c },
2666 [SPDM_RESET
] = { 0x2b6c },
2667 [SEC_CTRL_RESET
] = { 0x2b80, 7 },
2668 [TLMM_H_RESET
] = { 0x2ba0, 7 },
2669 [TLMM_RESET
] = { 0x2ba4, 7 },
2670 [MARRM_PWRON_RESET
] = { 0x2bd4, 1 },
2671 [MARM_RESET
] = { 0x2bd4 },
2672 [MAHB1_RESET
] = { 0x2be4, 7 },
2673 [SFAB_MSS_S_RESET
] = { 0x2c00, 7 },
2674 [MAHB2_RESET
] = { 0x2c20, 7 },
2675 [MODEM_SW_AHB_RESET
] = { 0x2c48, 1 },
2676 [MODEM_RESET
] = { 0x2c48 },
2677 [SFAB_MSS_MDM1_RESET
] = { 0x2c4c, 1 },
2678 [SFAB_MSS_MDM0_RESET
] = { 0x2c4c },
2679 [MSS_SLP_RESET
] = { 0x2c60, 7 },
2680 [MSS_MARM_SAW_RESET
] = { 0x2c68, 1 },
2681 [MSS_WDOG_RESET
] = { 0x2c68 },
2682 [TSSC_RESET
] = { 0x2ca0, 7 },
2683 [PDM_RESET
] = { 0x2cc0, 12 },
2684 [SCSS_CORE0_RESET
] = { 0x2d60, 1 },
2685 [SCSS_CORE0_POR_RESET
] = { 0x2d60 },
2686 [SCSS_CORE1_RESET
] = { 0x2d80, 1 },
2687 [SCSS_CORE1_POR_RESET
] = { 0x2d80 },
2688 [MPM_RESET
] = { 0x2da4, 1 },
2689 [EBI1_1X_DIV_RESET
] = { 0x2dec, 9 },
2690 [EBI1_RESET
] = { 0x2dec, 7 },
2691 [SFAB_SMPSS_S_RESET
] = { 0x2e00, 7 },
2692 [USB_PHY0_RESET
] = { 0x2e20 },
2693 [USB_PHY1_RESET
] = { 0x2e40 },
2694 [PRNG_RESET
] = { 0x2e80, 12 },
2697 static const struct regmap_config gcc_msm8660_regmap_config
= {
2701 .max_register
= 0x363c,
2705 static const struct qcom_cc_desc gcc_msm8660_desc
= {
2706 .config
= &gcc_msm8660_regmap_config
,
2707 .clks
= gcc_msm8660_clks
,
2708 .num_clks
= ARRAY_SIZE(gcc_msm8660_clks
),
2709 .resets
= gcc_msm8660_resets
,
2710 .num_resets
= ARRAY_SIZE(gcc_msm8660_resets
),
2713 static const struct of_device_id gcc_msm8660_match_table
[] = {
2714 { .compatible
= "qcom,gcc-msm8660" },
2717 MODULE_DEVICE_TABLE(of
, gcc_msm8660_match_table
);
2719 static int gcc_msm8660_probe(struct platform_device
*pdev
)
2722 struct device
*dev
= &pdev
->dev
;
2724 /* Temporary until RPM clocks supported */
2725 clk
= clk_register_fixed_rate(dev
, "cxo", NULL
, CLK_IS_ROOT
, 19200000);
2727 return PTR_ERR(clk
);
2729 clk
= clk_register_fixed_rate(dev
, "pxo", NULL
, CLK_IS_ROOT
, 27000000);
2731 return PTR_ERR(clk
);
2733 return qcom_cc_probe(pdev
, &gcc_msm8660_desc
);
2736 static int gcc_msm8660_remove(struct platform_device
*pdev
)
2738 qcom_cc_remove(pdev
);
2742 static struct platform_driver gcc_msm8660_driver
= {
2743 .probe
= gcc_msm8660_probe
,
2744 .remove
= gcc_msm8660_remove
,
2746 .name
= "gcc-msm8660",
2747 .of_match_table
= gcc_msm8660_match_table
,
2751 static int __init
gcc_msm8660_init(void)
2753 return platform_driver_register(&gcc_msm8660_driver
);
2755 core_initcall(gcc_msm8660_init
);
2757 static void __exit
gcc_msm8660_exit(void)
2759 platform_driver_unregister(&gcc_msm8660_driver
);
2761 module_exit(gcc_msm8660_exit
);
2763 MODULE_DESCRIPTION("GCC MSM 8660 Driver");
2764 MODULE_LICENSE("GPL v2");
2765 MODULE_ALIAS("platform:gcc-msm8660");