remove this ifdef
OMAP4+: Add ability to store reboot reason

Bootloaders need to know when their platforms do a reboot.
The only memory that is retained is SAR ram accross reboots,
provide ability to store the reboot reason in a standard location
in the SAR memory (using the last 0xf bytes in SAR BANK1 ram).

This is now populated with the string "normal" if the reboot
is due to ordinary reboot commands, if the reboot reason is
for other reasons, such as bootloader or recovery as is the
case with Android systems, this stores the same.

NOTE: bootloader should be updated accordingly.

Change-Id: I32d05ef023682a1530b34315dac90fd97bed3265
Signed-off-by: Nishanth Menon <nm@ti.com>

Conflicts:
	arch/arm/mach-omap2/Kconfig

Conflicts:
	arch/arm/mach-omap2/Kconfig
OMAP4+: reboot-reason: handle wdt trigger

consider a scenario where one does a adb reboot-bootloader
the SAR memory is populated with "bootloader", and fastboot
reboot. If the bootloader does not cleanup the SAR memory
and a wdt triggers, the normal arch reset path is not
taken, instead bootloader will startup and detect the
previous string, which is wrong. kernel should be able
to recover as much as possible any miscoded bootloaders.

Change-Id: Icec723287415511b7733955c47f8931e0b43d3c5
Signed-off-by: Nishanth Menon <nm@ti.com>
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>
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>
add ezekeels code for custom sr values