Lower NFC wakelock timer
Adjust voltages and add 430mhz and 500mhz iva clocks
remoteproc: fix checkpatch warnings

A few checkpatch warnings have crept into remoteproc over time,
and these have been fixed.

Change-Id: Ife21b9c063505f4ceb4f7f4fd6561c854fc99b90
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
remoteproc: create version debugfs after image is loaded

This patch ensures that the image version debugfs entry is
created only after the image is loaded. Version info is
not available before the image is loaded.

If the debugfs entry is created before, then it results in
a kernel panic.

Change-Id: I7311b4a832b5e897ca10f1290900b3178e2c544d
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
remoteproc: add an api to do pa to da conversion

Added an api to provide memory translation from a
physical address to a device virtual address.

Change-Id: I476ce1ba8dc53562c500ad069be42b62e69c5ee3
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
rpmsg: store rproc reference during virtio device creation

Get and store a reference to the rproc associated with the
virtio device. This can later be used by rpmsg drivers to
exercise rproc API (for eg: rproc_da_to_pa).

An API is provided to get this reference from a given rpmsg
channel device.

Change-Id: Ieb397a8cbdd9897a09d631f902c37364fa612210
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
rpmsg: omx: add return values to the pa to da convert function

This patch adds return values to the pa to da conversion function.
This will help in propagation of proper error codes to the calling
functions.

Change-Id: Ie547f7b7e7c51eff4b7998cbd336a61663995708
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
rpmsg-omx: tiler_virt2phys called for 1D buffers

While migrating to the new PVR APIs, the changes caused
a the tiler_virt2phys to be bypassed in case it is not
a PVR buffer. This patches fixes the issue

Change-Id: I9a3353053d58a7bc0ef89012de46534fad5f4b88
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Signed-off-by: Tate Hornbeck <tate.hornbeck@ti.com>

Conflicts:

	drivers/rpmsg/rpmsg_omx.c
rpmsg: omx: re-work buffer lookup to support contiguous NV12

SGX544 requires Y and UV to be contiguous in SGX virtual address space. This
is done by using single FD for two ion handles.

Change-Id: I33ced876905d74e6293a2c32df0612f01a23d13f
Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>

Conflicts:

	drivers/rpmsg/rpmsg_omx.c
remoteproc: remove pa hardcoding of IPU_MEM_IOBUFS

While adding a mem entry, we currently check the pa of
IPU_MEM_IOBUFS and mark the entry not to be considered
during core dump. The pa hardcoding is removed in this
patch and we use the resource name instead, to make it
independent of the address location of this section.

Change-Id: If0fa893e033b8d0252d8d9d13532c7385417045c
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Revert back to old state
omap: mailbox: enable mailbox irq per instance

The machine-specific omap2_mbox_startup is called only once
to initialize the whole mbox module. Enabling mbox irq at
startup is only enabling the irq of the very first mailbox
instance created.

The enable_irq function should be called every time a
new mbox instance is created, in the generic platform
mailbox layer.

Change-Id: I1b7148fd0342a335e3b45cfe349c43a8491ae5c1
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
omap: iommu: apply latency constraint based on power domain

When the iommu is taken out of reset, a latency constraint is
set to avoid its power domain going to retention/off. The iommus
for DSP and M3 reside in DSP and Core power domains respectively,
and therefore the API for setting the constraints is different.
This patch uses the appropriate API depending on the iommu (power
domain) the latency constraint is being applied on.

Change-Id: I3fa4485b3c405aa10c32a3fe0b7ac694d484ee21
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
omap: remoteproc: handle latency constraints for non-ipu rprocs

The omap remoteproc code is incorrectly applying the latency
constraint on the CORE domain for all remote processors. This
would apply only for ipu, and the others need them to be applied
on their respective domains. This patch fixes the same.

Change-Id: I1768d78b7029366d05cb5df16a032de597e1e5f3
Signed-off-by: Suman Anna <s-anna@ti.com>
omap: remoteproc: add support for a boot register

Some remote processors (like DSP) need to explicitly configure
a boot address in a special register or memory location, and
this is the address from which they start executing code when
taken out of reset.

Support for this infrastructure has been added to remoteproc
code. The memory or register address where the boot address
is to be stored is supplied through the boot_reg field of the
platform data in the remoteproc. The omap_rproc_start function
will fetch the boot address from the image, and write this
address into the boot register, if provided, before taking the
processor out of reset.

Change-Id: I4efc5824791eda6e23e5d568f4568a3fe3d0014b
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
OMAP4: PM: OPP/Clock: Add virtual clocks for high IVA OPPs support

To get correct frequencies for IVA OPP higher than OPP100
IVA DPLL should be reconfigured.
Tesla is also supplied from the same IVA DPLL, so frequency on DSP
should be reconfigured together with IVAHD frequency.

This is achieved by adding virtual clocks for IVA and DSP.
Main logic is implemented in IVA virtual clock which sets
frequency for both IVAHD and DSP.
DSP virtual clock is just a dummy clock and it do nothing.

Necessary DSP OPP is set via IVA virtual clock by using DVFS framework feature:
if device on which OPP is set is not the primary device in voltage domain,
then constraint to the same OPP is set for primary device.
In case of DSP the primary device is IVAHD.

If switching to the lower OPP will cause IVA DPLL scaling up,
then frequency of IVA and DSP should be scaled down before DPLL.

Change-Id: I1b229f1d52f0f8bfa4f65f08221df1e1ba6194bc
[jagadeeshwar.reddy@ti.com: original patch author for 4430]
Signed-off-by: Jagadeeshwar Reddy <jagadeeshwar.reddy@ti.com>
[taras@ti.com: modified and extended for all OMAP44xx]
Signed-off-by: Taras Kondratiuk <taras@ti.com>

Conflicts:

	arch/arm/mach-omap2/opp4xxx_data.c
OMAP4: OPP: make omap4_mpu_opp_enable generic
Also enable all higher OPPs for VDD_IVA

Make omap4_mpu_opp_enable generic using the omap_hwmod_name_get_dev api
so that we can reuse it for other devices as well. As part of this,
rename it to omap4_opp_enable.

Change-Id: I87e76b446fb4e57200edd0ae00f5ff9b70021fa5
Signed-off-by: Nishanth Menon <nm@ti.com>

Conflicts:

	arch/arm/mach-omap2/opp4xxx_data.c