|
17 | 17 | #include "clk.h"
|
18 | 18 | #include "clk-exynos-arm64.h"
|
19 | 19 |
|
| 20 | +/* NOTE: Must be equal to the last clock ID increased by one */ |
| 21 | +#define CLKS_NR_TOP (CLK_DOUT_G3D_SWITCH + 1) |
| 22 | +#define CLKS_NR_APM (CLK_GOUT_SYSREG_APM_PCLK + 1) |
| 23 | +#define CLKS_NR_AUD (CLK_GOUT_AUD_CMU_AUD_PCLK + 1) |
| 24 | +#define CLKS_NR_CMGP (CLK_GOUT_SYSREG_CMGP_PCLK + 1) |
| 25 | +#define CLKS_NR_G3D (CLK_GOUT_G3D_SYSREG_PCLK + 1) |
| 26 | +#define CLKS_NR_HSI (CLK_GOUT_HSI_CMU_HSI_PCLK + 1) |
| 27 | +#define CLKS_NR_IS (CLK_GOUT_IS_SYSREG_PCLK + 1) |
| 28 | +#define CLKS_NR_MFCMSCL (CLK_GOUT_MFCMSCL_SYSREG_PCLK + 1) |
| 29 | +#define CLKS_NR_PERI (CLK_GOUT_WDT1_PCLK + 1) |
| 30 | +#define CLKS_NR_CORE (CLK_GOUT_SYSREG_CORE_PCLK + 1) |
| 31 | +#define CLKS_NR_DPU (CLK_GOUT_DPU_SYSREG_PCLK + 1) |
| 32 | + |
20 | 33 | /* ---- CMU_TOP ------------------------------------------------------------- */
|
21 | 34 |
|
22 | 35 | /* Register Offset definitions for CMU_TOP (0x120e0000) */
|
@@ -486,7 +499,7 @@ static const struct samsung_cmu_info top_cmu_info __initconst = {
|
486 | 499 | .nr_div_clks = ARRAY_SIZE(top_div_clks),
|
487 | 500 | .gate_clks = top_gate_clks,
|
488 | 501 | .nr_gate_clks = ARRAY_SIZE(top_gate_clks),
|
489 |
| - .nr_clk_ids = TOP_NR_CLK, |
| 502 | + .nr_clk_ids = CLKS_NR_TOP, |
490 | 503 | .clk_regs = top_clk_regs,
|
491 | 504 | .nr_clk_regs = ARRAY_SIZE(top_clk_regs),
|
492 | 505 | };
|
@@ -626,7 +639,7 @@ static const struct samsung_cmu_info apm_cmu_info __initconst = {
|
626 | 639 | .nr_gate_clks = ARRAY_SIZE(apm_gate_clks),
|
627 | 640 | .fixed_clks = apm_fixed_clks,
|
628 | 641 | .nr_fixed_clks = ARRAY_SIZE(apm_fixed_clks),
|
629 |
| - .nr_clk_ids = APM_NR_CLK, |
| 642 | + .nr_clk_ids = CLKS_NR_APM, |
630 | 643 | .clk_regs = apm_clk_regs,
|
631 | 644 | .nr_clk_regs = ARRAY_SIZE(apm_clk_regs),
|
632 | 645 | .clk_name = "dout_clkcmu_apm_bus",
|
@@ -909,7 +922,7 @@ static const struct samsung_cmu_info aud_cmu_info __initconst = {
|
909 | 922 | .nr_gate_clks = ARRAY_SIZE(aud_gate_clks),
|
910 | 923 | .fixed_clks = aud_fixed_clks,
|
911 | 924 | .nr_fixed_clks = ARRAY_SIZE(aud_fixed_clks),
|
912 |
| - .nr_clk_ids = AUD_NR_CLK, |
| 925 | + .nr_clk_ids = CLKS_NR_AUD, |
913 | 926 | .clk_regs = aud_clk_regs,
|
914 | 927 | .nr_clk_regs = ARRAY_SIZE(aud_clk_regs),
|
915 | 928 | .clk_name = "dout_aud",
|
@@ -1012,7 +1025,7 @@ static const struct samsung_cmu_info cmgp_cmu_info __initconst = {
|
1012 | 1025 | .nr_gate_clks = ARRAY_SIZE(cmgp_gate_clks),
|
1013 | 1026 | .fixed_clks = cmgp_fixed_clks,
|
1014 | 1027 | .nr_fixed_clks = ARRAY_SIZE(cmgp_fixed_clks),
|
1015 |
| - .nr_clk_ids = CMGP_NR_CLK, |
| 1028 | + .nr_clk_ids = CLKS_NR_CMGP, |
1016 | 1029 | .clk_regs = cmgp_clk_regs,
|
1017 | 1030 | .nr_clk_regs = ARRAY_SIZE(cmgp_clk_regs),
|
1018 | 1031 | .clk_name = "gout_clkcmu_cmgp_bus",
|
@@ -1108,7 +1121,7 @@ static const struct samsung_cmu_info g3d_cmu_info __initconst = {
|
1108 | 1121 | .nr_div_clks = ARRAY_SIZE(g3d_div_clks),
|
1109 | 1122 | .gate_clks = g3d_gate_clks,
|
1110 | 1123 | .nr_gate_clks = ARRAY_SIZE(g3d_gate_clks),
|
1111 |
| - .nr_clk_ids = G3D_NR_CLK, |
| 1124 | + .nr_clk_ids = CLKS_NR_G3D, |
1112 | 1125 | .clk_regs = g3d_clk_regs,
|
1113 | 1126 | .nr_clk_regs = ARRAY_SIZE(g3d_clk_regs),
|
1114 | 1127 | .clk_name = "dout_g3d_switch",
|
@@ -1210,7 +1223,7 @@ static const struct samsung_cmu_info hsi_cmu_info __initconst = {
|
1210 | 1223 | .nr_mux_clks = ARRAY_SIZE(hsi_mux_clks),
|
1211 | 1224 | .gate_clks = hsi_gate_clks,
|
1212 | 1225 | .nr_gate_clks = ARRAY_SIZE(hsi_gate_clks),
|
1213 |
| - .nr_clk_ids = HSI_NR_CLK, |
| 1226 | + .nr_clk_ids = CLKS_NR_HSI, |
1214 | 1227 | .clk_regs = hsi_clk_regs,
|
1215 | 1228 | .nr_clk_regs = ARRAY_SIZE(hsi_clk_regs),
|
1216 | 1229 | .clk_name = "dout_hsi_bus",
|
@@ -1342,7 +1355,7 @@ static const struct samsung_cmu_info is_cmu_info __initconst = {
|
1342 | 1355 | .nr_div_clks = ARRAY_SIZE(is_div_clks),
|
1343 | 1356 | .gate_clks = is_gate_clks,
|
1344 | 1357 | .nr_gate_clks = ARRAY_SIZE(is_gate_clks),
|
1345 |
| - .nr_clk_ids = IS_NR_CLK, |
| 1358 | + .nr_clk_ids = CLKS_NR_IS, |
1346 | 1359 | .clk_regs = is_clk_regs,
|
1347 | 1360 | .nr_clk_regs = ARRAY_SIZE(is_clk_regs),
|
1348 | 1361 | .clk_name = "dout_is_bus",
|
@@ -1451,7 +1464,7 @@ static const struct samsung_cmu_info mfcmscl_cmu_info __initconst = {
|
1451 | 1464 | .nr_div_clks = ARRAY_SIZE(mfcmscl_div_clks),
|
1452 | 1465 | .gate_clks = mfcmscl_gate_clks,
|
1453 | 1466 | .nr_gate_clks = ARRAY_SIZE(mfcmscl_gate_clks),
|
1454 |
| - .nr_clk_ids = MFCMSCL_NR_CLK, |
| 1467 | + .nr_clk_ids = CLKS_NR_MFCMSCL, |
1455 | 1468 | .clk_regs = mfcmscl_clk_regs,
|
1456 | 1469 | .nr_clk_regs = ARRAY_SIZE(mfcmscl_clk_regs),
|
1457 | 1470 | .clk_name = "dout_mfcmscl_mfc",
|
@@ -1626,7 +1639,7 @@ static const struct samsung_cmu_info peri_cmu_info __initconst = {
|
1626 | 1639 | .nr_div_clks = ARRAY_SIZE(peri_div_clks),
|
1627 | 1640 | .gate_clks = peri_gate_clks,
|
1628 | 1641 | .nr_gate_clks = ARRAY_SIZE(peri_gate_clks),
|
1629 |
| - .nr_clk_ids = PERI_NR_CLK, |
| 1642 | + .nr_clk_ids = CLKS_NR_PERI, |
1630 | 1643 | .clk_regs = peri_clk_regs,
|
1631 | 1644 | .nr_clk_regs = ARRAY_SIZE(peri_clk_regs),
|
1632 | 1645 | .clk_name = "dout_peri_bus",
|
@@ -1733,7 +1746,7 @@ static const struct samsung_cmu_info core_cmu_info __initconst = {
|
1733 | 1746 | .nr_div_clks = ARRAY_SIZE(core_div_clks),
|
1734 | 1747 | .gate_clks = core_gate_clks,
|
1735 | 1748 | .nr_gate_clks = ARRAY_SIZE(core_gate_clks),
|
1736 |
| - .nr_clk_ids = CORE_NR_CLK, |
| 1749 | + .nr_clk_ids = CLKS_NR_CORE, |
1737 | 1750 | .clk_regs = core_clk_regs,
|
1738 | 1751 | .nr_clk_regs = ARRAY_SIZE(core_clk_regs),
|
1739 | 1752 | .clk_name = "dout_core_bus",
|
@@ -1807,7 +1820,7 @@ static const struct samsung_cmu_info dpu_cmu_info __initconst = {
|
1807 | 1820 | .nr_div_clks = ARRAY_SIZE(dpu_div_clks),
|
1808 | 1821 | .gate_clks = dpu_gate_clks,
|
1809 | 1822 | .nr_gate_clks = ARRAY_SIZE(dpu_gate_clks),
|
1810 |
| - .nr_clk_ids = DPU_NR_CLK, |
| 1823 | + .nr_clk_ids = CLKS_NR_DPU, |
1811 | 1824 | .clk_regs = dpu_clk_regs,
|
1812 | 1825 | .nr_clk_regs = ARRAY_SIZE(dpu_clk_regs),
|
1813 | 1826 | .clk_name = "dout_dpu",
|
|
0 commit comments