ASoC: dsp - BE disconnection after pending flag is clear

Currently we can disconnect a BE and have its update flag incorrectly
set after reparenting. Fix this so we always clear the update flag
before any disconnections and reparenting.

dsp_run_update_startup() also called disconnect but this was always
called anyway by its caller soc_dsp_runtime_update() before the update
flag was cleared.

Change-Id: If0cde4c9df845a7189188bb49e6fb4fd496a925d
Signed-off-by: Liam Girdwood <lrg@ti.com>
ASoC: DSP: Split runtime startup/shutdown updates

A FE->BE-1 link can transition to FE->BE-2 in a single widget/kcontrol
change (e.g. Muxes). Currently, DSP framework searches for new and old
paths of the FE, and then perform the startup/shutdown runtime updates.
The single-step FE->BE-1 to FE->BE-2 transition has both: new and old
paths to be updated, hence BE-1 and BE-2 will be marked for runtime
update. However, startup and shutdown updates will both be performed
on BE-1 and BE-2, which is incorect as it would be expected to run
startup update on BE-2 and shutdown update on BE-1.

In order to handle these scenarios, the path search (new and old) is
performed along with its runtime update (startup and shutdown).

Change-Id: I5a687d6fcc51a968d9b0ae52d749935a92f00ef7
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
OMAP4: HWMOD: UART1: disable smart-idle.

UART module gets stuck in transition when smart-idle enabled.
By enabling HWMOD_SWSUP_SIDLE flag in UART1 HWMOD, ensures that
module's smart-idle feature is disabled and it is put to
forced-idle and no-idle during pm-runtime.

Seen similar issue with UART3 and was fixed by enabling
HWMOD_SWSUP_SIDLE flag in uart3 HWMOD.

Change-Id: Id1d97a498a5ffd7323be15be0ba8d0fc02e6df85
Signed-off-by: Ambresh K <ambresh@ti.com>
OMAP4: TWL: ensure PREQ1 results in all active VCOREs to be down

Map VCORE1,2,3 appropriately to PREQ1 APP processor group so that
only APP processor can control it's power down status when OFF
mode is hit. Normally, OMAP sends a OFF voltage command to setup PMIC,
However, it is equally important to ensure that TWL will switch
off the relevant rail when the OFF voltage != 0.

Change-Id: Id623ecdd26bee0504058132835e0112bac1a630e
Signed-off-by: Nishanth Menon <nm@ti.com>
OMAP4460: TWL6030: Setup VDD_core OFF voltage to retention voltage

VDD_CORE must not be turned off before VDD_MPU due to OMAP4460
shifter/isolation implementation between MPU_VD and CORE_VD.

Since PWR_REQ is being used for voltage control, this situation
can be handled by using off voltage as retention voltage. This
contributes to the dummy I2C_SR command to setup the voltage
prior to the voltage going down to 0V for VDD_CORE along with
PWR_REQ going low when device OFF mode is achieved. When
device OFF mode is not achieved on an attempted OFF mode,
this has no impact.

Change-Id: Iceb41fbf6b361887c45eeba528ed7f836cff6482
Signed-off-by: Nishanth Menon <nm@ti.com>
OMAP4: PM: TPS6236x: ensure rampdown occurs fast on shutdown

Enable the discharge capacitor to ensure ramp down occurs fast.

Change-Id: I625b75e87e3a22239c14a3d22a3f7752999c05f1
Reported-by: Baek.Kyung-Han <wildtaz.baek@samsung.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
OMAP4: PM: TPS6236x: speed up voltage rampup rate

Increase the voltage ramp rate to 32mv/uSec from 8mV/uSec

This should fasten up our Voltage transition times and benefit
latencies as well.

Change-Id: I5246a75c2f7ec4cc187ba8ad63a7ad71c94616da
Signed-off-by: Nishanth Menon <nm@ti.com>
OMAP3+: PM: VC: vcbypass needs to wait for valid to clear

