msm: clock-9625: Support measurement of some RPM clocks

Add debug mux index values for the system NOC, peripheral NOC,
config NOC and BIMC clocks.

Change-Id: I9b2bfd969ec794167d43df67e1ddf55ee765f5c3
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
msm:cpp: Enable two paralel to planar output in cpp

Add second pointer that is used when conversion from
two planar to three planar format  is needed. The
two pointers will help to write the two output chroma
planes in paralel.

Change-Id: Iab1f885c0289f76805f7241549590803f0d15060
Signed-off-by: Iliya Varadzhakov <ivarad@codeaurora.org>
spi_qsd: Correction in DMA mode check

Due to a bug in the if() condition msm_spi_use_dma
function is always returning '0' when cs_change
is true. Due to this issue the DMA mode is not being used
when it has to be.

CRs-Fixed: 475841
Change-Id: I7da2ee091635f0cfd89058787c35b62adf1984b5
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
msm: vidc: Handle SSR event in q6 hfi

APR send SSR events through callback and these
events have to handled properly in Q6 HFI. This
change translates SSR events to SYS_ERROR HFI event.

Change-Id: I82fe850d2df4ab1721755507c6d74d7b32a09b90
Signed-off-by: Sachin Shah <sachins@codeaurora.org>
msm: vidc: Add support for dumping packets

Whenever we read and write from queues add support for logging the
packet being written or read.  As this produces heavy kmsg traffic, also
add a dynamic fallback option to use ftrace.  Output to ftrace can be
triggered by 'echo 1 > debugfs/msm_vidc/debug_output'

Change-Id: Ie221c60ab465605ede332ac7eaadfb4b26c19e01
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
iommu: msm: Lock the meta data against map/unmap races

Reference counting is not enough to prevent races with map/unmap.
If a client tries to take an additional reference to an already
existing sg_table, it may be possible for an unmap to destroy the
reference while the map is still in progress. Prevent this race by
(properly) taking the meta lock around all lookup and reference calls.

Change-Id: Ic5de556db0d902e8b8f81b83b7897ad77940b269
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
msm: pproc: Change error handling for msm_iommu_get_ctx

Change the msm_cpp code so it can handle error code
EPROBE_DEFER returned from msm_iommu_get_ctx in case
of fault.

Change-Id: Iea91eb808a8f76e2ba8079c7e585961f4aa3709f
Signed-off-by: Iliya Varadzhakov <ivarad@codeaurora.org>
arm/dt: apq8074: add continuous splash screen flag

Add support for continuous splash screen in dragonboard platform using
QHD Sharp DSI panel.

Change-Id: I2a27f1abb943aab98610b6ba5d24e01981aeab40
Signed-off-by: Asaf Penso <apenso@codeaurora.org>
arm/dt: apq8084: qup_i2c: enable BLSP1 QUP3 for EEPROM test

Configure I2C device on BLSP1 QUP3 and sets its clocks and
GPIOs such that it may access the EEPROM device.
The EEPROM device is commonly used to verify I2C.

Change-Id: Ibb0036d6bbcb37394dd177adfed423306ff0477b
Signed-off-by: Gilad Avidov <gavidov@codeaurora.org>
coresight: use trigin 2 for cti reset trigger for tmc-etr

Flush ETR is mapped to TRIGIN[2] and so switch to using it in
order to cause a CTI trigger for TMC-ETR flush during wdog reset.

This avoids any race between TMC-ETR flush to memory and DDR
being put into self-refresh.

CRs-Fixed: 491986
Change-Id: Ia5e643121e040bd9c57c89a4b762b794bc8ddf62
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
arm/dt: msm8974: add support for SDIO3 on APQ8074

APQ8074 platforms use the SDCC3 as an interface for WiFi adapter.
The device node should be enabled to allow the kernel enumerate
the adapter.

