diff options
Diffstat (limited to 'arch/arm/mach-msm/clock.h')
-rw-r--r-- | arch/arm/mach-msm/clock.h | 55 |
1 files changed, 9 insertions, 46 deletions
diff --git a/arch/arm/mach-msm/clock.h b/arch/arm/mach-msm/clock.h index c270b552ed1..2c007f606d2 100644 --- a/arch/arm/mach-msm/clock.h +++ b/arch/arm/mach-msm/clock.h | |||
@@ -17,12 +17,10 @@ | |||
17 | #ifndef __ARCH_ARM_MACH_MSM_CLOCK_H | 17 | #ifndef __ARCH_ARM_MACH_MSM_CLOCK_H |
18 | #define __ARCH_ARM_MACH_MSM_CLOCK_H | 18 | #define __ARCH_ARM_MACH_MSM_CLOCK_H |
19 | 19 | ||
20 | #include <linux/init.h> | ||
20 | #include <linux/list.h> | 21 | #include <linux/list.h> |
21 | #include <mach/clk.h> | 22 | #include <mach/clk.h> |
22 | 23 | ||
23 | #include "clock-pcom.h" | ||
24 | #include "clock-7x30.h" | ||
25 | |||
26 | #define CLKFLAG_INVERT 0x00000001 | 24 | #define CLKFLAG_INVERT 0x00000001 |
27 | #define CLKFLAG_NOINVERT 0x00000002 | 25 | #define CLKFLAG_NOINVERT 0x00000002 |
28 | #define CLKFLAG_NONEST 0x00000004 | 26 | #define CLKFLAG_NONEST 0x00000004 |
@@ -45,6 +43,7 @@ struct clk_ops { | |||
45 | unsigned (*get_rate)(unsigned id); | 43 | unsigned (*get_rate)(unsigned id); |
46 | unsigned (*is_enabled)(unsigned id); | 44 | unsigned (*is_enabled)(unsigned id); |
47 | long (*round_rate)(unsigned id, unsigned rate); | 45 | long (*round_rate)(unsigned id, unsigned rate); |
46 | bool (*is_local)(unsigned id); | ||
48 | }; | 47 | }; |
49 | 48 | ||
50 | struct clk { | 49 | struct clk { |
@@ -52,58 +51,22 @@ struct clk { | |||
52 | uint32_t remote_id; | 51 | uint32_t remote_id; |
53 | uint32_t count; | 52 | uint32_t count; |
54 | uint32_t flags; | 53 | uint32_t flags; |
55 | const char *name; | ||
56 | struct clk_ops *ops; | 54 | struct clk_ops *ops; |
57 | const char *dbg_name; | 55 | const char *dbg_name; |
58 | struct list_head list; | 56 | struct list_head list; |
59 | struct device *dev; | ||
60 | }; | 57 | }; |
61 | 58 | ||
62 | #define A11S_CLK_CNTL_ADDR (MSM_CSR_BASE + 0x100) | ||
63 | #define A11S_CLK_SEL_ADDR (MSM_CSR_BASE + 0x104) | ||
64 | #define A11S_VDD_SVS_PLEVEL_ADDR (MSM_CSR_BASE + 0x124) | ||
65 | |||
66 | #ifdef CONFIG_DEBUG_FS | ||
67 | #define CLOCK_DBG_NAME(x) .dbg_name = x, | ||
68 | #else | ||
69 | #define CLOCK_DBG_NAME(x) | ||
70 | #endif | ||
71 | |||
72 | #define CLOCK(clk_name, clk_id, clk_dev, clk_flags) { \ | ||
73 | .name = clk_name, \ | ||
74 | .id = clk_id, \ | ||
75 | .flags = clk_flags, \ | ||
76 | .dev = clk_dev, \ | ||
77 | CLOCK_DBG_NAME(#clk_id) \ | ||
78 | } | ||
79 | |||
80 | #define OFF CLKFLAG_AUTO_OFF | 59 | #define OFF CLKFLAG_AUTO_OFF |
81 | #define CLK_MIN CLKFLAG_MIN | 60 | #define CLK_MIN CLKFLAG_MIN |
82 | #define CLK_MAX CLKFLAG_MAX | 61 | #define CLK_MAX CLKFLAG_MAX |
83 | #define CLK_MINMAX (CLK_MIN | CLK_MAX) | 62 | #define CLK_MINMAX (CLK_MIN | CLK_MAX) |
84 | #define NR_CLKS P_NR_CLKS | ||
85 | |||
86 | enum { | ||
87 | PLL_0 = 0, | ||
88 | PLL_1, | ||
89 | PLL_2, | ||
90 | PLL_3, | ||
91 | PLL_4, | ||
92 | PLL_5, | ||
93 | PLL_6, | ||
94 | NUM_PLL | ||
95 | }; | ||
96 | |||
97 | enum clkvote_client { | ||
98 | CLKVOTE_ACPUCLK = 0, | ||
99 | CLKVOTE_PMQOS, | ||
100 | CLKVOTE_MAX, | ||
101 | }; | ||
102 | |||
103 | int msm_clock_require_tcxo(unsigned long *reason, int nbits); | ||
104 | int msm_clock_get_name(uint32_t id, char *name, uint32_t size); | ||
105 | int ebi1_clk_set_min_rate(enum clkvote_client client, unsigned long rate); | ||
106 | unsigned long clk_get_max_axi_khz(void); | ||
107 | 63 | ||
64 | #ifdef CONFIG_DEBUG_FS | ||
65 | int __init clock_debug_init(void); | ||
66 | int __init clock_debug_add(struct clk *clock); | ||
67 | #else | ||
68 | static inline int __init clock_debug_init(void) { return 0; } | ||
69 | static inline int __init clock_debug_add(struct clk *clock) { return 0; } | ||
108 | #endif | 70 | #endif |
109 | 71 | ||
72 | #endif | ||