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>
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: HDMI: report HDMI as manually updated panel

Report HDMI as manually updated panel. Currently it is
default treated as auto updated panel by OMAPFB.
This is used by OMAPFB to determine if VSYNC notification
is possible by panel or not.

Change-Id: I3d1fe91f79fd2a39497bea700f9653ef141b310f
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>
OMAPFB: Select correct VSYNC IRQ based on DSS channel

Select correct VSYNC IRQ for asynchronous vsync notification
based on the DSS channel.
Current VSYNC notification supports only primary LCD panel.
To support VSYNC notification for default HDMI display this
patch adds the VSYNC IRQ selection based on the DSS channel
for default display.

Change-Id: I0594e80d4b4850c278e6bdd3b07c0cb63488be39
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>
blaze_defconfig: Enable SCHED_TRACER

The Galaxy Nexus JB production devices support the systracer.py
script which can be used to enable tracepoints in Android. This
needs the SCHED_TRACER config flag to be enable.

(Cribbed from the tuna defconfig in public kernel)
b129322 omap4: tuna: enable SCHED_TRACER in defconfig

Change-Id: I1a20095f7fe2ad3c047ff7067cd021032381141e
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
blaze_defconfig: Add KPROBES and RELAY dynamic instrumentation

On top of SCHED_TRACER support these flags are required for
tooling purposes and should have no runtime impact until
enabled.

Change-Id: I64985cfc339c41d5bbb65f4773aea889ee49e4ee
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
omaplfb: Add omaplfb to the kernel tree

omaplfb has dependencies on several kernel components and it will
be easier to maintain it in the kernel tree.

Sync'd to DDK omaplfb patch:
omaplfb: Allocate a clear buffer with 8 pixel stride per GC requirement

Change-Id: I0c781007350fea724aa498f7f8d328db66f9d41c
Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
Signed-off-by: Tony Lofthouse <a0741364@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>
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>
OMAPDSS: OMAPFB: Add support to suspend HDMI display

omapfb_blank() function was changed to allow HDMI display enter
into the suspend state.

Change-Id: Ie7b6b6e298885aba4714ca7f9ff3c5e9b5178854
Signed-off-by: Victor Kleinik <x0150886@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>
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>
Enable CONFIG_DYNAMIC_DEBUG

Signed-off-by: Shahar Levi <shahar_levi@ti.com>