diff options
Diffstat (limited to 'arch/arm/mach-omap2/smartreflex-class3.c')
| -rw-r--r-- | arch/arm/mach-omap2/smartreflex-class3.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/arch/arm/mach-omap2/smartreflex-class3.c b/arch/arm/mach-omap2/smartreflex-class3.c index 955566eefac4..1da8f03c479e 100644 --- a/arch/arm/mach-omap2/smartreflex-class3.c +++ b/arch/arm/mach-omap2/smartreflex-class3.c | |||
| @@ -11,36 +11,37 @@ | |||
| 11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
| 12 | */ | 12 | */ |
| 13 | 13 | ||
| 14 | #include "smartreflex.h" | 14 | #include <linux/power/smartreflex.h> |
| 15 | #include "voltage.h" | ||
| 15 | 16 | ||
| 16 | static int sr_class3_enable(struct voltagedomain *voltdm) | 17 | static int sr_class3_enable(struct omap_sr *sr) |
| 17 | { | 18 | { |
| 18 | unsigned long volt = voltdm_get_voltage(voltdm); | 19 | unsigned long volt = voltdm_get_voltage(sr->voltdm); |
| 19 | 20 | ||
| 20 | if (!volt) { | 21 | if (!volt) { |
| 21 | pr_warning("%s: Curr voltage unknown. Cannot enable sr_%s\n", | 22 | pr_warning("%s: Curr voltage unknown. Cannot enable %s\n", |
| 22 | __func__, voltdm->name); | 23 | __func__, sr->name); |
| 23 | return -ENODATA; | 24 | return -ENODATA; |
| 24 | } | 25 | } |
| 25 | 26 | ||
| 26 | omap_vp_enable(voltdm); | 27 | omap_vp_enable(sr->voltdm); |
| 27 | return sr_enable(voltdm, volt); | 28 | return sr_enable(sr->voltdm, volt); |
| 28 | } | 29 | } |
| 29 | 30 | ||
| 30 | static int sr_class3_disable(struct voltagedomain *voltdm, int is_volt_reset) | 31 | static int sr_class3_disable(struct omap_sr *sr, int is_volt_reset) |
| 31 | { | 32 | { |
| 32 | sr_disable_errgen(voltdm); | 33 | sr_disable_errgen(sr->voltdm); |
| 33 | omap_vp_disable(voltdm); | 34 | omap_vp_disable(sr->voltdm); |
| 34 | sr_disable(voltdm); | 35 | sr_disable(sr->voltdm); |
| 35 | if (is_volt_reset) | 36 | if (is_volt_reset) |
| 36 | voltdm_reset(voltdm); | 37 | voltdm_reset(sr->voltdm); |
| 37 | 38 | ||
| 38 | return 0; | 39 | return 0; |
| 39 | } | 40 | } |
| 40 | 41 | ||
| 41 | static int sr_class3_configure(struct voltagedomain *voltdm) | 42 | static int sr_class3_configure(struct omap_sr *sr) |
| 42 | { | 43 | { |
| 43 | return sr_configure_errgen(voltdm); | 44 | return sr_configure_errgen(sr->voltdm); |
| 44 | } | 45 | } |
| 45 | 46 | ||
| 46 | /* SR class3 structure */ | 47 | /* SR class3 structure */ |
