summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx31/dvfs_dptc-imx31.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx31/dvfs_dptc-imx31.c')
-rw-r--r--firmware/target/arm/imx31/dvfs_dptc-imx31.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/firmware/target/arm/imx31/dvfs_dptc-imx31.c b/firmware/target/arm/imx31/dvfs_dptc-imx31.c
index cae9a384c9..129e47d55e 100644
--- a/firmware/target/arm/imx31/dvfs_dptc-imx31.c
+++ b/firmware/target/arm/imx31/dvfs_dptc-imx31.c
@@ -571,14 +571,15 @@ static void dptc_stop(void)
if (dptc_running)
{
+ dptc_running = false;
+
/* Disable DPTC and mask interrupt. */
CCM_PMCR0 = (CCM_PMCR0 & ~CCM_PMCR0_DPTEN) | CCM_PMCR0_PTVAIM;
avic_disable_int(INT_CCM_CLK);
- dptc_running = false;
- }
- /* Go back to default working point. */
- dptc_new_wp(DPTC_WP_DEFAULT);
+ /* Go back to default working point. */
+ dptc_new_wp(DPTC_WP_DEFAULT);
+ }
restore_irq(oldlevel);