Add OMAP on-die governor to the thermal fw

Add OMAP on-die governor to the thermal fw

Add the OMAP on-die governor to the thermal framework.
This component will impose the policy for the on-die temp
sensor.

Change-Id: I68d69309c79088e44573991c940139e9710377f1
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
Thermal Governor: Disable annoying logging statement

Thermal Governor: Disable annoying logging statement

Remove the informative statement from the thermal governor

Change-Id: I2bf574ad7c57ec3b19231c27944f529b345d7cbb
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Thermal Governor: Update the actions for each thermal zone

Thermal Governor: Update the actions for each thermal zone

This patch applies the following changes to the governor:
 - Set the FATAL zone at 125C - accuracy of on-die sensor is already
included in the hot spot temperature extrapolation
 - Updated the formula to extrapolate the hot spot temperature:
the parameters of the formula are updated to keep OMAP in safe
thermal conditions
 - Fixed the main state machine handling the transition between
thermal zones
 - Fixed the thresholds and monitoring rate configuration
for the various thermal zones
 - Moved the cpu throttle from monitor zone to the panic zone
 - Updated the behavior in panic zone to handle consecutives entrance
into the panic zone
To summarize, this patch ensures that the CPU frequency is throttled
by 1 step when hot spot temperature enters into panic zone. Then
maximum CPU frequency is re-enabled when hot spot temperature comes back
into the monitor zone.

Change-Id: Idf870e3ae17c5b23921eeff9e31f2b3f193dbf2d
Signed-off-by: Sebastien Sabatier <s-sabatier1@ti.com>
Thermal Governor: Added logging statement

Thermal Governor: Added logging statement

This patch adds log when entering thermal zones

Change-Id: Iec6d70f6625bd756d5018026d3f50fbea7eddf3f
Signed-off-by: Sebastien Sabatier <s-sabatier1@ti.com>
Thermal: Modify the panic zone to be more agressive

Thermal: Modify the panic zone to be more agressive

Modify the panic zone to be more agressive with the cooling.
Basically once this zone is reached the governor should set the
threshold windows so that it can be notified if the temp is still
increasing once the the CPU is throttle.  If the temp is still increasing
then go to the next OPP until max throttling.

Change-Id: I4d4698a8f8ead5ce243032d80e136d7638e675f9
Signed-off-by: Dan Murphy <dmurphy@ti.com>
OMAP4 CPU Thermal governor: use PCB sensor to extrapolate hot spot temperature

OMAP4 CPU Thermal governor: use PCB sensor to extrapolate hot spot temperature

Even if OMAP4460/4470 on-die temperature sensor is located as close
as possible to OMAP MPU-SS, there is still an offset between on-die
sensor and OMAP hot spot.
This offset depends a lot on the additional system power:
various laws could be defined depending on the system power.
Relying on a PCB sensor allows correcting this offset temperature:
linear law can be used in thermal policy to adjust the temperature
read on the sensor and correct the offset at run time.

This patch adds the support of PCB temperature in the thermal governor:
- Updated formula to extrapolate hot spot from on-die sensor and PCB sensor
- Updated reconfiguration of thresholds that should take into account the
variation of PCB temperature
- Added additional thread to monitor the on-die temperature and make
average on latest 20 measurements:
This average temperature is mandatory to take care of huge delta
between on-die sensor and PCB sensor when the temperature
increases quickly (burst CPU activity).
This huge delta is coming from different response time between
on-die sensor and PCB sensor.

Change-Id: Ied89a7e3f3edd249808a245c0180cbfd073dcd1c
Signed-off-by: Sebastien Sabatier <s-sabatier1@ti.com>
ARM:OMAP4:Thermal Framework:TMP102 registration

ARM:OMAP4:Thermal Framework:TMP102 registration

The external sensor registration to omap die governor. The
sensor is present in som4470

Change-Id: I8b38dcdc4acd377bb544fa8487094cc976f6532f
Signed-off-by: Eugen Mandrenko <ievgen.mandrenko@ti.com>
Thermal Governor: OMAP4: cancel work task while suspending.

Thermal Governor: OMAP4: cancel work task while suspending.

Cancel work task while going to suspend and re-schedule after
resume.

Fixes:
	[  331.767303] CPU1: shutdown
	[  331.768310] Resume caused by I/O pad:
	CONTROL_PADCONF_WAKEUPEVENT_4[2]
	[  331.768310]    PD_CORE curr=ON prev=ON logic=ON
	[  331.768310]    PD_L4_PER curr=ON prev=ON logic=ON
	[  331.768310]          I2C1 mode=ENABLED idlest=ON

Change-Id: Ie69f404305e678e93c7b32ddff6ca536b0c9eed3
Tested-by: Ramajayam S <ramajayam.samudi@ti.com>
Signed-off-by: Ambresh K <ambresh@ti.com>
TI Thermal Governor: Updated the parameters for OMAP hot spot extrapolation

TI Thermal Governor: Updated the parameters for OMAP hot spot extrapolation

Due to a different OMAP die size between OMAP4460 and OMAP4470, the parameters
used to extrapolate the hot spot temperature from
the on-die sensor and the PCB sensor are different between 4460 and 4470.
When running thermal simulations, it appears that current parameters used on
OMAP4460 are not optimal.

This patch adds the capability to select the slope/const parameters according
to the OMAP44xx silicon revision and aligns these parameters with latest thermal
simulations (28th March 2012).

Change-Id: I828291504f6a23a1640c589af2d4913cf00f9745
Signed-off-by: Sebastien Sabatier <s-sabatier1@ti.com>
plat-omap: add compatibility with new TI OMAP thermal framework drivers
omap4: add 4430 ES2.3 support

omap4: add 4430 ES2.3 support

And default to 4430 ES2.3 for unidentified silicon.

Change-Id: I06b0aa9c5f33af25345996cf9d0c994491093096
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
OMAP4: ID: Chip detection for OMAP4470

Add support for detection of the next chip in the OMAP4 family: OMAP4470 ES1.0

Change-Id: I931d3df6e69fdc3ee4a307c204a68fc9b3ff519b
Signed-off-by: Leonid Iziumtsev <x0153368@ti.com>
modified by faux123
OMAP4: Add 4430 ES2.3 chip is check

OMAP4: Add 4430 ES2.3 chip is check

4430 ES2.3 chip is check was missed during the merge
phase.

Putting it back in

Change-Id: I94fa2b8f803acb2a13c2f7db4558b2864106d213
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Revert "fuse: re-work fuse_direct_io() to operate on iovec[]"

This reverts commit de187f1f3e34ebd992a94c5db70b4bc35e95f597.
Revert "fuse: re-work fuse_get_user_pages() to operate on iovec[]"

This reverts commit 7b595fcdee23940e18c1f41978b827518cea1900.
Revert "fuse: add basic support of iovec[] to fuse_req"

This reverts commit 8baf9ac7eb29911384aefa12a772294288ffad57.