aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/clock.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/clock.h')
-rw-r--r--arch/arm/mach-omap2/clock.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h
index 1fb330e0847..2679ddfa642 100644
--- a/arch/arm/mach-omap2/clock.h
+++ b/arch/arm/mach-omap2/clock.h
@@ -21,13 +21,28 @@
21/* The maximum error between a target DPLL rate and the rounded rate in Hz */ 21/* The maximum error between a target DPLL rate and the rounded rate in Hz */
22#define DEFAULT_DPLL_RATE_TOLERANCE 50000 22#define DEFAULT_DPLL_RATE_TOLERANCE 50000
23 23
24/* CM_CLKSEL2_PLL.CORE_CLK_SRC bits (2XXX) */
25#define CORE_CLK_SRC_32K 0x0
26#define CORE_CLK_SRC_DPLL 0x1
27#define CORE_CLK_SRC_DPLL_X2 0x2
28
29/* OMAP2xxx CM_CLKEN_PLL.EN_DPLL bits - for omap2_get_dpll_rate() */
30#define OMAP2XXX_EN_DPLL_LPBYPASS 0x1
31#define OMAP2XXX_EN_DPLL_FRBYPASS 0x2
32#define OMAP2XXX_EN_DPLL_LOCKED 0x3
33
34/* OMAP3xxx CM_CLKEN_PLL*.EN_*_DPLL bits - for omap2_get_dpll_rate() */
35#define OMAP3XXX_EN_DPLL_LPBYPASS 0x5
36#define OMAP3XXX_EN_DPLL_FRBYPASS 0x6
37#define OMAP3XXX_EN_DPLL_LOCKED 0x7
38
24int omap2_clk_init(void); 39int omap2_clk_init(void);
25int omap2_clk_enable(struct clk *clk); 40int omap2_clk_enable(struct clk *clk);
26void omap2_clk_disable(struct clk *clk); 41void omap2_clk_disable(struct clk *clk);
27long omap2_clk_round_rate(struct clk *clk, unsigned long rate); 42long omap2_clk_round_rate(struct clk *clk, unsigned long rate);
28int omap2_clk_set_rate(struct clk *clk, unsigned long rate); 43int omap2_clk_set_rate(struct clk *clk, unsigned long rate);
29int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent); 44int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent);
30int omap2_dpll_rate_tolerance_set(struct clk *clk, unsigned int tolerance); 45int omap2_dpll_set_rate_tolerance(struct clk *clk, unsigned int tolerance);
31long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate); 46long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate);
32 47
33#ifdef CONFIG_OMAP_RESET_CLOCKS 48#ifdef CONFIG_OMAP_RESET_CLOCKS
@@ -36,7 +51,7 @@ void omap2_clk_disable_unused(struct clk *clk);
36#define omap2_clk_disable_unused NULL 51#define omap2_clk_disable_unused NULL
37#endif 52#endif
38 53
39void omap2_clksel_recalc(struct clk *clk); 54unsigned long omap2_clksel_recalc(struct clk *clk);
40void omap2_init_clk_clkdm(struct clk *clk); 55void omap2_init_clk_clkdm(struct clk *clk);
41void omap2_init_clksel_parent(struct clk *clk); 56void omap2_init_clksel_parent(struct clk *clk);
42u32 omap2_clksel_get_divisor(struct clk *clk); 57u32 omap2_clksel_get_divisor(struct clk *clk);
@@ -44,13 +59,16 @@ u32 omap2_clksel_round_rate_div(struct clk *clk, unsigned long target_rate,
44 u32 *new_div); 59 u32 *new_div);
45u32 omap2_clksel_to_divisor(struct clk *clk, u32 field_val); 60u32 omap2_clksel_to_divisor(struct clk *clk, u32 field_val);
46u32 omap2_divisor_to_clksel(struct clk *clk, u32 div); 61u32 omap2_divisor_to_clksel(struct clk *clk, u32 div);
47void omap2_fixed_divisor_recalc(struct clk *clk); 62unsigned long omap2_fixed_divisor_recalc(struct clk *clk);
48long omap2_clksel_round_rate(struct clk *clk, unsigned long target_rate); 63long omap2_clksel_round_rate(struct clk *clk, unsigned long target_rate);
49int omap2_clksel_set_rate(struct clk *clk, unsigned long rate); 64int omap2_clksel_set_rate(struct clk *clk, unsigned long rate);
50u32 omap2_get_dpll_rate(struct clk *clk); 65u32 omap2_get_dpll_rate(struct clk *clk);
51int omap2_wait_clock_ready(void __iomem *reg, u32 cval, const char *name); 66int omap2_wait_clock_ready(void __iomem *reg, u32 cval, const char *name);
52void omap2_clk_prepare_for_reboot(void); 67void omap2_clk_prepare_for_reboot(void);
53 68
69extern const struct clkops clkops_omap2_dflt_wait;
70extern const struct clkops clkops_omap2_dflt;
71
54extern u8 cpu_mask; 72extern u8 cpu_mask;
55 73
56/* clksel_rate data common to 24xx/343x */ 74/* clksel_rate data common to 24xx/343x */