OMAP4: PM: setup initial OPP configuration

pm.c setups the initial voltage and frequencies for init devices
on bootup to be careful of invalid device configurations by
custom bootloaders. However, DVFS data structures are not aware
of these - As a result, when doing the first time scale of
a differnt device we could have a following scenario:

At boot - MPU,IVA,Core at OPP100

after pm framework has completed initialization, lets say IVA/AESS
transitions to OPP50, DVFS framework does not have information about
the OPP current frequency/voltage of IVA/MPU and sees that only
IVA is requested, moves the IVA and core to OPP50. This configuration
is invalid as MPU is currently at OPP100 and device should not have
scaled core to OPP50 without looking at OPP100 configuration of
MPU.

To resolve this, we populate the dvfs data structure with the
requisite init devices' frequency configuration by doing a
omap_device_scale.

Change-Id: Ib3048fb7fadec5adabbbcbce56c1ead026953de6
Reported-by: Hemanth V <hemanthv@ti.com>
Tested-by: Akash Choudhari <akashc@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
HACK: OMAP2+: Makefile: sequence SR earlier than idle init

SR should be initialized in sequence before idle initialization
is done and after pm basic inits are complete. PM initialization unfortunately
is not too smart and has to depend on initcall sequencing to ensure
proper dependencies are met. instead of fixing the entire PM init
sequence(which is possible with function pointers being registered and invoked,
but needs an entire revamp of OMAP PM's infrastructure), move SR initialization
up in the chain to ensure this works.

Change-Id: I643f73168753f618ccac6fd34b135aeb93923637
Signed-off-by: Nishanth Menon <nm@ti.com>
kernel/timer: Optimise apply_slack() for size and speed.

To apply proper slack, the original algorithm used to prepare a mask and
then apply the mask to obtain the appropriately rounded-off absolute
time the timer expires.

This patch modifies the masking logic to a bit-shift logic, therby
reducing the complexity and number of operations. Thus obtaining a minor
speed-up.

Signed-off-by: Chinmay V S <chinmay.v.s@pathpartnertech.com>
OMAP: TILER: Add bounds checking on format inputs

Added bounds checking to validate incoming tiler format.

Change-Id: Icd791cc294ecb1838afb3f91451626debd59c29e
Signed-off-by: Andy Gross <andy.gross@ti.com>
OMAP4: cpuidle: don't touch mpu and core state until CPU1 is off

MPU/Core logic and PD states shouldn't be changed until CPU1 is
completely off

Change-Id: Ia90126776e7bd7108c7b885c622df36323982cb0
Signed-off-by: Lianwei Wang <lian-wei.wang@motorola.com>
Signed-off-by: suilunlam <a0868997@ti.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
OMAP4: cpuidle: Some obvious optimisations to the code path