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

static void stop ( void   )  [static]

This function disables the DVFS module.

Definition at line 567 of file dvfs_per.c.

{
      u32 reg = 0;
      unsigned long flags;
      u32 ret = 0;

      if (dvfs_per_is_active) {
            dvfs_per_is_active = 0;
#ifndef DVFS_SW_WORKAROUND
            /* Increase the LP domain voltage first. */
            ret = regulator_set_voltage(
                        lp_regulator, dvfsper_plt_data->lp_high,
                        dvfsper_plt_data->lp_high);
            if (ret < 0) {
                  printk(KERN_DEBUG "COULD NOT SET LP VOLTAGE\n");
                  return;
            }
            udelay(100);
#endif

            spin_lock_irqsave(&mxc_dvfs_per_lock, flags);

            /* Mask dvfs irq, disable DVFS */
            reg = __raw_readl(MXC_DVFS_PER_PMCR0);
            /* FSVAIM=1 */
            reg |= MXC_DVFSPMCR0_FSVAIM;
            __raw_writel(reg, MXC_DVFS_PER_PMCR0);

            if (cur_setpoint != 0)
                  force_freq_change();

            reg = __raw_readl(MXC_DVFS_PER_PMCR0);
            reg = (reg & ~MXC_DVFSPMCR0_DVFEN);
            __raw_writel(reg, MXC_DVFS_PER_PMCR0);

            spin_unlock_irqrestore(&mxc_dvfs_per_lock, flags);
            clk_disable(dvfs_clk);

            start_sdram_autogating();
      }
}


Generated by  Doxygen 1.6.0   Back to index