msm: pm: send notification only for SPC and PC

Currently the pm notification is sent for all the low power
modes of each CPU. Generally the subscriber to this notification
expects to be notified for core power collapse. For example
interrupt controller subscribes this notification to save
and restore its context when entering and exit power collapse
respectively. So this is not necessary for shallow power modes
like WFI and Retention.

This change is to send the notification for only standalone
power collapse of each core and idle power collapse of core0.

Change-Id: I39fb6a6bfb47ca49d6ec8df8cad1fd74424140a0
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Implement kexec-hardboot

"Allows hard booting (i.e., with a full hardware reboot) to a kernel
previously loaded in memory by kexec.  This works around the problem of
soft-booted kernel hangs due to improper device shutdown and/or
reinitialization."
More info in /arch/arm/Kconfig.

Original author: Mike Kasick <mike@kasick.org>

Vojtech Bocek <vbocek@gmail.com>:
  I've ported it to mako and flo, it is based of my grouper port, which is
  based of Asus TF201 patche ported by Jens Andersen <jens.andersen@gmail.com>

  I've moved atags copying from guest to the host kernel, which means there
  is no need to patch the guest kernel, assuming the --mem-min in kexec call
  is within the first 256MB of System RAM, otherwise it will take a long time
  to load. I've also fixed /proc/atags entry, which would give the kexec-tools
  userspace binary only the first 1024 bytes of atags,
  see arch/arm/kernel/atags.c for more details.

  Other than that, memory-reservation code for the hardboot page and
  some assembler to do the watchdog reset on MSM chip are new for this device.

ayysir <dresadd09691@gmail.com>:
  kexec: use mem_text_write_kernel_word to set reboot_code_buffer args
  in order to avoid protection faults (writes to read-only
  kernel memory) when CONFIG_STRICT_MEMORY_RWX is enabled.

Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
drivers: input: ditch the old touch boost implementation. Compared to Ondemand touch boost this had a bit of latency. With the syscalls header we have access to functions to write directly to userspace files, which makes it easier since Google's boostpulse implementation relies on writing 1 to a certain file to boost the frequency on touch. Google relies on a userspace powerHal to do this (Mako and Flo don't touch boost through the PowerHal). In this case we rely solely on the Kernel side, so when theres a touch it writes to boostpulse. This is the touch driver part, next commit is needed to make this work.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
cpufreq: interactive: push this governor to Google's latest code which has the boostpulse interface from where we benefit from the previous commit.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Updated sound values by Mercado_Negro

Will be tuned in future

Signed-off-by: kecinzer <kecinzer@gmail.com>
Compilation fixes