OMAP: UART: Specify DMA RX buffer size

At the moment DMA mode is disabled for UART. When enable it -- there is
continuously printing "DMA misaligned error" even though data is aligned
properly (tested with IS_ALIGNED() macro). Actually the problem is in zero
length size for RX DMA buffer.

This patch set RX DMA buffer size equals to default size to prevent futher
problems if DMA will be enabled for UART. Also it set other DMA RX fields to
their default values.

This patch inspired by OMAP5 serial board file (board-omap5evm-serial.c)
in k3.4.

Change-Id: Id73c30892b2104b4283783e740f137514be64a1f
Signed-off-by: Semen Protsenko <semen.protsenko@ti.com>
remoteproc: omap: differentiate auto-suspend from system suspend

The omap remoteproc driver sends a mailbox message to the remote
processor requesting it to save its context and then be suspended.
This can happen either through the runtime auto-suspend path or
through the system suspend.

The mailbox message being sent to the remote processor is now
differentiated between the two paths. This differentiation provides
flexibility on the remote processor to allow an application cancel
auto-suspend. This flexibility is needed as there can be some
operations wherein there is no on-going activity between the host
and the remote processor with the remote processor idle waiting for
an event that would take more time to complete than the auto-suspend
timeout.

The auto-suspend cancellation is detected by the driver on the
host-side through a timeout for the processor to be idled, and is
simply rescheduled.

Change-Id: Ifdeeb80a632ac0145194d3c20f66256226e7efd4
Signed-off-by: Shahid Akhtar <sakhtar@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
omap: ion: increase ducati memory by 2MB

The carveout size required for the ducati firmware image has
been increased by 2MB to allow an increased heap size on the
remote processor side.

This change is automatically reflected for OMAP4 Blaze, Tablet
and Panda boards.

Change-Id: I2524e481b9c753a03a32c50c30fab879b6515665
Signed-off-by: Suman Anna <s-anna@ti.com>
omap4: hwmod_data: add clocks to ipu processor devices

The ipu processor hwmod devices (ipu_c0 & ipu_c1) are defined
primarily as pseudo-hwmod devices with only reset controls.
These share the same functional clock along with the ipu hwmod
device that is mainly used for controlling the MMU. This clock
name is added to these pseudo-hwmod devices, as it will improve
the robustness to any HW_AUTO settings performed within the
hwmod framework. There is no major effect on the clock framework
itself, as the clock enable & disable will simply be reference
counted and the functionality would be identical as before.

Change-Id: I865e9690b503e601df27aa0a55cfac45622c4259
Signed-off-by: Suman Anna <s-anna@ti.com>
omap: iommu: relax constraint value to allow CSWR

The iommu driver currently requests a latency constraint,
if configured in platform data, on the power domain it is
present in. These values are required only for OMAP4 and
beyond and is done to ensure the AMMU context is maintained
when the corresponding power domain goes to a low power state
during cpuidle path. The AMMU context is retained in CSWR, but
is lost in OSWR.

The current constraint value (10) for OMAP4+ is high and
restricts the power domain to remain in ON state as long as
the processor is active. This value is relaxed to 400 to
allow a lower power CSWR state during cpuidle path.

The context is saved and restored properly when suspending
the remote processor.

Change-Id: I89fd125f2244ae1691843c3c078aa6314a7ae8a6
Signed-off-by: Miguel Vadillo <vadillo@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
omap: mailbox: relax constraint to allow powerdomain to go to CSWR

The mailbox registers can be accessed and configured by other remote
processor initiators, and hence the driver has to be responsible for
maintaining the register context when they are active. This is
achieved by the mailbox driver by requesting a latency constraint
on the power domain that it belongs to.

The current constraint value (10) is high and restricts the power
domain to remain in ON state as long as a remote processor is
active. This value is relaxed to 400 to allow a lower power CSWR
state that can still retain the context during cpuidle path and
a remote processor is active.

