ASoC: DSP: Fix BE link state and hw_params in debugfs

BE state and hw_params were incorrectly shown in DSP state debugfs,
it was showing FE's values instead.

Change-Id: Ib5afb1537824634208741b0b635a31152c5aaddd
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
OMAP4: clock: Fixing clock internal source selection for ABE ports

ABE ports need a mask of two bits in order to select the
correct internal source clock. This patch fix this mask that
was only one bit and was overlaping with source clock bits.

Change-Id: I8597efd9cec6707e815da39598a0adb7a3ce3c61
Signed-off-by: Israel Cepeda <icepeda@ti.com>
misc: cdc tcxo: Add initial support

Add initial support for Texas Instruments CDC3S04. The misc
driver creates a set of APIs to allow external client drivers
to configure CDC clock settings, for example: request source
(internal, external) and internal request values.

Change-Id: Id83b57037be832af15462b75bc0af997783da603
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
omap: iommu: lower trace level in iommu_enable

The version of the iommu is printed using dev_info in iommu_enable.
This trace is quite rudimentary and hence is converted to use a
dev_dbg. The iommu_enable function is invoked every-time a processor
has to be booted, and so this conversion also helps with the overall
processor init time.

Change-Id: Ia6cfbdf7e6424a917b5d49083c994c88103c0049
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
remoteproc: use dev_dbg to print image version

The version of the remote processor's resource table format is printed
using dev_info during the startup path of a remoteproc. The version
changes very rarely and hence is converted to use a dev_dbg. An error
message is printed anyway in case of a mismatch, so this conversion is
useful in helping improve the overall processor init time.

Also, version info can be looked up using an offline readrprc utility.

Change-Id: I546d3c73582bb7a3fdb2b32b4e3df03ce3a6e7f2
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
rpmsg: use dev_dbg for channel creation/deletion messages

The number of rpmsg channels is decently high enough during
both the initialization and tear-up/recovery of the remote
processor to effect overall boot time. The trace level of this
print is therefore reduced to improves the overall image init
time. It also helps with the runtime performance of usecases as
they have to create and delete a channel.

Change-Id: I96c293d990bc41f1a9dcd6710ef1388fa2ce2cec
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
rpmsg: fix device definitions in rpmsg client drivers

The rpmsg client drivers - rpmsg_omx, rpmsg_resmgr and the rpmsg
sample drivers - rpmsg_client_sample & rpmsg_server_sample, are
all defining the supported devices incorrectly as a 'platform'
device.

The devices these drivers support should all be 'rpmsg' devices,
and the device id tables declared by these drivers has been
corrected accordingly.

Change-Id: Ib1a0f0de5ffad48fe52937730e90a3254265a2f6
Reported-by: Xavier Boudet <x-boudet@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
omap: remoteproc: add a notification for loading error

When calling rproc_get for the first time, the loading of
the remoteproc image will be requested using a non-blocking
request_firmware_no_wait, and the caller can continue before
the actual loading is complete.

The loader later can return an error due to a non-existing
or wrong image and there should be a way to notify about this
to users having a rproc handle.

This functionality is added and is leveraged by rpmsg to
release some resources it had already acquired since requesting
a firmware load.

Change-Id: I1d3523efbcfd613bca74d363084791ceaaaa9989
Signed-off-by: Miguel Vadillo <vadillo@ti.com>
gcx: moved GC320 pixel cache flush to the end of the batch.

Change-Id: I72eb7c3dfb298329ccbef965f12bec55fef4eea6
Signed-off-by: Alexei Shlychkov <shlychkov@gmail.com>
gcx: optimized programming of the destination.

Change-Id: I39381097a64dffe4af6632d9da414c73978505f5
Signed-off-by: Alexei Shlychkov <shlychkov@gmail.com>
gcx: driver cleanup.

Remove unused flush pages function.
Replace hardcoded irq value with proper method.
Remove hardcoded 2d base address & direct allocation.

Change-Id: I79c1089db935bfddc17e85f761113e3f709738b6
Signed-off-by: David Sin <davidsin@ti.com>
twl-rtc: mask alarm interrupts at shutdown.

Mask alarm interrupts when the system is shutdown so that we don't
get powered up unnecessarily.

