diff options
Diffstat (limited to 'arch/arm/mach-omap2/voltage.h')
-rw-r--r-- | arch/arm/mach-omap2/voltage.h | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h index db23d493f66..54402989626 100644 --- a/arch/arm/mach-omap2/voltage.h +++ b/arch/arm/mach-omap2/voltage.h | |||
@@ -31,6 +31,8 @@ | |||
31 | #define OMAP3_VOLTOFFSET 0xff | 31 | #define OMAP3_VOLTOFFSET 0xff |
32 | #define OMAP3_VOLTSETUP2 0xff | 32 | #define OMAP3_VOLTSETUP2 0xff |
33 | 33 | ||
34 | struct omap_vdd_info; | ||
35 | |||
34 | /** | 36 | /** |
35 | * struct omap_vfsm_instance_data - per-voltage manager FSM register/bitfield | 37 | * struct omap_vfsm_instance_data - per-voltage manager FSM register/bitfield |
36 | * data | 38 | * data |
@@ -50,11 +52,14 @@ struct omap_vfsm_instance_data { | |||
50 | 52 | ||
51 | /** | 53 | /** |
52 | * struct voltagedomain - omap voltage domain global structure. | 54 | * struct voltagedomain - omap voltage domain global structure. |
53 | * @name: Name of the voltage domain which can be used as a unique | 55 | * @name: Name of the voltage domain which can be used as a unique identifier. |
54 | * identifier. | 56 | * @node: list_head linking all voltage domains |
57 | * @vdd: to be removed | ||
55 | */ | 58 | */ |
56 | struct voltagedomain { | 59 | struct voltagedomain { |
57 | char *name; | 60 | char *name; |
61 | struct list_head node; | ||
62 | struct omap_vdd_info *vdd; | ||
58 | }; | 63 | }; |
59 | 64 | ||
60 | /** | 65 | /** |
@@ -116,7 +121,6 @@ struct omap_volt_pmic_info { | |||
116 | * @vc_data : structure containing various various vc registers, | 121 | * @vc_data : structure containing various various vc registers, |
117 | * shifts, masks etc. | 122 | * shifts, masks etc. |
118 | * @vfsm : voltage manager FSM data | 123 | * @vfsm : voltage manager FSM data |
119 | * @voltdm : pointer to the voltage domain structure | ||
120 | * @debug_dir : debug directory for this voltage domain. | 124 | * @debug_dir : debug directory for this voltage domain. |
121 | * @curr_volt : current voltage for this vdd. | 125 | * @curr_volt : current voltage for this vdd. |
122 | * @prm_irqst_mod : PRM module id used for PRM IRQ status register access | 126 | * @prm_irqst_mod : PRM module id used for PRM IRQ status register access |
@@ -130,7 +134,6 @@ struct omap_vdd_info { | |||
130 | struct omap_vp_runtime_data vp_rt_data; | 134 | struct omap_vp_runtime_data vp_rt_data; |
131 | struct omap_vc_instance_data *vc_data; | 135 | struct omap_vc_instance_data *vc_data; |
132 | const struct omap_vfsm_instance_data *vfsm; | 136 | const struct omap_vfsm_instance_data *vfsm; |
133 | struct voltagedomain voltdm; | ||
134 | struct dentry *debug_dir; | 137 | struct dentry *debug_dir; |
135 | u32 curr_volt; | 138 | u32 curr_volt; |
136 | bool vp_enabled; | 139 | bool vp_enabled; |
@@ -139,7 +142,7 @@ struct omap_vdd_info { | |||
139 | u8 prm_irqst_reg; | 142 | u8 prm_irqst_reg; |
140 | u32 (*read_reg) (u16 mod, u8 offset); | 143 | u32 (*read_reg) (u16 mod, u8 offset); |
141 | void (*write_reg) (u32 val, u16 mod, u8 offset); | 144 | void (*write_reg) (u32 val, u16 mod, u8 offset); |
142 | int (*volt_scale) (struct omap_vdd_info *vdd, | 145 | int (*volt_scale) (struct voltagedomain *voltdm, |
143 | unsigned long target_volt); | 146 | unsigned long target_volt); |
144 | }; | 147 | }; |
145 | 148 | ||
@@ -155,16 +158,11 @@ struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm, | |||
155 | unsigned long volt); | 158 | unsigned long volt); |
156 | unsigned long omap_voltage_get_nom_volt(struct voltagedomain *voltdm); | 159 | unsigned long omap_voltage_get_nom_volt(struct voltagedomain *voltdm); |
157 | struct dentry *omap_voltage_get_dbgdir(struct voltagedomain *voltdm); | 160 | struct dentry *omap_voltage_get_dbgdir(struct voltagedomain *voltdm); |
158 | int __init omap_voltage_early_init(struct omap_vdd_info *omap_vdd_array[], | ||
159 | u8 omap_vdd_count); | ||
160 | #ifdef CONFIG_PM | 161 | #ifdef CONFIG_PM |
161 | int omap_voltage_register_pmic(struct voltagedomain *voltdm, | 162 | int omap_voltage_register_pmic(struct voltagedomain *voltdm, |
162 | struct omap_volt_pmic_info *pmic_info); | 163 | struct omap_volt_pmic_info *pmic_info); |
163 | void omap_change_voltscale_method(struct voltagedomain *voltdm, | 164 | void omap_change_voltscale_method(struct voltagedomain *voltdm, |
164 | int voltscale_method); | 165 | int voltscale_method); |
165 | /* API to get the voltagedomain pointer */ | ||
166 | struct voltagedomain *omap_voltage_domain_lookup(char *name); | ||
167 | |||
168 | int omap_voltage_late_init(void); | 166 | int omap_voltage_late_init(void); |
169 | #else | 167 | #else |
170 | static inline int omap_voltage_register_pmic(struct voltagedomain *voltdm, | 168 | static inline int omap_voltage_register_pmic(struct voltagedomain *voltdm, |
@@ -178,10 +176,11 @@ static inline int omap_voltage_late_init(void) | |||
178 | { | 176 | { |
179 | return -EINVAL; | 177 | return -EINVAL; |
180 | } | 178 | } |
181 | static inline struct voltagedomain *omap_voltage_domain_lookup(char *name) | ||
182 | { | ||
183 | return ERR_PTR(-EINVAL); | ||
184 | } | ||
185 | #endif | 179 | #endif |
186 | 180 | ||
181 | extern void omap3xxx_voltagedomains_init(void); | ||
182 | extern void omap44xx_voltagedomains_init(void); | ||
183 | |||
184 | struct voltagedomain *voltdm_lookup(const char *name); | ||
185 | void voltdm_init(struct voltagedomain **voltdm_list); | ||
187 | #endif | 186 | #endif |