Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: OMAP2+: SmartReflex: add POWER_AVS Kconfig options

Add a Kconfig menu (POWER_AVS) and rename the Kconfig options
for the OMAP SmartReflex implementation:
CONFIG_OMAP_SMARTREFLEX renames to CONFIG_POWER_AVS_OMAP
CONFIG_OMAP_SMARTREFLEX_CLASS3 renames to CONFIG_POWER_AVS_OMAP_CLASS3

This change makes the SmartReflex implementation ready for the move
to drivers/.

Signed-off-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: J Keerthy <j-keerthy@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>

authored by

Jean Pihet and committed by
Kevin Hilman
7fb149ff 308d1bd0

+35 -19
+3 -2
arch/arm/mach-omap2/Makefile
··· 69 69 obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o omap-mpuss-lowpower.o \ 70 70 cpuidle44xx.o 71 71 obj-$(CONFIG_PM_DEBUG) += pm-debug.o 72 - obj-$(CONFIG_OMAP_SMARTREFLEX) += sr_device.o smartreflex.o 73 - obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3) += smartreflex-class3.o 72 + 73 + obj-$(CONFIG_POWER_AVS_OMAP) += sr_device.o smartreflex.o 74 + obj-$(CONFIG_POWER_AVS_OMAP_CLASS3) += smartreflex-class3.o 74 75 75 76 AFLAGS_sleep24xx.o :=-Wa,-march=armv6 76 77 AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a$(plus_sec)
+1 -1
arch/arm/mach-omap2/pm.h
··· 88 88 static inline void enable_omap3630_toggle_l2_on_restore(void) { } 89 89 #endif /* defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3) */ 90 90 91 - #ifdef CONFIG_OMAP_SMARTREFLEX 91 + #ifdef CONFIG_POWER_AVS_OMAP 92 92 extern int omap_devinit_smartreflex(void); 93 93 extern void omap_enable_smartreflex_on_init(void); 94 94 #else
+30 -15
arch/arm/plat-omap/Kconfig
··· 45 45 depends on OMAP_DEBUG_DEVICES 46 46 default y if LEDS_CLASS 47 47 48 - config OMAP_SMARTREFLEX 49 - bool "SmartReflex support" 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 64 + bool "AVS(Adaptive Voltage Scaling) support for OMAP IP versions 1&2" 50 65 depends on (ARCH_OMAP3 || ARCH_OMAP4) && PM 51 66 help 52 - Say Y if you want to enable SmartReflex. 53 - 54 - SmartReflex can perform continuous dynamic voltage 55 - scaling around the nominal operating point voltage 56 - according to silicon characteristics and operating 57 - conditions. Enabling SmartReflex reduces power 58 - consumption. 67 + Say Y to enable AVS support on OMAP containing the version 1 or 68 + version 2 of the SmartReflex IP. 69 + V1 is the 65nm version used in OMAP3430. 70 + V2 is the update for the 45nm version of the IP used in OMAP3630 71 + and OMAP4430 59 72 60 73 Please note, that by default SmartReflex is only 61 - initialized. To enable the automatic voltage 62 - compensation for vdd mpu and vdd core from user space, 74 + initialized and not enabled. To enable the automatic voltage 75 + compensation for vdd mpu and vdd core from user space, 63 76 user must write 1 to 64 - /debug/voltage/vdd_<X>/smartreflex/autocomp, 65 - where X is mpu or core for OMAP3. 77 + /debug/smartreflex/sr_<X>/autocomp, 78 + where X is mpu_iva or core for OMAP3. 66 79 Optionally autocompensation can be enabled in the kernel 67 80 by default during system init via the enable_on_init flag 68 81 which an be passed as platform data to the smartreflex driver. 69 82 70 - config OMAP_SMARTREFLEX_CLASS3 83 + config POWER_AVS_OMAP_CLASS3 71 84 bool "Class 3 mode of Smartreflex Implementation" 72 - depends on OMAP_SMARTREFLEX && TWL4030_CORE 85 + depends on POWER_AVS_OMAP && TWL4030_CORE 73 86 help 74 87 Say Y to enable Class 3 implementation of Smartreflex 75 88 76 89 Class 3 implementation of Smartreflex employs continuous hardware 77 90 voltage calibration. 91 + 92 + endif # POWER_AVS 78 93 79 94 config OMAP_RESET_CLOCKS 80 95 bool "Reset unused clocks during boot"
+1 -1
include/linux/power/smartreflex.h
··· 207 207 const char *sensor_voltdm_name; 208 208 }; 209 209 210 - #ifdef CONFIG_OMAP_SMARTREFLEX 210 + #ifdef CONFIG_POWER_AVS_OMAP 211 211 /* 212 212 * The smart reflex driver supports CLASS1 CLASS2 and CLASS3 SR. 213 213 * The smartreflex class driver should pass the class type.