Enable gamma feature in DSS

This patch enables the Gamma table to be loaded. sysfs entries are used to
control the value of gamma ranging from 0.2 to 2.0 in steps of 0.2.
The different values of gamma can also be used to alter the brightness
level of image.

Change-Id: I072bc5465ad636bfb1a416db1534542dfd5fa421
Signed-off-by: Sujeet Barnawal <s-baranwal@ti.com>
Clock rate for dpll_core_m6x2_ck for OPP100 should be exactly 266666666 = 1600000000 / 6 (266600000 is rounded down to 228571428 = 1600000000 / 7).
OMAP4: Workaround the OCP synchronisation issue with 32K synctimer.

Backport from:
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap.git;
a=commitdiff;h=68523f4233de5f233478dde0a63047b4efb710b8

Original comment:
On OMAP4, recently a synchronisation bug is discovered by hardware
team, which leads to incorrect timer value read from 32K sync timer
IP when the IP is comming out of idle.

The issue is due to the synchronization methodology used in the SYNCTIMER IP.
The value of the counter register in 32kHz domain is synchronized to the OCP
domain register only at count up event, and if the OCP clock is switched off,
the OCP register gets out of synch until the first count up event after the
clock is switched back -at the next falling edge of the 32kHz clock.

Further investigation revealed that it applies to gptimer1 and watchdog timer2
as well which may run on 32KHz. This patch fixes the issue for all the
applicable modules.

The BUG has not made it yet to the OMAP errata list and it is applicable to
OMAP1/2/3/4/5. OMAP1/2/3 it is taken care indirectly by autodeps.

By enabling static depedency of wakeup clockdomain with MPU, as soon as MPU
is woken up from lowpower state(idle) or whenever MPU is active, PRCM forces
the OCP clock to be running and allow the counter value to be updated properly
in the OCP clock domain.

The bug is going to fixed in future OMAP versions.

Change-Id: I3c7ff239c3dcac180fcae50c1b909d417b2b8e16
Reported-Tested-by: dave.long@linaro.org
[dave.long@linaro.org: Reported the oprofile time stamp issue with synctimer
and helped to test this patch]
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@ti.com>
ARM: OMAP4: Only wait for module ready for clocks enabled via MODULEMODE

Some clocks are enabled by programming the MODULEMODE bit field of the PRCM
CLKCTRL registers. For these clocks, we should wait for the module to
transition from the idle state when we enable them. For other clocks, such as
optional clocks, that are enabled via other bits in the CLKCTRL registers, the
idle state is not updated when we enable them and so we should not wait for
the idle state to change when we enable them. This is causing unnecessary
delays to occur when enabling optional clocks as we are waiting for the idle
state to change and eventually timeout.

Change-Id: Iaa8a86d38a55b4faa95988c48e4bac0e772c7492
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Huzefa Kankroliwala <huzefank@ti.com>
omap: rpmsg: unmap vring memory address

A call to iounmap() of the vring memory address was missing during the deletion
stage of the rpmsg-virtqueues, thus causing a memory leak.

Change-Id: I208c908e064e3c9cc56e6c21736725836eb2d74d

Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
remoteproc: add mutex protection for traces

In rproc_put() the buffers used to read remoteproc's traces were being unmapped
without any protection.  If at the same time a cat on the traces is done, it
may access an unmapped buffer leading to a crash.

This patch protects the access and unmapping of dump/trace buffers with a
mutex.  It also fixes some checkpatch issues in the trace functions.

Change-Id: I0a6f52e9df691bc1d4ff894febb9a20819b4b7c3

Signed-off-by: Miguel Vadillo <vadillo@ti.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
Add 192MHz MPU Slot