Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
clock.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/mutex.h>
#include <linux/io.h>
#include <linux/delay.h>
#include <mach/hardware.h>
#include <mach/clock.h>
#include <mach/psc.h>
#include <mach/cputype.h>
#include "clock.h"

Go to the source code of this file.

Functions

int clk_enable (struct clk *clk)
 
 EXPORT_SYMBOL (clk_enable)
 
void clk_disable (struct clk *clk)
 
 EXPORT_SYMBOL (clk_disable)
 
unsigned long clk_get_rate (struct clk *clk)
 
 EXPORT_SYMBOL (clk_get_rate)
 
long clk_round_rate (struct clk *clk, unsigned long rate)
 
 EXPORT_SYMBOL (clk_round_rate)
 
int clk_set_rate (struct clk *clk, unsigned long rate)
 
 EXPORT_SYMBOL (clk_set_rate)
 
int clk_set_parent (struct clk *clk, struct clk *parent)
 
 EXPORT_SYMBOL (clk_set_parent)
 
int clk_register (struct clk *clk)
 
 EXPORT_SYMBOL (clk_register)
 
void clk_unregister (struct clk *clk)
 
 EXPORT_SYMBOL (clk_unregister)
 
int davinci_set_sysclk_rate (struct clk *clk, unsigned long rate)
 
 EXPORT_SYMBOL (davinci_set_sysclk_rate)
 
int davinci_simple_set_rate (struct clk *clk, unsigned long rate)
 
int davinci_set_pllrate (struct pll_data *pll, unsigned int prediv, unsigned int mult, unsigned int postdiv)
 
 EXPORT_SYMBOL (davinci_set_pllrate)
 
int davinci_set_refclk_rate (unsigned long rate)
 
int __init davinci_clk_init (struct clk_lookup *clocks)
 

Function Documentation

void clk_disable ( struct clk clk)

Definition at line 70 of file clock.c.

int clk_enable ( struct clk clk)

Definition at line 55 of file clock.c.

unsigned long clk_get_rate ( struct clk clk)

Definition at line 83 of file clock.c.

int clk_register ( struct clk clk)

Definition at line 166 of file clock.c.

long clk_round_rate ( struct clk clk,
unsigned long  rate 
)

Definition at line 92 of file clock.c.

int clk_set_parent ( struct clk clk,
struct clk parent 
)

Definition at line 139 of file clock.c.

int clk_set_rate ( struct clk clk,
unsigned long  rate 
)

Definition at line 116 of file clock.c.

void clk_unregister ( struct clk clk)

Definition at line 200 of file clock.c.

int __init davinci_clk_init ( struct clk_lookup clocks)

Definition at line 537 of file clock.c.

int davinci_set_pllrate ( struct pll_data pll,
unsigned int  prediv,
unsigned int  mult,
unsigned int  postdiv 
)

davinci_set_pllrate - set the output rate of a given PLL.

Note: Currently tested to work with OMAP-L138 only.

: pll whose rate needs to be changed. : The pre divider value. Passing 0 disables the pre-divider. : The multiplier value. Passing 0 leads to multiply-by-one. : The post divider value. Passing 0 disables the post-divider.

Definition at line 438 of file clock.c.

int davinci_set_refclk_rate ( unsigned long  rate)

davinci_set_refclk_rate() - Set the reference clock rate : The new rate.

Sets the reference clock rate to a given value. This will most likely result in the entire clock tree getting updated.

This is used to support boards which use a reference clock different than that used by default in <soc>.c file. The reference clock rate should be updated early in the boot process; ideally soon after the clock tree has been initialized once with the default reference clock rate (davinci_common_init()).

Returns 0 on success, error otherwise.

Definition at line 520 of file clock.c.

int davinci_set_sysclk_rate ( struct clk clk,
unsigned long  rate 
)

Definition at line 280 of file clock.c.

int davinci_simple_set_rate ( struct clk clk,
unsigned long  rate 
)

Definition at line 361 of file clock.c.

EXPORT_SYMBOL ( clk_enable  )
EXPORT_SYMBOL ( clk_disable  )
EXPORT_SYMBOL ( clk_get_rate  )
EXPORT_SYMBOL ( clk_round_rate  )
EXPORT_SYMBOL ( clk_set_rate  )
EXPORT_SYMBOL ( clk_set_parent  )
EXPORT_SYMBOL ( clk_register  )
EXPORT_SYMBOL ( clk_unregister  )
EXPORT_SYMBOL ( davinci_set_sysclk_rate  )
EXPORT_SYMBOL ( davinci_set_pllrate  )