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.h50
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
39int omap2_clk_init(void); 50int omap2_clk_init(void);
40int omap2_clk_enable(struct clk *clk); 51int omap2_clk_enable(struct clk *clk);
41void omap2_clk_disable(struct clk *clk); 52void omap2_clk_disable(struct clk *clk);
@@ -44,6 +55,14 @@ int omap2_clk_set_rate(struct clk *clk, unsigned long rate);
44int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent); 55int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent);
45int omap2_dpll_set_rate_tolerance(struct clk *clk, unsigned int tolerance); 56int omap2_dpll_set_rate_tolerance(struct clk *clk, unsigned int tolerance);
46long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate); 57long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate);
58unsigned long omap3_dpll_recalc(struct clk *clk);
59unsigned long omap3_clkoutx2_recalc(struct clk *clk);
60void omap3_dpll_allow_idle(struct clk *clk);
61void omap3_dpll_deny_idle(struct clk *clk);
62u32 omap3_dpll_autoidle_read(struct clk *clk);
63int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate);
64int omap3_noncore_dpll_enable(struct clk *clk);
65void omap3_noncore_dpll_disable(struct clk *clk);
47 66
48#ifdef CONFIG_OMAP_RESET_CLOCKS 67#ifdef CONFIG_OMAP_RESET_CLOCKS
49void omap2_clk_disable_unused(struct clk *clk); 68void omap2_clk_disable_unused(struct clk *clk);
@@ -63,6 +82,7 @@ unsigned long omap2_fixed_divisor_recalc(struct clk *clk);
63long omap2_clksel_round_rate(struct clk *clk, unsigned long target_rate); 82long omap2_clksel_round_rate(struct clk *clk, unsigned long target_rate);
64int omap2_clksel_set_rate(struct clk *clk, unsigned long rate); 83int omap2_clksel_set_rate(struct clk *clk, unsigned long rate);
65u32 omap2_get_dpll_rate(struct clk *clk); 84u32 omap2_get_dpll_rate(struct clk *clk);
85void omap2_init_dpll_parent(struct clk *clk);
66int omap2_wait_clock_ready(void __iomem *reg, u32 cval, const char *name); 86int omap2_wait_clock_ready(void __iomem *reg, u32 cval, const char *name);
67void omap2_clk_prepare_for_reboot(void); 87void omap2_clk_prepare_for_reboot(void);
68int omap2_dflt_clk_enable(struct clk *clk); 88int omap2_dflt_clk_enable(struct clk *clk);
@@ -72,29 +92,17 @@ void omap2_clk_dflt_find_companion(struct clk *clk, void __iomem **other_reg,
72void omap2_clk_dflt_find_idlest(struct clk *clk, void __iomem **idlest_reg, 92void omap2_clk_dflt_find_idlest(struct clk *clk, void __iomem **idlest_reg,
73 u8 *idlest_bit); 93 u8 *idlest_bit);
74 94
95extern u8 cpu_mask;
96
75extern const struct clkops clkops_omap2_dflt_wait; 97extern const struct clkops clkops_omap2_dflt_wait;
76extern const struct clkops clkops_omap2_dflt; 98extern const struct clkops clkops_omap2_dflt;
77 99
78extern u8 cpu_mask; 100extern struct clk_functions omap2_clk_functions;
101extern struct clk *vclk, *sclk;
79 102
80/* clksel_rate data common to 24xx/343x */ 103extern const struct clksel_rate gpt_32k_rates[];
81static const struct clksel_rate gpt_32k_rates[] = { 104extern const struct clksel_rate gpt_sys_rates[];
82 { .div = 1, .val = 0, .flags = RATE_IN_24XX | RATE_IN_343X | DEFAULT_RATE }, 105extern const struct clksel_rate gfx_l3_rates[];
83 { .div = 0 }
84};
85
86static 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
91static 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