Revert "Revert "OMAPDSS: DSS: Relax L3 bus bandwidth constraint""

This reverts commit 0649be7b05e183e2c80261bbfccd59d051a7a94b.
Revert "Revert "OMAPDSS: DSI: Enable DSI and DISPC configuration from board file""

This reverts commit f03d9ef21eb95210a00c65cbed26aa7b5e3676b6.
OMAP4: adding Vivante Corp 2/3D gcxxx driver files

Driver files to enable Vivante Corp 2/3D gcxxx hardware.

Change-Id: Ic7593e603a2b078879aa7a99f6dcf8074ed6b47d
Signed-off-by: Alexei Shlychkov <x0177296@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
Signed-off-by: Volodymyr Mieshkov <volodymyr.mieshkov@ti.com>
OMAP4: Adding cache-2dmanager

Based on k3.0 commit:
p-android-omap-3.0: 43eb373199a [Jack Yen <jyen@ti.com>]

Change-Id: I7e43de75a20a1cead49e902a7fedad9d4f568855
Signed-off-by: Jack Yen <jyen@ti.com>
Signed-off-by: Volodymyr Mieshkov <volodymyr.mieshkov@ti.com>
OMAP4: adding BLTsville header files

Change-Id: If573d2ea6f0d6e858e2dae94a629458d2d767cc5
Signed-off-by: David Sin <davidsin@ti.com>
Signed-off-by: Volodymyr Mieshkov <volodymyr.mieshkov@ti.com>
OMAP4: omaplfb: add rotation check to pass the correct stride

The patch fixed the stride calculation based on rotation angle.

Ported from k3.0, commit Id 6da9df431be5b [Jack Yen <jyen@ti.com>]

Change-Id: I7bb5e798568004e7429a5aff870ac9c5b64f87c6
Signed-off-by: Jack Yen <jyen@ti.com>
Signed-off-by: Volodymyr Mieshkov <volodymyr.mieshkov@ti.com>
ARM OMAP2+ PM: Centralize PM Initialization

Currently different PM layers  are initialized in different
places and there is no specific order or order depends on the
link order in makefile or it will depend on __initcall. This is an attempt
to initialize all PM layers from a single place so that dependencies are
properly taken care. Now PM init is done as a late init call so that all
dependencies are initialized before PM get initialized.
If driver tries to use PM APIs before PM Init, it would fail. So drivers
are expected to wait till PM init is done before PM APIs can be used.

Also omap cpufreq driver initialization is moved to lateinit_sync stage
so that omap cpufreq is initialized only after OMAP PM initialization.

Change-Id: Ib524428496538e2f41cd7e01445be0932a1f5b9a
Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com>
[grygorii.strashko@ti.com: rebased, move PM initialization on
subsys_initcall_sync layer to allow PMIC be initialized before]
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>

Conflicts:

	arch/arm/mach-omap2/pm.c
mmc: omap44XX: Fix Errata FSMR: Fix FSM reset time

MMC FSM is expected to take a maximum time of 100us
to get reset.

Change-Id: Ia3407cf77671bc8a5cd10375acbb2fb1c95befa4
Signed-off-by: Viswanath Puttagunta <vishp@ti.com>
ARM OMAP2+ OPP: Perform OPP registration as part of device build

Currently an OPP is registered as part of OPP Init and
an opp is not added if the corresponding device for that OPP is not
available. It's quite possible that by the time OPP init is called,
many of the devices may not be available. This will lead to those OPPs
not registered with DVFS layer.
It is better to register an OPP for a device when the device is built.
This will avoid dependency on device creation sequence with OPP layer.
As part of this change, based OPP init is moved as part of early init so
that OPP table information is available when devices are getting built.

Change-Id: Id9a085f21f21d1371f86d18e591350fd6c520b98
Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com>
[ivan.khoronzhuk@ti.com: moved omap_init_opp_table to __init
and replace static opp table on dynamic opp_table]
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
twl603x_battery: minor code cleanup in probe

Added unregistration of the bk_batt power supply if
probe fails after it is registered. Changed the
corresponding labels in probe function code.
Also removed unnecessary cancelling of delayed work
and goto fail if sysfs group creation failed.

Change-Id: I41f635008d2605caabb445e90d9442f59ec2e916
Signed-off-by: Oleg_Kosheliev <oleg.kosheliev@ti.com>
twl603x_battery: Fix race in probe

In probe was implemented such sequence:
1. request irqs (twl6030charger_fault_interrupt,
   twl6030charger_ctrl_interrupt)
2. init works (which are called from irq)
3. unmask irqs

The race occurs because USB driver unmasks
TWL6030_CHARGER_CTRL_INT before it must be
unmasked in twl6030_bci_battery_probe. Thus
at some conditions (e.g. on TWL6030 if battery
emulator is enabled) irq starts to handle
after point 1 and before point 2 is reached.
The irq tries to schedule uninited work. This
causes kernel instability or a deadlock.