Change-Id: I732577f1d62a28e880c193a3d7d7d6bcdaf863d2
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Semen Protsenko <semen.protsenko@ti.com>
gcx: image offset issue fixed; accounts for pageoffset and pagesize.

Change-Id: I64a9f4fdb8c33d89c4cd883e17fa40c6d1550b04
Signed-off-by: Alexei Shlychkov <shlychkov@gmail.com>
gcx: boot stability fixes.

Fixed export strucure initialization.
Fixed state loading and optimized source states.
Simplified waiting for the interrupt.

Change-Id: Ifefd6e9ce2d42a9c6f52aa75b8478dd22b95f207
Signed-off-by: Alexei Shlychkov <shlychkov@gmail.com>
gcx: use pm_runtime calls to obtain omap power resources.

These are the proper PM apis to use for GC320.
Remove explicit usage of the bb2d fclk.

Remove idle wait check.  Any handling of prcm wait states
should be done in the hwmod if needed in the future.

Change-Id: I16a53e98fa4c1efca512b7506e2fe9934e9b185f
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
OMAP:MUSB:OTG: Disable MUSB DMA mode incase of DMA channel request failure

Currently in case of MUSB DMA channel request failure we are not
clearing MUSB_RXCSR_DMAENAB, MUSB_RXCSR_H_AUTOREQ and
MUSB_RXCSR_AUTOCLEAR bits of MUSB RXCSR of MUSB DMA. Which is
causing failure in receipt of data packets in next transfer.

Fix is to disable the MUSB DMA mode and related bits incase of
DMA channel request fails

Change-Id: Ie6caed6ef2a01ef647cc839c01724be32a247598
Signed-off-by: Mantesh Sarashetti <mantesh@ti.com>
OMAP: EMIF: fix LP_MODE_PWR_DN value definition

According to TRM the EMIF Power-down mode is identified
by value 0x4 (EMIF_PWR_MGMT_CTRL.REG_LP_MODE)

Change-Id: I4d9b9534dea27ab4619af5b6d78de8ab14f0fead
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
OMAP4: DSS: Implement workaround for Errata ID:i733.

Description of Errata i733:
Due to wrong timings, all register accesses transitioning through the L4
interconnect toward DSS are not reliable.

Workaround:
DSS register access should be addressed through the L3 interconnect.

This change fixes errata by using L3 for access to DSS in dss_hwmod
instead of L4.

Silicon Versions Impacted:
OMAP4430 ES1.0, ES2.0, ES2.1, ES2.2, ES2.3
OMAP4460 ES1.0, ES1.1
OMAP4470 ES1.0

Change-Id: Ie087b861ee653a3beeacba74c3afe7b1a0490ed4
Co-author: Raghuveer Murthy <raghuveer.murthy@ti.com>
Signed-off-by: Mykhailo Denysiuk <x0172934@ti.com>
ARM: OMAP4: USB: Update workaround for USB errata i719

Due to USB errata i719 the USB host save-and-restore context can be corrupted
if the device enters off mode more than two times without enabling the USB
host controller in between.

The corruption is occuring during the software save of the USB context which
occurs on entry to every off mode attempt. To avoid this problem only save the
USB context if the USB host controller has been enabled since the previous off
mode attempt. We do not need to save the USB context on every entry to off mode
if the USB controller has not been enabled.

Change-Id: I67e07963679af6494ef289eb10db09c0162d6f00
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Volodymyr Riazantsev <v.riazantsev@ti.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
OMAPDSS: DSSCOMP: efficiency improvement.

This change adds 3 local caches of objects, which are used at each flip buffer
action. In original variant kzalloc()/kfree() functions are called each time
dsscomp_gralloc_queue() function is called. This meens that slab|slob|slub
common cache is used at each frame draw action. Call to kzalloc()/kfree()
result in synchronization with other code, which uses common cache, and can
result in dips in FPS, when other code allocates/frees memory.
This change improves reliability, autonomy and efficiency of DSSCOMP module.

Change-Id: Id50778f4579309fb71318a32820b9d6441a6dac1
Signed-off-by: Mykhailo Denysiuk <x0172934@ti.com>