Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
clock.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <linux/list.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/spinlock.h>
#include <linux/delay.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/of_address.h>
#include <mach/hardware.h>
#include <mach/at91_pmc.h>
#include <mach/cpu.h>
#include <asm/proc-fns.h>
#include "clock.h"
#include "generic.h"

Go to the source code of this file.

Macros

#define clk_is_primary(x)   ((x)->type & CLK_TYPE_PRIMARY)
 
#define clk_is_programmable(x)   ((x)->type & CLK_TYPE_PROGRAMMABLE)
 
#define clk_is_peripheral(x)   ((x)->type & CLK_TYPE_PERIPHERAL)
 
#define clk_is_sys(x)   ((x)->type & CLK_TYPE_SYSTEM)
 
#define cpu_has_utmi()
 
#define cpu_has_800M_plla()
 
#define cpu_has_300M_plla()   (cpu_is_at91sam9g10())
 
#define cpu_has_240M_plla()
 
#define cpu_has_210M_plla()   (cpu_is_at91sam9260())
 
#define cpu_has_pllb()
 
#define cpu_has_upll()
 
#define cpu_has_uhp()   (!cpu_is_at91sam9rl())
 
#define cpu_has_udpfs()
 
#define cpu_has_plladiv2()
 
#define cpu_has_mdiv3()
 
#define cpu_has_alt_prescaler()
 

Functions

 EXPORT_SYMBOL_GPL (at91_pmc_base)
 
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)
 
int __init clk_register (struct clk *clk)
 
int __init at91_clock_init (unsigned long main_clock)
 
 late_initcall (at91_clock_reset)
 
void at91sam9_idle (void)
 

Variables

void __iomemat91_pmc_base
 
struct clk utmi_clk
 
struct clk mck
 

Macro Definition Documentation

#define clk_is_peripheral (   x)    ((x)->type & CLK_TYPE_PERIPHERAL)

Definition at line 48 of file clock.c.

#define clk_is_primary (   x)    ((x)->type & CLK_TYPE_PRIMARY)

Definition at line 46 of file clock.c.

#define clk_is_programmable (   x)    ((x)->type & CLK_TYPE_PROGRAMMABLE)

Definition at line 47 of file clock.c.

#define clk_is_sys (   x)    ((x)->type & CLK_TYPE_SYSTEM)

Definition at line 49 of file clock.c.

#define cpu_has_210M_plla ( )    (cpu_is_at91sam9260())

Definition at line 70 of file clock.c.

#define cpu_has_240M_plla ( )
Value:

Definition at line 66 of file clock.c.

#define cpu_has_300M_plla ( )    (cpu_is_at91sam9g10())

Definition at line 64 of file clock.c.

#define cpu_has_800M_plla ( )
Value:

Definition at line 59 of file clock.c.

#define cpu_has_alt_prescaler ( )
Value:

Definition at line 96 of file clock.c.

#define cpu_has_mdiv3 ( )
Value:

Definition at line 92 of file clock.c.

#define cpu_has_plladiv2 ( )
Value:

Definition at line 88 of file clock.c.

#define cpu_has_pllb ( )
Value:

Definition at line 72 of file clock.c.

#define cpu_has_udpfs ( )
Value:

Definition at line 84 of file clock.c.

#define cpu_has_uhp ( )    (!cpu_is_at91sam9rl())

Definition at line 81 of file clock.c.

#define cpu_has_upll ( )
Value:

Definition at line 77 of file clock.c.

#define cpu_has_utmi ( )
Value:

Definition at line 55 of file clock.c.

Function Documentation

int __init at91_clock_init ( unsigned long  main_clock)

Definition at line 860 of file clock.c.

void at91sam9_idle ( void  )

Definition at line 898 of file clock.c.

void clk_disable ( struct clk clk)

Definition at line 280 of file clock.c.

int clk_enable ( struct clk clk)

Definition at line 260 of file clock.c.

unsigned long clk_get_rate ( struct clk clk)

Definition at line 290 of file clock.c.

int __init clk_register ( struct clk clk)

Definition at line 528 of file clock.c.

EXPORT_SYMBOL ( clk_enable  )
EXPORT_SYMBOL ( clk_disable  )
EXPORT_SYMBOL ( clk_get_rate  )
EXPORT_SYMBOL_GPL ( at91_pmc_base  )
late_initcall ( at91_clock_reset  )

Variable Documentation

void __iomem* at91_pmc_base

Definition at line 37 of file clock.c.

struct clk mck
Initial value:
= {
.name = "mck",
.pmc_mask = AT91_PMC_MCKRDY,
}

Definition at line 206 of file clock.c.

struct clk utmi_clk
Initial value:
= {
.name = "utmi_clk",
.parent = &main_clk,
.pmc_mask = AT91_PMC_UPLLEN,
.mode = pmc_uckr_mode,
.type = CLK_TYPE_PLL,
}

Definition at line 187 of file clock.c.