diff options
Diffstat (limited to 'arch/arm/mach-omap2/clock.h')
-rw-r--r-- | arch/arm/mach-omap2/clock.h | 50 |
1 files changed, 29 insertions, 21 deletions
diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h index 43b6bedaafd6..93c48df3b5b1 100644 --- a/arch/arm/mach-omap2/clock.h +++ b/arch/arm/mach-omap2/clock.h | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/arm/mach-omap2/clock.h | 2 | * linux/arch/arm/mach-omap2/clock.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005-2008 Texas Instruments, Inc. | 4 | * Copyright (C) 2005-2009 Texas Instruments, Inc. |
5 | * Copyright (C) 2004-2008 Nokia Corporation | 5 | * Copyright (C) 2004-2009 Nokia Corporation |
6 | * | 6 | * |
7 | * Contacts: | 7 | * Contacts: |
8 | * Richard Woodruff <r-woodruff2@ti.com> | 8 | * Richard Woodruff <r-woodruff2@ti.com> |
@@ -36,6 +36,17 @@ | |||
36 | #define OMAP3XXX_EN_DPLL_FRBYPASS 0x6 | 36 | #define OMAP3XXX_EN_DPLL_FRBYPASS 0x6 |
37 | #define OMAP3XXX_EN_DPLL_LOCKED 0x7 | 37 | #define OMAP3XXX_EN_DPLL_LOCKED 0x7 |
38 | 38 | ||
39 | /* OMAP4xxx CM_CLKMODE_DPLL*.EN_*_DPLL bits - for omap2_get_dpll_rate() */ | ||
40 | #define OMAP4XXX_EN_DPLL_MNBYPASS 0x4 | ||
41 | #define OMAP4XXX_EN_DPLL_LPBYPASS 0x5 | ||
42 | #define OMAP4XXX_EN_DPLL_FRBYPASS 0x6 | ||
43 | #define OMAP4XXX_EN_DPLL_LOCKED 0x7 | ||
44 | |||
45 | /* CM_CLKEN_PLL*.EN* bit values - not all are available for every DPLL */ | ||
46 | #define DPLL_LOW_POWER_STOP 0x1 | ||
47 | #define DPLL_LOW_POWER_BYPASS 0x5 | ||
48 | #define DPLL_LOCKED 0x7 | ||
49 | |||
39 | int omap2_clk_init(void); | 50 | int omap2_clk_init(void); |
40 | int omap2_clk_enable(struct clk *clk); | 51 | int omap2_clk_enable(struct clk *clk); |
41 | void omap2_clk_disable(struct clk *clk); | 52 | void omap2_clk_disable(struct clk *clk); |
@@ -44,6 +55,14 @@ int omap2_clk_set_rate(struct clk *clk, unsigned long rate); | |||
44 | int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent); | 55 | int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent); |
45 | int omap2_dpll_set_rate_tolerance(struct clk *clk, unsigned int tolerance); | 56 | int omap2_dpll_set_rate_tolerance(struct clk *clk, unsigned int tolerance); |
46 | long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate); | 57 | long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate); |
58 | unsigned long omap3_dpll_recalc(struct clk *clk); | ||
59 | unsigned long omap3_clkoutx2_recalc(struct clk *clk); | ||
60 | void omap3_dpll_allow_idle(struct clk *clk); | ||
61 | void omap3_dpll_deny_idle(struct clk *clk); | ||
62 | u32 omap3_dpll_autoidle_read(struct clk *clk); | ||
63 | int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate); | ||
64 | int omap3_noncore_dpll_enable(struct clk *clk); | ||
65 | void omap3_noncore_dpll_disable(struct clk *clk); | ||
47 | 66 | ||
48 | #ifdef CONFIG_OMAP_RESET_CLOCKS | 67 | #ifdef CONFIG_OMAP_RESET_CLOCKS |
49 | void omap2_clk_disable_unused(struct clk *clk); | 68 | void omap2_clk_disable_unused(struct clk *clk); |
@@ -63,6 +82,7 @@ unsigned long omap2_fixed_divisor_recalc(struct clk *clk); | |||
63 | long omap2_clksel_round_rate(struct clk *clk, unsigned long target_rate); | 82 | long omap2_clksel_round_rate(struct clk *clk, unsigned long target_rate); |
64 | int omap2_clksel_set_rate(struct clk *clk, unsigned long rate); | 83 | int omap2_clksel_set_rate(struct clk *clk, unsigned long rate); |
65 | u32 omap2_get_dpll_rate(struct clk *clk); | 84 | u32 omap2_get_dpll_rate(struct clk *clk); |
85 | void omap2_init_dpll_parent(struct clk *clk); | ||
66 | int omap2_wait_clock_ready(void __iomem *reg, u32 cval, const char *name); | 86 | int omap2_wait_clock_ready(void __iomem *reg, u32 cval, const char *name); |
67 | void omap2_clk_prepare_for_reboot(void); | 87 | void omap2_clk_prepare_for_reboot(void); |
68 | int omap2_dflt_clk_enable(struct clk *clk); | 88 | int omap2_dflt_clk_enable(struct clk *clk); |
@@ -72,29 +92,17 @@ void omap2_clk_dflt_find_companion(struct clk *clk, void __iomem **other_reg, | |||
72 | void omap2_clk_dflt_find_idlest(struct clk *clk, void __iomem **idlest_reg, | 92 | void omap2_clk_dflt_find_idlest(struct clk *clk, void __iomem **idlest_reg, |
73 | u8 *idlest_bit); | 93 | u8 *idlest_bit); |
74 | 94 | ||
95 | extern u8 cpu_mask; | ||
96 | |||
75 | extern const struct clkops clkops_omap2_dflt_wait; | 97 | extern const struct clkops clkops_omap2_dflt_wait; |
76 | extern const struct clkops clkops_omap2_dflt; | 98 | extern const struct clkops clkops_omap2_dflt; |
77 | 99 | ||
78 | extern u8 cpu_mask; | 100 | extern struct clk_functions omap2_clk_functions; |
101 | extern struct clk *vclk, *sclk; | ||
79 | 102 | ||
80 | /* clksel_rate data common to 24xx/343x */ | 103 | extern const struct clksel_rate gpt_32k_rates[]; |
81 | static const struct clksel_rate gpt_32k_rates[] = { | 104 | extern const struct clksel_rate gpt_sys_rates[]; |
82 | { .div = 1, .val = 0, .flags = RATE_IN_24XX | RATE_IN_343X | DEFAULT_RATE }, | 105 | extern const struct clksel_rate gfx_l3_rates[]; |
83 | { .div = 0 } | ||
84 | }; | ||
85 | |||
86 | static const struct clksel_rate gpt_sys_rates[] = { | ||
87 | { .div = 1, .val = 1, .flags = RATE_IN_24XX | RATE_IN_343X | DEFAULT_RATE }, | ||
88 | { .div = 0 } | ||
89 | }; | ||
90 | |||
91 | static const struct clksel_rate gfx_l3_rates[] = { | ||
92 | { .div = 1, .val = 1, .flags = RATE_IN_24XX | RATE_IN_343X }, | ||
93 | { .div = 2, .val = 2, .flags = RATE_IN_24XX | RATE_IN_343X | DEFAULT_RATE }, | ||
94 | { .div = 3, .val = 3, .flags = RATE_IN_243X | RATE_IN_343X }, | ||
95 | { .div = 4, .val = 4, .flags = RATE_IN_243X | RATE_IN_343X }, | ||
96 | { .div = 0 } | ||
97 | }; | ||
98 | 106 | ||
99 | 107 | ||
100 | #endif | 108 | #endif |