msm: msm_bus: Explicitly clear client requests before removal

Clients can potentially leave non-zero requests before
unregistering. Such requests persist and cause instability
and severe power and performance impact.

Protect the system against such clients by explicitly
clearing the client requests before unregistration.

Change-Id: I6a905b097de41af168b5f5048b682ba995b581c2
CRs-Fixed: 407057
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
msm: msm_bus: Fix the 64-bit division during interleaving

When interleaving flag is enabled, the bandwidth is divided
between ports. There was an error in the division as the
macro was not correctly updated with the right order of using
bandwidth and port number when 64-bit division function
was used by the bus driver.
Correcting this for fixing the token allocation issues
observed.

CRs-Fixed: 472791
Change-Id: Ie7c7f9557006cbb946eaa9eff4b50771cc60525e
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
msm: msm_bus: Add NULL pointer check

This patch protects the bus driver against clients who try to
update requests without registering the client.

Change-Id: Ie740844218dbabe5fca098798c461590aba42e97
CRs-Fixed: 459651
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
Merge "msm: msm_bus: Explicitly clear client requests before removal"
Merge "msm: msm_bus: Fix the 64-bit division during interleaving"
Merge "msm: msm_bus: Add NULL pointer check"
msm: msm_bus: Add NULL pointer checks.

Bus driver is crashing due to a NULL pointer
access sent by the client. A few NULL pointer
checks have been added to protect the driver
from invalid/NULL client handle.

CRs-Fixed: 458264
Change-Id: I822ad312ba1a0c0939d97eb92ea53094d408a836
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
(cherry picked from commit ced1d81035c66133083ae93217912b102155f2ca)

Conflicts:

	arch/arm/mach-msm/msm_bus/msm_bus_arb.c

Signed-off-by: Goberu Gopal <ggober@codeaurora.org>
Merge "msm: msm_bus: Add NULL pointer checks."
power: pm8921-charger: remove OV UV irq

Enabling the OverVoltage (OV) and UnderVoltage (UV) interrupts is
causing an interrupt storm. These interrupts are not used by the
charger driver.

Remove them from being registered and enabled.

Change-Id: I2605afc2d6f9f3569ec783b2d23881f31cc9038a
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
(cherry picked from commit 8a2a5f509a80b5188cd7379ad66c085344c25f77)

Conflicts:

	drivers/power/pm8921-charger.c

Signed-off-by: Goberu Gopal <ggober@codeaurora.org>
Merge "power: pm8921-charger: remove OV UV irq"
msm: board-8960:  Add chip id support for WRSG 1.1

To support 8960Pro HW version 1.0 & 1.1

Change-Id: I503dd5e52271d4a8b422cc817c59efe289011e4f
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
Merge "msm: board-8960:  Add chip id support for WRSG 1.1"
msm:camera: Fix signedness issue in hw_exec_cmds

  In hw_exec_cmds()second argument m_cmds should be
  of type unsigned interger

Change-Id: Idad2eb1a59481f3fe9f90221ff2061e8dae57013
CRs-Fixed: 493314
Signed-off-by: Monika Alekhya <malekh@codeaurora.org>
 msm:camera: Fix overflow issue in ioctl_hw_cmds function

    'len' is of type signed int 32bit,but the assigned value
    may exceed maximum unsigned int32 range.Add overflow check
    and graceful exit if 'm'exceeds UINT32_MAX value.

Change-Id: I38f0d10a0cb44d08d0054f91044fc891c246ebd1
CRs-Fixed: 493314
Signed-off-by: Monika Alekhya <malekh@codeaurora.org>
Merge " msm:camera: Fix overflow issue in ioctl_hw_cmds function"
Merge "msm:camera: Fix signedness issue in hw_exec_cmds"
debug: msm_bus: Fix division by zero error.

Change-Id: I805453ccc9e86629ea2665e61037a924c5f246d4
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
(cherry picked from commit f71a059ad219774dcd32db67b5355f5646dbe816)

Signed-off-by: Satish Kamuju <skamuj@codeaurora.org>
msm: camera: Add support for bus overflow recovery.

In case of bus overflow, try to recover by stopping CAMIF
and overall VFE reset and restore the IRQ mask.

CRs-Fixed: 510209
Change-Id: I18d5d0c22ffed94f559717500901ff23ce19c0ca
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
(cherry picked from commit c3a15ed07f92e1cad6ef3d55e41fa590c15f31c9)

Signed-off-by: Satish Kamuju <skamuj@codeaurora.org>
msm: camera: Notify application in case of CAMIF error.

In case of CAMIF errors, send the error notification so that
the application can shutdown the camera pipeline.

Change-Id: I08e9e150e5e08905e34fb342c611f789eccc4e74
CRs-Fixed: 510209
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
(cherry picked from commit 8641b2821d2d1f0000c49e9c7017cca6e9979663)

Signed-off-by: Satish Kamuju <skamuj@codeaurora.org>
msm: camera: Notify application in case of bad state.

In case, the bus overflow keeps happening beyond a
predefined threshold, stop recovery and notify the
user about the error so that camera can be gracefully
shutdown.

CRs-Fixed: 510209
Change-Id: I4a3ff26cd73a20511174fe7fc9d0b46af2986249
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
(cherry picked from commit 6a5606b85cd601af351b3b7256b176aa403638fc)

Signed-off-by: Satish Kamuju <skamuj@codeaurora.org>