With OMAP3630 onwards, a new SmartReflex AVS class of operation Class 1.5 was introduced. * Class 1.5 - Periodic s/w calibration This uses the h/w calibration loop and at the end of calibration stores the voltages to be used run time, periodic recalibration is performed as well. The operational mode is describes as the following: * SmartReflex AVS h/w calibration loop is essential to identify the optimal voltage for a given OPP. * Once this optimal voltage is detected, SmartReflex AVS loop is disabled in class 1.5 mode of operation. * Until there is a need for a recalibration, any further transition to an OPP voltage which is calibrated can use the calibrated voltage and does not require enabling the SR AVS h/w loop. * On a periodic basis (recommendation being once approximately every 24 hours), software is expected to perform a recalibration to find a new optimal voltage which is compensated for device aging. - For performing this recalibration, the start voltage does not need to be the nominal voltage anymore. instead, the system can start with a voltage which is 50mV higher than the previously calibrated voltage to identify the new optimal voltage as the aging factor within a period of 1 day is not going to be anywhere close to 50mV. - This "new starting point" for recalibration is called a dynamic nominal voltage for that voltage point. In short, with the introduction of SmartReflex class 1.5, there are three new voltages possible in a system's DVFS transition: * Nominal Voltage - The maximum voltage needed for a worst possible device in the worst possible conditions. This is the voltage we choose as the starting point for the h/w loop to optimize for the first time calibration on system bootup. * Dynamic Nominal Voltage - Worst case voltage for a specific device in considering the system aging on the worst process device. * Calibrated Voltage - Best voltage for the current device at a given point of time. In terms of the implementation, doing calibration involves waiting for the SmartReflex h/w loop to settle down, and doing this as part of the DVFS flow itself would increase the latency of DVFS transition when there is a need to calibrate that opp. instead, the calibration is performed "out of path" using a workqueue statemachine. The workqueue waits for the system stabilization, then enables VP interrupts to monitor for system instability interms of voltage oscillations that are reported back to the system as interrupts, in case of prolonged system oscillations, nominal voltage is chosen as a safe voltage and this event is logged in the system log for developer debug and fixing. For the recalibration, a common workqueue for all domains is started at the start of the class initialization and it resets the calibrated voltages on a periodic basis. For distros that may choose not to do the recommended periodic recalibration, instead choose to perform boot time calibration, kconfig configuration option is provided to do so.