valid bit is cleared when the command has been send to PMIC.
Current code is waiting for the invert of this. fix the same.

Change-Id: Ic9ae3b7a0c2f825edeb01e75602ee8fb07536900
Signed-off-by: Nishanth Menon <nm@ti.com>
OMAP4: PM: work around for CPU1 onlining from OFF/OSWR state on older PPA

Originally detected in OMAP4430 ES2.3 HS samples, CPU1 crashes the
device upon calling PPA service DEFAULT_POR_NS_SMP(0x25).

Rootcause showed that cache maintenance operations required to be
performed before handing over control of CPU1 to HLOS, were incomplete
and not broadcasted from CPU0 to CPU1.

Kernel workaround for this is to use WFI to put CPU1 in OFF
state if CPU0 is not ready yet (this mechanism was in place in previous
versions of this code base but was meant to address a different need).
When putting CPU1 back to off, its internal MMU descriptors are reset
and sync'd with CPU0. CPU1 is brought online by later kernel subsystems.
Note: CPU0 power state is made to OFF for both OSWR and OFF modes.

This issue has been analysed to impact all OMAP4 non GP devices.

A config flag is introduced to allow platforms and distributions to
enable/disable if PPA version requirement is not met.

Change-Id: I82c5880ec2d9a98a54755dfbd01aa981cfed9852
[nm@ti.com, cileija@ti.com: improvements and rootcause support]
Signed-off-by: Carlos Leija <cileija@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com]
[wwang@ti.com: WA identification]
Signed-off-by: Wenbiao Wang <wwang@ti.com>
Merge branch 'android-3.0' into android-omap-3.0
Merge branch 'linux-omap-3.0' into android-omap-3.0

Conflicts:
	arch/arm/mach-omap2/Kconfig

Change-Id: I43e69654c80590b971018903ae00fc7fa2ea5cc7
OMAP4: Clock: Force a DPLL clkdm/pwrdm ON before a relock

All DPLLs except USB are in ALWON powerdomain. Make sure the
clkdm/pwrdm for USB DPLL (l3init) is turned on before attempting
a DPLL relock. So, mark the database accordingly.

Without this fix, it was seen that DPLL relock fails while testing
relock in a loop of USB DPLL.

Change-Id: I52f621a2c83e3e0dc4f6c440291860b285854e12
Tested-by: Ameya Palande <ameya.palande@ti.com>
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Merge branch 'linux-omap-3.0' into android-omap-3.0
gpu: pvr: Update to DDK 1.8@794370

Change-Id: I77887fd47acf5f29cce09bc9e06378d3c8608614
Revert "proc: enable writing to /proc/pid/mem"

This reverts commit 198214a7ee50375fa71a65e518341980cfd4b2f0.
Merge branch 'linux-omap-3.0' into android-omap-3.0
misc: remove android pmem driver, it's obsolete.

Change-Id: I48d9778007e1e9eed2bb34e33ceee818c23afaa5
Signed-off-by: Dima Zavin <dima@android.com>
[Tablet] HACK: Remove the TMP105 sensor from I2C3

There is an interaction issue with the Camera sensor on I2C3
and this sensor when enabled.  We need to not allow registration
until this issue is determined.

Change-Id: I459d9d1c0736ecca6fb0d4865a6cb6083aa522fa
Signed-off-by: Dan Murphy <dmurphy@ti.com>
cfg80211/nl80211: Send AssocReq IEs to user space in AP mode

When user space SME/MLME (e.g., hostapd) is not used in AP mode, the
IEs from the (Re)Association Request frame that was processed in
firmware need to be made available for user space (e.g., RSN IE for
hostapd). Allow this to be done with cfg80211_new_sta().

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
nl80211/cfg80211: Make addition of new sinfo fields safer

Add a comment pointing out the use of enum station_info_flags for
all new struct station_info fields. In addition, memset the sinfo
buffer to zero before use on all paths in the current tree to avoid
leaving uninitialized pointers in the data.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>