USB: msm_otg: Add debouncing logic for PMIC id line status handling

Currently reading PMIC ID line status immediately once PMIC interrupt
is triggered. This leads to returning wrong ID line state sometimes
and causes not detecting connected devices. Hence add debouncing time
of 5msec for PMIC ID line state to settle down before reading PMIC
ID status.

CRs-Fixed: 371552
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
(cherry picked from commit 68d55cfa2ed1de84966fae66329a3aeca4ecc3a2)

Conflicts:

	drivers/usb/otg/msm_otg.c

Change-Id: I2f9cfa8d62341555a3269fe64cef34461c838f65
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm7627a: Enable Memory Compaction on 7x27a/8x25

Use memory compaction for reducing external memory fragmentation.

Signed-off-by: Prachee Ramsinghani <pracheer@codeaurora.org>
(cherry picked from commit 728b4665a94b3a3b2751344bfdec5eb5250185c5)

Change-Id: Ia1f6ec08be7a546ad3123ab340e351a5c269562b
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
msm7x27a: Enable SLUB allocator on 7627a and 8x25.

Use SLUB allocator for better memory management.

CRs-Fixed: 378682
Signed-off-by: Prachee Ramsinghani <pracheer@codeaurora.org>
(cherry picked from commit c62e4b0c7ca0f931708eba94390ef62abba50295)

Change-Id: I887e9243c3a0a994c153fc5c89d36beac76896d1
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
Revert "msm_fb: HDMI: Do not add HPD state timer during probe"

This reverts commit 98318da51af4d838b12d335938a8e0377686a7cc.

Change-Id: Idbc67408173af57af7f39b6300d23aa321840ddd
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
Revert "msm_fb: HDMI: Start HDCP authentication only on device open"

This reverts commit 68398e5867e3b1b44941dadde2d093a8e4e6eb58.

Change-Id: Ibe9bf770b32a8b2a9fec5c6a2d14c62de33e88ed
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
Revert "msm_fb: display: HPD rework for cleaner approach"

This reverts commit 9b0f56598165ab4b8fd463d529b94cdaf11ca04d.

Change-Id: If7c49cef6812f08e7e63d6d318de74e0c69e30d9
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
Revert "Revert "msm_fb: HDMI: Removing unnecessary HPD detection code.""

This reverts commit 90db3c440080346c2a5b3a2adc0850e3235127db.

Change-Id: I70b29a25b51a16b34b5cdcacecbe39a7063e687e
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
Revert "Revert "msm_fb: HDMI: Do not add HPD state timer during probe""

This reverts commit 92d9f147ae3bb69f3478e2a392d033dbab4ccb53.

Change-Id: Ib5c5d1a95dc79a33942f23447f015721a3e40564
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm_fb: HDMI: Start HDCP authentication only on device open

Currently HDCP authentication is started for a default resolution
upon HPD connection event. With this change, HDCP authentication
is only triggered after the HDMI interface has been configured for
an appropriate resolution following the call to open the HDMI device.

CRs-Fixed: 368865
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
(cherry picked from commit 14db6b404f2b1627791dada77ea303ef970910a6)

Conflicts:

	drivers/video/msm/hdmi_msm.c

Change-Id: I4950be30128d6cb866b563e7ba450c4084bbf7ed
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
Revert "Revert "msm_fb: display: HPD rework for cleaner approach""

This reverts commit 1427d091b273b4a081372ef85df8ac6821df32b4.

Conflicts:

	drivers/video/msm/hdmi_msm.c

Change-Id: Ic9f47d450523cca33eec96b658a3a4578b1daf55
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm_fb: hdmi: Do not turn on HPD at boot

HPD is getting turned on by userspace if HDMI is enabled.
We don't need to turn on the HPD from HDMI driver.

CRs-Fixed: 377899 368865

Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
(cherry picked from commit 2f7f94cef2a64930e1476c09a5a402631bd39d99)

Change-Id: I0ff1c811bd6e819000f9610692eeeff869fc8921
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm_fb: HDMI: Fix for high HDMI sleep current

In certain cases, the HPD circuitry is not switched off when the
device goes to suspend state, resulting in high sleep current on
the HDMI power rail. This patch ensures that the HPD circuitry is
always turned off during suspend operation by removing an
unnecessary condition check.

CRs-fixed: 368865
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
(cherry picked from commit 3bb47a097c62b71c7f8f2be888a1f73c6cfb8142)

Change-Id: Ia7eec23d47e6380eff8516eb0f20d045f6ad4401
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm_fb: hdmi: Turn on switch dev when connect to HDMI

Audio is not routed to TV after deep sleep and resume.
Userspace is dependent on switch device to indentify audio
route. When HDMI is turned on, this switch needs to be turned
on as well.

CRs-Fixed: 377159 368865
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
(cherry picked from commit fd142681ad79a1b0e8ff007f146761ef8142e4c4)

Change-Id: Ibc717ceecba6ddc9191ad5b22a8b09900281f4d6
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm_fb: HDMI: Fix handling of HDMI PLL software reset

Whenever a software reset is asserted on the HDMI PLL, we should
wait for short time to wait for the PLL calibration to be
successful before checking to see if the PLL is locked.

CRs-Fixed: 378044 368865
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
(cherry picked from commit 53223912053984d6c8a33e7f93960f0e6fff02bc)

Change-Id: Ibd805939cdd14f48c78699e5fa7f3c3013a60cfa
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm: Use immediate operations instead of PC-relative loads

Use immediate operations for creating constants in
__enable_mmu to avoid a situation where the constant area
may not have been fully mapped by the initial identity
mapping.

CRs-Fixed: 375963
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
(cherry picked from commit c00dfe2cd0edb8d891261e7c3f24a50ccd233d17)

Change-Id: I5eb962ca70be36ced5ed9953f954f11dac0d42d3
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm: idle-v7: Write Krait-specific bits before WFI

Certain variants of the Krait processor require a
modification of an implementation-defined register prior to
executing the WFI instruction.

CRs-Fixed: 375963
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
(cherry picked from commit ae920e776de8271232a524031f07e9fd605b5b30)

Change-Id: Iaa1af291662092bbd36800da568de20c66e55417
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>