Revert "Revert "Revert "OMAP4: PM: setup initial OPP configuration"""

This reverts commit b89fc2ec50ae026185e900b7de282ba6821a18ef.

Conflicts:

	arch/arm/mach-omap2/pm44xx.c
OMAP: EMIF: fix LP_MODE_PWR_DN value definition

According to TRM the EMIF Power-down mode is identified
by value 0x4 (EMIF_PWR_MGMT_CTRL.REG_LP_MODE)

Change-Id: I4d9b9534dea27ab4619af5b6d78de8ab14f0fead
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
omap2plus: cpufreq: Modify lpj recalculation logic

Somethimes "mdelay" function provide delay
that several times lower than it should be.

This happens because recalculating lpj
performed after switching OPP. In this case,
for short period of time, when OPP on MPU
was switched but lpj was not recalculated,
"udelay" function can provide incorrect
delay - upto 5 times lower
(if OPP was switched from lowest to highest).

This patch changes lpj recalculation logic to:
if OPP will be switched to higher - recalculate lpj before switching OPP,
if OPP will be switched to higher - recalculate lpj after switching OPP.

Change-Id: I3258e756c471fd0258a849d712ab00f4e1279ea9
Signed-off-by: Sergii Postulga <x0153364@ti.com>

Patch Set 3
defconfig: NL_UTF8 support
opp4xx: remove OPP10
usb: musb: fix pm_runtime mismatch (772aed4)
usb: musb: drop superfluous pm_runtime calls (f557978)
usb: musb: fix some runtime_pm issues

When runtime_pm was originally added, it was done in rather confusing
way: omap2430_musb_init() (called from musb_init_controller) would do
runtime_pm_get_sync() and musb_init_controller() itself would do
runtime_pm_put to balance it out. This is not only confusing but also
wrong if non-omap2430 glue layer is used.

This confusion resulted in commit 772aed45b604 "usb: musb: fix
pm_runtime mismatch", that removed runtime_pm_put() from
musb_init_controller as that looked unbalanced, and also happened to
fix unrelated isp1704_charger crash. However this broke runtime PM
functionality (musb is now always powered, even without gadget active).

Avoid these confusing runtime pm dependences by making
musb_init_controller() and omap2430_musb_init() do their own runtime
get/put pairs; also cover error paths. Remove unneeded runtime_pm_put
in omap2430_remove too. isp1704_charger crash that motivated
772aed45b604 will be fixed by following patch.

Cc: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>

Conflicts:

	drivers/usb/musb/omap2430.c
Linux 3.0.31
tuna-wifi: lower wlan voltage to 1.8V (faux123)
OMAP4: MUSB: peripheral isoch IN endpt support

This patch does the following
1. Updation of the TXCSR programmation sequence
2. When the occurance of a DMA completion occurs,
   if the completion results in residual (< max_packet_sz) data
   the TXPKTRDY bit is set to allow the sending of this data.
3. The above could occur in 2 scenarios:
	a. DMA Mode 0 which requires as per specification to set TXPKTRDY and
	   await the endpoint interrupt.
	b. DMA Mode 1, where the last packet is shorter that max_packet_sz.

Change-Id: Id517ea74f2b3f6f66ea768f0b505b4c059b27f55
Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
board-tuna: VAUX3 and VUSIM voltage tweak

original patch by ch33kybutt modified for leankernel to be
more stable due to the following kernel errors:

"Can't get vlcd for display!"
tuna-wifi: do not randomize MAC if bootloader doesn't pass it

Calculate MAC from SOC die_id which hopefully is unique enough.
SR: Custom SR Tuning v1 - supports MPU, IVA, and CORE

Override kernel default VDDMIN via sysfs (debug fs).
/sys/kernel/debug/smartreflex/sr_*/vmin
usb: musb: handle nuked ep dma interrupt

User can trigger disabling of gadget at run time while the
transfers are going on.
Eg: On android doing:
 echo 0       > /sys/class/android_usb/android0/enable
While a big file transfer is going on via PTP/MTP.

In such a case, musb_gadget_disable() calls nuke()
but the dma interrupt may still happen for an endpoint since hw
would raise the interrupt in anycase.

This can result in a NULL pointer access crash:

[  314.030426] PC is at txstate+0x74/0x20c
[  314.034759] LR is at musb_g_tx+0x140/0x204
[  314.039489] pc : [<c03506f4>]    lr : [<c0350bcc>]    psr: 20000193
[  314.039520] sp : c783bc68  ip : 00000002  fp : c783bc9c
[  314.052429] r10: 00000018  r9 : 00000000  r8 : 00000200
[  314.058258] r7 : 00000000  r6 : fc0ab130  r5 : c781a410  r4 : c6caf640
[  314.065643] r3 : 00000000  r2 : 00000000  r1 : 00000000  r0 : c781a000
[  315.083251] Backtrace:
[  315.086242] [<c0350680>] (txstate+0x0/0x20c) from [<c0350bcc>] (musb_g_tx+0x140/0x204)
[  315.095123] [<c0350a8c>] (musb_g_tx+0x0/0x204) from [<c034eb00>] (musb_dma_completion+0x40/0x54)
[  315.104980] [<c034eac0>] (musb_dma_completion+0x0/0x54) from [<c0351e6c>] (dma_controller_irq+0x118/0x184)
[  315.115661] [<c0351d54>] (dma_controller_irq+0x0/0x184) from [<c00d86b8>] (handle_irq_event_percpu+0x54/0x188)

So put protection in code to handle possiblity of getting an interrupt for an
endpoint that might have been already nuked.

Change-Id: I565a586264a87458f3bb4fb49ff9c3e4905e3e3c
Reported-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
checkt: show SR VMIN
build script: upload last 200 commit logs
build script: only upload when i tell it to
build script: some tweaks

Conflicts:

	buildlean.sh
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>
gamma control: allow sysfw write access to all