aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap2/prcm.c17
-rw-r--r--arch/arm/mach-omap2/prm44xx.c14
-rw-r--r--arch/arm/mach-omap2/prm44xx.h2
3 files changed, 24 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index fe0865bd64cf..68c541f98ad2 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -68,17 +68,16 @@ void omap_prcm_arch_reset(char mode, const char *cmd)
68 } else if (cpu_is_omap34xx()) { 68 } else if (cpu_is_omap34xx()) {
69 prcm_offs = OMAP3430_GR_MOD; 69 prcm_offs = OMAP3430_GR_MOD;
70 omap3_ctrl_write_boot_mode((cmd ? (u8)*cmd : 0)); 70 omap3_ctrl_write_boot_mode((cmd ? (u8)*cmd : 0));
71 } else if (cpu_is_omap44xx()) 71 } else if (cpu_is_omap44xx()) {
72 prcm_offs = OMAP4430_PRM_DEVICE_INST; 72 omap4_prm_global_warm_sw_reset(); /* never returns */
73 else 73 } else {
74 WARN_ON(1); 74 WARN_ON(1);
75 }
75 76
76 if (cpu_is_omap24xx() || cpu_is_omap34xx()) 77 /* XXX should be moved to some OMAP2/3 specific code */
77 prm_set_mod_reg_bits(OMAP_RST_DPLL3_MASK, prcm_offs, 78 prm_set_mod_reg_bits(OMAP_RST_DPLL3_MASK, prcm_offs,
78 OMAP2_RM_RSTCTRL); 79 OMAP2_RM_RSTCTRL);
79 if (cpu_is_omap44xx()) 80 prm_read_mod_reg(prcm_offs, OMAP2_RM_RSTCTRL); /* OCP barrier */
80 prm_set_mod_reg_bits(OMAP4430_RST_GLOBAL_WARM_SW_MASK,
81 prcm_offs, OMAP4_RM_RSTCTRL);
82} 81}
83 82
84/** 83/**
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c
index c016ae4cbad1..a2a04bfa9628 100644
--- a/arch/arm/mach-omap2/prm44xx.c
+++ b/arch/arm/mach-omap2/prm44xx.c
@@ -179,3 +179,17 @@ int omap4_prm_deassert_hardreset(void __iomem *rstctrl_reg, u8 shift)
179 return (c == MAX_MODULE_HARDRESET_WAIT) ? -EBUSY : 0; 179 return (c == MAX_MODULE_HARDRESET_WAIT) ? -EBUSY : 0;
180} 180}
181 181
182void omap4_prm_global_warm_sw_reset(void)
183{
184 u32 v;
185
186 v = omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST,
187 OMAP4_RM_RSTCTRL);
188 v |= OMAP4430_RST_GLOBAL_WARM_SW_MASK;
189 omap4_prm_write_inst_reg(v, OMAP4430_PRM_DEVICE_INST,
190 OMAP4_RM_RSTCTRL);
191
192 /* OCP barrier */
193 v = omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST,
194 OMAP4_RM_RSTCTRL);
195}
diff --git a/arch/arm/mach-omap2/prm44xx.h b/arch/arm/mach-omap2/prm44xx.h
index 358865344d58..95542aec6c90 100644
--- a/arch/arm/mach-omap2/prm44xx.h
+++ b/arch/arm/mach-omap2/prm44xx.h
@@ -756,6 +756,8 @@ extern int omap4_prm_is_hardreset_asserted(void __iomem *rstctrl_reg, u8 shift);
756extern int omap4_prm_assert_hardreset(void __iomem *rstctrl_reg, u8 shift); 756extern int omap4_prm_assert_hardreset(void __iomem *rstctrl_reg, u8 shift);
757extern int omap4_prm_deassert_hardreset(void __iomem *rstctrl_reg, u8 shift); 757extern int omap4_prm_deassert_hardreset(void __iomem *rstctrl_reg, u8 shift);
758 758
759extern void omap4_prm_global_warm_sw_reset(void);
760
759# endif 761# endif
760 762
761#endif 763#endif