msm: ocmem: Call restore_sec_config() after every power collapse

As the QRIB is enabled, after every power collapse of ocmem, the
QRIB is reset to the maximum security state. Due to this the apps
processor cannot access the ocmem register space.

The restore_sec_config() scm call needs to be called before any
register is accessed after a power collapse to ensure that the
security configuration is restored. The clocks need to be turned
on before every call that is made into TZ to ensure that there
is no power collapse.

CRs-Fixed: 651324, 660089
Change-Id: Ieb6b635142057e219de29e811c93749f6500cec5
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
smp: Allow booting a specific subset of CPUs

In a heterogenous multiprocessor system, specifying the
'maxcpus' parameter on the kernel command line does not
provide sufficient control over which CPUs are brought
online at kernel boot time, since CPUs may have nonuniform
performance characteristics. Thus, we introduce a
'boot_cpus' command line argument, allowing the user to
explicitly specify the list of CPUs that shall be brought
online during kernel boot.

Change-Id: I5f119e23202660941fa7be8c4e6dd91a82365451
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mmc: core: abort rescan if suspend is triggered

There could be a race between suspend and mmc_rescan as follows:
At resume:
-> mmc_pm_notify
  -> mmc_rescan is scheduled

Suspend is triggered:
-> mmc_pm_notify
   -> wait for mmc_rescan/cancel it
      -> rescan acquires wakelock if card is detected
         so as to give user-space a chance to respond
-> PM framework cancels suspend since wakelock is active

Hence, release the wake-lock if its active in suspend prepare
and check for rescan_disable before acquiring wake-lock.
This prefers suspend over notifying the user-space of the status
of the card, which is fine since with suspend user-space is frozen
too.

CRs-fixed: 655281
Change-Id: I83783589f9b541d3af73931e9a7b0b144a25538e
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mmc: core: continue to wait, when unblocked by signal

Mmc thread is waiting for one of following events occurs:
- current running request completion (is_done_rcv)
- new request notification arrived (is_new_req)
- urgent request notification arrived (is_urgent)
or the thread received a signal. In this case none of described events
happened.

This change process the case, when mmc thread was unblocked from wait by
signal, for example system shutdown flow.

Change-Id: I0b4f0cefedc839640c162ad3cdb011d13daaee0c
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
msm-camera: Avoid adding top up to calulated ab/ib for single stream.

Avoiding topup for ab/ib for single stream

Change-Id: Ie6fb6716ea1b30604d801936bea3da5a96d8a6fc
Signed-off-by: Chandan Gera <cgera@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>