In this patch the request of the irqs are
moved to the end of the twl6030_bci_battery_probe.
This helps to avoid races and is safe if
irqs are unmasked before probe ends and the
battery isn't ready to charge.

Change-Id: Icb9d35a20933bafdd23d9c06e63d6252db3087e3
Signed-off-by: Oleg_Kosheliev <oleg.kosheliev@ti.com>
mfd: omap: usb-phy: Add OMAP4 support in USB charger detection

OMAP4 and OMAP5 have different addresses of the
OMAP4_CONTROL_USB2PHYCORE register.
So we need to detect OMAP version and use the
appropriate address.

Change-Id: Icf534dc40928894918dbc8db56d6c740d4e0e642
Signed-off-by: Oleg_Kosheliev <oleg.kosheliev@ti.com>
Revert "ARM OMAP2+ OPP: Perform OPP registration as part of device build"

This reverts commit 174620a0699f83985ba9c2c1147b5239feaee9ad.
Revert "Fix GPTimer for Ducati."

This reverts commit 56bb0025b4854bcba3ec8199b6ed5d841c2cb6b5.
Temporary revert
twl603x_battery: minor code cleanup in probe

Added unregistration of the bk_batt power supply if
probe fails after it is registered. Changed the
corresponding labels in probe function code.
Also removed unnecessary cancelling of delayed work
and goto fail if sysfs group creation failed.

Change-Id: I41f635008d2605caabb445e90d9442f59ec2e916
Signed-off-by: Oleg_Kosheliev <oleg.kosheliev@ti.com>
twl603x_battery: Fix race in probe

In probe was implemented such sequence:
1. request irqs (twl6030charger_fault_interrupt,
   twl6030charger_ctrl_interrupt)
2. init works (which are called from irq)
3. unmask irqs

The race occurs because USB driver unmasks
TWL6030_CHARGER_CTRL_INT before it must be
unmasked in twl6030_bci_battery_probe. Thus
at some conditions (e.g. on TWL6030 if battery
emulator is enabled) irq starts to handle
after point 1 and before point 2 is reached.
The irq tries to schedule uninited work. This
causes kernel instability or a deadlock.

In this patch the request of the irqs are
moved to the end of the twl6030_bci_battery_probe.
This helps to avoid races and is safe if
irqs are unmasked before probe ends and the
battery isn't ready to charge.

Change-Id: Icb9d35a20933bafdd23d9c06e63d6252db3087e3
Signed-off-by: Oleg_Kosheliev <oleg.kosheliev@ti.com>
ASoC: Prevent pop_wait overwrite

pop_wait is used to determine if a deferred playback close
needs to be cancelled when the a PCM is open or if after
the power-down delay expires it needs to run. pop_wait is
associated with the CODEC DAI, so the CODEC DAI must be
unique. This holds true for most CODECs, except for the
dummy CODEC and its DAI.

In DAI links with non-unique dummy CODECs (e.g. front-ends),
pop_wait can be overwritten by another DAI link using also a
dummy CODEC. Failure to cancel a deferred close can cause
mute due to the DAPM STOP event sent in the deferred work.

One scenario where pop_wait is overwritten and causing mute
is below (where hw:0,0 and hw:0,1 are two front-ends with
default pmdown_time = 5 secs):

aplay /dev/urandom -D hw:0,0 -c 2 -r 48000 -f S16_LE -d 1
sleep 1
aplay /dev/urandom -D hw:0,1 -c 2 -r 48000 -f S16_LE -d 3 &
aplay /dev/urandom -D hw:0,0 -c 2 -r 48000 -f S16_LE

Since CODECs may not be unique, pop_wait is moved to the PCM
runtime structure. Creating separate dummy CODECs for each
DAI link can also solve the problem, but at this point it's
only pop_wait variable in the CODEC DAI that has negative
effects by not being unique.

Change-Id: Ifc90980e049e6e768bdb56134eb62e0dfb07f473
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
ARM: OMAP5: Clean-up un-supported CPU1 force off functionality

OMAP5 introduced FORCE OFF functionality which never worked. On ES2.0
legacy CPU OFF mode is fixed, so fallback to it and cleanup the
unused force off code.

Change-Id: I369a2367af7faeca1bd2c5afe63b0828605f9ab3
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
[minor corrections in cpuidle5xxx.c and powerdomain.h]
Resolve Conflicts:
	arch/arm/mach-omap2/omap-smp.c
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Merge branch 'p-linux-omap-3.4' into p-android-omap-3.4

* p-linux-omap-3.4:
  ARM: OMAP5: Clean-up un-supported CPU1 force off functionality
  ASoC: Prevent pop_wait overwrite
  twl603x_battery: Fix race in probe
  twl603x_battery: minor code cleanup in probe

Change-Id: If9b1c1a4c3c57795f9e2dc8377701783bcb0b106
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Merge remote-tracking branch 'omapzoom/p-android-omap-3.4' into testing