diff options
| -rw-r--r-- | arch/arm/mach-omap2/cclock33xx_data.c | 5 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/cclock44xx_data.c | 20 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 4 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 69 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 42 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/powerdomains3xxx_data.c | 8 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/prcm-common.h | 1 |
7 files changed, 118 insertions, 31 deletions
diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c index ba6534d7f155..865d30ee812f 100644 --- a/arch/arm/mach-omap2/cclock33xx_data.c +++ b/arch/arm/mach-omap2/cclock33xx_data.c | |||
| @@ -421,6 +421,10 @@ static struct clk aes0_fck; | |||
| 421 | DEFINE_STRUCT_CLK_HW_OMAP(aes0_fck, NULL); | 421 | DEFINE_STRUCT_CLK_HW_OMAP(aes0_fck, NULL); |
| 422 | DEFINE_STRUCT_CLK(aes0_fck, dpll_core_ck_parents, clk_ops_null); | 422 | DEFINE_STRUCT_CLK(aes0_fck, dpll_core_ck_parents, clk_ops_null); |
| 423 | 423 | ||
| 424 | static struct clk rng_fck; | ||
| 425 | DEFINE_STRUCT_CLK_HW_OMAP(rng_fck, NULL); | ||
| 426 | DEFINE_STRUCT_CLK(rng_fck, dpll_core_ck_parents, clk_ops_null); | ||
| 427 | |||
| 424 | /* | 428 | /* |
| 425 | * Modules clock nodes | 429 | * Modules clock nodes |
| 426 | * | 430 | * |
| @@ -966,6 +970,7 @@ static struct omap_clk am33xx_clks[] = { | |||
| 966 | CLK(NULL, "smartreflex1_fck", &smartreflex1_fck), | 970 | CLK(NULL, "smartreflex1_fck", &smartreflex1_fck), |
| 967 | CLK(NULL, "sha0_fck", &sha0_fck), | 971 | CLK(NULL, "sha0_fck", &sha0_fck), |
| 968 | CLK(NULL, "aes0_fck", &aes0_fck), | 972 | CLK(NULL, "aes0_fck", &aes0_fck), |
| 973 | CLK(NULL, "rng_fck", &rng_fck), | ||
| 969 | CLK(NULL, "timer1_fck", &timer1_fck), | 974 | CLK(NULL, "timer1_fck", &timer1_fck), |
| 970 | CLK(NULL, "timer2_fck", &timer2_fck), | 975 | CLK(NULL, "timer2_fck", &timer2_fck), |
| 971 | CLK(NULL, "timer3_fck", &timer3_fck), | 976 | CLK(NULL, "timer3_fck", &timer3_fck), |
diff --git a/arch/arm/mach-omap2/cclock44xx_data.c b/arch/arm/mach-omap2/cclock44xx_data.c index 88e37a474334..1d5b5290d2af 100644 --- a/arch/arm/mach-omap2/cclock44xx_data.c +++ b/arch/arm/mach-omap2/cclock44xx_data.c | |||
| @@ -1707,6 +1707,18 @@ int __init omap4xxx_clk_init(void) | |||
| 1707 | omap2_clk_disable_autoidle_all(); | 1707 | omap2_clk_disable_autoidle_all(); |
| 1708 | 1708 | ||
| 1709 | /* | 1709 | /* |
| 1710 | * A set rate of ABE DPLL inturn triggers a set rate of USB DPLL | ||
| 1711 | * when its in bypass. So always lock USB before ABE DPLL. | ||
| 1712 | */ | ||
| 1713 | /* | ||
| 1714 | * Lock USB DPLL on OMAP4 devices so that the L3INIT power | ||
| 1715 | * domain can transition to retention state when not in use. | ||
| 1716 | */ | ||
| 1717 | rc = clk_set_rate(&dpll_usb_ck, OMAP4_DPLL_USB_DEFFREQ); | ||
| 1718 | if (rc) | ||
| 1719 | pr_err("%s: failed to configure USB DPLL!\n", __func__); | ||
| 1720 | |||
| 1721 | /* | ||
| 1710 | * On OMAP4460 the ABE DPLL fails to turn on if in idle low-power | 1722 | * On OMAP4460 the ABE DPLL fails to turn on if in idle low-power |
| 1711 | * state when turning the ABE clock domain. Workaround this by | 1723 | * state when turning the ABE clock domain. Workaround this by |
| 1712 | * locking the ABE DPLL on boot. | 1724 | * locking the ABE DPLL on boot. |
| @@ -1718,13 +1730,5 @@ int __init omap4xxx_clk_init(void) | |||
| 1718 | if (rc) | 1730 | if (rc) |
| 1719 | pr_err("%s: failed to configure ABE DPLL!\n", __func__); | 1731 | pr_err("%s: failed to configure ABE DPLL!\n", __func__); |
| 1720 | 1732 | ||
| 1721 | /* | ||
| 1722 | * Lock USB DPLL on OMAP4 devices so that the L3INIT power | ||
| 1723 | * domain can transition to retention state when not in use. | ||
| 1724 | */ | ||
| 1725 | rc = clk_set_rate(&dpll_usb_ck, OMAP4_DPLL_USB_DEFFREQ); | ||
| 1726 | if (rc) | ||
| 1727 | pr_err("%s: failed to configure USB DPLL!\n", __func__); | ||
| 1728 | |||
| 1729 | return 0; | 1733 | return 0; |
| 1730 | } | 1734 | } |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 7f4db12b1459..03e9e2f5d9a7 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
| @@ -1405,7 +1405,9 @@ static void _enable_sysc(struct omap_hwmod *oh) | |||
| 1405 | (sf & SYSC_HAS_CLOCKACTIVITY)) | 1405 | (sf & SYSC_HAS_CLOCKACTIVITY)) |
| 1406 | _set_clockactivity(oh, oh->class->sysc->clockact, &v); | 1406 | _set_clockactivity(oh, oh->class->sysc->clockact, &v); |
| 1407 | 1407 | ||
| 1408 | _write_sysconfig(v, oh); | 1408 | /* If the cached value is the same as the new value, skip the write */ |
| 1409 | if (oh->_sysc_cache != v) | ||
| 1410 | _write_sysconfig(v, oh); | ||
| 1409 | 1411 | ||
| 1410 | /* | 1412 | /* |
| 1411 | * Set the autoidle bit only after setting the smartidle bit | 1413 | * Set the autoidle bit only after setting the smartidle bit |
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c index eb2f3b93b51c..215894f8910d 100644 --- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c | |||
| @@ -325,7 +325,6 @@ static struct omap_hwmod am33xx_adc_tsc_hwmod = { | |||
| 325 | * | 325 | * |
| 326 | * - cEFUSE (doesn't fall under any ocp_if) | 326 | * - cEFUSE (doesn't fall under any ocp_if) |
| 327 | * - clkdiv32k | 327 | * - clkdiv32k |
| 328 | * - debugss | ||
| 329 | * - ocp watch point | 328 | * - ocp watch point |
| 330 | */ | 329 | */ |
| 331 | #if 0 | 330 | #if 0 |
| @@ -369,27 +368,6 @@ static struct omap_hwmod am33xx_clkdiv32k_hwmod = { | |||
| 369 | }, | 368 | }, |
| 370 | }; | 369 | }; |
| 371 | 370 | ||
| 372 | /* | ||
| 373 | * 'debugss' class | ||
| 374 | * debug sub system | ||
| 375 | */ | ||
| 376 | static struct omap_hwmod_class am33xx_debugss_hwmod_class = { | ||
| 377 | .name = "debugss", | ||
| 378 | }; | ||
| 379 | |||
| 380 | static struct omap_hwmod am33xx_debugss_hwmod = { | ||
| 381 | .name = "debugss", | ||
| 382 | .class = &am33xx_debugss_hwmod_class, | ||
| 383 | .clkdm_name = "l3_aon_clkdm", | ||
| 384 | .main_clk = "debugss_ick", | ||
| 385 | .prcm = { | ||
| 386 | .omap4 = { | ||
| 387 | .clkctrl_offs = AM33XX_CM_WKUP_DEBUGSS_CLKCTRL_OFFSET, | ||
| 388 | .modulemode = MODULEMODE_SWCTRL, | ||
| 389 | }, | ||
| 390 | }, | ||
| 391 | }; | ||
| 392 | |||
| 393 | /* ocpwp */ | 371 | /* ocpwp */ |
| 394 | static struct omap_hwmod_class am33xx_ocpwp_hwmod_class = { | 372 | static struct omap_hwmod_class am33xx_ocpwp_hwmod_class = { |
| 395 | .name = "ocpwp", | 373 | .name = "ocpwp", |
| @@ -482,6 +460,34 @@ static struct omap_hwmod am33xx_ocmcram_hwmod = { | |||
| 482 | }, | 460 | }, |
| 483 | }; | 461 | }; |
| 484 | 462 | ||
| 463 | /* | ||
| 464 | * 'debugss' class | ||
| 465 | * debug sub system | ||
| 466 | */ | ||
| 467 | static struct omap_hwmod_opt_clk debugss_opt_clks[] = { | ||
| 468 | { .role = "dbg_sysclk", .clk = "dbg_sysclk_ck" }, | ||
| 469 | { .role = "dbg_clka", .clk = "dbg_clka_ck" }, | ||
| 470 | }; | ||
| 471 | |||
| 472 | static struct omap_hwmod_class am33xx_debugss_hwmod_class = { | ||
| 473 | .name = "debugss", | ||
| 474 | }; | ||
| 475 | |||
| 476 | static struct omap_hwmod am33xx_debugss_hwmod = { | ||
| 477 | .name = "debugss", | ||
| 478 | .class = &am33xx_debugss_hwmod_class, | ||
| 479 | .clkdm_name = "l3_aon_clkdm", | ||
| 480 | .main_clk = "trace_clk_div_ck", | ||
| 481 | .prcm = { | ||
| 482 | .omap4 = { | ||
| 483 | .clkctrl_offs = AM33XX_CM_WKUP_DEBUGSS_CLKCTRL_OFFSET, | ||
| 484 | .modulemode = MODULEMODE_SWCTRL, | ||
| 485 | }, | ||
| 486 | }, | ||
| 487 | .opt_clks = debugss_opt_clks, | ||
| 488 | .opt_clks_cnt = ARRAY_SIZE(debugss_opt_clks), | ||
| 489 | }; | ||
| 490 | |||
| 485 | /* 'smartreflex' class */ | 491 | /* 'smartreflex' class */ |
| 486 | static struct omap_hwmod_class am33xx_smartreflex_hwmod_class = { | 492 | static struct omap_hwmod_class am33xx_smartreflex_hwmod_class = { |
| 487 | .name = "smartreflex", | 493 | .name = "smartreflex", |
| @@ -1796,6 +1802,24 @@ static struct omap_hwmod_ocp_if am33xx_l3_main__gfx = { | |||
| 1796 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1802 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1797 | }; | 1803 | }; |
| 1798 | 1804 | ||
| 1805 | /* l3_main -> debugss */ | ||
| 1806 | static struct omap_hwmod_addr_space am33xx_debugss_addrs[] = { | ||
| 1807 | { | ||
| 1808 | .pa_start = 0x4b000000, | ||
| 1809 | .pa_end = 0x4b000000 + SZ_16M - 1, | ||
| 1810 | .flags = ADDR_TYPE_RT | ||
| 1811 | }, | ||
| 1812 | { } | ||
| 1813 | }; | ||
| 1814 | |||
| 1815 | static struct omap_hwmod_ocp_if am33xx_l3_main__debugss = { | ||
| 1816 | .master = &am33xx_l3_main_hwmod, | ||
| 1817 | .slave = &am33xx_debugss_hwmod, | ||
| 1818 | .clk = "dpll_core_m4_ck", | ||
| 1819 | .addr = am33xx_debugss_addrs, | ||
| 1820 | .user = OCP_USER_MPU, | ||
| 1821 | }; | ||
| 1822 | |||
| 1799 | /* l4 wkup -> smartreflex0 */ | 1823 | /* l4 wkup -> smartreflex0 */ |
| 1800 | static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex0 = { | 1824 | static struct omap_hwmod_ocp_if am33xx_l4_wkup__smartreflex0 = { |
| 1801 | .master = &am33xx_l4_wkup_hwmod, | 1825 | .master = &am33xx_l4_wkup_hwmod, |
| @@ -2470,6 +2494,7 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = { | |||
| 2470 | &am33xx_pruss__l3_main, | 2494 | &am33xx_pruss__l3_main, |
| 2471 | &am33xx_wkup_m3__l4_wkup, | 2495 | &am33xx_wkup_m3__l4_wkup, |
| 2472 | &am33xx_gfx__l3_main, | 2496 | &am33xx_gfx__l3_main, |
| 2497 | &am33xx_l3_main__debugss, | ||
| 2473 | &am33xx_l4_wkup__wkup_m3, | 2498 | &am33xx_l4_wkup__wkup_m3, |
| 2474 | &am33xx_l4_wkup__control, | 2499 | &am33xx_l4_wkup__control, |
| 2475 | &am33xx_l4_wkup__smartreflex0, | 2500 | &am33xx_l4_wkup__smartreflex0, |
diff --git a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c index 3c70f5c1860f..7996ca5538e5 100644 --- a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c | |||
| @@ -741,6 +741,39 @@ static struct omap_hwmod omap54xx_kbd_hwmod = { | |||
| 741 | }; | 741 | }; |
| 742 | 742 | ||
| 743 | /* | 743 | /* |
| 744 | * 'mailbox' class | ||
| 745 | * mailbox module allowing communication between the on-chip processors using a | ||
| 746 | * queued mailbox-interrupt mechanism. | ||
| 747 | */ | ||
| 748 | |||
| 749 | static struct omap_hwmod_class_sysconfig omap54xx_mailbox_sysc = { | ||
| 750 | .rev_offs = 0x0000, | ||
| 751 | .sysc_offs = 0x0010, | ||
| 752 | .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE | | ||
| 753 | SYSC_HAS_SOFTRESET), | ||
| 754 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
| 755 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
| 756 | }; | ||
| 757 | |||
| 758 | static struct omap_hwmod_class omap54xx_mailbox_hwmod_class = { | ||
| 759 | .name = "mailbox", | ||
| 760 | .sysc = &omap54xx_mailbox_sysc, | ||
| 761 | }; | ||
| 762 | |||
| 763 | /* mailbox */ | ||
| 764 | static struct omap_hwmod omap54xx_mailbox_hwmod = { | ||
| 765 | .name = "mailbox", | ||
| 766 | .class = &omap54xx_mailbox_hwmod_class, | ||
| 767 | .clkdm_name = "l4cfg_clkdm", | ||
| 768 | .prcm = { | ||
| 769 | .omap4 = { | ||
| 770 | .clkctrl_offs = OMAP54XX_CM_L4CFG_MAILBOX_CLKCTRL_OFFSET, | ||
| 771 | .context_offs = OMAP54XX_RM_L4CFG_MAILBOX_CONTEXT_OFFSET, | ||
| 772 | }, | ||
| 773 | }, | ||
| 774 | }; | ||
| 775 | |||
| 776 | /* | ||
| 744 | * 'mcbsp' class | 777 | * 'mcbsp' class |
| 745 | * multi channel buffered serial port controller | 778 | * multi channel buffered serial port controller |
| 746 | */ | 779 | */ |
| @@ -1808,6 +1841,14 @@ static struct omap_hwmod_ocp_if omap54xx_l4_wkup__kbd = { | |||
| 1808 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 1841 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
| 1809 | }; | 1842 | }; |
| 1810 | 1843 | ||
| 1844 | /* l4_cfg -> mailbox */ | ||
| 1845 | static struct omap_hwmod_ocp_if omap54xx_l4_cfg__mailbox = { | ||
| 1846 | .master = &omap54xx_l4_cfg_hwmod, | ||
| 1847 | .slave = &omap54xx_mailbox_hwmod, | ||
| 1848 | .clk = "l4_root_clk_div", | ||
| 1849 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
| 1850 | }; | ||
| 1851 | |||
| 1811 | /* l4_abe -> mcbsp1 */ | 1852 | /* l4_abe -> mcbsp1 */ |
| 1812 | static struct omap_hwmod_ocp_if omap54xx_l4_abe__mcbsp1 = { | 1853 | static struct omap_hwmod_ocp_if omap54xx_l4_abe__mcbsp1 = { |
| 1813 | .master = &omap54xx_l4_abe_hwmod, | 1854 | .master = &omap54xx_l4_abe_hwmod, |
| @@ -2108,6 +2149,7 @@ static struct omap_hwmod_ocp_if *omap54xx_hwmod_ocp_ifs[] __initdata = { | |||
| 2108 | &omap54xx_l4_per__i2c4, | 2149 | &omap54xx_l4_per__i2c4, |
| 2109 | &omap54xx_l4_per__i2c5, | 2150 | &omap54xx_l4_per__i2c5, |
| 2110 | &omap54xx_l4_wkup__kbd, | 2151 | &omap54xx_l4_wkup__kbd, |
| 2152 | &omap54xx_l4_cfg__mailbox, | ||
| 2111 | &omap54xx_l4_abe__mcbsp1, | 2153 | &omap54xx_l4_abe__mcbsp1, |
| 2112 | &omap54xx_l4_abe__mcbsp2, | 2154 | &omap54xx_l4_abe__mcbsp2, |
| 2113 | &omap54xx_l4_abe__mcbsp3, | 2155 | &omap54xx_l4_abe__mcbsp3, |
diff --git a/arch/arm/mach-omap2/powerdomains3xxx_data.c b/arch/arm/mach-omap2/powerdomains3xxx_data.c index e2d4bd804523..328c1037cb60 100644 --- a/arch/arm/mach-omap2/powerdomains3xxx_data.c +++ b/arch/arm/mach-omap2/powerdomains3xxx_data.c | |||
| @@ -336,6 +336,13 @@ static struct powerdomain dpll5_pwrdm = { | |||
| 336 | .voltdm = { .name = "core" }, | 336 | .voltdm = { .name = "core" }, |
| 337 | }; | 337 | }; |
| 338 | 338 | ||
| 339 | static struct powerdomain alwon_81xx_pwrdm = { | ||
| 340 | .name = "alwon_pwrdm", | ||
| 341 | .prcm_offs = TI81XX_PRM_ALWON_MOD, | ||
| 342 | .pwrsts = PWRSTS_OFF_ON, | ||
| 343 | .voltdm = { .name = "core" }, | ||
| 344 | }; | ||
| 345 | |||
| 339 | static struct powerdomain device_81xx_pwrdm = { | 346 | static struct powerdomain device_81xx_pwrdm = { |
| 340 | .name = "device_pwrdm", | 347 | .name = "device_pwrdm", |
| 341 | .prcm_offs = TI81XX_PRM_DEVICE_MOD, | 348 | .prcm_offs = TI81XX_PRM_DEVICE_MOD, |
| @@ -442,6 +449,7 @@ static struct powerdomain *powerdomains_am35x[] __initdata = { | |||
| 442 | }; | 449 | }; |
| 443 | 450 | ||
| 444 | static struct powerdomain *powerdomains_ti81xx[] __initdata = { | 451 | static struct powerdomain *powerdomains_ti81xx[] __initdata = { |
| 452 | &alwon_81xx_pwrdm, | ||
| 445 | &device_81xx_pwrdm, | 453 | &device_81xx_pwrdm, |
| 446 | &active_816x_pwrdm, | 454 | &active_816x_pwrdm, |
| 447 | &default_816x_pwrdm, | 455 | &default_816x_pwrdm, |
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h index ff1ac4a82a04..0e841fd9498a 100644 --- a/arch/arm/mach-omap2/prcm-common.h +++ b/arch/arm/mach-omap2/prcm-common.h | |||
| @@ -58,6 +58,7 @@ | |||
| 58 | #define TI816X_PRM_IVAHD1_MOD 0x0d00 | 58 | #define TI816X_PRM_IVAHD1_MOD 0x0d00 |
| 59 | #define TI816X_PRM_IVAHD2_MOD 0x0e00 | 59 | #define TI816X_PRM_IVAHD2_MOD 0x0e00 |
| 60 | #define TI816X_PRM_SGX_MOD 0x0f00 | 60 | #define TI816X_PRM_SGX_MOD 0x0f00 |
| 61 | #define TI81XX_PRM_ALWON_MOD 0x1800 | ||
| 61 | 62 | ||
| 62 | /* 24XX register bits shared between CM & PRM registers */ | 63 | /* 24XX register bits shared between CM & PRM registers */ |
| 63 | 64 | ||
