omaprpc: Unified Patch to add OMAP Remote Procedure Call Driver

Patch History (squashed), contributors initials follow history.

omaprpc: Adding OMAP Remote Procedure Call Driver to staging area of kernel. [ER]
omaprpc: Adding defines for CONFIG_DRM_OMAP and isolating Android parts. [ER]
omaprpc: Latest commit, compiles and produces a working kernel, no ducati/tesla to test with. [ER]
omaprpc: Added dependency on DMA_SHARED_BUFFER and changed some dev_info prints. [ER]
omaprpc: fixing omaprpc makefile to build omap_rpc.c. [GA]
omaprpc: commenting some debug in omap_rpc_dmabuf.c that doesn't compile. [GA]
omaprpc: enable OMAPRPC_INFO debug messages. [GA]
omaprpc: changing char dev creation procedure. [GA]

create_device() is now called in the probe() function.
omaprpc_device_create() and omaprpc_driver_cb() are commented, because not compiling.

omaprpc: fixing char dev name [GA]
omaprpc: renaming iMX to SIMCOP [ER]
omaprpc: Added dynamic dev node naming back, updated header files. kmaps still do not work correctly [AA][ER]
omaprpc: Added safety code to make sure dma_bufs behave well. Adjusted ranges for cpu_access [ER]
omaprpc: Updates to copyright and MODULE_DEVICE_TABLE. Also removed unneeded header [ER]
omaprpc: Fixes from Android [ER][AA]
omaprpc: Unified OMAP Remote Procedure Call Driver [ER]
omaprpc: Fixes to coding style [ER]
omaprpc: Added bootargs debug flag [ER]
omaprpc: Changed some formatting for readibility [ER]
omaprpc: Fix to forcefully unpin all dmabufs after a transaction [ER]

Signed-off By: Erik Rainey <erik.rainey@ti.com>
Signed-off By: Guillaume Aubertin <g-aubertin@ti.com>
Signed-off By: Alberto Aguirre <a-aguirre@ti.com>
Signed-off-by: Xavier Boudet <x-boudet@ti.com>
OMAP: dmtimer: Save timer context through API

Currently we are not saving the timer context but only restoring it
through API. This patch saves the context while the timer is stopped
so that same context can be restored when it is restarted.

Change-Id: Idf050253e74dacefbc7bad4ecb46125bd4f66fe7
Signed-off-by: Huzefa Kankroliwala <huzefank@ti.com>

Conflicts:

	arch/arm/plat-omap/dmtimer.c
bypassing RPRM_SET_CONSTRAINTS and RPRM_CLEAR_CONSTRAINTS requests
Revert "OMAP4: ERRATA: ARM: Fix ARM Errata 743622"

This reverts commit 0dfe4754ab5f3f50d5107757d5ba8143fa919577.
Revert "OMAP4: ERRATA: ARM: Fix ARM Errata 751472"

This reverts commit 54629b9e603c22e2aa90b90124c0849d43303ac3.
Revert "OMAP4: ERRATA: ARM: Fix ARM Errata 742230"

This reverts commit 0f661ba5ffa88baa445fdf53c7731d833696682c.
OMAP4: ERRATA: ARM: Fix ARM Errata 742230 v2

Errata 742230: This Errata workaround requires bit 4 to be set in the CP15
diagnostic control register. This patch takes care of this errata fix for GP
devices at CPU init time and at the cpu_resume stage.

Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
Signed-off-by: Sebastien Jan <s-jan@ti.com>
OMAP4: ERRATA: ARM: Fix ARM Errata 751472 v2

Errata 751472: This Errata workaround requires bit 11 to be set in the CP15
diagnostic control register. This patch takes care of this errata fix for GP
devices at CPU init time and at the cpu_resume stage.

Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
Signed-off-by: Sebastien Jan <s-jan@ti.com>
OMAP4: ERRATA: ARM: Fix ARM Errata 743622 v2

Errata 743622: This Errata workaround requires bit 6 to be set in the CP15
diagnostic control register. This patch takes care of this errata fix for GP
devices at CPU init time and at the cpu_resume stage.

Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
Signed-off-by: Sebastien Jan <s-jan@ti.com>
omap4: pm: errata i608: extend to 4460

Signed-off-by: Sebastien Jan <s-jan@ti.com>
OMAP4: Serial: Set TX_FIFO_THRESHOLD if uart in dma mode for es2.0

