OMAP: Support for Android RAM console

Android's RAMCONSOLE framework is handy framework which allows
saving the kernel printk messages to a buffer in RAM, so that
after a kernel panic they can be viewed in the next kernel
invocation, by accessing /proc/last_kmsg.

This obviously needs DDR to be in selfrefresh mode. Board files
which have relevant support need to enable CONFIG_OMAP_RAM_CONSOLE
and call omap_ram_console_init with relevant parameters for this
to function.

Change-Id: I2dd5ad55a0a3af5a5dcb9a9b8a797e1371af39bc
Signed-off-by: Huzefa Kankroliwala <huzefank@ti.com>
Signed-off-by: Akash Choudhari <akashc@ti.com>
Signed-off-by: Ameya Palande <ameya.palande@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>

Conflicts:
	arch/arm/mach-omap2/Makefile
omap: enable android ram console on tuna
ARM: OMAP: Fix ramconsole init.

Fix the issue when trying to register a platform device
before the platform device was initialized.

Postpone the device registration until the board file init.

Change-Id: I3920f9236fec957e4f63f39ff9aa3bae530af014
Signed-off-by: Dan Murphy <dmurphy@ti.com>
OMAP: ramconsole: fix offset by 1 error in recovery path

memblock_add in recovery path of omap_ram_console_register takes
size parameter which is end - start + 1 instead of just end - start.

Change-Id: Iceb88c41538e497611d94dc49e2fc2fff8ee4d30
Signed-off-by: Nishanth Menon <nm@ti.com>
OMAP: ramconsole: make omap_ram_console_register device_initcall

Commit: 65b0b50251c8aa66d5e1da712e3183c74b08c615
(ARM: OMAP: Fix ramconsole init) fixes the symptom of not having
platform_device root device available at reserve. However,
there is no need for omap_ram_console_register to be invoked
by board files as we can do the registration internal to ram_console
logic itself as part of device_initcall.

We use a flag to ensure that we register the device only if the board
file has updated relevant parameters.

Change-Id: I1a0c622612007b0a0ce3249cf71a1dfed9401e24
Signed-off-by: Nishanth Menon <nm@ti.com>
HACK: ASoC: OMAP ABE: Save DL1 BE related gains

MM_EXT_DL gains were being lost when ABE was hitting OFF, because
they were not properly saved when DL1 last active BE was muted.

Save DL1 BE gains along with ABE context in order to avoid
losing their values when OFF is hit. Gain values are saved when
gains are muted. These gains were not properly muted if BT_VX_DL
or MM_EXT_DL port was enabled and DL2 path was active, since
PDM_DL1 port gets enabled(for DL1 or DL2) when ABE McPDM is started.

Change-Id: Ib0d658c65c134f7ee4baeb13f7e09f6299b1923a
Signed-off-by: Axel Castaneda Gonzalez <x0055901@ti.com>
OMAP GPIO: Fix to disable I/O PAD wakeup for GPIO 38

On Tablet2 GPIO 38 is used for secondary sensor and PAD wakeup
is not required for this pin as it is not intended to be wakeup
capable

Change-Id: I973cb8a131fa148e5205eaf5a35a63e6c88c2b9e
Signed-off-by: Huzefa Kankroliwala <huzefank@ti.com>
OMAP4: USB: Fixed tshut reboot issue

Wakeup enable was set for usbb1_ulpitll_dir.usbb1_ulpiphy_dir. This is also
muxed with gpio 86. When a wakeup event was detected as part of the
gpio runtime resume, it set the gpio 86 event causing a tshut irq event.
We now rely on the wakeup from pin usbb1_ulpitll_dat0.usbb1_ulpiphy_dat0 for
USB wakeup events.

Change-Id: Ic32a976118944e45b91c0bdce6099ab090da3ae7
Signed-off-by: Huzefa Kankroliwala <huzefank@ti.com>
Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
OMAP: DSS2: Fix callback completion issue in mgr->blank

Uncommitted callbacks were not completed yet eclipsed in mgr->blank.

Also fixed mgr index in ECLIPSED_CACHE callback.
This patch is co-authored with Muralidhar Dixit <murali.dixit@ti.com>

Change-Id: Ia20b79e9a6308441423d9900469e0c4adfc30eee
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>