msm: camera: Change CCI I2C write interface

Every CCI I2C write involves one I2C transaction to CCI core.
Since CCI queue has maximum of 64 words, Write CCI commands
to CCI core and handle it in hardware.

Change-Id: Ic3b03bf70b1a5a23d4bdd42d2cbf8528fa8bd413
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
ARM: dts: msm: change sound setting for SKUF with WCD9302

- change qcom,model to msm8226-tapan9302-skuf-snd-card to support SKUF
  sound card initialization in HAL with WCD9302

- delete the value of qcom,cdc-vdd-spkr-gpio and qcom,cdc-us-euro-gpios
  which are not used in SKUF with WCD9302. Otherwise these two GPIO
  settings will conflict with other GPIOs which is used in SKUF.

Change-Id: I286b8fd8405fd8d3202640743ce1512521ba3083
Signed-off-by: Meng Wang <mwang@codeaurora.org>
msm: smem: add mpu based security support

Add support for the Memory Protection Unit (MPU) based shared memory
security feature.  This feature fragments shared memory into multiple
partitions and restricts access for each partition to a limited set of
processors which is enforced by MPUs.

Change-Id: I0878e1df3aad5aab49b845918be095c71956029d
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
msm: smem: clarify SBL misconfiguration error messages

SMEM must be initialized by the secondary bootloader (SBL) before Linux
is booted and the SMEM driver is initialized.  If it is not initialized,
error messages are printed and SMEM is disabled.  Some of these error
messages can be misinterpreted to be a Linux configuration issue instead
of an SBL issue which delays resolving the misconfiguration.

Add additional code comments and change the error messages to make it
clear that the SBL has not initialized SMEM.

Change-Id: I1d80245337fbfb708a070d56c65c293aed9a2b6b
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
msm: smd: separate SMD and SMSM logs

SMD and SMSM log to the same buffer.  In some scenarios, one driver could
flood that buffer with activity, thereby overwriting activity from the
other driver, which can hamper debug efforts.

Create separate buffers for each driver to mitigate this issue.

Change-Id: I6ef3e2c1213e52dd81db770ef824547a49784ec2
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
msm: smd: add support for distributed SSR

Distributed SSR removes the requirement for the Apps processor to
step in for the failed subsystem and close its edges.

Have Apps only close its own SMD edges during SSR.

Change-Id: Ida1dd54f88860a2d83b3f98bc4c783a63653eba7
Signed-off-by: Brent Hronik <bhronik@codeaurora.org>
msm: smd: fix SMD probe initialization race condition

As an optimization, do_smd_probe() checks the free_offset and only
schedules the probe worker if the free_offset has changed (which
implies that new SMD channels may have been allocated).

If a remote subsystem allocates all of its SMD channels before SMSM
initialization has been completed, then when smsm_post_init() is
called, smsm_irq_handler() will call do_smd_probe() which will update
the free_offset and schedule the SMD probe worker. The probe worker
will bail because SMD has not been initialized yet (e.g. smd_initialized
isn't true). Once do_smd_probe() is called as part of smd_post_init(), it
compares the free_offset and doesn't see a change, so the SMD probe worker
is not scheduled.

Do not use do_smd_probe() until after SMD has been initialized.

CRs-Fixed: 538710
Change-Id: Ic4e97141202dfcb5f936a9cd38c6dcf9a61ccf8d
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
msm: smd: convert to secured smem feature

The shared memory (smem) driver provides a feature where point-to-point
smem items shared between Linux apps and one other remote processor are
protected against a number of attacks by security hardware, provided system
support exists.  Clients of the smem driver must elect to use this feature
if applicable.

SMD is a point-to-point communication protocol to which the security
feature applies.  Update SMD to make use of the security feature.

Change-Id: I5eafb832e83489bb1e4a8f70e4103416c540953d
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
msm: smem: add smem_get_free_space()

The smem_get_free_space() API is a private helper function to optimize the
SMD client's table scanning usecase.

Change-Id: I00b12bf3b667001f973fd5126278536b47e052f4
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
msm: smsm: add snapshot queue scheduling delay

When debugging delayed SMSM callbacks, it is difficult to determine if
the delay is due to a scheduling issue for the callback worker or a
delayed interrupt issue.  In addition, sometimes the interrupt timestamp
needs to be determined from a crash dump.

Add timestamp when the SMSM interrupt snapshot is queued and calculate
the time delta when the snapshot is dequeued.

Change-Id: Ife9bd790ff4b1943c75ee9bbfdb0b77d2aca70f5
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
input: synaptics: Avoid kernel crash when voltages are unstable

2013.09.24
- Fixed kernel panic when voltages are unstable (error handling)

Signed-off-by: Alexandra Chin <alexandra.chin@tw.synaptics.com>
Change-Id: Ie1da0e4215ad7aeff2d5e1df1846e417609afb73
Git-commit: d19d8947f5c24d57fe5ce8b92510401a15b860ba
Git-repo: git://github.com/synaptics-touch/msm-3.4.git
[amaloche@codeaurora.org: Modified commit message for proper form]
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
input: atmel_mxt_ts: Support for secure touch polling

Add support for polling to the secure touch sysfs notification
file.

Change-Id: I08603c7ba9fdf041460f285bfc61d93541c79752
Acked-by: Christian Bolis <cbolis@qti.qualcomm.com>
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
msm: mdss: Reserve framebuffer memory for the splash screen

Reserve memory for the framebuffer in the HLOS partition that
would be used to display splash screen in the bootloader as
well as the initial stages of the kernel bootup. This avoids
copying splash screen memory to a local buffer in the kernel.
The reserved memory would be freed when the first real update
comes in from the userspace.

Change-Id: I7dc256f8ffd69c24e56ac10ed57e37d96c8c9a2f
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
defconfig: 8226: Enable CC_STACKPROTECTOR

Enable the stack canary feature in an effort to detect
potential buffer overflows within the kernel.

Change-Id: I20c5d363e77e58809e6b3241b104a4ac6a4fb9d8
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
input: touchpanel: fix security issues in GT915 driver

There are multiple buffer overflow and input validation issues
in Goodix gt915 driver, fix these issues by adding data length
check and change file system node mode.

CRs-Fixed: 526101
Change-Id: I5173fc1ca021fd45c939c7c8a4f460651330de5b
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Merge "msm: camera: Change CCI I2C write interface"
Merge "msm: smem: add mpu based security support"
Merge "defconfig: 8226: Enable CC_STACKPROTECTOR"
Merge "msm: mdss: Reserve framebuffer memory for the splash screen"
ASoC: msm: qdsp6v2: Set ADM channel to max supported for ULL

ULL copp can only operate currently for 2 Channels.
ADM open for ULL fails for channel greater than 2 channels
Set the channel to max supported
when adm is opened for a ULL device session.

Change-Id: Ib47af5bca7461b935fae0f695b04767929bea925
Signed-off-by: Vimal Puthanveed <vimalp@codeaurora.org>