misc: pmem: Add support for PMEM->ION wrapper.

PMEM to ION wrapper replaces standard PMEM driver with its own. It's sole
purpose is to redirect all PMEM allocations to ION.

If enabled, board driver must ensure pmem pdata provides .ion_heap_id with the
name of the ION heap ID (such as camera, mm, sf, etc).

Since some kernel drivers are PMEM based, all drivers that request PMEM memory
will be getting ION memory (get_pmem_file/put_pmem_file). On a corner case,
such as userspace allocating memory directly with /dev/ion, PMEM wrapper driver
will automatically import the fd (from PMEM id 0 ION client) and return the
memory from ION.

Not a complete solution. Unfinished features have been marked with TODO.

Currently unsupported commands:
flush_pmem_fd
flush_pmem_file

Currently unsupported ioctl commands:
PMEM_MAP
PMEM_UNMAP
PMEM_CONNECT
PMEM_GET_TOTAL_SIZE
PMEM_GET_FREE_SPACE

Change-Id: I507ce0850d6fdbac4a72c83105140e9f3992a678
Signed-off-by: Rudolf Tammekivi <rtammekivi@gmail.com>
Signed-off-by: Michael Bestas <mikeioannina@gmail.com>
misc: pmem: Squashed revert of DMA changes

Revert "pmem: Do not use special case for DMA."

This reverts commit cb1c16e11db36b8d4bdba9a8b90aff6636480126.

Revert "misc: pmem: Explictly mark DMA allocations as GFP_KERNEL"

This reverts commit f85cf2fbdcf73f156e01d5bb3d8105e3a14cc5b7.

Revert "misc: pmem: Manage DMA allocation failures"

This reverts commit b27b65c4104ebc1fa056db97929d0aacb7bfd913.

Revert "misc: pmem: Add support for CMA."

This reverts commit c0f9f27defba4b066e94a2f5ef390c713addcd9c.

Change-Id: I8a3f2f6ca813da8e0d99663653ce91e829655979
Revert "PMEM: compatibility with older camera libs"

This reverts commit c0ad02b30664ad1a1daea6470fce63e23bc90c85.

Change-Id: I3ceaa7caad5959bf9b29ba7c3b57b9e01da436ce
msm: mogami/zeus: Remove references to PMEM DMA (cma).

Change-Id: I00e645ff05945c72e07c986fcbd6c56648c0f5fd
mogami/zeus: Add PMEM->ION wrapper changes.

Change-Id: I1ee8aeb28f4f729e0be93cb4bfc94615b7b7f9af
defconfigs: Enable PMEM->ION wrapper

Also remove obsolete PMEM DMA (cma)

Change-Id: I8350c0c24c3adab8fb891e97578c59b971b1e437
msm: pmic: Add a separate config option for PMIC over RPC

MSMs in which the APPS does not have a direct access to
PMIC (over SSBI) use RPC to communicate with the PMIC.
Create a new config option for this RPC based PMIC driver
and enable it only for the required MSMs (7x27a, 7x30, fsm9xxx).

Change-Id: I668d9840581b8f1f2bdd80da6bdb9445ed560d32
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
msm: Add a separate config option for RPC PMAPP and RPC USB

MSMs in which the APPS does not have a direct access to
PMIC (over SSBI) use RPC to communicate with the PMIC.
Create a new config option for this RPC based PMIC APP
driver and enable it only for the required MSMs (7x27a,
7x30, fsm9xxx).

Also, add a similar option for RPC based HS USB and FS USB
driver.

Change-Id: I6d32243eb271f72a9055b346198bb274749297c1
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
msm: mogami/zeus: Remove has_outer_cache flag

7630 doesn't have outer cache. So, disable outer_cache_ops
for ION heaps.

Change-Id: I185a0a0e752d12a1a680ef81c12ce2cd964010a1
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
(cherry picked from commit 395ed6ca700c488d7e262a40e61f31887b4a42cf)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
defconfigs: mogami/zeus: Update for RPC changes

Change-Id: I841cf2d4bf449500be228f6b191462bd539bb84f
Squashed update of kernel from 3.4.101 to 3.4.102

Change-Id: I832c80b94aa2c4e1b1df5efecfc968a8a64b9e8a
Squashed update of kernel from 3.4.102 to 3.4.103

Change-Id: If9f3233f9d6005f4b23476a69cff7799c0fb8a07