kernel: Prevent unnecessary rfkill event generation.

Prevent unnecessary rfkill event generation when the state has
not actually changed. These events have to be delivered to
relevant userspace processes, causing these processes to wake
up and do something while they could as well have slept. This
obviously results in more CPU usage, longer time-to-sleep-again
and therefore higher power consumption.

Change-Id: I3ac4e141fbdf1315b74d3bad6aa96f34b00c3f92
CRs-fixed: 398283
Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
Signed-off-by: Mykyta Iziumtsev <nikita.izyumtsev@gmail.com>
Signed-off-by: Deepthi Gowri <deepthi@codeaurora.org>
Patch-mainline: v3.7
Git-commit: eab48345c2b2d791159aaac4a77000baa8dbc1ae
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
 Ported Snappy-C version 1.1.0

https://github.com/AndreiLux/Perseus-UNIVERSAL5410
thx -DorimanX

Conflicts:
	lib/Kconfig
use snappy for zram
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>

Conflicts:
	arch/arm/mach-omap2/Makefile
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>

Conflicts:
	arch/arm/mach-omap2/Kconfig
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>

Conflicts:
	arch/arm/mach-omap2/Kconfig
	arch/arm/mach-omap2/Makefile