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>
Signed-off-by: Dan Trifan <jimsth@gmail.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>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
OMAP4: ERRATA: ARM: Fix ARM Errata 742230

Errata 742230: This Errata workaround requires bit 4 to be set in the CP15
diagnostic control register. This patch takes care of this errata fix for GP
devices at CPU init time and at the cpu_resume stage.

Change-Id: I5244bec9544fddc9fff33ca2903f5ec19bcc52a7
Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
OMAP4: ERRATA: ARM: Fix ARM Errata 751472

Errata 751472: This Errata workaround requires bit 11 to be set in the CP15
diagnostic control register. This patch takes care of this errata fix for GP
devices at CPU init time and at the cpu_resume stage.

Change-Id: I3a8d2b825ac59719233275a77c5fbf5175b35bcb
Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
OMAP4: ERRATA: ARM: Fix ARM Errata 743622

Errata 743622: This Errata workaround requires bit 6 to be set in the CP15
diagnostic control register. This patch takes care of this errata fix for GP
devices at CPU init time and at the cpu_resume stage.

Change-Id: I6b9cf510ca631f74da4ce2f31c1190a2216aa5bb
Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
OMAP4: HSOTG: Improved HSOTG USB EYE diagram

1. Added the ability to improve HSOTG USB EYE diagram.

 solution #1: (all 44XX CPUs family)
   Improvement of 2-3% in EYE diagram opening by playing slightly on USB
   driver output impedance.

 solution #2: (4430 CPUs)
   Improvement of up to 8% in EYE diagram opening has been accomplished by
   decreasing the internal termination impedance by increasing the SWCAP
   trim code in USBPHY_USB2PHYCM_TRIM register to 0x24.

2. Added menuconfig option for this feature:
   'System Type'--->'OMAP 44XX HSOTG Eye diagram correction'

Change-Id: Ifd0450e8eeea57e6f68d1e166fe878a39ce52f71
Signed-off-by: Volodymyr Riazantsev <x0153367@ti.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
Select OMAP_RAM_CONSOLE for tuna

Signed-off-by: Dan Trifan <jimsth@gmail.com>
Add FORCE_SILICON_PERFORMANCE
by Hashcode

Signed-off-by: Dan Trifan <jimsth@gmail.com>
clean up FORCE_SILICON handling

Change-Id: I5cc786a8ff5a4364f4458a9919b9863bae57fd55
Signed-off-by: Dan Trifan <jimsth@gmail.com>