Merge git://git.kernel.org/pub/scm/virt/kvm/kvm
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-omap2 / prm33xx.c
index 1ac73883f8913c5894aff5f5267222c9f35343ee..44c0d7216aa72e1f5f578e0c7e4d8da1ada8871a 100644 (file)
@@ -110,11 +110,11 @@ int am33xx_prm_assert_hardreset(u8 shift, s16 inst, u16 rstctrl_offs)
  * -EINVAL upon an argument error, -EEXIST if the submodule was already out
  * of reset, or -EBUSY if the submodule did not exit reset promptly.
  */
-int am33xx_prm_deassert_hardreset(u8 shift, s16 inst,
+int am33xx_prm_deassert_hardreset(u8 shift, u8 st_shift, s16 inst,
                u16 rstctrl_offs, u16 rstst_offs)
 {
        int c;
-       u32 mask = 1 << shift;
+       u32 mask = 1 << st_shift;
 
        /* Check the current status to avoid  de-asserting the line twice */
        if (am33xx_prm_is_hardreset_asserted(shift, inst, rstctrl_offs) == 0)
@@ -122,11 +122,14 @@ int am33xx_prm_deassert_hardreset(u8 shift, s16 inst,
 
        /* Clear the reset status by writing 1 to the status bit */
        am33xx_prm_rmw_reg_bits(0xffffffff, mask, inst, rstst_offs);
+
        /* de-assert the reset control line */
+       mask = 1 << shift;
+
        am33xx_prm_rmw_reg_bits(mask, 0, inst, rstctrl_offs);
-       /* wait the status to be set */
 
-       omap_test_timeout(am33xx_prm_is_hardreset_asserted(shift, inst,
+       /* wait the status to be set */
+       omap_test_timeout(am33xx_prm_is_hardreset_asserted(st_shift, inst,
                                                           rstst_offs),
                          MAX_MODULE_HARDRESET_WAIT, c);