|
138 | 138 | /* the exynos4 soc type */
|
139 | 139 | enum exynos4_soc {
|
140 | 140 | EXYNOS4210,
|
141 |
| - EXYNOS4X12, |
| 141 | + EXYNOS4212, |
| 142 | + EXYNOS4412, |
142 | 143 | };
|
143 | 144 |
|
144 | 145 | /* list of PLLs to be registered */
|
@@ -1205,6 +1206,24 @@ static const struct exynos_cpuclk_cfg_data e4210_armclk_d[] __initconst = {
|
1205 | 1206 | { 0 },
|
1206 | 1207 | };
|
1207 | 1208 |
|
| 1209 | +static const struct exynos_cpuclk_cfg_data e4212_armclk_d[] __initconst = { |
| 1210 | + { 1500000, E4210_CPU_DIV0(2, 1, 6, 0, 7, 3), E4210_CPU_DIV1(2, 6), }, |
| 1211 | + { 1400000, E4210_CPU_DIV0(2, 1, 6, 0, 7, 3), E4210_CPU_DIV1(2, 6), }, |
| 1212 | + { 1300000, E4210_CPU_DIV0(2, 1, 5, 0, 7, 3), E4210_CPU_DIV1(2, 5), }, |
| 1213 | + { 1200000, E4210_CPU_DIV0(2, 1, 5, 0, 7, 3), E4210_CPU_DIV1(2, 5), }, |
| 1214 | + { 1100000, E4210_CPU_DIV0(2, 1, 4, 0, 6, 3), E4210_CPU_DIV1(2, 4), }, |
| 1215 | + { 1000000, E4210_CPU_DIV0(1, 1, 4, 0, 5, 2), E4210_CPU_DIV1(2, 4), }, |
| 1216 | + { 900000, E4210_CPU_DIV0(1, 1, 3, 0, 5, 2), E4210_CPU_DIV1(2, 3), }, |
| 1217 | + { 800000, E4210_CPU_DIV0(1, 1, 3, 0, 5, 2), E4210_CPU_DIV1(2, 3), }, |
| 1218 | + { 700000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4210_CPU_DIV1(2, 3), }, |
| 1219 | + { 600000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4210_CPU_DIV1(2, 3), }, |
| 1220 | + { 500000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4210_CPU_DIV1(2, 3), }, |
| 1221 | + { 400000, E4210_CPU_DIV0(1, 1, 3, 0, 4, 2), E4210_CPU_DIV1(2, 3), }, |
| 1222 | + { 300000, E4210_CPU_DIV0(1, 1, 2, 0, 4, 2), E4210_CPU_DIV1(2, 3), }, |
| 1223 | + { 200000, E4210_CPU_DIV0(1, 1, 1, 0, 3, 1), E4210_CPU_DIV1(2, 3), }, |
| 1224 | + { 0 }, |
| 1225 | +}; |
| 1226 | + |
1208 | 1227 | #define E4412_CPU_DIV1(cores, hpm, copy) \
|
1209 | 1228 | (((cores) << 8) | ((hpm) << 4) | ((copy) << 0))
|
1210 | 1229 |
|
@@ -1233,6 +1252,11 @@ static const struct samsung_cpu_clock exynos4210_cpu_clks[] __initconst = {
|
1233 | 1252 | CLK_CPU_NEEDS_DEBUG_ALT_DIV | CLK_CPU_HAS_DIV1, 0x14200, e4210_armclk_d),
|
1234 | 1253 | };
|
1235 | 1254 |
|
| 1255 | +static const struct samsung_cpu_clock exynos4212_cpu_clks[] __initconst = { |
| 1256 | + CPU_CLK(CLK_ARM_CLK, "armclk", CLK_MOUT_APLL, CLK_MOUT_MPLL_USER_C, |
| 1257 | + CLK_CPU_NEEDS_DEBUG_ALT_DIV | CLK_CPU_HAS_DIV1, 0x14200, e4212_armclk_d), |
| 1258 | +}; |
| 1259 | + |
1236 | 1260 | static const struct samsung_cpu_clock exynos4412_cpu_clks[] __initconst = {
|
1237 | 1261 | CPU_CLK(CLK_ARM_CLK, "armclk", CLK_MOUT_APLL, CLK_MOUT_MPLL_USER_C,
|
1238 | 1262 | CLK_CPU_NEEDS_DEBUG_ALT_DIV | CLK_CPU_HAS_DIV1, 0x14200, e4412_armclk_d),
|
@@ -1326,11 +1350,15 @@ static void __init exynos4_clk_init(struct device_node *np,
|
1326 | 1350 | samsung_clk_register_fixed_factor(ctx,
|
1327 | 1351 | exynos4x12_fixed_factor_clks,
|
1328 | 1352 | ARRAY_SIZE(exynos4x12_fixed_factor_clks));
|
1329 |
| - samsung_clk_register_cpu(ctx, exynos4412_cpu_clks, |
1330 |
| - ARRAY_SIZE(exynos4412_cpu_clks)); |
| 1353 | + if (soc == EXYNOS4412) |
| 1354 | + samsung_clk_register_cpu(ctx, exynos4412_cpu_clks, |
| 1355 | + ARRAY_SIZE(exynos4412_cpu_clks)); |
| 1356 | + else |
| 1357 | + samsung_clk_register_cpu(ctx, exynos4212_cpu_clks, |
| 1358 | + ARRAY_SIZE(exynos4212_cpu_clks)); |
1331 | 1359 | }
|
1332 | 1360 |
|
1333 |
| - if (soc == EXYNOS4X12) |
| 1361 | + if (soc == EXYNOS4212 || soc == EXYNOS4412) |
1334 | 1362 | exynos4x12_core_down_clock();
|
1335 | 1363 |
|
1336 | 1364 | samsung_clk_extended_sleep_init(reg_base,
|
@@ -1363,8 +1391,14 @@ static void __init exynos4210_clk_init(struct device_node *np)
|
1363 | 1391 | }
|
1364 | 1392 | CLK_OF_DECLARE(exynos4210_clk, "samsung,exynos4210-clock", exynos4210_clk_init);
|
1365 | 1393 |
|
| 1394 | +static void __init exynos4212_clk_init(struct device_node *np) |
| 1395 | +{ |
| 1396 | + exynos4_clk_init(np, EXYNOS4212); |
| 1397 | +} |
| 1398 | +CLK_OF_DECLARE(exynos4212_clk, "samsung,exynos4212-clock", exynos4212_clk_init); |
| 1399 | + |
1366 | 1400 | static void __init exynos4412_clk_init(struct device_node *np)
|
1367 | 1401 | {
|
1368 |
| - exynos4_clk_init(np, EXYNOS4X12); |
| 1402 | + exynos4_clk_init(np, EXYNOS4412); |
1369 | 1403 | }
|
1370 | 1404 | CLK_OF_DECLARE(exynos4412_clk, "samsung,exynos4412-clock", exynos4412_clk_init);
|
0 commit comments