Change-Id: I55a6434c9f66bdeab95b2f0c1e6e971d38d24b5c
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
camera_v2: jpeg: Avoid double freeing

Avoid double freeing of jpeg device struct during
failure case.

Change-Id: I88b965a8a429ce7f79a8d8585b875ce176b69917
Signed-off-by: Krupal Divvela <kdivvela@codeaurora.org>
msm8974: mdss: dsi: uncached alloc for dsi buffer

Use uncached allocation for DSI buffers to avoid
cache inconsistency issues introduced with SLUB
DEBUG option enabled. With SLUB_DEBUG, the entries
in cache are somehow polluted which results in incorrect
dsi command values sent to the panel. This change avoids
cached allocation by using dma allocation instead.

Change-Id: Ib769e91d411bf856e7d2e860cff7c1188ff0236e
CRs-Fixed: 488236
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
wcnss: Fix Iris VDDDIG regulator map

Iris VDDDIG is mapped to PMIC regulator S3.

Change-Id: Iab2873e3e65603267fcb9166c7d56d23dea61c62
CRs-Fixed: 487397
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
ASoC: msm8x10-wcd: Configure IIR filter stages for codec sidetone

Configure IIR filter register bank to store filter
coefficients for codec sidetone operation.

Change-Id: I32b70429e35cebea6cb63ffc18f75f8ca4edb9f1
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
msm: pm-8x60: Register sleep status driver before regulator

During hotplug, drivers wait for core to be power collapsed to turn off
the resources used by a core in CPU_DEAD notification. The kernel
thermal module which hotplugs the core in certain conditions is
registered in the arch_initcall(). To ensure that the CPU_DEAD waits for
sleep status to be set during hotplug, register the cpu sleep status
driver before the regulator driver.

To this effect, the sleep status driver is no longer made a child device
for pm-8x60 device.

Change-Id: I772521f4b3cd18e367aa44a41d60ef9735c99ef9
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
usb: gadget: Allow MBIM to queue packets before QBI is ready

A race condition between USB enumeration and QBI boot could
sometimes results in mbim packets lost. If USB enumeration
is finished before QBI opens the interface with the USB driver
then each MBIM packet received from the host before the interface
is opend would be dropped.
This change fix this issue so that the packets are queued and
are sent to QBI when its ready.

Change-Id: I9acf271c9a43a0cfa8bab9e97aac32c508fc6d6e
CRs-Fixed: 488231
Signed-off-by: Bar Weiner <bweiner@codeaurora.org>
mmc: sdhci-msm: fix pwrsave bit handling

SDCC controller provides the PWRSAVE control bit to automatically
disable the clock to card when there is no activity with card.
During the SDCC DLL tuning, PWRSAVE is disabled to make sure that clock
is always running but once the DLL tuning is completed, currently we
enable the PWRSAVE unconditionally irrespective of its previous state.

This change ensures that we always check if the previous state of pwrsave
before really enabling it.

Change-Id: I464ab1e0db41af50550bb5a9ea9b909ee0d27dd9
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
mmc: sdhci-msm: enable asynchronous interrupt support in 4-bit mode

SDIO 3.0 specification has added the support for asynchronous interrupt
period during which card allows the clock to be gated off.

As SDCC driver is capable of handling the asynchronous interrupt,
advertise MMC_CAP2_ASYNC_SDIO_IRQ_4BIT_MODE capability.

Change-Id: Id5a86bc70b7b798b23be3a0fc0d59b2db05e0409
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
msm: hotplug: remove code related to cpu_killed

Earlier the completion event cpu_killed was used to synchronize
notify to hot plug framework that the CPU is dead. But now it is
replaced with another completion event cpu_died and it is placed
in the hotplug framework itself. So there is no need for a
platform to implement a completion event.

But in msm platform driver the completion event related code
was not removed with the changes in hotplug framework. This
patch removes the unused code.

Change-Id: I4418e5e397821e39a7b6a6efa997c4a866e9b46b
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>