Fix mach-omap2/omap-iommu.c to prevent NULL pointer deref and fix a warning.

Change-Id: Iee7790cd529d8823b8c0606a3e4e614e94df0a77
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
ARM: omap2: fiq_debugger: ifdef local_timer_irqs in dump_irqs()

The local_timer_irqs field is surrounded by #ifdef
CONFIG_LOCAL_TIMERS in the irq_cpustat_t structure.  Do the same
for its usage in dump_irqs() so fiq_debugger can compile on
non-SMP systems.

Change-Id: Ie212d39b8c705f6815e00d86569bdb92b0c1e4c1
Signed-off-by: Scott Anderson <saa@google.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
OMAP: DMA: Set thread reservation for high-priority channels

Reserve one thread for write and one for read for high-priority
channels. This configuration helps latency critical synchronized
transfers: memory-peripheral and/or peripheral-memory.

Change-Id: Ib8ecf32db126937820b1da04b183568c44143d64
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: John Grossman <johngro@google.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
ARM: OMAP: USB: Fix compiler warnings

Change-Id: I871e4429da55cfc79a6e1b01ffc1029032c14ef9
Signed-off-by: Mike J. Chen <mjchen@google.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
OMAP4: OMAPFB: Always set a x_decim and y_decim in overlays

When using the framebuffer API to setup overlay, there's
currently no way to pass a x_decim and y_decim value in
so set some safe non-zero defaults.  Otherwise, when
the overlay is enabled, zero values will cause divide
by zero error in dispc.

Change-Id: Id2cb4bc4cb6be7b57e3ab5fc28fffc57163faecb
Signed-off-by: Mike J. Chen <mjchen@google.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
OMAP4: OMAPFB: Set overlay zorder to 0 if omapfb API used

Since there's no ioctl to set zorder when modifying overlays
using SETUP_PLANE, it's more useful to userland code if
overlay is 0, so they don't have to use sysfs and first
figure out which overlay is being used by omapfb.

Change-Id: I1c2eeecb0b950439e40eec895d6b89c73df2fd7e
Signed-off-by: Mike J. Chen <mjchen@google.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
OMAP4: DSSCOMP: Check user passed arg in ioctl

Prevent stack overflow if user passes in a value
that's too large for num_ovl.

Change-Id: I86a232544f8acc6a08eca00dfdb71db41f355341
Signed-off-by: Mike J. Chen <mjchen@google.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
OMAP:DSSCOMP:Limit modedb_len in query ioctl

Add an argument sanity check/limit to prevent
heap corruption attacks.

Change-Id: Ib466af13dba8da6bd4d9b326cdc6b842c8f3caa7
Signed-off-by: Erik Gilling <konkers@android.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
OMAP: process tput request made before PM init.

Because driver load order is uncertain, drivers could request bus
throughput constraints before the PM subsystem had initialized.  The
constraints would be recorded, but would have no effect on the actual
L3 clock.  This change suppresses attempts to set L3 scaling before PM
has initialized, and causes the PM subsystem to apply any pending bus
throughput constraints immediately after it has initialized itself.

Change-Id: If2a1f5315b8c1b084e4e4b3ce8e6844d92dd59b6
Signed-off-by: John Grossman <johngro@google.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>

Conflicts:
	arch/arm/mach-omap2/pm44xx.c
OMAP4: PM: Fix missed PRCM MPU interrupt events

OMAP PRCM detects events with EDGE sensitivity. Edge sensitivity
requires to clear the interrupt event status bit before acknowledging
the source event.
If the source event is cleared (1) before reseting the interrupt event
status bit (2), then a subsequent source event (i.e edge) between (1)
and (2) would be missed. Then, all the source events would be kept
"masked" until the source event is cleared again.

The bug seen here is that upon two consecutive PRCM interrupt events
from the IO daisy chain source event, the second event is missed if it
occurs before the PRCM interrupt event status is cleared.
Since the IO daisy chain source event has not been acknowledged, the
subseqent events from this source are missed too.

This patch fix the PRCM interrupt handler by acknowledging the interrupt
event status bit before clearing the source event.

Change-Id: I8c43a93c3b6c7c654ddaa262b7c1c3e7385da158
Signed-off-by: Patrick Combes <p-combes@ti.com>
Signed-off-by: Cedric Poignet <c-poignet@ti.com>