forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclk-3xxx-legacy.c
4656 lines (4019 loc) · 98.7 KB
/
clk-3xxx-legacy.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* OMAP3 Legacy clock data
*
* Copyright (C) 2014 Texas Instruments, Inc
* Tero Kristo ([email protected])
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation version 2.
*
* This program is distributed "as is" WITHOUT ANY WARRANTY of any
* kind, whether express or implied; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <linux/kernel.h>
#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/clk/ti.h>
#include "clock.h"
static struct ti_clk_fixed virt_12m_ck_data = {
.frequency = 12000000,
};
static struct ti_clk virt_12m_ck = {
.name = "virt_12m_ck",
.type = TI_CLK_FIXED,
.data = &virt_12m_ck_data,
};
static struct ti_clk_fixed virt_13m_ck_data = {
.frequency = 13000000,
};
static struct ti_clk virt_13m_ck = {
.name = "virt_13m_ck",
.type = TI_CLK_FIXED,
.data = &virt_13m_ck_data,
};
static struct ti_clk_fixed virt_19200000_ck_data = {
.frequency = 19200000,
};
static struct ti_clk virt_19200000_ck = {
.name = "virt_19200000_ck",
.type = TI_CLK_FIXED,
.data = &virt_19200000_ck_data,
};
static struct ti_clk_fixed virt_26000000_ck_data = {
.frequency = 26000000,
};
static struct ti_clk virt_26000000_ck = {
.name = "virt_26000000_ck",
.type = TI_CLK_FIXED,
.data = &virt_26000000_ck_data,
};
static struct ti_clk_fixed virt_38_4m_ck_data = {
.frequency = 38400000,
};
static struct ti_clk virt_38_4m_ck = {
.name = "virt_38_4m_ck",
.type = TI_CLK_FIXED,
.data = &virt_38_4m_ck_data,
};
static struct ti_clk_fixed virt_16_8m_ck_data = {
.frequency = 16800000,
};
static struct ti_clk virt_16_8m_ck = {
.name = "virt_16_8m_ck",
.type = TI_CLK_FIXED,
.data = &virt_16_8m_ck_data,
};
static const char *osc_sys_ck_parents[] = {
"virt_12m_ck",
"virt_13m_ck",
"virt_19200000_ck",
"virt_26000000_ck",
"virt_38_4m_ck",
"virt_16_8m_ck",
};
static struct ti_clk_mux osc_sys_ck_data = {
.num_parents = ARRAY_SIZE(osc_sys_ck_parents),
.reg = 0xd40,
.module = TI_CLKM_PRM,
.parents = osc_sys_ck_parents,
};
static struct ti_clk osc_sys_ck = {
.name = "osc_sys_ck",
.type = TI_CLK_MUX,
.data = &osc_sys_ck_data,
};
static struct ti_clk_divider sys_ck_data = {
.parent = "osc_sys_ck",
.bit_shift = 6,
.max_div = 3,
.reg = 0x1270,
.module = TI_CLKM_PRM,
.flags = CLKF_INDEX_STARTS_AT_ONE,
};
static struct ti_clk sys_ck = {
.name = "sys_ck",
.type = TI_CLK_DIVIDER,
.data = &sys_ck_data,
};
static const char *dpll3_ck_parents[] = {
"sys_ck",
"sys_ck",
};
static struct ti_clk_dpll dpll3_ck_data = {
.num_parents = ARRAY_SIZE(dpll3_ck_parents),
.control_reg = 0xd00,
.idlest_reg = 0xd20,
.mult_div1_reg = 0xd40,
.autoidle_reg = 0xd30,
.module = TI_CLKM_CM,
.parents = dpll3_ck_parents,
.flags = CLKF_CORE,
.freqsel_mask = 0xf0,
.div1_mask = 0x7f00,
.idlest_mask = 0x1,
.auto_recal_bit = 0x3,
.max_divider = 0x80,
.min_divider = 0x1,
.recal_en_bit = 0x5,
.max_multiplier = 0x7ff,
.enable_mask = 0x7,
.mult_mask = 0x7ff0000,
.recal_st_bit = 0x5,
.autoidle_mask = 0x7,
};
static struct ti_clk dpll3_ck = {
.name = "dpll3_ck",
.clkdm_name = "dpll3_clkdm",
.type = TI_CLK_DPLL,
.data = &dpll3_ck_data,
};
static struct ti_clk_divider dpll3_m2_ck_data = {
.parent = "dpll3_ck",
.bit_shift = 27,
.max_div = 31,
.reg = 0xd40,
.module = TI_CLKM_CM,
.flags = CLKF_INDEX_STARTS_AT_ONE,
};
static struct ti_clk dpll3_m2_ck = {
.name = "dpll3_m2_ck",
.type = TI_CLK_DIVIDER,
.data = &dpll3_m2_ck_data,
};
static struct ti_clk_fixed_factor core_ck_data = {
.parent = "dpll3_m2_ck",
.div = 1,
.mult = 1,
};
static struct ti_clk core_ck = {
.name = "core_ck",
.type = TI_CLK_FIXED_FACTOR,
.data = &core_ck_data,
};
static struct ti_clk_divider l3_ick_data = {
.parent = "core_ck",
.max_div = 3,
.reg = 0xa40,
.module = TI_CLKM_CM,
.flags = CLKF_INDEX_STARTS_AT_ONE,
};
static struct ti_clk l3_ick = {
.name = "l3_ick",
.type = TI_CLK_DIVIDER,
.data = &l3_ick_data,
};
static struct ti_clk_fixed_factor security_l3_ick_data = {
.parent = "l3_ick",
.div = 1,
.mult = 1,
};
static struct ti_clk security_l3_ick = {
.name = "security_l3_ick",
.type = TI_CLK_FIXED_FACTOR,
.data = &security_l3_ick_data,
};
static struct ti_clk_fixed_factor wkup_l4_ick_data = {
.parent = "sys_ck",
.div = 1,
.mult = 1,
};
static struct ti_clk wkup_l4_ick = {
.name = "wkup_l4_ick",
.type = TI_CLK_FIXED_FACTOR,
.data = &wkup_l4_ick_data,
};
static struct ti_clk_gate usim_ick_data = {
.parent = "wkup_l4_ick",
.bit_shift = 9,
.reg = 0xc10,
.module = TI_CLKM_CM,
.flags = CLKF_OMAP3 | CLKF_INTERFACE,
};
static struct ti_clk usim_ick = {
.name = "usim_ick",
.clkdm_name = "wkup_clkdm",
.type = TI_CLK_GATE,
.data = &usim_ick_data,
};
static struct ti_clk_gate dss2_alwon_fck_data = {
.parent = "sys_ck",
.bit_shift = 1,
.reg = 0xe00,
.module = TI_CLKM_CM,
};
static struct ti_clk dss2_alwon_fck = {
.name = "dss2_alwon_fck",
.clkdm_name = "dss_clkdm",
.type = TI_CLK_GATE,
.data = &dss2_alwon_fck_data,
};
static struct ti_clk_divider l4_ick_data = {
.parent = "l3_ick",
.bit_shift = 2,
.max_div = 3,
.reg = 0xa40,
.module = TI_CLKM_CM,
.flags = CLKF_INDEX_STARTS_AT_ONE,
};
static struct ti_clk l4_ick = {
.name = "l4_ick",
.type = TI_CLK_DIVIDER,
.data = &l4_ick_data,
};
static struct ti_clk_fixed_factor core_l4_ick_data = {
.parent = "l4_ick",
.div = 1,
.mult = 1,
};
static struct ti_clk core_l4_ick = {
.name = "core_l4_ick",
.type = TI_CLK_FIXED_FACTOR,
.data = &core_l4_ick_data,
};
static struct ti_clk_gate mmchs2_ick_data = {
.parent = "core_l4_ick",
.bit_shift = 25,
.reg = 0xa10,
.module = TI_CLKM_CM,
.flags = CLKF_OMAP3 | CLKF_INTERFACE,
};
static struct ti_clk mmchs2_ick = {
.name = "mmchs2_ick",
.clkdm_name = "core_l4_clkdm",
.type = TI_CLK_GATE,
.data = &mmchs2_ick_data,
};
static const char *dpll4_ck_parents[] = {
"sys_ck",
"sys_ck",
};
static struct ti_clk_dpll dpll4_ck_data = {
.num_parents = ARRAY_SIZE(dpll4_ck_parents),
.control_reg = 0xd00,
.idlest_reg = 0xd20,
.mult_div1_reg = 0xd44,
.autoidle_reg = 0xd30,
.module = TI_CLKM_CM,
.parents = dpll4_ck_parents,
.flags = CLKF_PER,
.freqsel_mask = 0xf00000,
.modes = 0x82,
.div1_mask = 0x7f,
.idlest_mask = 0x2,
.auto_recal_bit = 0x13,
.max_divider = 0x80,
.min_divider = 0x1,
.recal_en_bit = 0x6,
.max_multiplier = 0x7ff,
.enable_mask = 0x70000,
.mult_mask = 0x7ff00,
.recal_st_bit = 0x6,
.autoidle_mask = 0x38,
};
static struct ti_clk dpll4_ck = {
.name = "dpll4_ck",
.clkdm_name = "dpll4_clkdm",
.type = TI_CLK_DPLL,
.data = &dpll4_ck_data,
};
static struct ti_clk_divider dpll4_m2_ck_data = {
.parent = "dpll4_ck",
.max_div = 63,
.reg = 0xd48,
.module = TI_CLKM_CM,
.flags = CLKF_INDEX_STARTS_AT_ONE,
};
static struct ti_clk dpll4_m2_ck = {
.name = "dpll4_m2_ck",
.type = TI_CLK_DIVIDER,
.data = &dpll4_m2_ck_data,
};
static struct ti_clk_fixed_factor dpll4_m2x2_mul_ck_data = {
.parent = "dpll4_m2_ck",
.div = 1,
.mult = 2,
};
static struct ti_clk dpll4_m2x2_mul_ck = {
.name = "dpll4_m2x2_mul_ck",
.type = TI_CLK_FIXED_FACTOR,
.data = &dpll4_m2x2_mul_ck_data,
};
static struct ti_clk_gate dpll4_m2x2_ck_data = {
.parent = "dpll4_m2x2_mul_ck",
.bit_shift = 0x1b,
.reg = 0xd00,
.module = TI_CLKM_CM,
.flags = CLKF_SET_BIT_TO_DISABLE,
};
static struct ti_clk dpll4_m2x2_ck = {
.name = "dpll4_m2x2_ck",
.type = TI_CLK_GATE,
.data = &dpll4_m2x2_ck_data,
};
static struct ti_clk_fixed_factor omap_96m_alwon_fck_data = {
.parent = "dpll4_m2x2_ck",
.div = 1,
.mult = 1,
};
static struct ti_clk omap_96m_alwon_fck = {
.name = "omap_96m_alwon_fck",
.type = TI_CLK_FIXED_FACTOR,
.data = &omap_96m_alwon_fck_data,
};
static struct ti_clk_fixed_factor cm_96m_fck_data = {
.parent = "omap_96m_alwon_fck",
.div = 1,
.mult = 1,
};
static struct ti_clk cm_96m_fck = {
.name = "cm_96m_fck",
.type = TI_CLK_FIXED_FACTOR,
.data = &cm_96m_fck_data,
};
static const char *omap_96m_fck_parents[] = {
"cm_96m_fck",
"sys_ck",
};
static struct ti_clk_mux omap_96m_fck_data = {
.bit_shift = 6,
.num_parents = ARRAY_SIZE(omap_96m_fck_parents),
.reg = 0xd40,
.module = TI_CLKM_CM,
.parents = omap_96m_fck_parents,
};
static struct ti_clk omap_96m_fck = {
.name = "omap_96m_fck",
.type = TI_CLK_MUX,
.data = &omap_96m_fck_data,
};
static struct ti_clk_fixed_factor core_96m_fck_data = {
.parent = "omap_96m_fck",
.div = 1,
.mult = 1,
};
static struct ti_clk core_96m_fck = {
.name = "core_96m_fck",
.type = TI_CLK_FIXED_FACTOR,
.data = &core_96m_fck_data,
};
static struct ti_clk_gate mspro_fck_data = {
.parent = "core_96m_fck",
.bit_shift = 23,
.reg = 0xa00,
.module = TI_CLKM_CM,
.flags = CLKF_WAIT,
};
static struct ti_clk mspro_fck = {
.name = "mspro_fck",
.clkdm_name = "core_l4_clkdm",
.type = TI_CLK_GATE,
.data = &mspro_fck_data,
};
static struct ti_clk_gate dss_ick_3430es2_data = {
.parent = "l4_ick",
.bit_shift = 0,
.reg = 0xe10,
.module = TI_CLKM_CM,
.flags = CLKF_DSS | CLKF_OMAP3 | CLKF_INTERFACE,
};
static struct ti_clk dss_ick_3430es2 = {
.name = "dss_ick",
.clkdm_name = "dss_clkdm",
.type = TI_CLK_GATE,
.data = &dss_ick_3430es2_data,
};
static struct ti_clk_gate uart4_ick_am35xx_data = {
.parent = "core_l4_ick",
.bit_shift = 23,
.reg = 0xa10,
.module = TI_CLKM_CM,
.flags = CLKF_OMAP3 | CLKF_INTERFACE,
};
static struct ti_clk uart4_ick_am35xx = {
.name = "uart4_ick_am35xx",
.clkdm_name = "core_l4_clkdm",
.type = TI_CLK_GATE,
.data = &uart4_ick_am35xx_data,
};
static struct ti_clk_fixed_factor security_l4_ick2_data = {
.parent = "l4_ick",
.div = 1,
.mult = 1,
};
static struct ti_clk security_l4_ick2 = {
.name = "security_l4_ick2",
.type = TI_CLK_FIXED_FACTOR,
.data = &security_l4_ick2_data,
};
static struct ti_clk_gate aes1_ick_data = {
.parent = "security_l4_ick2",
.bit_shift = 3,
.reg = 0xa14,
.module = TI_CLKM_CM,
.flags = CLKF_OMAP3 | CLKF_INTERFACE,
};
static struct ti_clk aes1_ick = {
.name = "aes1_ick",
.type = TI_CLK_GATE,
.data = &aes1_ick_data,
};
static const char *dpll5_ck_parents[] = {
"sys_ck",
"sys_ck",
};
static struct ti_clk_dpll dpll5_ck_data = {
.num_parents = ARRAY_SIZE(dpll5_ck_parents),
.control_reg = 0xd04,
.idlest_reg = 0xd24,
.mult_div1_reg = 0xd4c,
.autoidle_reg = 0xd34,
.module = TI_CLKM_CM,
.parents = dpll5_ck_parents,
.freqsel_mask = 0xf0,
.modes = 0x82,
.div1_mask = 0x7f,
.idlest_mask = 0x1,
.auto_recal_bit = 0x3,
.max_divider = 0x80,
.min_divider = 0x1,
.recal_en_bit = 0x19,
.max_multiplier = 0x7ff,
.enable_mask = 0x7,
.mult_mask = 0x7ff00,
.recal_st_bit = 0x19,
.autoidle_mask = 0x7,
};
static struct ti_clk dpll5_ck = {
.name = "dpll5_ck",
.clkdm_name = "dpll5_clkdm",
.type = TI_CLK_DPLL,
.data = &dpll5_ck_data,
};
static struct ti_clk_divider dpll5_m2_ck_data = {
.parent = "dpll5_ck",
.max_div = 31,
.reg = 0xd50,
.module = TI_CLKM_CM,
.flags = CLKF_INDEX_STARTS_AT_ONE,
};
static struct ti_clk dpll5_m2_ck = {
.name = "dpll5_m2_ck",
.type = TI_CLK_DIVIDER,
.data = &dpll5_m2_ck_data,
};
static struct ti_clk_gate usbhost_120m_fck_data = {
.parent = "dpll5_m2_ck",
.bit_shift = 1,
.reg = 0x1400,
.module = TI_CLKM_CM,
};
static struct ti_clk usbhost_120m_fck = {
.name = "usbhost_120m_fck",
.clkdm_name = "usbhost_clkdm",
.type = TI_CLK_GATE,
.data = &usbhost_120m_fck_data,
};
static struct ti_clk_fixed_factor cm_96m_d2_fck_data = {
.parent = "cm_96m_fck",
.div = 2,
.mult = 1,
};
static struct ti_clk cm_96m_d2_fck = {
.name = "cm_96m_d2_fck",
.type = TI_CLK_FIXED_FACTOR,
.data = &cm_96m_d2_fck_data,
};
static struct ti_clk_fixed sys_altclk_data = {
.frequency = 0x0,
};
static struct ti_clk sys_altclk = {
.name = "sys_altclk",
.type = TI_CLK_FIXED,
.data = &sys_altclk_data,
};
static const char *omap_48m_fck_parents[] = {
"cm_96m_d2_fck",
"sys_altclk",
};
static struct ti_clk_mux omap_48m_fck_data = {
.bit_shift = 3,
.num_parents = ARRAY_SIZE(omap_48m_fck_parents),
.reg = 0xd40,
.module = TI_CLKM_CM,
.parents = omap_48m_fck_parents,
};
static struct ti_clk omap_48m_fck = {
.name = "omap_48m_fck",
.type = TI_CLK_MUX,
.data = &omap_48m_fck_data,
};
static struct ti_clk_fixed_factor core_48m_fck_data = {
.parent = "omap_48m_fck",
.div = 1,
.mult = 1,
};
static struct ti_clk core_48m_fck = {
.name = "core_48m_fck",
.type = TI_CLK_FIXED_FACTOR,
.data = &core_48m_fck_data,
};
static struct ti_clk_fixed mcbsp_clks_data = {
.frequency = 0x0,
};
static struct ti_clk mcbsp_clks = {
.name = "mcbsp_clks",
.type = TI_CLK_FIXED,
.data = &mcbsp_clks_data,
};
static struct ti_clk_gate mcbsp2_gate_fck_data = {
.parent = "mcbsp_clks",
.bit_shift = 0,
.reg = 0x1000,
.module = TI_CLKM_CM,
};
static struct ti_clk_fixed_factor per_96m_fck_data = {
.parent = "omap_96m_alwon_fck",
.div = 1,
.mult = 1,
};
static struct ti_clk per_96m_fck = {
.name = "per_96m_fck",
.type = TI_CLK_FIXED_FACTOR,
.data = &per_96m_fck_data,
};
static const char *mcbsp2_mux_fck_parents[] = {
"per_96m_fck",
"mcbsp_clks",
};
static struct ti_clk_mux mcbsp2_mux_fck_data = {
.bit_shift = 6,
.num_parents = ARRAY_SIZE(mcbsp2_mux_fck_parents),
.reg = 0x274,
.module = TI_CLKM_SCRM,
.parents = mcbsp2_mux_fck_parents,
};
static struct ti_clk_composite mcbsp2_fck_data = {
.mux = &mcbsp2_mux_fck_data,
.gate = &mcbsp2_gate_fck_data,
};
static struct ti_clk mcbsp2_fck = {
.name = "mcbsp2_fck",
.type = TI_CLK_COMPOSITE,
.data = &mcbsp2_fck_data,
};
static struct ti_clk_fixed_factor dpll3_m2x2_ck_data = {
.parent = "dpll3_m2_ck",
.div = 1,
.mult = 2,
};
static struct ti_clk dpll3_m2x2_ck = {
.name = "dpll3_m2x2_ck",
.type = TI_CLK_FIXED_FACTOR,
.data = &dpll3_m2x2_ck_data,
};
static struct ti_clk_fixed_factor corex2_fck_data = {
.parent = "dpll3_m2x2_ck",
.div = 1,
.mult = 1,
};
static struct ti_clk corex2_fck = {
.name = "corex2_fck",
.type = TI_CLK_FIXED_FACTOR,
.data = &corex2_fck_data,
};
static struct ti_clk_gate ssi_ssr_gate_fck_3430es1_data = {
.parent = "corex2_fck",
.bit_shift = 0,
.reg = 0xa00,
.module = TI_CLKM_CM,
.flags = CLKF_NO_WAIT,
};
static int ssi_ssr_div_fck_3430es1_divs[] = {
0,
1,
2,
3,
4,
0,
6,
0,
8,
};
static struct ti_clk_divider ssi_ssr_div_fck_3430es1_data = {
.num_dividers = ARRAY_SIZE(ssi_ssr_div_fck_3430es1_divs),
.parent = "corex2_fck",
.bit_shift = 8,
.dividers = ssi_ssr_div_fck_3430es1_divs,
.reg = 0xa40,
.module = TI_CLKM_CM,
};
static struct ti_clk_composite ssi_ssr_fck_3430es1_data = {
.gate = &ssi_ssr_gate_fck_3430es1_data,
.divider = &ssi_ssr_div_fck_3430es1_data,
};
static struct ti_clk ssi_ssr_fck_3430es1 = {
.name = "ssi_ssr_fck",
.type = TI_CLK_COMPOSITE,
.data = &ssi_ssr_fck_3430es1_data,
};
static struct ti_clk_fixed_factor ssi_sst_fck_3430es1_data = {
.parent = "ssi_ssr_fck",
.div = 2,
.mult = 1,
};
static struct ti_clk ssi_sst_fck_3430es1 = {
.name = "ssi_sst_fck",
.type = TI_CLK_FIXED_FACTOR,
.data = &ssi_sst_fck_3430es1_data,
};
static struct ti_clk_fixed omap_32k_fck_data = {
.frequency = 32768,
};
static struct ti_clk omap_32k_fck = {
.name = "omap_32k_fck",
.type = TI_CLK_FIXED,
.data = &omap_32k_fck_data,
};
static struct ti_clk_fixed_factor per_32k_alwon_fck_data = {
.parent = "omap_32k_fck",
.div = 1,
.mult = 1,
};
static struct ti_clk per_32k_alwon_fck = {
.name = "per_32k_alwon_fck",
.type = TI_CLK_FIXED_FACTOR,
.data = &per_32k_alwon_fck_data,
};
static struct ti_clk_gate gpio5_dbck_data = {
.parent = "per_32k_alwon_fck",
.bit_shift = 16,
.reg = 0x1000,
.module = TI_CLKM_CM,
};
static struct ti_clk gpio5_dbck = {
.name = "gpio5_dbck",
.clkdm_name = "per_clkdm",
.type = TI_CLK_GATE,
.data = &gpio5_dbck_data,
};
static struct ti_clk_gate gpt1_ick_data = {
.parent = "wkup_l4_ick",
.bit_shift = 0,
.reg = 0xc10,
.module = TI_CLKM_CM,
.flags = CLKF_OMAP3 | CLKF_INTERFACE,
};
static struct ti_clk gpt1_ick = {
.name = "gpt1_ick",
.clkdm_name = "wkup_clkdm",
.type = TI_CLK_GATE,
.data = &gpt1_ick_data,
};
static struct ti_clk_gate mcspi3_fck_data = {
.parent = "core_48m_fck",
.bit_shift = 20,
.reg = 0xa00,
.module = TI_CLKM_CM,
.flags = CLKF_WAIT,
};
static struct ti_clk mcspi3_fck = {
.name = "mcspi3_fck",
.clkdm_name = "core_l4_clkdm",
.type = TI_CLK_GATE,
.data = &mcspi3_fck_data,
};
static struct ti_clk_gate gpt2_gate_fck_data = {
.parent = "sys_ck",
.bit_shift = 3,
.reg = 0x1000,
.module = TI_CLKM_CM,
};
static const char *gpt2_mux_fck_parents[] = {
"omap_32k_fck",
"sys_ck",
};
static struct ti_clk_mux gpt2_mux_fck_data = {
.num_parents = ARRAY_SIZE(gpt2_mux_fck_parents),
.reg = 0x1040,
.module = TI_CLKM_CM,
.parents = gpt2_mux_fck_parents,
};
static struct ti_clk_composite gpt2_fck_data = {
.mux = &gpt2_mux_fck_data,
.gate = &gpt2_gate_fck_data,
};
static struct ti_clk gpt2_fck = {
.name = "gpt2_fck",
.type = TI_CLK_COMPOSITE,
.data = &gpt2_fck_data,
};
static struct ti_clk_gate gpt10_ick_data = {
.parent = "core_l4_ick",
.bit_shift = 11,
.reg = 0xa10,
.module = TI_CLKM_CM,
.flags = CLKF_OMAP3 | CLKF_INTERFACE,
};
static struct ti_clk gpt10_ick = {
.name = "gpt10_ick",
.clkdm_name = "core_l4_clkdm",
.type = TI_CLK_GATE,
.data = &gpt10_ick_data,
};
static struct ti_clk_gate uart2_fck_data = {
.parent = "core_48m_fck",
.bit_shift = 14,
.reg = 0xa00,
.module = TI_CLKM_CM,
.flags = CLKF_WAIT,
};
static struct ti_clk uart2_fck = {
.name = "uart2_fck",
.clkdm_name = "core_l4_clkdm",
.type = TI_CLK_GATE,
.data = &uart2_fck_data,
};
static struct ti_clk_fixed_factor sr_l4_ick_data = {
.parent = "l4_ick",
.div = 1,
.mult = 1,
};
static struct ti_clk sr_l4_ick = {
.name = "sr_l4_ick",
.type = TI_CLK_FIXED_FACTOR,
.data = &sr_l4_ick_data,
};
static struct ti_clk_fixed_factor omap_96m_d8_fck_data = {
.parent = "omap_96m_fck",
.div = 8,
.mult = 1,
};
static struct ti_clk omap_96m_d8_fck = {
.name = "omap_96m_d8_fck",
.type = TI_CLK_FIXED_FACTOR,
.data = &omap_96m_d8_fck_data,
};
static struct ti_clk_divider dpll4_m5_ck_data = {
.parent = "dpll4_ck",
.max_div = 63,
.reg = 0xf40,
.module = TI_CLKM_CM,
.flags = CLKF_INDEX_STARTS_AT_ONE,
};
static struct ti_clk dpll4_m5_ck = {
.name = "dpll4_m5_ck",
.type = TI_CLK_DIVIDER,
.data = &dpll4_m5_ck_data,
};
static struct ti_clk_fixed_factor dpll4_m5x2_mul_ck_data = {
.parent = "dpll4_m5_ck",
.div = 1,
.mult = 2,
.flags = CLKF_SET_RATE_PARENT,
};
static struct ti_clk dpll4_m5x2_mul_ck = {
.name = "dpll4_m5x2_mul_ck",
.type = TI_CLK_FIXED_FACTOR,
.data = &dpll4_m5x2_mul_ck_data,
};
static struct ti_clk_gate dpll4_m5x2_ck_data = {
.parent = "dpll4_m5x2_mul_ck",
.bit_shift = 0x1e,
.reg = 0xd00,
.module = TI_CLKM_CM,
.flags = CLKF_SET_BIT_TO_DISABLE,
};
static struct ti_clk dpll4_m5x2_ck = {
.name = "dpll4_m5x2_ck",
.type = TI_CLK_GATE,
.data = &dpll4_m5x2_ck_data,
};
static struct ti_clk_gate cam_mclk_data = {
.parent = "dpll4_m5x2_ck",
.bit_shift = 0,
.reg = 0xf00,
.module = TI_CLKM_CM,
.flags = CLKF_SET_RATE_PARENT,
};
static struct ti_clk cam_mclk = {
.name = "cam_mclk",
.type = TI_CLK_GATE,
.data = &cam_mclk_data,
};
static struct ti_clk_gate mcbsp3_gate_fck_data = {
.parent = "mcbsp_clks",
.bit_shift = 1,
.reg = 0x1000,
.module = TI_CLKM_CM,
};
static const char *mcbsp3_mux_fck_parents[] = {
"per_96m_fck",
"mcbsp_clks",
};
static struct ti_clk_mux mcbsp3_mux_fck_data = {
.num_parents = ARRAY_SIZE(mcbsp3_mux_fck_parents),
.reg = 0x2d8,
.module = TI_CLKM_SCRM,
.parents = mcbsp3_mux_fck_parents,
};
static struct ti_clk_composite mcbsp3_fck_data = {
.mux = &mcbsp3_mux_fck_data,
.gate = &mcbsp3_gate_fck_data,
};
static struct ti_clk mcbsp3_fck = {
.name = "mcbsp3_fck",
.type = TI_CLK_COMPOSITE,
.data = &mcbsp3_fck_data,
};
static struct ti_clk_gate csi2_96m_fck_data = {
.parent = "core_96m_fck",
.bit_shift = 1,
.reg = 0xf00,
.module = TI_CLKM_CM,
};
static struct ti_clk csi2_96m_fck = {
.name = "csi2_96m_fck",
.clkdm_name = "cam_clkdm",
.type = TI_CLK_GATE,
.data = &csi2_96m_fck_data,
};
static struct ti_clk_gate gpt9_gate_fck_data = {
.parent = "sys_ck",
.bit_shift = 10,
.reg = 0x1000,
.module = TI_CLKM_CM,
};
static const char *gpt9_mux_fck_parents[] = {
"omap_32k_fck",
"sys_ck",
};
static struct ti_clk_mux gpt9_mux_fck_data = {