Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
core.c File Reference
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/list.h>
#include <linux/syscore_ops.h>
#include <linux/seq_file.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/cpufreq.h>
#include <linux/clk.h>
#include <linux/sh_clk.h>

Go to the source code of this file.

Data Structures

struct  clk_rate_round_data
 

Macros

#define pr_fmt(fmt)   "clock: " fmt
 
#define for_each_frequency(pos, r, freq)
 

Functions

void clk_rate_table_build (struct clk *clk, struct cpufreq_frequency_table *freq_table, int nr_freqs, struct clk_div_mult_table *src_table, unsigned long *bitmap)
 
long clk_rate_table_round (struct clk *clk, struct cpufreq_frequency_table *freq_table, unsigned long rate)
 
long clk_rate_div_range_round (struct clk *clk, unsigned int div_min, unsigned int div_max, unsigned long rate)
 
long clk_rate_mult_range_round (struct clk *clk, unsigned int mult_min, unsigned int mult_max, unsigned long rate)
 
int clk_rate_table_find (struct clk *clk, struct cpufreq_frequency_table *freq_table, unsigned long rate)
 
unsigned long followparent_recalc (struct clk *clk)
 
int clk_reparent (struct clk *child, struct clk *parent)
 
void propagate_rate (struct clk *tclk)
 
void clk_disable (struct clk *clk)
 
 EXPORT_SYMBOL_GPL (clk_disable)
 
int clk_enable (struct clk *clk)
 
 EXPORT_SYMBOL_GPL (clk_enable)
 
void recalculate_root_clocks (void)
 
int clk_register (struct clk *clk)
 
 EXPORT_SYMBOL_GPL (clk_register)
 
void clk_unregister (struct clk *clk)
 
 EXPORT_SYMBOL_GPL (clk_unregister)
 
void clk_enable_init_clocks (void)
 
unsigned long clk_get_rate (struct clk *clk)
 
 EXPORT_SYMBOL_GPL (clk_get_rate)
 
int clk_set_rate (struct clk *clk, unsigned long rate)
 
 EXPORT_SYMBOL_GPL (clk_set_rate)
 
int clk_set_parent (struct clk *clk, struct clk *parent)
 
 EXPORT_SYMBOL_GPL (clk_set_parent)
 
struct clkclk_get_parent (struct clk *clk)
 
 EXPORT_SYMBOL_GPL (clk_get_parent)
 
long clk_round_rate (struct clk *clk, unsigned long rate)
 
 EXPORT_SYMBOL_GPL (clk_round_rate)
 
long clk_round_parent (struct clk *clk, unsigned long target, unsigned long *best_freq, unsigned long *parent_freq, unsigned int div_min, unsigned int div_max)
 
 EXPORT_SYMBOL_GPL (clk_round_parent)
 
 late_initcall (clk_late_init)
 

Macro Definition Documentation

#define for_each_frequency (   pos,
  r,
  freq 
)
Value:
for (pos = r->min, freq = r->func(pos, r); \
pos <= r->max; pos++, freq = r->func(pos, r)) \
if (unlikely(freq == 0)) \
; \
else

Definition at line 84 of file core.c.

#define pr_fmt (   fmt)    "clock: " fmt

Definition at line 17 of file core.c.

Function Documentation

void clk_disable ( struct clk clk)

Definition at line 257 of file core.c.

int clk_enable ( struct clk clk)

Definition at line 297 of file core.c.

void clk_enable_init_clocks ( void  )

Definition at line 467 of file core.c.

struct clk* clk_get_parent ( struct clk clk)
read

Definition at line 542 of file core.c.

unsigned long clk_get_rate ( struct clk clk)

Definition at line 476 of file core.c.

long clk_rate_div_range_round ( struct clk clk,
unsigned int  div_min,
unsigned int  div_max,
unsigned long  rate 
)

Definition at line 161 of file core.c.

long clk_rate_mult_range_round ( struct clk clk,
unsigned int  mult_min,
unsigned int  mult_max,
unsigned long  rate 
)

Definition at line 181 of file core.c.

void clk_rate_table_build ( struct clk clk,
struct cpufreq_frequency_table freq_table,
int  nr_freqs,
struct clk_div_mult_table src_table,
unsigned long bitmap 
)

Definition at line 39 of file core.c.

int clk_rate_table_find ( struct clk clk,
struct cpufreq_frequency_table freq_table,
unsigned long  rate 
)

Definition at line 195 of file core.c.

long clk_rate_table_round ( struct clk clk,
struct cpufreq_frequency_table freq_table,
unsigned long  rate 
)

Definition at line 137 of file core.c.

int clk_register ( struct clk clk)

Definition at line 416 of file core.c.

int clk_reparent ( struct clk child,
struct clk parent 
)

Definition at line 220 of file core.c.

long clk_round_parent ( struct clk clk,
unsigned long  target,
unsigned long best_freq,
unsigned long parent_freq,
unsigned int  div_min,
unsigned int  div_max 
)

Definition at line 564 of file core.c.

long clk_round_rate ( struct clk clk,
unsigned long  rate 
)

Definition at line 548 of file core.c.

int clk_set_parent ( struct clk clk,
struct clk parent 
)

Definition at line 510 of file core.c.

int clk_set_rate ( struct clk clk,
unsigned long  rate 
)

Definition at line 482 of file core.c.

void clk_unregister ( struct clk clk)

clk_unregister - unregister a currently registered clock : clock to unregister

Currently unimplemented.

Definition at line 457 of file core.c.

EXPORT_SYMBOL_GPL ( clk_disable  )
EXPORT_SYMBOL_GPL ( clk_enable  )
EXPORT_SYMBOL_GPL ( clk_register  )
EXPORT_SYMBOL_GPL ( clk_unregister  )
EXPORT_SYMBOL_GPL ( clk_get_rate  )
EXPORT_SYMBOL_GPL ( clk_set_rate  )
EXPORT_SYMBOL_GPL ( clk_set_parent  )
EXPORT_SYMBOL_GPL ( clk_get_parent  )
EXPORT_SYMBOL_GPL ( clk_round_rate  )
EXPORT_SYMBOL_GPL ( clk_round_parent  )
unsigned long followparent_recalc ( struct clk clk)

Definition at line 215 of file core.c.

late_initcall ( clk_late_init  )
void propagate_rate ( struct clk tclk)

Definition at line 231 of file core.c.

void recalculate_root_clocks ( void  )

recalculate_root_clocks - recalculate and propagate all root clocks

Recalculates all root clocks (clocks with no parent), which if the clock's .recalc is set correctly, should also propagate their rates. Called at init.

Definition at line 322 of file core.c.