The constraint is completely removed when the remote processor is
suspended. The mailbox context is saved and restored properly
when suspending the remote processor.

Change-Id: I152b57e982dc8e5739808cbbbe8bd5cc96223ffa
Signed-off-by: Miguel Vadillo <vadillo@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
cpufreq: interactive governor: Fix not uniform buf filling & memory corruption

Each CPU has it's own load history buffer, but all they use shared
<history_load_index> variable, this lead to not uniform filling
of the cpu's circular buffers. Only about half of buffer is updated
during each buffer rewriting cycle that obligate governor to use
outdated data during freq tuning.

Moreover access to <history_load_index> variable is not atomic, that
create race conditions. Simultaneous increment could cause situation
where such check:

        if (++history_load_index == sampling_periods)
                history_load_index = 0;

not safe and buffer overflow will not be prevented. That will lead
to memory corruption.

To avoid such problems this patch move buffer-index variable to
<cpufreq_interactive_cpuinfo> structure, which is separate for each CPU.
Also, buffer overflow checking will be paranoidly changed.

Change-Id: I333a4462be17816372a7a57529811d87930058c0
Signed-off-by: Leonid Iziumtsev <x0153368@ti.com>
OMAP4470: OPP: Enable SGX OPP-OV for Low Power OPP set

Initial 4470 Low Power OPP set was copied from 4460 OPP set.
4460 OPP set had SGX OPP-OV disabled by
commit 919cf0ce816b626f1d836d050a31463650f54526.
This commit is reverted and 4460 SGX OPP-OV is enabled.
Same should be done for 4470.

Change-Id: I7483a8669da79479303453495c0d41f959daa9ad
Signed-off-by: Taras Kondratiuk <taras@ti.com>
blaze_defconfig: enable USB networking

USB network adapters are widely used for many cases.
Enable USB networking so rebuild of kernel will not be
required for USB network adapters usage.

Change-Id: Ic45ff71922538be6b0404c3674ac9002a838ae3a
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
OMAPDSS: DSSCOMP: Fix incorrect num_ovls check

In setup manager IOCTL, the check to validate the number of overlays
is incorrect. Hence when all overlays are passed to setup manager IOCTL
with enable/disable, error was returned. Fix the same.

Change-Id: I8ec1a6dee9f074ebf83a39bdf113a97e2543cc70
Signed-off-by: Varadarajan, Charulatha <charu@ti.com>
i2c: omap: implement shutdown handler

Once i2c driver shutdown has been called, ignore any more
transfer requests. This patch adds the missing callback.

Leave the PMIC i2c (i2c-1) alive, since power_off case needs it
well after shutdown handlers have been called for power_off case.

Change-Id: I4f4553327e5c024f78acb8501864dd9beb1883c3
Signed-off-by: Semen Protsenko <semen.protsenko@ti.com>
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Revert ducati 2.1.13 prerequisites: 6d2d426 and 1289289.

This reverts commits:
6d2d426 "remoteproc: omap: differentiate auto-suspend from system suspend"
1289289 "omap: ion: increase ducati memory by 2MB"

Change-Id: Ib3d14d9ca859bcc60f35734552bae41eaa874436
Signed-off-by: Roman Shaposhnikov <x0166637@ti.com>
Merge remote-tracking branch 'omapzoom/p-android-omap-3.0'
fixed for 4.6+ compilers
(thanks to Hashcode here: https://github.com/KFire-Android/kernel_omap/commit/48daa086eac7e5eb7d266792359bb939d0fdbc6a)
fixed for 4.6+ compilers
Revert "Disable resume/sleep function for FT5406, KXTF9 and AIC3100 devices. (Try to resolve random reboot bug)."

This reverts commit 4ec7731caca2c204888b45af909b847ec71bca34.
revert FB config
fix typo
fix suspend/resume typo of xktf9 (accel)
trace time