kernel/msm: 8974: Add audio OCMEM driver support

Add audio OCMEM driver support to exercise On-Chip
Memory (OCMEM) for low power audio and voice. The
driver is implemented as standalone and it gets
exercised based on the usecase. Also, this design
reduces the latency associated with OCMEM handshaking
protocol. The audio OCMEM driver is enabled by default
with a Kconfig option using select. Add device tree node
for audio OCMEM to retrieve platform data.

Change-Id: Iba46ce675fc03843d88cd7cf2aa9bc92fe70a955
Signed-off-by: Phani Kumar Uppalapati <phanik@codeaurora.org>
ASoC: wcd9320: Enable RX7 speaker drive path

The wcd9320 Taiko codec replaced LINEOUT5 with speaker drive.
Add speaker drive path support.

Change-Id: Ia552dff774312491b8068ea1faf9c6137c7906a9
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
usb: gadget: Fix RmNET control to always clear RTS bit

The MODEM requires RTS to be cleared for RmNET use case.
The original code clear all SMD tiocm bits upon USB connection.
This fix leaves the RTS bit set, which is the SMD default.

Change-Id: Ie3aaa285c9a1598dfd7408f062ea7af2f391a7dd
CRs-Fixed: 370682
Signed-off-by: Amit Blay <ablay@codeaurora.org>
base: genlock: handle error while creating lock/handle inode

A lock/handle inode is required in order to successfully create a
new lock/handle. Failure to report the lock/handle inode error can
result in errors for subsequent function calls.

Change-Id: I622af24e695f4781c4dbf46363931a7da09df677
Signed-off-by: Jeff Boody <jboody@codeaurora.org>
arm/dt: msm8974: Update PM8941 regulator voltage constraint ranges

Modify the voltage constraint ranges for PMIC PM8941 regulators
LDO 3, LDO 4, and LDO 11 so that they match hardware
documentation guidelines.

Change-Id: Ic0a292e9e79d9d1562b9df04988daad06d027643
Signed-off-by: David Collins <collinsd@codeaurora.org>
msm: pil-q6v4: Update regulator stepping

Hardware profiling has determined that the two step voltage ramp
should be larger for the first step than previously determined.
Instead of stopping at 375mV we should stop at 743.75mV and then
proceed to 1.05V. Update the code accordingly.

Change-Id: I44ffcea4ecc475c1e7f9bfdac44c1a15365a3ea3
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
usb: serial: Check for received data upon unlinking the urb

There is a possibility of runtime suspend in the middle of
data transfer on the rx data path of driver. This results in
the completion of data transfer on bulk IN endpoint with short
packet or integral multiple of 512 bytes. Hence for -ENOENT
transfer status check for non zero data length and pass it to
the consumer in the userspace.

CRs-Fixed: 382161
Change-Id: I72407e8879b6b3b7a9456c1234eec71970272495
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
spinlock_debug: Print offset in addition to symbol name

If one has two spinlocks embedded in a structure that kallsyms
knows about and one of the spinlocks locks up we will print the
name of the containing structure instead of the address of the
lock. This is quite bad, so let's use %pS instead of %ps so we
get an offset into the symbol so we can determine which lock is
having problems.

Change-Id: If6fbb2eb2316b846d96da76c35fcfeadbef64401
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
msm: qdsp5: Increase buffersize of hostPCM interface.

The default audio sample rate of audioflinger is increased
from 44.1k to 48k.Increase the buffersize to take
advantage of that.

Change-Id: I7ffc6c697cb32b6983c9bb5cc6ea73a7a55b5006
Signed-off-by: Sidipotu Ashok <sashok@codeaurora.org>
Perf: Add PMU names to perf output

Output of raw events in perf tools can be hard to distinguish
when multiple PMU's have the same event encoding.

Show the PMU name along with the counter output.

e.g.

 Performance counter stats for 'ls':

          4514688 msm-l2 0x1

Change-Id: I65d4ac03c2fd562519ab78524b37467e7d53dbb3
Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
defconfig: 9625: Enable NAND driver, MTD and YAFFS2 configs

Enable all the required config options for NAND controller in
MDM9x25.

Change-Id: Ic4738b12450d114e1b35aeee23fd5bb63499afe7
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
msm: vidc: Increase video driver clients count.

Video driver currently supports registration of 4 clients.
Increasing number of clients count to 6 to support new usecases.
Video driver will limit number of instances to 4.

Change-Id: If00911ef1027b1e44917465791ef3612e6c59ed1
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
msm: mpq8064: Avoid NPL clock overflow

Since external components has its own variation there is a need
for an additional 2% margin for the npl_clk

Change-Id: I27d77ccd2f5cd9a9635975ea286bf3d0f8dba1d2
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
msm_fb: display: Set LVDS Chimei panel frequency to run at 60 fps

Modify LVDS Chimei panel pixel clock from 75 MHz to 79.4 MHz
and update PLL settings to achieve refresh rate of 60 Hz for
better user experience.

CRs-Fixed: 375510
Change-Id: Ifb4036c790552b1c43d5a3c817ed05691f86c7f6
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
msm: clock-8974: Use the RPM regulator API to set FMAX corners.

Vote for the FMAX voltage corner required by a frequency setting
using the rpm-regulator-smd API. Also, use the proper corners
for the VDD CX rail on the MSM8974.

Change-Id: I795160478e0e295f10d3dfeb4773a4306967ff27
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
msm: clock-8974: Add additional locally controlled MMSS clocks

The following clocks are to be controlled locally by
the apps processor, add support for them:

1. ocmemcx_ocmemnoc_clk
2. gcc_mmss_noc_cfg_ahb_clk
3. gcc_ocmem_noc_cfg_ahb_clk

Temporarily enable the gcc_mmss_noc_cfg_ahb_clk and
gcc_ocmem_noc_cfg_ahb_clk clocks in post_init while
the bus driver adds support for them.

Change-Id: Ic6da845582cb815379e53b87cf34e81c5eb00b4e
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
msm: clock-8974: Apply 8974 frequency updates

The MMPLL1 frequency and some downstream clocks have had
their frequency plans updated. Update the relevant frequency
tables.

Change-Id: I7b9d5eeb48c9268254bc3f6f9b4f7fdea34a62c3
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
msm: clock-8974: Set the 'warned' flag on the mmpll3 clock source

The PLL sources need to have the warned flag set to preclude
the clk_prepare warnings. Set this flag on the mmpll3_clk_src
clock.

Change-Id: Ie04d8e625e03dcbab99779dcff5fcd85c7205de1
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Revert "msm8974: Enable watchdog on msm8974"

This reverts commit 2db0c0ee0ea46b9a1fe46929439a38861c5098cc.
Enable watchdog causes crash on RUMI. We'll turn it on again after
fix the issue.

Change-Id: I1524bcb9908cf95611bc49d726e7e368417f74a1
Signed-off-by: Jin Hong <jinh@codeaurora.org>
virtio: Decouple virtqueues and vrings

Add struct virtqueue_ops back into the virtio core code to facilitate
the use of virtqueue implementations other than vrings. This allows
virtqueue implementations that use SMD drivers, USB drivers, or other
mechanisms for transport.

Add a new virtqueue operation, virtqueue_get_impl_size, to provide the
functionality of virtqueue_get_vring_size from the previous collapsed
implementation.

This commit partially reverts commit
7c5e9ed0c84e7d70d887878574590638d5572659.

Change-Id: I1219c4f203879658dce5800f405291bf311564b4
Signed-off-by: Yatin Manerkar <yatinm@codeaurora.org>