ARM: dts:  msm: Add BAM interrupt to bypass list

Since BAM irq originates at the Modem, marking this interrupt as a
bypass as modem is halted when the system enters a deep sleep mode.

Change-Id: I3b06e504f3aea8f567a3a4f910719c3165fd5f03
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
ARM: dts: msm-pm8941: Switch VADC/IADC to polling

Switch VADC/IADC to use polling mode to check if the
conversion request is complete by checking the status
bits for the corresponding VADC/IADC registers to
indicate the conversion is complete.

CRs-Fixed: 521265
Change-Id: Ia04af13c52cc098ca7af167c457e52a6f4398b46
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>

https://www.codeaurora.org/cgit/quic/la/kernel/msm/commit/?h=msm-3.4&id=267614aa4e42a3a32cbdf510895d289ce6de3a76

Bug: 10621614

Change-Id: Ie4b8cab74f529ee4196580ec21d81eb766acd238
Signed-off-by: Devin Kim <dojip.kim@lge.com>
arm/dt: msm8974-leds: Increase flash LED current

By increasing LED flash current, camera gets better
image quality.

Signed-off-by: Sushmitha Gummalla <sgumma@codeaurora.org>
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
arm: Add XN bit to pgrprot_stronglyordered

pgprot_stronglyordered sets page attributes to the strongly ordered
memory type. This type is often used for regions of memory which
cannot be speculated into. Strongly ordered memory by itself prevents
speculative data accesses but it will not prevent speculative instruction
accesses. Since strongly ordered memory will never be used for
instructions, set the XN bit as well to prevent speculative instruction
fethces.

Bug: 10750953
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Naveen Ramaraj <nramaraj@codeaurora.org>
msm: scm-pas: Provide a strongly ordered buffer to the secure world

The secure world requires that the metadata-containing buffer
be strongly ordered. Use the dma_alloc_attrs API to obtain a
strongly ordered region for this purpose.

Bug: 10750953
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Signed-off-by: Naveen Ramaraj <nramaraj@codeaurora.org>
msm: cpufreq: Move cpu_frequency_* trace points from acpuclock to cpufreq

acpuclock is not used on newer targets, so move the trace points
in it up to the generic msm cpufreq driver. Also drop the use of
the 'trace_cpu_frequency' entirely, since it's already present in
generic cpufreq code.

As a side effect of this change, these trace events will no longer
track cpu frequency changes from the power-collapse path. Only
frequency changes coming from cpufreq will be tracked.

CRs-Fixed: 535512
Change-Id: Ib69d92f5d3209a7e36be678997b79bcdac92f953
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
msm: acpuclock-krait: Work-around retention corner-case

The CPU clock source MUXes cannot switch while a CPU is in
retention, but callers of acpuclock APIs may not known that
the CPU is in retention.

Work around this problem be always performing the CPU MUX
switch on the affected CPU using smp_call_function_single()
in cases where cross-calling might otherwise be possible.
The one exception to this is during hotplug code paths,
where cross-calling is expected by design (since the target
CPU is not online and cannot be in retention).

Bug: 10735002

Change-Id: I76b6de436e71da7979f30bdce841f414c26bfe44
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
msm: clock-mdss: Toggle lock detect before checking for PLL lock

The enable sequences for the DSI PLL for MSM8226 poll a hardware
status register in order to determine whether the PLL has locked.
However, with the current sequences, it is possible that the
hardware status register would indicate a PLL lock even though the
PLL is not really locked. To avoid this, toggle the lock detect
register setting before polling for PLL lock status.

CRs-Fixed: 490476
Change-Id: I6e1357afaa6a86be9ab92095a41768873c70cf0d
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm: clock-mdss: Do not toggle lock detect during handoff

If continuous splash screen feature is enabled, then the DSI
clocks are left on in the bootloader. When the kernel boots
up, te DSI PLL lock status is checked in order to determine
whether these clocks should be handed off or not. Ensure that
the lock detect register is not toggled at this time to avoid
any blinks in the display.

Change-Id: Ica8c42e260d9b3ceffda885b1942fab945f60c86
CRs-Fixed: 506037
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm: clock-mdss: set clk rate when the cached rate has no change

This is to make sure setting the rate happens after the clk is handoff
from lk.

Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm: bam_dmux: delay shutdown until DL polling is complete

Bam_dmux assumes that a shutdown event will not occur while downlink (DL)
polling is active. If this assumption does not hold, bam_dmux stops
polling, but does not cleanly switch back to interrupt mode until the next
power-on event. This is a problem because the next power-on event could
occur in the distant future and until that time some resources may be
incorrectly accessed or not released. Instead, if a shutdown event occurs
while DL polling is active, delay processing of that event until polling
completes.

CRs-Fixed: 503046
Change-Id: I67e4216b4820942e6070944557cd13f59600a2aa
Signed-off-by: Brent Hronik <bhronik@codeaurora.org>
msm: bam_dmux: Update UL wakeup timeout to two seconds

The current uplink (UL) wakeup timeout of one second does not allow the
remote side enough time to trigger a watchdog and recover from some serious
problems. Increase the UL wakeup timeout to two seconds to provide the
remote side enough time to trigger the watchdog, if necessary, without
significantly impacting user experience due to an overly long data stall.

Change-Id: Ia9f85bb9822ce500c3d41b894a945fc6ecc75fc7
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/bam_dmux.c