From OMAP4430 ES2.0 onwards if uart is configured in dma mode we need to set
uart tx threshold value using the new register UART_TX_DMA_THRESHOLD, this
register can used if UART_MDR3 bit(2) is set. We have to ensure
tx_threshold + tx_trigger <= 63 from es2.0 onwards. By default we are using
tx_trigger of 1 so we can set threshold to 62 to satisfy above criteria.
Without the threshold setting we hit dma_sync lost errors on tx channel
leading to data loss on rx side

Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
Signed-off-by: Sebastien Jan <s-jan@ti.com>
omap-hsmmc: Fix issue during SD card disconnect

Turning off IO & PBIAS cells and then SD card VMMC
as soon as we get disconnect interrupt. Failure to do
so is causing current spikes (latch-up issue)which
can potentially burn the I/O cells.

Enabled Debounce logic in TWL6030 so that erroneous
disconnect/connect interrupts will be suppressed.

This will also fix issue where SD card disconnect
event was not getting detected when SD card is very
slowly plugged out.

Signed-off-by: Viswanath Puttagunta <vishp@ti.com>

Conflicts:

	drivers/mfd/twl6030-irq.c
	drivers/mmc/host/omap_hsmmc.c

Signed-off-by: Sebastien Jan <s-jan@ti.com>
omap_hsmmc: Errata: Fix SD card removal detection

Because of OMAP4 Silicon errata (i705), we have to turn off the
PBIAS and VMMC for SD card as soon as we get card disconnect
interrupt. Because of this, we don't wait for all higher layer
structures to be dismantled before turning off power. As a side
effect of this, we might end up getting a mmc_request
even after SD is removed and VMMC and PBIAS are turned off.
In that case, just fail the mmc_request and return immediately

Signed-off-by: Viswanath Puttagunta <vishp@ti.com>
Signed-off-by: Sebastien Jan <s-jan@ti.com>
MFD: twl6040-codec: Implement PDMCLK cold temp errata

No PDM clock output is generated when operating in cold temperatures.
The suggested workaround consists of resetting LPPLL and HPPLL after
Sleep/Deep-Sleep mode transitions, before entering in application
mode.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Sebastien Jan <s-jan@ti.com>
Revert "remoteproc: omap: Set lantency constraint to prevent L3 errors"

This reverts commit b93c809a07652a462bad6da52cf2479ab541c02a.
omap: add a new rproc_user misc driver

A small minimal driver, rproc_user, is added that provides interfaces
to the user-space to be able to start/stop the secure mode.

The current implementation provides only the .read file operation, with
the .write file operation stubbed out. The .write always returns an
error since the entire secure playback infrastructure is not supported
yet.

Signed-off-by: Suman Anna <s-anna@ti.com>
ARM: OMAP: clock: create followparent_set_rate function

The followparent_set_rate function can be used by dummy clocks as
their .set_rate function to allow the children of the dummy clocks
to set a rate on the dummy clocks using a call like
    clk_set_rate(clk->parent, rate);

The dummy clocks usually are created as a child of a real clock, and
do not have the capability to set their own rate. Any rate that needs
to be set on the dummy clock has to be set on the dummy clock's
parent. This functionality is implemented by the followparent_set_rate
function by setting the rate on the requested clock's parent clock and
propagating the rate to all the parent's children.

This function allows a clk_set_rate(clk->parent, rate) call to
support both the following clock hierarchies:

   1)  x----- parent_clk
	      |
	      x-----clk;

   2)  x----- parent_clk
	      |
	      x-----parent_dummy_clk;
		    |
		    x--- clk;

This patch is based on the original idea from Nishant Menon.

Reviewed-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
[s-anna@ti.com: Revised function and patch descriptions]
Signed-off-by: Suman Anna <s-anna@ti.com>
ARM: OMAP5: clock: Add set_rate operation to OPT clock nodes for SCRM

Use followparent_set_rate as set_rate operation for OPT clocks nodes
for SCRM. This allows a clk_set_rate call on the OPT clock to work as
expected as the rate is propagated to the real clock.

Reviewed-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
omap5: evm: add camera regulators as rpmsg resources

The camera regulator data is board-specific and has to be
published to the rpmsg resource layer. The necessary data
is added to the OMAP5 sEVM board file.

[Roger Q] ported to tilt-3.4

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
rpmsg: resmgr: omap: retrieve ISS opt clk handle from platform data

The OMAP rpmsg driver is currently getting the struct clk handle for
the ISS optional clock through the omap_get_clk_by_name function. This
function is currently not exported, and causes a build error if
omap_rpmsg_resmgr were to be built as a module. This function call is
moved to the mach-omap2/rpmsg_resmgr.c which is always built-in, and
the ISS optional clock struct clk is published to the generic rpmsg
omap resmgr layer through platform data to its omap driver.

Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>