]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARM: OMAP3: PRM: move modem reset to PRM driver
authorTero Kristo <t-kristo@ti.com>
Tue, 4 Mar 2014 13:48:33 +0000 (15:48 +0200)
committerTero Kristo <t-kristo@ti.com>
Fri, 4 Jul 2014 14:02:13 +0000 (17:02 +0300)
This is a more proper isolation of the code. Done in preparation of making
PRM an individual driver.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
arch/arm/mach-omap2/pm34xx.c
arch/arm/mach-omap2/prm3xxx.c
arch/arm/mach-omap2/prm3xxx.h

index 6d02573ac4c026cf9db607cab6d7d25c31aff06c..acb895deb3cc03c3a6f989aa4170f9cbcf469c16 100644 (file)
@@ -371,10 +371,7 @@ static void __init omap3_d2d_idle(void)
        omap_ctrl_writew(padconf, OMAP3_PADCONF_SAD2D_IDLEACK);
 
        /* reset modem */
-       omap2_prm_write_mod_reg(OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RSTPWRON_MASK |
-                         OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RST_MASK,
-                         CORE_MOD, OMAP2_RM_RSTCTRL);
-       omap2_prm_write_mod_reg(0, CORE_MOD, OMAP2_RM_RSTCTRL);
+       omap3_prm_reset_modem();
 }
 
 static void __init prcm_setup_regs(void)
index a575b6964bf91f6381ac37f59503d63808d54484..e46ff7184c9d4139df331ac0b03cd3c27a94a081 100644 (file)
@@ -259,6 +259,21 @@ int omap3xxx_prm_clear_mod_irqs(s16 module, u8 regs, u32 ignore_bits)
        return c;
 }
 
+/**
+ * omap3_prm_reset_modem - toggle reset signal for modem
+ *
+ * Toggles the reset signal to modem IP block. Required to allow
+ * OMAP3430 without stacked modem to idle properly.
+ */
+void __init omap3_prm_reset_modem(void)
+{
+       omap2_prm_write_mod_reg(
+               OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RSTPWRON_MASK |
+               OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RST_MASK,
+                               CORE_MOD, OMAP2_RM_RSTCTRL);
+       omap2_prm_write_mod_reg(0, CORE_MOD, OMAP2_RM_RSTCTRL);
+}
+
 /**
  * omap3xxx_prm_reconfigure_io_chain - clear latches and reconfigure I/O chain
  *
index 007ff59602fd8cba43bde4998bc8f3ce8297cd38..21eb1d5ba52450a7b2e87003b609b47ab41764f0 100644 (file)
@@ -164,6 +164,7 @@ extern int __init omap3xxx_prm_init(void);
 extern u32 omap3xxx_prm_get_reset_sources(void);
 int omap3xxx_prm_clear_mod_irqs(s16 module, u8 regs, u32 ignore_bits);
 void omap3xxx_prm_iva_idle(void);
+void omap3_prm_reset_modem(void);
 
 #endif /* __ASSEMBLER */