diff options
-rw-r--r-- | arch/arm/mach-omap2/clock34xx_data.c | 66 | ||||
-rw-r--r-- | arch/arm/mach-omap2/cm-regbits-34xx.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/id.c | 3 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/cpu.h | 2 |
4 files changed, 65 insertions, 8 deletions
diff --git a/arch/arm/mach-omap2/clock34xx_data.c b/arch/arm/mach-omap2/clock34xx_data.c index 4dd5926ad980..da71ef17cb11 100644 --- a/arch/arm/mach-omap2/clock34xx_data.c +++ b/arch/arm/mach-omap2/clock34xx_data.c | |||
@@ -692,18 +692,24 @@ static struct clk dpll4_m2x2_ck = { | |||
692 | * 96M_ALWON_FCLK (called "omap_96m_alwon_fck" below) and | 692 | * 96M_ALWON_FCLK (called "omap_96m_alwon_fck" below) and |
693 | * CM_96K_(F)CLK. | 693 | * CM_96K_(F)CLK. |
694 | */ | 694 | */ |
695 | static struct clk omap_96m_alwon_fck = { | 695 | |
696 | .name = "omap_96m_alwon_fck", | 696 | /* Adding 192MHz Clock node needed by SGX */ |
697 | static struct clk omap_192m_alwon_fck = { | ||
698 | .name = "omap_192m_alwon_fck", | ||
697 | .ops = &clkops_null, | 699 | .ops = &clkops_null, |
698 | .parent = &dpll4_m2x2_ck, | 700 | .parent = &dpll4_m2x2_ck, |
699 | .recalc = &followparent_recalc, | 701 | .recalc = &followparent_recalc, |
700 | }; | 702 | }; |
701 | 703 | ||
702 | static struct clk cm_96m_fck = { | 704 | static const struct clksel_rate omap_96m_alwon_fck_rates[] = { |
703 | .name = "cm_96m_fck", | 705 | { .div = 1, .val = 1, .flags = RATE_IN_36XX }, |
704 | .ops = &clkops_null, | 706 | { .div = 2, .val = 2, .flags = RATE_IN_36XX | DEFAULT_RATE }, |
705 | .parent = &omap_96m_alwon_fck, | 707 | { .div = 0 } |
706 | .recalc = &followparent_recalc, | 708 | }; |
709 | |||
710 | static const struct clksel omap_96m_alwon_fck_clksel[] = { | ||
711 | { .parent = &omap_192m_alwon_fck, .rates = omap_96m_alwon_fck_rates }, | ||
712 | { .parent = NULL } | ||
707 | }; | 713 | }; |
708 | 714 | ||
709 | static const struct clksel_rate omap_96m_dpll_rates[] = { | 715 | static const struct clksel_rate omap_96m_dpll_rates[] = { |
@@ -716,6 +722,31 @@ static const struct clksel_rate omap_96m_sys_rates[] = { | |||
716 | { .div = 0 } | 722 | { .div = 0 } |
717 | }; | 723 | }; |
718 | 724 | ||
725 | static struct clk omap_96m_alwon_fck = { | ||
726 | .name = "omap_96m_alwon_fck", | ||
727 | .ops = &clkops_null, | ||
728 | .parent = &dpll4_m2x2_ck, | ||
729 | .recalc = &followparent_recalc, | ||
730 | }; | ||
731 | |||
732 | static struct clk omap_96m_alwon_fck_3630 = { | ||
733 | .name = "omap_96m_alwon_fck", | ||
734 | .parent = &omap_192m_alwon_fck, | ||
735 | .init = &omap2_init_clksel_parent, | ||
736 | .ops = &clkops_null, | ||
737 | .recalc = &omap2_clksel_recalc, | ||
738 | .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL), | ||
739 | .clksel_mask = OMAP3630_CLKSEL_96M_MASK, | ||
740 | .clksel = omap_96m_alwon_fck_clksel | ||
741 | }; | ||
742 | |||
743 | static struct clk cm_96m_fck = { | ||
744 | .name = "cm_96m_fck", | ||
745 | .ops = &clkops_null, | ||
746 | .parent = &omap_96m_alwon_fck, | ||
747 | .recalc = &followparent_recalc, | ||
748 | }; | ||
749 | |||
719 | static const struct clksel omap_96m_fck_clksel[] = { | 750 | static const struct clksel omap_96m_fck_clksel[] = { |
720 | { .parent = &cm_96m_fck, .rates = omap_96m_dpll_rates }, | 751 | { .parent = &cm_96m_fck, .rates = omap_96m_dpll_rates }, |
721 | { .parent = &sys_ck, .rates = omap_96m_sys_rates }, | 752 | { .parent = &sys_ck, .rates = omap_96m_sys_rates }, |
@@ -1304,12 +1335,24 @@ static struct clk gfx_cg2_ck = { | |||
1304 | /* SGX power domain - 3430ES2 only */ | 1335 | /* SGX power domain - 3430ES2 only */ |
1305 | 1336 | ||
1306 | static const struct clksel_rate sgx_core_rates[] = { | 1337 | static const struct clksel_rate sgx_core_rates[] = { |
1338 | { .div = 2, .val = 5, .flags = RATE_IN_36XX }, | ||
1307 | { .div = 3, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE }, | 1339 | { .div = 3, .val = 0, .flags = RATE_IN_343X | DEFAULT_RATE }, |
1308 | { .div = 4, .val = 1, .flags = RATE_IN_343X }, | 1340 | { .div = 4, .val = 1, .flags = RATE_IN_343X }, |
1309 | { .div = 6, .val = 2, .flags = RATE_IN_343X }, | 1341 | { .div = 6, .val = 2, .flags = RATE_IN_343X }, |
1310 | { .div = 0 }, | 1342 | { .div = 0 }, |
1311 | }; | 1343 | }; |
1312 | 1344 | ||
1345 | static const struct clksel_rate sgx_192m_rates[] = { | ||
1346 | { .div = 1, .val = 4, .flags = RATE_IN_36XX | DEFAULT_RATE }, | ||
1347 | { .div = 0 }, | ||
1348 | }; | ||
1349 | |||
1350 | static const struct clksel_rate sgx_corex2_rates[] = { | ||
1351 | { .div = 3, .val = 6, .flags = RATE_IN_36XX | DEFAULT_RATE }, | ||
1352 | { .div = 5, .val = 7, .flags = RATE_IN_36XX }, | ||
1353 | { .div = 0 }, | ||
1354 | }; | ||
1355 | |||
1313 | static const struct clksel_rate sgx_96m_rates[] = { | 1356 | static const struct clksel_rate sgx_96m_rates[] = { |
1314 | { .div = 1, .val = 3, .flags = RATE_IN_343X | DEFAULT_RATE }, | 1357 | { .div = 1, .val = 3, .flags = RATE_IN_343X | DEFAULT_RATE }, |
1315 | { .div = 0 }, | 1358 | { .div = 0 }, |
@@ -1318,7 +1361,9 @@ static const struct clksel_rate sgx_96m_rates[] = { | |||
1318 | static const struct clksel sgx_clksel[] = { | 1361 | static const struct clksel sgx_clksel[] = { |
1319 | { .parent = &core_ck, .rates = sgx_core_rates }, | 1362 | { .parent = &core_ck, .rates = sgx_core_rates }, |
1320 | { .parent = &cm_96m_fck, .rates = sgx_96m_rates }, | 1363 | { .parent = &cm_96m_fck, .rates = sgx_96m_rates }, |
1321 | { .parent = NULL }, | 1364 | { .parent = &omap_192m_alwon_fck, .rates = sgx_192m_rates }, |
1365 | { .parent = &corex2_fck, .rates = sgx_corex2_rates }, | ||
1366 | { .parent = NULL } | ||
1322 | }; | 1367 | }; |
1323 | 1368 | ||
1324 | static struct clk sgx_fck = { | 1369 | static struct clk sgx_fck = { |
@@ -1332,6 +1377,8 @@ static struct clk sgx_fck = { | |||
1332 | .clksel = sgx_clksel, | 1377 | .clksel = sgx_clksel, |
1333 | .clkdm_name = "sgx_clkdm", | 1378 | .clkdm_name = "sgx_clkdm", |
1334 | .recalc = &omap2_clksel_recalc, | 1379 | .recalc = &omap2_clksel_recalc, |
1380 | .set_rate = &omap2_clksel_set_rate, | ||
1381 | .round_rate = &omap2_clksel_round_rate | ||
1335 | }; | 1382 | }; |
1336 | 1383 | ||
1337 | static struct clk sgx_ick = { | 1384 | static struct clk sgx_ick = { |
@@ -3262,6 +3309,7 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3262 | CLK("etb", "emu_core_alwon_ck", &emu_core_alwon_ck, CK_3XXX), | 3309 | CLK("etb", "emu_core_alwon_ck", &emu_core_alwon_ck, CK_3XXX), |
3263 | CLK(NULL, "dpll4_ck", &dpll4_ck, CK_3XXX), | 3310 | CLK(NULL, "dpll4_ck", &dpll4_ck, CK_3XXX), |
3264 | CLK(NULL, "dpll4_x2_ck", &dpll4_x2_ck, CK_3XXX), | 3311 | CLK(NULL, "dpll4_x2_ck", &dpll4_x2_ck, CK_3XXX), |
3312 | CLK(NULL, "omap_192m_alwon_fck", &omap_192m_alwon_fck, CK_36XX), | ||
3265 | CLK(NULL, "omap_96m_alwon_fck", &omap_96m_alwon_fck, CK_3XXX), | 3313 | CLK(NULL, "omap_96m_alwon_fck", &omap_96m_alwon_fck, CK_3XXX), |
3266 | CLK(NULL, "omap_96m_fck", &omap_96m_fck, CK_3XXX), | 3314 | CLK(NULL, "omap_96m_fck", &omap_96m_fck, CK_3XXX), |
3267 | CLK(NULL, "cm_96m_fck", &cm_96m_fck, CK_3XXX), | 3315 | CLK(NULL, "cm_96m_fck", &cm_96m_fck, CK_3XXX), |
@@ -3495,6 +3543,8 @@ int __init omap3xxx_clk_init(void) | |||
3495 | cpu_clkflg |= CK_3430ES2; | 3543 | cpu_clkflg |= CK_3430ES2; |
3496 | } | 3544 | } |
3497 | } | 3545 | } |
3546 | if (omap3_has_192mhz_clk()) | ||
3547 | omap_96m_alwon_fck = omap_96m_alwon_fck_3630; | ||
3498 | 3548 | ||
3499 | if (cpu_is_omap3630()) { | 3549 | if (cpu_is_omap3630()) { |
3500 | cpu_mask |= RATE_IN_36XX; | 3550 | cpu_mask |= RATE_IN_36XX; |
diff --git a/arch/arm/mach-omap2/cm-regbits-34xx.h b/arch/arm/mach-omap2/cm-regbits-34xx.h index e6a724cc63f1..a3a3ca07e383 100644 --- a/arch/arm/mach-omap2/cm-regbits-34xx.h +++ b/arch/arm/mach-omap2/cm-regbits-34xx.h | |||
@@ -346,6 +346,8 @@ | |||
346 | #define OMAP3430_CLKSEL_L4_MASK (0x3 << 2) | 346 | #define OMAP3430_CLKSEL_L4_MASK (0x3 << 2) |
347 | #define OMAP3430_CLKSEL_L3_SHIFT 0 | 347 | #define OMAP3430_CLKSEL_L3_SHIFT 0 |
348 | #define OMAP3430_CLKSEL_L3_MASK (0x3 << 0) | 348 | #define OMAP3430_CLKSEL_L3_MASK (0x3 << 0) |
349 | #define OMAP3630_CLKSEL_96M_SHIFT 12 | ||
350 | #define OMAP3630_CLKSEL_96M_MASK (0x3 << 12) | ||
349 | 351 | ||
350 | /* CM_CLKSTCTRL_CORE */ | 352 | /* CM_CLKSTCTRL_CORE */ |
351 | #define OMAP3430ES1_CLKTRCTRL_D2D_SHIFT 4 | 353 | #define OMAP3430ES1_CLKTRCTRL_D2D_SHIFT 4 |
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 9e7c4aeeae02..d2897a6fe491 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c | |||
@@ -175,6 +175,8 @@ void __init omap3_check_features(void) | |||
175 | OMAP3_CHECK_FEATURE(status, SGX); | 175 | OMAP3_CHECK_FEATURE(status, SGX); |
176 | OMAP3_CHECK_FEATURE(status, NEON); | 176 | OMAP3_CHECK_FEATURE(status, NEON); |
177 | OMAP3_CHECK_FEATURE(status, ISP); | 177 | OMAP3_CHECK_FEATURE(status, ISP); |
178 | if (cpu_is_omap3630()) | ||
179 | omap3_features |= OMAP3_HAS_192MHZ_CLK; | ||
178 | 180 | ||
179 | /* | 181 | /* |
180 | * TODO: Get additional info (where applicable) | 182 | * TODO: Get additional info (where applicable) |
@@ -359,6 +361,7 @@ void __init omap3_cpuinfo(void) | |||
359 | OMAP3_SHOW_FEATURE(sgx); | 361 | OMAP3_SHOW_FEATURE(sgx); |
360 | OMAP3_SHOW_FEATURE(neon); | 362 | OMAP3_SHOW_FEATURE(neon); |
361 | OMAP3_SHOW_FEATURE(isp); | 363 | OMAP3_SHOW_FEATURE(isp); |
364 | OMAP3_SHOW_FEATURE(192mhz_clk); | ||
362 | 365 | ||
363 | printk(")\n"); | 366 | printk(")\n"); |
364 | } | 367 | } |
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index b80151c1ee61..ed8786c41df2 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h | |||
@@ -439,6 +439,7 @@ extern u32 omap3_features; | |||
439 | #define OMAP3_HAS_SGX BIT(2) | 439 | #define OMAP3_HAS_SGX BIT(2) |
440 | #define OMAP3_HAS_NEON BIT(3) | 440 | #define OMAP3_HAS_NEON BIT(3) |
441 | #define OMAP3_HAS_ISP BIT(4) | 441 | #define OMAP3_HAS_ISP BIT(4) |
442 | #define OMAP3_HAS_192MHZ_CLK BIT(5) | ||
442 | 443 | ||
443 | #define OMAP3_HAS_FEATURE(feat,flag) \ | 444 | #define OMAP3_HAS_FEATURE(feat,flag) \ |
444 | static inline unsigned int omap3_has_ ##feat(void) \ | 445 | static inline unsigned int omap3_has_ ##feat(void) \ |
@@ -451,5 +452,6 @@ OMAP3_HAS_FEATURE(sgx, SGX) | |||
451 | OMAP3_HAS_FEATURE(iva, IVA) | 452 | OMAP3_HAS_FEATURE(iva, IVA) |
452 | OMAP3_HAS_FEATURE(neon, NEON) | 453 | OMAP3_HAS_FEATURE(neon, NEON) |
453 | OMAP3_HAS_FEATURE(isp, ISP) | 454 | OMAP3_HAS_FEATURE(isp, ISP) |
455 | OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK) | ||
454 | 456 | ||
455 | #endif | 457 | #endif |