msm: footswitch-8x60: Reverse order of reset assertion

The order in which a power domain is put into reset matters for
ijpeg. Revert back to the previous order of resets by looping
over the clock array backwards. This should maintain the reset
order we had before, i.e. axi, ahb, and then core clocks.

CRs-Fixed: 327801
Change-Id: Ie228615a54a46cc0e408f2c646bcb979c30e59ff
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This commit is contained in:
Stephen Boyd
2011-12-28 19:15:57 -08:00
committed by Linux Build Service Account
parent ee770a365b
commit 0c629385ae

View File

@@ -184,6 +184,8 @@ static int footswitch_enable(struct regulator_dev *rdev)
* and resets should be asserted before power is restored.
*/
for (clock = fs->clk_data; clock->clk; clock++)
; /* Do nothing */
for (clock--; clock >= fs->clk_data; clock--)
clk_reset(clock->clk, CLK_RESET_ASSERT);
/* Wait for synchronous resets to propagate. */
udelay(RESET_DELAY_US);
@@ -260,6 +262,8 @@ static int footswitch_disable(struct regulator_dev *rdev)
* outputs settle prior to clamping.
*/
for (clock = fs->clk_data; clock->clk; clock++)
; /* Do nothing */
for (clock--; clock >= fs->clk_data; clock--)
clk_reset(clock->clk, CLK_RESET_ASSERT);
/* Wait for synchronous resets to propagate. */
udelay(RESET_DELAY_US);
@@ -331,6 +335,8 @@ static int gfx2d_footswitch_enable(struct regulator_dev *rdev)
* and resets should be asserted before power is restored.
*/
for (clock = fs->clk_data; clock->clk; clock++)
; /* Do nothing */
for (clock--; clock >= fs->clk_data; clock--)
clk_reset(clock->clk, CLK_RESET_ASSERT);
/* Wait for synchronous resets to propagate. */
udelay(RESET_DELAY_US);
@@ -397,6 +403,8 @@ static int gfx2d_footswitch_disable(struct regulator_dev *rdev)
* outputs settle prior to clamping.
*/
for (clock = fs->clk_data; clock->clk; clock++)
; /* Do nothing */
for (clock--; clock >= fs->clk_data; clock--)
clk_reset(clock->clk, CLK_RESET_ASSERT);
/* Wait for synchronous resets to propagate. */
udelay(5);