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

dvfs_per.c File Reference


Detailed Description

A simplied driver for the Freescale Semiconductor MXC DVFS module.

Upon initialization, the DVFS driver initializes the DVFS hardware sets up driver nodes attaches to the DVFS interrupt and initializes internal data structures. When the DVFS interrupt occurs the driver checks the cause of the interrupt (lower frequency, increase frequency or emergency) and changes the CPU voltage according to translation table that is loaded into the driver.

Definition in file dvfs_per.c.

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/interrupt.h>
#include <linux/jiffies.h>
#include <linux/device.h>
#include <linux/sysdev.h>
#include <linux/delay.h>
#include <linux/clk.h>
#include <linux/regulator/consumer.h>
#include <linux/platform_device.h>
#include <linux/workqueue.h>
#include <linux/io.h>
#include <mach/hardware.h>
#include <mach/mxc_dvfs.h>
#include <mach/sdram_autogating.h>
#include <mach/clock.h>

Go to the source code of this file.

Classes

struct  dvfsper_device

Defines

#define DRIVER_NAME   "DVFSPER"
#define DVFS_PER_DEBUG   0
#define LOW_BUS_FREQ   24000000

Enumerations

enum  { FSVAI_FREQ_NOCHANGE = 0x0, FSVAI_FREQ_INCREASE, FSVAI_FREQ_DECREASE, FSVAI_FREQ_EMERG }

Functions

 DEFINE_SPINLOCK (mxc_dvfs_per_lock)
static DEVICE_ATTR (enable, 0644, dvfsper_status_show, dvfsper_enable_store)
int dvfs_enable (struct device *dev)
int dvfs_per_active (void)
static void __exit dvfs_per_cleanup (void)
int dvfs_per_divider_active (void)
static void dvfs_per_handler (struct work_struct *work)
static int __init dvfs_per_init (void)
static irqreturn_t dvfs_per_irq (int irq, void *dev_id)
static void dvfs_per_load_config (void)
int dvfs_per_pixel_clk_limit ()
static ssize_t dvfsper_enable_store (struct device *dev, struct device_attribute *attr, const char *buf, size_t size)
static ssize_t dvfsper_status_show (struct device *dev, struct device_attribute *attr, char *buf)
static void force_freq_change (void)
static int init_dvfs_per_controller (void)
 MODULE_AUTHOR ("Freescale Semiconductor, Inc.")
 MODULE_DESCRIPTION ("DVFS PERIPHERAL driver")
 module_exit (dvfs_per_cleanup)
 module_init (dvfs_per_init)
 MODULE_LICENSE ("GPL")
static int mxc_dvfs_resume (struct platform_device *pdev)
static int mxc_dvfs_suspend (struct platform_device *pdev, pm_message_t state)
static int __devinit mxc_dvfsper_probe (struct platform_device *pdev)
static int start (void)
int start_dvfs_per (void)
static void stop (void)
void stop_dvfs_per (void)

Variables

static struct clk * ahb_clk
static struct clk * axi_b_clk
int bus_freq_scaling_is_active
static struct clk * cpu_clk
static int cur_setpoint
static struct clk * ddr_hf_clk
static struct clk * dvfs_clk
static int dvfs_per_is_active
static int dvfs_per_is_paused
static int dvfs_per_low_freq
struct dvfs_wp dvfs_per_setpoint []
static int dvfs_per_stop
static int dvfs_per_suspended
static struct delayed_work dvfs_per_work
struct dvfsper_devicedvfsper_device_data
struct mxc_dvfsper_data * dvfsper_plt_data
static volatile int freq_increased
static int ipu_freq_scaled
int low_bus_freq_mode
static struct regulator * lp_regulator
static struct clk * lpapm
static struct clk * main_bus_clk
static struct platform_driver mxc_dvfsper_driver
static struct clk * pll2
struct timeval prev_intr


Generated by  Doxygen 1.6.0   Back to index