diff options
author | Jean Pihet <j-pihet@ti.com> | 2012-04-25 07:13:17 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2012-05-31 19:36:30 -0400 |
commit | 21ff63ad131218048525fbd37d065ce61f03bcbd (patch) | |
tree | a50d72ca4f71b341fd0cf48d72a3dce5d7a49289 | |
parent | 7fb149ffe357d6ad672cf9325181530b4c478a81 (diff) |
ARM: OMAP: SmartReflex: Move smartreflex driver to drivers/
After a clean-up of the interfaces the OMAP Smartreflex IP driver is now a
generic driver. Move it to drivers/power/avs/.
The build is controlled by the following Kconfig options:
. CONFIG_POWER_AVS: general knob for Adaptive Voltage Scaling support,
. CONFIG_POWER_AVS_OMAP: AVS(Adaptive Voltage Scaling)
support on OMAP containing the version 1 or version 2 of the SmartReflex IP,
. CONFIG_POWER_AVS_OMAP_CLASS3: Class 3 implementation of Smartreflex.
Signed-off-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: J Keerthy <j-keerthy@ti.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
-rw-r--r-- | arch/arm/mach-omap2/Makefile | 4 | ||||
-rw-r--r-- | arch/arm/plat-omap/Kconfig | 22 | ||||
-rw-r--r-- | drivers/power/Kconfig | 2 | ||||
-rw-r--r-- | drivers/power/Makefile | 1 | ||||
-rw-r--r-- | drivers/power/avs/Kconfig | 12 | ||||
-rw-r--r-- | drivers/power/avs/Makefile | 1 | ||||
-rw-r--r-- | drivers/power/avs/smartreflex.c (renamed from arch/arm/mach-omap2/smartreflex.c) | 5 |
7 files changed, 22 insertions, 25 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 518444acc90f..f8ee10a06f46 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -70,8 +70,8 @@ obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o omap-mpuss-lowpower.o \ | |||
70 | cpuidle44xx.o | 70 | cpuidle44xx.o |
71 | obj-$(CONFIG_PM_DEBUG) += pm-debug.o | 71 | obj-$(CONFIG_PM_DEBUG) += pm-debug.o |
72 | 72 | ||
73 | obj-$(CONFIG_POWER_AVS_OMAP) += sr_device.o smartreflex.o | 73 | obj-$(CONFIG_POWER_AVS_OMAP) += sr_device.o |
74 | obj-$(CONFIG_POWER_AVS_OMAP_CLASS3) += smartreflex-class3.o | 74 | obj-$(CONFIG_POWER_AVS_OMAP_CLASS3) += smartreflex-class3.o |
75 | 75 | ||
76 | AFLAGS_sleep24xx.o :=-Wa,-march=armv6 | 76 | AFLAGS_sleep24xx.o :=-Wa,-march=armv6 |
77 | AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a$(plus_sec) | 77 | AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a$(plus_sec) |
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index bba384dfbcf6..816dec062f3c 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
@@ -45,26 +45,12 @@ config OMAP_DEBUG_LEDS | |||
45 | depends on OMAP_DEBUG_DEVICES | 45 | depends on OMAP_DEBUG_DEVICES |
46 | default y if LEDS_CLASS | 46 | default y if LEDS_CLASS |
47 | 47 | ||
48 | menuconfig POWER_AVS | ||
49 | tristate "Adaptive Voltage Scaling class support" | ||
50 | help | ||
51 | AVS(Adaptive Voltage Scaling) is a power management technique which | ||
52 | finely controls the operating voltage of a device in order to optimize | ||
53 | (i.e. reduce) its power consumption. | ||
54 | At a given operating point the voltage is adapted depending on | ||
55 | static factors (chip manufacturing process) and dynamic factors | ||
56 | (temperature depending performance). | ||
57 | AVS is also called SmartReflex on OMAP devices. | ||
58 | |||
59 | Say Y here to enable Adaptive Voltage Scaling class support. | ||
60 | |||
61 | if POWER_AVS | ||
62 | |||
63 | config POWER_AVS_OMAP | 48 | config POWER_AVS_OMAP |
64 | bool "AVS(Adaptive Voltage Scaling) support for OMAP IP versions 1&2" | 49 | bool "AVS(Adaptive Voltage Scaling) support for OMAP IP versions 1&2" |
65 | depends on (ARCH_OMAP3 || ARCH_OMAP4) && PM | 50 | depends on POWER_AVS && (ARCH_OMAP3 || ARCH_OMAP4) && PM |
66 | help | 51 | help |
67 | Say Y to enable AVS support on OMAP containing the version 1 or | 52 | Say Y to enable AVS(Adaptive Voltage Scaling) |
53 | support on OMAP containing the version 1 or | ||
68 | version 2 of the SmartReflex IP. | 54 | version 2 of the SmartReflex IP. |
69 | V1 is the 65nm version used in OMAP3430. | 55 | V1 is the 65nm version used in OMAP3430. |
70 | V2 is the update for the 45nm version of the IP used in OMAP3630 | 56 | V2 is the update for the 45nm version of the IP used in OMAP3630 |
@@ -89,8 +75,6 @@ config POWER_AVS_OMAP_CLASS3 | |||
89 | Class 3 implementation of Smartreflex employs continuous hardware | 75 | Class 3 implementation of Smartreflex employs continuous hardware |
90 | voltage calibration. | 76 | voltage calibration. |
91 | 77 | ||
92 | endif # POWER_AVS | ||
93 | |||
94 | config OMAP_RESET_CLOCKS | 78 | config OMAP_RESET_CLOCKS |
95 | bool "Reset unused clocks during boot" | 79 | bool "Reset unused clocks during boot" |
96 | depends on ARCH_OMAP | 80 | depends on ARCH_OMAP |
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index 99dc29f2f2f2..d416773771ef 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig | |||
@@ -308,3 +308,5 @@ config AB8500_BATTERY_THERM_ON_BATCTRL | |||
308 | Say Y to enable battery temperature measurements using | 308 | Say Y to enable battery temperature measurements using |
309 | thermistor connected on BATCTRL ADC. | 309 | thermistor connected on BATCTRL ADC. |
310 | endif # POWER_SUPPLY | 310 | endif # POWER_SUPPLY |
311 | |||
312 | source "drivers/power/avs/Kconfig" | ||
diff --git a/drivers/power/Makefile b/drivers/power/Makefile index b6b243416c0e..ee58afb1e71f 100644 --- a/drivers/power/Makefile +++ b/drivers/power/Makefile | |||
@@ -43,4 +43,5 @@ obj-$(CONFIG_CHARGER_GPIO) += gpio-charger.o | |||
43 | obj-$(CONFIG_CHARGER_MANAGER) += charger-manager.o | 43 | obj-$(CONFIG_CHARGER_MANAGER) += charger-manager.o |
44 | obj-$(CONFIG_CHARGER_MAX8997) += max8997_charger.o | 44 | obj-$(CONFIG_CHARGER_MAX8997) += max8997_charger.o |
45 | obj-$(CONFIG_CHARGER_MAX8998) += max8998_charger.o | 45 | obj-$(CONFIG_CHARGER_MAX8998) += max8998_charger.o |
46 | obj-$(CONFIG_POWER_AVS) += avs/ | ||
46 | obj-$(CONFIG_CHARGER_SMB347) += smb347-charger.o | 47 | obj-$(CONFIG_CHARGER_SMB347) += smb347-charger.o |
diff --git a/drivers/power/avs/Kconfig b/drivers/power/avs/Kconfig new file mode 100644 index 000000000000..18493f7a8f6f --- /dev/null +++ b/drivers/power/avs/Kconfig | |||
@@ -0,0 +1,12 @@ | |||
1 | menuconfig POWER_AVS | ||
2 | tristate "Adaptive Voltage Scaling class support" | ||
3 | help | ||
4 | AVS is a power management technique which finely controls the | ||
5 | operating voltage of a device in order to optimize (i.e. reduce) | ||
6 | its power consumption. | ||
7 | At a given operating point the voltage is adapted depending on | ||
8 | static factors (chip manufacturing process) and dynamic factors | ||
9 | (temperature depending performance). | ||
10 | AVS is also called SmartReflex on OMAP devices. | ||
11 | |||
12 | Say Y here to enable Adaptive Voltage Scaling class support. | ||
diff --git a/drivers/power/avs/Makefile b/drivers/power/avs/Makefile new file mode 100644 index 000000000000..0843386a6c19 --- /dev/null +++ b/drivers/power/avs/Makefile | |||
@@ -0,0 +1 @@ | |||
obj-$(CONFIG_POWER_AVS_OMAP) += smartreflex.o | |||
diff --git a/arch/arm/mach-omap2/smartreflex.c b/drivers/power/avs/smartreflex.c index 515041ccccb8..44efc6e202af 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/drivers/power/avs/smartreflex.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Author: Thara Gopinath <thara@ti.com> | 4 | * Author: Thara Gopinath <thara@ti.com> |
5 | * | 5 | * |
6 | * Copyright (C) 2010 Texas Instruments, Inc. | 6 | * Copyright (C) 2012 Texas Instruments, Inc. |
7 | * Thara Gopinath <thara@ti.com> | 7 | * Thara Gopinath <thara@ti.com> |
8 | * | 8 | * |
9 | * Copyright (C) 2008 Nokia Corporation | 9 | * Copyright (C) 2008 Nokia Corporation |
@@ -27,9 +27,6 @@ | |||
27 | #include <linux/pm_runtime.h> | 27 | #include <linux/pm_runtime.h> |
28 | #include <linux/power/smartreflex.h> | 28 | #include <linux/power/smartreflex.h> |
29 | 29 | ||
30 | #include "common.h" | ||
31 | #include "pm.h" | ||
32 | |||
33 | #define SMARTREFLEX_NAME_LEN 16 | 30 | #define SMARTREFLEX_NAME_LEN 16 |
34 | #define NVALUE_NAME_LEN 40 | 31 | #define NVALUE_NAME_LEN 40 |
35 | #define SR_DISABLE_TIMEOUT 200 | 32 | #define SR_DISABLE_TIMEOUT 200 |