@@ -534,8 +534,6 @@ static const struct samsung_gate_clock exynos5800_gate_clks[] __initconst = {
534
534
GATE_BUS_TOP , 24 , 0 , 0 ),
535
535
GATE (CLK_ACLK432_SCALER , "aclk432_scaler" , "mout_user_aclk432_scaler" ,
536
536
GATE_BUS_TOP , 27 , CLK_IS_CRITICAL , 0 ),
537
- GATE (CLK_MAU_EPLL , "mau_epll" , "mout_user_mau_epll" ,
538
- SRC_MASK_TOP7 , 20 , CLK_SET_RATE_PARENT , 0 ),
539
537
};
540
538
541
539
static const struct samsung_mux_clock exynos5420_mux_clks [] __initconst = {
@@ -577,8 +575,13 @@ static const struct samsung_div_clock exynos5420_div_clks[] __initconst = {
577
575
578
576
static const struct samsung_gate_clock exynos5420_gate_clks [] __initconst = {
579
577
GATE (CLK_SECKEY , "seckey" , "aclk66_psgen" , GATE_BUS_PERIS1 , 1 , 0 , 0 ),
578
+ /* Maudio Block */
580
579
GATE (CLK_MAU_EPLL , "mau_epll" , "mout_mau_epll_clk" ,
581
580
SRC_MASK_TOP7 , 20 , CLK_SET_RATE_PARENT , 0 ),
581
+ GATE (CLK_SCLK_MAUDIO0 , "sclk_maudio0" , "dout_maudio0" ,
582
+ GATE_TOP_SCLK_MAU , 0 , CLK_SET_RATE_PARENT , 0 ),
583
+ GATE (CLK_SCLK_MAUPCM0 , "sclk_maupcm0" , "dout_maupcm0" ,
584
+ GATE_TOP_SCLK_MAU , 1 , CLK_SET_RATE_PARENT , 0 ),
582
585
};
583
586
584
587
static const struct samsung_mux_clock exynos5x_mux_clks [] __initconst = {
@@ -890,9 +893,6 @@ static const struct samsung_div_clock exynos5x_div_clks[] __initconst = {
890
893
/* GSCL Block */
891
894
DIV (0 , "dout_gscl_blk_333" , "aclk333_432_gscl" , DIV2_RATIO0 , 6 , 2 ),
892
895
893
- /* MSCL Block */
894
- DIV (0 , "dout_mscl_blk" , "aclk400_mscl" , DIV2_RATIO0 , 28 , 2 ),
895
-
896
896
/* PSGEN */
897
897
DIV (0 , "dout_gen_blk" , "mout_user_aclk266" , DIV2_RATIO0 , 8 , 1 ),
898
898
DIV (0 , "dout_jpg_blk" , "aclk166" , DIV2_RATIO0 , 20 , 1 ),
@@ -1017,12 +1017,6 @@ static const struct samsung_gate_clock exynos5x_gate_clks[] __initconst = {
1017
1017
GATE (CLK_SCLK_DP1 , "sclk_dp1" , "dout_dp1" ,
1018
1018
GATE_TOP_SCLK_DISP1 , 20 , CLK_SET_RATE_PARENT , 0 ),
1019
1019
1020
- /* Maudio Block */
1021
- GATE (CLK_SCLK_MAUDIO0 , "sclk_maudio0" , "dout_maudio0" ,
1022
- GATE_TOP_SCLK_MAU , 0 , CLK_SET_RATE_PARENT , 0 ),
1023
- GATE (CLK_SCLK_MAUPCM0 , "sclk_maupcm0" , "dout_maupcm0" ,
1024
- GATE_TOP_SCLK_MAU , 1 , CLK_SET_RATE_PARENT , 0 ),
1025
-
1026
1020
/* FSYS Block */
1027
1021
GATE (CLK_TSI , "tsi" , "aclk200_fsys" , GATE_BUS_FSYS0 , 0 , 0 , 0 ),
1028
1022
GATE (CLK_PDMA0 , "pdma0" , "aclk200_fsys" , GATE_BUS_FSYS0 , 1 , 0 , 0 ),
@@ -1162,17 +1156,6 @@ static const struct samsung_gate_clock exynos5x_gate_clks[] __initconst = {
1162
1156
GATE (CLK_FIMC_LITE3 , "fimc_lite3" , "aclk333_432_gscl" ,
1163
1157
GATE_IP_GSCL1 , 17 , 0 , 0 ),
1164
1158
1165
- /* MSCL Block */
1166
- GATE (CLK_MSCL0 , "mscl0" , "aclk400_mscl" , GATE_IP_MSCL , 0 , 0 , 0 ),
1167
- GATE (CLK_MSCL1 , "mscl1" , "aclk400_mscl" , GATE_IP_MSCL , 1 , 0 , 0 ),
1168
- GATE (CLK_MSCL2 , "mscl2" , "aclk400_mscl" , GATE_IP_MSCL , 2 , 0 , 0 ),
1169
- GATE (CLK_SMMU_MSCL0 , "smmu_mscl0" , "dout_mscl_blk" ,
1170
- GATE_IP_MSCL , 8 , 0 , 0 ),
1171
- GATE (CLK_SMMU_MSCL1 , "smmu_mscl1" , "dout_mscl_blk" ,
1172
- GATE_IP_MSCL , 9 , 0 , 0 ),
1173
- GATE (CLK_SMMU_MSCL2 , "smmu_mscl2" , "dout_mscl_blk" ,
1174
- GATE_IP_MSCL , 10 , 0 , 0 ),
1175
-
1176
1159
/* ISP */
1177
1160
GATE (CLK_SCLK_UART_ISP , "sclk_uart_isp" , "dout_uart_isp" ,
1178
1161
GATE_TOP_SCLK_ISP , 0 , CLK_SET_RATE_PARENT , 0 ),
@@ -1281,32 +1264,103 @@ static struct exynos5_subcmu_reg_dump exynos5x_mfc_suspend_regs[] = {
1281
1264
{ DIV4_RATIO , 0 , 0x3 }, /* DIV dout_mfc_blk */
1282
1265
};
1283
1266
1284
- static const struct exynos5_subcmu_info exynos5x_subcmus [] = {
1285
- {
1286
- .div_clks = exynos5x_disp_div_clks ,
1287
- .nr_div_clks = ARRAY_SIZE (exynos5x_disp_div_clks ),
1288
- .gate_clks = exynos5x_disp_gate_clks ,
1289
- .nr_gate_clks = ARRAY_SIZE (exynos5x_disp_gate_clks ),
1290
- .suspend_regs = exynos5x_disp_suspend_regs ,
1291
- .nr_suspend_regs = ARRAY_SIZE (exynos5x_disp_suspend_regs ),
1292
- .pd_name = "DISP" ,
1293
- }, {
1294
- .div_clks = exynos5x_gsc_div_clks ,
1295
- .nr_div_clks = ARRAY_SIZE (exynos5x_gsc_div_clks ),
1296
- .gate_clks = exynos5x_gsc_gate_clks ,
1297
- .nr_gate_clks = ARRAY_SIZE (exynos5x_gsc_gate_clks ),
1298
- .suspend_regs = exynos5x_gsc_suspend_regs ,
1299
- .nr_suspend_regs = ARRAY_SIZE (exynos5x_gsc_suspend_regs ),
1300
- .pd_name = "GSC" ,
1301
- }, {
1302
- .div_clks = exynos5x_mfc_div_clks ,
1303
- .nr_div_clks = ARRAY_SIZE (exynos5x_mfc_div_clks ),
1304
- .gate_clks = exynos5x_mfc_gate_clks ,
1305
- .nr_gate_clks = ARRAY_SIZE (exynos5x_mfc_gate_clks ),
1306
- .suspend_regs = exynos5x_mfc_suspend_regs ,
1307
- .nr_suspend_regs = ARRAY_SIZE (exynos5x_mfc_suspend_regs ),
1308
- .pd_name = "MFC" ,
1309
- },
1267
+ static const struct samsung_gate_clock exynos5x_mscl_gate_clks [] __initconst = {
1268
+ /* MSCL Block */
1269
+ GATE (CLK_MSCL0 , "mscl0" , "aclk400_mscl" , GATE_IP_MSCL , 0 , 0 , 0 ),
1270
+ GATE (CLK_MSCL1 , "mscl1" , "aclk400_mscl" , GATE_IP_MSCL , 1 , 0 , 0 ),
1271
+ GATE (CLK_MSCL2 , "mscl2" , "aclk400_mscl" , GATE_IP_MSCL , 2 , 0 , 0 ),
1272
+ GATE (CLK_SMMU_MSCL0 , "smmu_mscl0" , "dout_mscl_blk" ,
1273
+ GATE_IP_MSCL , 8 , 0 , 0 ),
1274
+ GATE (CLK_SMMU_MSCL1 , "smmu_mscl1" , "dout_mscl_blk" ,
1275
+ GATE_IP_MSCL , 9 , 0 , 0 ),
1276
+ GATE (CLK_SMMU_MSCL2 , "smmu_mscl2" , "dout_mscl_blk" ,
1277
+ GATE_IP_MSCL , 10 , 0 , 0 ),
1278
+ };
1279
+
1280
+ static const struct samsung_div_clock exynos5x_mscl_div_clks [] __initconst = {
1281
+ DIV (0 , "dout_mscl_blk" , "aclk400_mscl" , DIV2_RATIO0 , 28 , 2 ),
1282
+ };
1283
+
1284
+ static struct exynos5_subcmu_reg_dump exynos5x_mscl_suspend_regs [] = {
1285
+ { GATE_IP_MSCL , 0xffffffff , 0xffffffff }, /* MSCL gates */
1286
+ { SRC_TOP3 , 0 , BIT (4 ) }, /* MUX mout_user_aclk400_mscl */
1287
+ { DIV2_RATIO0 , 0 , 0x30000000 }, /* DIV dout_mscl_blk */
1288
+ };
1289
+
1290
+ static const struct samsung_gate_clock exynos5800_mau_gate_clks [] __initconst = {
1291
+ GATE (CLK_MAU_EPLL , "mau_epll" , "mout_user_mau_epll" ,
1292
+ SRC_MASK_TOP7 , 20 , CLK_SET_RATE_PARENT , 0 ),
1293
+ GATE (CLK_SCLK_MAUDIO0 , "sclk_maudio0" , "dout_maudio0" ,
1294
+ GATE_TOP_SCLK_MAU , 0 , CLK_SET_RATE_PARENT , 0 ),
1295
+ GATE (CLK_SCLK_MAUPCM0 , "sclk_maupcm0" , "dout_maupcm0" ,
1296
+ GATE_TOP_SCLK_MAU , 1 , CLK_SET_RATE_PARENT , 0 ),
1297
+ };
1298
+
1299
+ static struct exynos5_subcmu_reg_dump exynos5800_mau_suspend_regs [] = {
1300
+ { SRC_TOP9 , 0 , BIT (8 ) }, /* MUX mout_user_mau_epll */
1301
+ };
1302
+
1303
+ static const struct exynos5_subcmu_info exynos5x_disp_subcmu = {
1304
+ .div_clks = exynos5x_disp_div_clks ,
1305
+ .nr_div_clks = ARRAY_SIZE (exynos5x_disp_div_clks ),
1306
+ .gate_clks = exynos5x_disp_gate_clks ,
1307
+ .nr_gate_clks = ARRAY_SIZE (exynos5x_disp_gate_clks ),
1308
+ .suspend_regs = exynos5x_disp_suspend_regs ,
1309
+ .nr_suspend_regs = ARRAY_SIZE (exynos5x_disp_suspend_regs ),
1310
+ .pd_name = "DISP" ,
1311
+ };
1312
+
1313
+ static const struct exynos5_subcmu_info exynos5x_gsc_subcmu = {
1314
+ .div_clks = exynos5x_gsc_div_clks ,
1315
+ .nr_div_clks = ARRAY_SIZE (exynos5x_gsc_div_clks ),
1316
+ .gate_clks = exynos5x_gsc_gate_clks ,
1317
+ .nr_gate_clks = ARRAY_SIZE (exynos5x_gsc_gate_clks ),
1318
+ .suspend_regs = exynos5x_gsc_suspend_regs ,
1319
+ .nr_suspend_regs = ARRAY_SIZE (exynos5x_gsc_suspend_regs ),
1320
+ .pd_name = "GSC" ,
1321
+ };
1322
+
1323
+ static const struct exynos5_subcmu_info exynos5x_mfc_subcmu = {
1324
+ .div_clks = exynos5x_mfc_div_clks ,
1325
+ .nr_div_clks = ARRAY_SIZE (exynos5x_mfc_div_clks ),
1326
+ .gate_clks = exynos5x_mfc_gate_clks ,
1327
+ .nr_gate_clks = ARRAY_SIZE (exynos5x_mfc_gate_clks ),
1328
+ .suspend_regs = exynos5x_mfc_suspend_regs ,
1329
+ .nr_suspend_regs = ARRAY_SIZE (exynos5x_mfc_suspend_regs ),
1330
+ .pd_name = "MFC" ,
1331
+ };
1332
+
1333
+ static const struct exynos5_subcmu_info exynos5x_mscl_subcmu = {
1334
+ .div_clks = exynos5x_mscl_div_clks ,
1335
+ .nr_div_clks = ARRAY_SIZE (exynos5x_mscl_div_clks ),
1336
+ .gate_clks = exynos5x_mscl_gate_clks ,
1337
+ .nr_gate_clks = ARRAY_SIZE (exynos5x_mscl_gate_clks ),
1338
+ .suspend_regs = exynos5x_mscl_suspend_regs ,
1339
+ .nr_suspend_regs = ARRAY_SIZE (exynos5x_mscl_suspend_regs ),
1340
+ .pd_name = "MSC" ,
1341
+ };
1342
+
1343
+ static const struct exynos5_subcmu_info exynos5800_mau_subcmu = {
1344
+ .gate_clks = exynos5800_mau_gate_clks ,
1345
+ .nr_gate_clks = ARRAY_SIZE (exynos5800_mau_gate_clks ),
1346
+ .suspend_regs = exynos5800_mau_suspend_regs ,
1347
+ .nr_suspend_regs = ARRAY_SIZE (exynos5800_mau_suspend_regs ),
1348
+ .pd_name = "MAU" ,
1349
+ };
1350
+
1351
+ static const struct exynos5_subcmu_info * exynos5x_subcmus [] = {
1352
+ & exynos5x_disp_subcmu ,
1353
+ & exynos5x_gsc_subcmu ,
1354
+ & exynos5x_mfc_subcmu ,
1355
+ & exynos5x_mscl_subcmu ,
1356
+ };
1357
+
1358
+ static const struct exynos5_subcmu_info * exynos5800_subcmus [] = {
1359
+ & exynos5x_disp_subcmu ,
1360
+ & exynos5x_gsc_subcmu ,
1361
+ & exynos5x_mfc_subcmu ,
1362
+ & exynos5x_mscl_subcmu ,
1363
+ & exynos5800_mau_subcmu ,
1310
1364
};
1311
1365
1312
1366
static const struct samsung_pll_rate_table exynos5420_pll2550x_24mhz_tbl [] __initconst = {
@@ -1539,11 +1593,17 @@ static void __init exynos5x_clk_init(struct device_node *np,
1539
1593
samsung_clk_extended_sleep_init (reg_base ,
1540
1594
exynos5x_clk_regs , ARRAY_SIZE (exynos5x_clk_regs ),
1541
1595
exynos5420_set_clksrc , ARRAY_SIZE (exynos5420_set_clksrc ));
1542
- if (soc == EXYNOS5800 )
1596
+
1597
+ if (soc == EXYNOS5800 ) {
1543
1598
samsung_clk_sleep_init (reg_base , exynos5800_clk_regs ,
1544
1599
ARRAY_SIZE (exynos5800_clk_regs ));
1545
- exynos5_subcmus_init (ctx , ARRAY_SIZE (exynos5x_subcmus ),
1546
- exynos5x_subcmus );
1600
+
1601
+ exynos5_subcmus_init (ctx , ARRAY_SIZE (exynos5800_subcmus ),
1602
+ exynos5800_subcmus );
1603
+ } else {
1604
+ exynos5_subcmus_init (ctx , ARRAY_SIZE (exynos5x_subcmus ),
1605
+ exynos5x_subcmus );
1606
+ }
1547
1607
1548
1608
samsung_clk_of_add_provider (np , ctx );
1549
1609
}
0 commit comments