Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

static void stop_dvfs ( void   )  [static]

This function disables the DVFS module.

Definition at line 299 of file dvfs_v2.c.

Referenced by mxc_dvfs_core_suspend().

{
      u32 pmcr0, dvsup;
      unsigned long flags;
      u32 curr_ahb = clk_get_rate(ahb_clk);

      if (dvfs_is_active) {
            spin_lock_irqsave(&mxc_dvfs_lock, flags);

            pmcr0 = __raw_readl(MXC_CCM_PMCR0);
            dvsup = (pmcr0 & MXC_CCM_PMCR0_DVSUP_MASK) >>
                MXC_CCM_PMCR0_DVSUP_OFFSET;
            if (dvsup != DVSUP_TURBO) {
                  /* Use sw delay to insure volt/freq change */
                  clk_set_rate(cpu_clk, (4 * curr_ahb));
                  udelay(200);
            }

            pmcr0 = __raw_readl(MXC_CCM_PMCR0);
            /* disable dvfs and its interrupt */
            pmcr0 = (pmcr0 & ~MXC_CCM_PMCR0_DVFEN) | MXC_CCM_PMCR0_FSVAIM;
            __raw_writel(pmcr0, MXC_CCM_PMCR0);

            dvfs_is_active = 0;

            spin_unlock_irqrestore(&mxc_dvfs_lock, flags);
      }

      pr_info("DVFS is stopped\n");
}


Generated by  Doxygen 1.6.0   Back to index