OMAPDSS: DISPC: Pipe threshold sizes power optimization.

This patch changes the calculation of thresholds and sets low
threshold to half of buffer size for OMAP4. The memory will
able to sleep between transactions to dss because dss will
read by big chunks.

boype: Also removed dispc_calculate_threshold function, as it is no longer used.

Backport from TI omapzoom kernel 3.4 repo, based upon:
http://git.omapzoom.org/?p=kernel/omap.git;a=commit;h=cd99eb345e1ad26ffbc665f46ea917dad762937b
OMAPDSS:DISPC: Gamma feature implementation

I think this code needs more work: beta in leanKernel for now.

This patch enables the gamma table to be loaded. Gamma value
can range from 0.2 to 2.0 in steps of 0.2 and thus they have
indices from 1 to 10 correspondingly. To disable gamma, value
shall be set to zero. The different values of gamma can also
be used to alter the brightness level of image.

Change-Id: I212a33f5b87c6510ba36720594378affa9ed5bba
Signed-off-by: Sujeet Barnawal <s-baranwal@ti.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Auto detects if its a charger in the OTG cable, if it is, charges, if it isnt, uses default OTG. - all work from caioketo

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
lib/checksum.c: optimize do_csum a bit

Reduce the number of variables modified by the loop in do_csum() by 1,
which seems like a good idea.  On Nios II (a RISC CPU with 3-operand
instruction set) it reduces the loop from 7 to 6 instructions, including
the conditional branch.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Clock rate for dpll_core_m6x2_ck for OPP100 should be exactly 266666666
= 1600000000 / 6 (266600000 is rounded down to 228571428 = 1600000000 / 7).