diff options
Diffstat (limited to 'arch/arm/mach-omap2/clock34xx_data.c')
-rw-r--r-- | arch/arm/mach-omap2/clock34xx_data.c | 66 |
1 files changed, 58 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; |