aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/control.c
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2014-03-04 10:43:04 -0500
committerTero Kristo <t-kristo@ti.com>2014-07-04 10:02:21 -0400
commitba12c24286296159a1271eb19f2fc5c2ef59fbde (patch)
tree4282350c3d4906d60383d9ba66da141b0cd43104 /arch/arm/mach-omap2/control.c
parentc2148e5930cdd2dd964e18fb7057c1e07f63c363 (diff)
ARM: OMAP3: control: isolate control module init to its own function
Control module related PM initializations are now moved within control module driver. Done in preparation to isolate the code to its own driver. Signed-off-by: Tero Kristo <t-kristo@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/control.c')
-rw-r--r--arch/arm/mach-omap2/control.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
index f432ffc0deb2..f4796c002070 100644
--- a/arch/arm/mach-omap2/control.c
+++ b/arch/arm/mach-omap2/control.c
@@ -564,7 +564,7 @@ int omap3_ctrl_save_padconf(void)
564 * Sets the bootmode for IVA2 to idle. This is needed by the PM code to 564 * Sets the bootmode for IVA2 to idle. This is needed by the PM code to
565 * force disable IVA2 so that it does not prevent any low-power states. 565 * force disable IVA2 so that it does not prevent any low-power states.
566 */ 566 */
567void omap3_ctrl_set_iva_bootmode_idle(void) 567static void __init omap3_ctrl_set_iva_bootmode_idle(void)
568{ 568{
569 omap_ctrl_writel(OMAP3_IVA2_BOOTMOD_IDLE, 569 omap_ctrl_writel(OMAP3_IVA2_BOOTMOD_IDLE,
570 OMAP343X_CONTROL_IVA2_BOOTMOD); 570 OMAP343X_CONTROL_IVA2_BOOTMOD);
@@ -576,7 +576,7 @@ void omap3_ctrl_set_iva_bootmode_idle(void)
576 * Sets up the pads controlling the stacked modem in such way that the 576 * Sets up the pads controlling the stacked modem in such way that the
577 * device can enter idle. 577 * device can enter idle.
578 */ 578 */
579void omap3_ctrl_setup_d2d_padconf(void) 579static void __init omap3_ctrl_setup_d2d_padconf(void)
580{ 580{
581 u16 mask, padconf; 581 u16 mask, padconf;
582 582
@@ -595,4 +595,19 @@ void omap3_ctrl_setup_d2d_padconf(void)
595 padconf |= mask; 595 padconf |= mask;
596 omap_ctrl_writew(padconf, OMAP3_PADCONF_SAD2D_IDLEACK); 596 omap_ctrl_writew(padconf, OMAP3_PADCONF_SAD2D_IDLEACK);
597} 597}
598
599/**
600 * omap3_ctrl_init - does static initializations for control module
601 *
602 * Initializes system control module. This sets up the sysconfig autoidle,
603 * and sets up modem and iva2 so that they can be idled properly.
604 */
605void __init omap3_ctrl_init(void)
606{
607 omap_ctrl_writel(OMAP3430_AUTOIDLE_MASK, OMAP2_CONTROL_SYSCONFIG);
608
609 omap3_ctrl_set_iva_bootmode_idle();
610
611 omap3_ctrl_setup_d2d_padconf();
612}
598#endif /* CONFIG_ARCH_OMAP3 && CONFIG_PM */ 613#endif /* CONFIG_ARCH_OMAP3 && CONFIG_PM */