msm: mdp: Disable early suspend only for the MDP driver

Early suspend is deprecated in the framework but disabling it
completely can affect other subsystems. Disabling only for the
MDP driver.

Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm: mdp: Disable early suspend locally

undefing at the header level could mess with other components.

Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm: scm-pas: Provide a strongly ordered buffer to the secure world

The secure world requires that the metadata-containing buffer
be strongly ordered. Use the dma_alloc_attrs API to obtain a
strongly ordered region for this purpose.

Bug: 10750953
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
msm: scm: Add scm_call_atomic3

Some drivers need to pass three arguments atomically. Add support
for it.

Change-Id: Id0f962400c5c4f721eef44069fc3db1779248ae3
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
msm: rotator: signal timeline when rotator prepare fails.

When rotator prepare fails, timeline is not signalled causing fence
timeout on the rotator release fence. This patch fixes the issue.

Change-Id: I6023393d768dbb1a0a9095bb1822ac504632ed64
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
gpu: msm: Add new Adreno driver

* Temporary place for this.

Change-Id: I83b5d75fbd201c352d011ed43f21ebe3576e058c
msm: We are using the msm2 gpu driver, not msm

Fix references that are incorrectly pointing at drivers/gpu/msm
instead of msm2.

The incorrect includes cause linaro gcc 4.8 with -O3 to produce
an unbootable kernel on the DLX.

While it doesn't seem to be affecting our normal builds, not
fixing it will likely bite us in the future in some other
mysterious way.

Change-Id: I3c51062ca6a66ddb9782365d2c51c5e485556c1b
msm: kgsl: Add separate GPU shader memory mapping

Add separate kernel memory mapping for GPU shader memory.
Previously, both the register and the shader memory were mapped
as one entity, with the mapping length being equal to combined
size of register memory and shader memory. Now, we separate the
shader memory mapping to help in cases of GPU devices where the
shader and register memory may not be adjacent. This helps to
dump the shader memory in the postmortem snapshot. By having a
separate mapping for shader memory, the snapshot dump routine
simply reads in the shader memory range specified and dumps.

Change-Id: I30e59dffe849fefcfbbaf0e5245cc1024ccedcb1
Signed-off-by: Harsh Vardhan Dwivedi <hdwivedi@codeaurora.org>
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>

msm: Fix mem leak when using per-process pages

When GPU is using per process page tables the code creates
a new page table (domain) for every process. There is also
some associated structures allocated to keep track of each
domain. However, when cleaning up the memory used for a page
table only the domain is freed and not the associated structures.

Add a function to allow a client to properly unregister a domain
which will free all the memory associated with a domain.
Call the unregister function from kgsl driver code.

CRs-fixed: 480801
Change-Id: I9704c12c66a95ce66cea63b619bbdbafa0f1eac8
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>

Conflicts:
	arch/arm/mach-msm/iommu_domains.c

msm: kgsl: Remove nap_allowed variable and functionality

Allow NAP on all targets.  The splitting of the clock enable
and disable calls into enable/prepare and disable/unprepare
allows us to safely make this change for all targets.

Change-Id: I03d909b86aef33631a887d159cf0a807a6d0ae75
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
iommu/core: pass a user-provided token to fault handlers

Sometimes a single IOMMU user may have to deal with several
different IOMMU devices (e.g. remoteproc).

When an IOMMU fault happens, such users have to regain their
context in order to deal with the fault.

Users can't use the private fields of neither the iommu_domain nor
the IOMMU device, because those are already used by the IOMMU core
and low level driver (respectively).

This patch just simply allows users to pass a private token (most
notably their own context pointer) to iommu_set_fault_handler(),
and then makes sure it is provided back to the users whenever
an IOMMU fault happens.

The patch also adopts remoteproc to the new fault handling
interface, but the real functionality using this (recovery of
remote processors) will only be added later in a subsequent patch
set.

Change-Id: Ic04659686e72838a0db518e9303dd037191e3879
Cc: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
[ohaugan@codeaurora.org: Resolved compilation and merge issues]
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>

Conflicts:
	drivers/video/msm/mdss/mdss_mdp.c
ARM: Add support for 64 bit register reads/writes

Add macros to read and write to 64 bit registers.

Change-Id: Id45d4086aa148ba96df3987c3341c133f1c56541
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>

Conflicts:
	arch/arm/include/asm/io.h
msm: HTC: Unconditionally enable USB Speaker support

* Enable extra cases for USB Speaker detection.

Change-Id: I7acdd2df84031f00c435b0762ed775013b030d75
msm_serial_hs_brcm: Add Broadcom high speed MSM serial interface

* Needed to communicate with Broadcom Bluetooth.

Change-Id: I3c4b0445b7f8d0a583367cdc76779226bdf30a38
misc: tfa9887: Add HTC TFA9887 Amp driver

* HTC kernel version: m7-kk-3.4.10-17db3b4

Change-Id: I8fbeff195ff11497f9fef8b1d8196d4c76eaaa6b
misc: rt5501: Add HTC RT5501 Amp driver

* HTC kernel version: m7-kk-3.4.10-17db3b4

Change-Id: I0b067aebecd6c36aa3bdeb32fad2b30aadc11f49
input: akm8963_nst: Add HTC variant of AKM8963 compass

HTC kernel version: m7-kk-3.4.10-17db3b4

Change-Id: Idde00c0369157833aabcc444f0338062e566d1aa
input: bma250_bosch: Add HTC variant of BMA250 sensor

* HTC kernel version: m7-kk-3.4.10-17db3b4

Change-Id: Iea33decb7b9f79396c08acfccf13c2452299edb1
msm_serial_hs_cir: Add HTC CIR serial driver

* HTC kernel version: m7-kk-3.4.10-17db3b4

Change-Id: I738963154d7b29aec19190f667082f2e66578a00
msm: camera: actuators: Import Rumbas-S actuator driver

* HTC kernel version: m7-kk-3.4.10-17db3b4

Change-Id: Id770c018bb835c96a8f5e412e2dd95bcf3f623b9
msm: camera: actuators: Import lc898212 actuator driver

* HTC kernel version: m7-kk-3.4.10-17db3b4

Change-Id: Ic545ae9c10f1e0b484b268e10c535730cf729cc9
msm: camera: actuators: Import HTC TI201 actuator driver

* HTC kernel version: m7-kk-3.4.10-17db3b4

Change-Id: Id0e4e9c8319b2df240c2c0f37f8d3e2624af3fd0