Port open call for smux is blocking. There is a 5 seconds default
timeout for the open call. The total number of retries for opening
the port makes the total wait time to be 11 minutes. This timeout
becomes an issue if QSC does not come up in time. Adding a device
attribute lets the user space control/reduce the timeout value.
CRs-Fixed: 372629
Change-Id: Ib20bf05da740c99dbb7e94b4df96d256ecadad34
Signed-off-by: Angshuman Sarkar <angshuman@codeaurora.org>
Add a call to of_mpm_init function from within the msm_8974_init_irq().
The MPM drivers keeps account of all enabled interrupts in the system to
be able to configure the MPM hardware during low power sleep modes. To
ensure that MPM receives notification for all interrupts, it needs to be
initialized as soon as the system interrupt controllers are initliazed.
Change-Id: I61f01fc9a7a6caf5b950f24cf7474f86c97745ca
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
MPM driver is used to configure the MPM driver for monitoring wakeup
interrupts when the system is low power mode.
Change-Id: I711f71359b751c5be08aaaccff7ee3548e3243d9
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
The current MPM driver works for targets where the interrupt controllers
operate in a legacy mode, where the linux irqs are at a constant offset
from the hardware irqs. On newer targets, the mapping within the
interrupt controllers are no longer restricted to legacy mode.
The change also address the interface changes in the MPM hardware
starting with 8974 chipsets.
Change-Id: Ide9b5bf7e29c94a85e37d04cd0064864b89f7c5c
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
Driver probe is returning 0(success) in case of error
returned by APIs called in msm_otg_probe(). This is causing
NULL pointer exceptions during system wide suspend as
driver data for platform device is not set.
CRs-Fixed: 379532
Change-Id: I194e9386ba8de6d88ab102a467793f8b2f03083a
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
In adreno_idle the default timeout value was always used,
even if the caller specified something different. The caller
can now specify a non default timeout value to be used
in adreno_idle.
Change-Id: Ibb6bcc094521d4a660d8385b32bf8c6ac68acbd9
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
When switching HDMI on, 3D display gets turned on. Correctly setting
up the 3D GPIO(DISP_3D_EN_N) to fix the problem.
CRs-Fixed: 360983
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Change-Id: I898b30ce399a8de481e51676954b57ca5f09797a
For Android/Linux kernel 3.4. This is the initial commit.
Change-Id: I96e300d7b59743df1f757746228b47b5d444c76c
Signed-off-by: Samuel Huo <samuel.huo@st.com>
Signed-off-by: Wentao Xu <wentaox@codeaurora.org>
Added support to let the userspace know about the updated
LE connection parameters. On receiving successful connection
complete and connection parameters update event from the BT
Controller, send a mgmt event to the userspace bluetoothd.
CRs-fixed: 380271
Change-Id: If8c3d785188e0d4f38c7431d01c016f399137408
Signed-off-by: Sunny Kapdi <sunnyk@codeaurora.org>
Allow the graphics core to access OCMEM regions by initializing
the custom mPU until Trustzone support for OCMEM is integrated.
Change-Id: Ie7390ed7a690800f75a663e25d0f53527fec52ae
Signed-off-by: Naveen Ramaraj <nramaraj@codeaurora.org>
HDMI 1.3 supports Multi channel PCM up to 8 channels with sample
size of 16/20/24 bits and sample rate of 32, 44.1, 48, 96, 176.4,
192K. This patch add supports for 6 channel PCM at 48K sample rate
with sample size of 16 bits.
CRs-Fixed: 380370
Change-Id: I01cb7eb509a0d21072e2e8dcc63624384a1edb0d
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Add smem interface to get data from shared memory.
One use case is getting config data for RBCPR driver.
Change-Id: I5fa089195ec05cb9d3859741e4f2224b0e89bc01
Signed-off-by: Kaushal Kumar <kaushalk@codeaurora.org>
Remove modem_wake and from_idle parameters from msm_gic_save
API since they are not used at all.
Change-Id: Icd1a83aea6b0eb988c19ccdbaf65b1f5be9e8ac2
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
MSM8625 v1.0 needs the s/w workaround for hready pin access problem
in QGIC2. The workaround is add the lock around every QGIC2 register's
read and write operation to avoid reading the incorrect value from the
QGIC2 registers when back to back read happens on another CPU.
Change-Id: If980c03d2c57b0b9c560b5a746db0535584841d9
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
Add support for low power clients to map and unmap OCMEM buffers.
These operations trigger RDM transfers using the BR/DM core which
enables low power clients to migrate segments between main memory and
OCMEM.
Also add the required APIs for supporting eviction and
restoration of buffers.
Change-Id: I6b641510f8ef27da2b347d13af468a1ed6664c9e
Signed-off-by: Naveen Ramaraj <nramaraj@codeaurora.org>
Tearing was observed while playing 1080p H264 videos in
potrait mode. Enabled blt mode check for MIPI command
mode panel as well.
CRs-Fixed: 369365
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Change-Id: Iac980050e5966db4731240c11e89e1f68118f2b7
Allow individual clients to register respective memory
dump locations. These are dumped at the time of kernel crashes,
cpu hangs for debugging purposes.
Change-Id: I6f38debef62dbfb570b048d25b3dab9c17eff745
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
In order to support mapping of the ring-buffers of
demux-device directly to HW output, kernel-demux needs
to get the information of the ring-buffers. In addition,
when these buffers are mapped to HW output, kernel-demux
needs to be notified when data is read from the buffers
so that the respective HW FIFO can be updated accordingly.
Change-Id: I29e2e89476dd343dbebb440c6feb955a76fd0bd1
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Add device tree bindings and driver support for the cache
error reporting devices on 8974. Remove leftover
opportunistic debug info from the L1 error handler, since
we can no longer get away with this on all targets.
Change-Id: Iac88915a6b40a40ec3157027048f4daf6369dc42
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
If source end of a channel removes its vote, it should be allowed to
be reclaimed by other client (or by other source port by same client)
who wants to be the source for this channel.
CRs-Fixed: 376731
Change-Id: Ia30c6a4b07de7df98cde8bc928205b4f4598036d
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
PM8821_SEC_N_IRQ on 8064 is being routed as
a direct connect interrupt to QGIC. Change
this to enable mpm to monitor this interrupt
and wake it out of power collapse.This helps
in achieving vdd minimization on 8064.
Change-Id: Ia5c0463dc7c853f44d5d63a737aff10b15cf4a32
Signed-off-by: Chandra Ramachandran <cramacha@codeaurora.org>
On 8960 it is observed that head and tail of rpm
circular buffer is not updated properly which is preventing
reading the RPM log through adb.
CRs-fixed: 365071
Change-Id: If24b7fb29fce14dccc24dbcdbe3513d22d94a298
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
Found that the register sequence for enabling recording on analog
microphone was updating a wrong register. Fix by correcting the
register sequence
CRs-fixed: 378189
Change-Id: I3598cbc77b279684b28677943ac13f446bc2f78e
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Disable RGB module when the LED is turned off and enable the
module when the LED is on.
CRs-fixed: 381623
Change-Id: I0861c6a38fff19c9499d169deaa02d05696bd148
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
With commit (d5d59dc) setting AUTO_PROG_DONE bit for Multi
block write command (CMD25) is broken. Fix this by setting
wait_for_auto_prog_done flag for CMD25 preceded with CMD23.
Change-Id: Ic81550b199162b657ad4ef5de47ec0c2d4de25c8
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
The VBIF is capable of triggering a false bus error the first time
it performs a read. This fix creates a dummy read event that
happens every time that the VCAP is powered on that will ignore
the false positive VBIF interrupt error, so that during normal
operation the error can be properly identified.
Change-Id: Ie56e60faf2067fab7a05a0f16c2d840408c35035
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Add couple of valid ptr checks and zero out
variables after allocation.
Change-Id: Ib0e80eab9ac41cec192d1c4a04f8aeafd77729a3
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
When closing the slimbus ports, clear only the slimbus
ports which were active at the time of closing on that
slimbus interrupt, which will avoid clearing further
interrupts for other slimbus ports
Change-Id: I43ce9963c0ecb4b8fb79527b8a9c6b13d7780aad
CRs-fixed: 380535
Signed-off-by: Swaminathan Sathappan <Swami@codeaurora.org>
Bug fixes to get RPM assisted power collapse working.
Unstable behavior was seen because L2 SPM state wasn't
being reset as part of exiting power collapse.
RPM driver callbacks were being missed because the
resource type comparison from the callback with the
resource type maintained at lpm_resources was failing
due to endian related issues.RPM sleep set processing
fails because vdd-dig resource doesn't use absolute
voltage values but voltage corner values.
Change-Id: I5b7218ba87574f2e7296378ded5e86fcac085203
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
Memory reservations for memory pools or using memblock remove
must happen early at bootup. Add a function at early boot to
walk the flattened device tree and extract memory reservation
information from appropriate bindings in device tree. To ensure
that the memory is only reserved when a driver is enabled,
drivers must put EXPORT_COMPAT(<compat string>) in the driver
as well as adding the binding to the device tree. More
documentation is available in
Documentation/devicetree/bindings/arm/msm/memory-reserve.txt
Change-Id: I28fa71d7a30cea9af5447acb5d2dde562fa0f6de
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
- Add a front end DAI link for compressed audio driver.
- Add device tree specific changes to sound soc compressed
drivers which will help the detection of sound card.
Change-Id: I4a8076df8c82cd4e444fc0d68e8f7a228bd1dc02
Signed-off-by: Harmandeep Singh <hsingh@codeaurora.org>
Certain version of the Krait processor require a specific
code sequence to be executed prior to executing a WFE
instruction to permit that instruction to place the
processor into a low-power state.
Change-Id: I308adc691f110a323cbd84e9779675ac045826fa
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Refactor the inline assembly code in spinlock.h in
preparation for supporting the Krait safe WFE sequence.
Change-Id: I2db4f823c39b164e04673f44cea916e334a20c9a
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Remove the condition argument from the WFE macro in the
spinlock code so it can support a WFE fixup needed on
certain Krait CPUs.
Change-Id: I8b4f85f0e7c130dff1e14fe275fda14a43e6f3f4
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Some physical pools ids may become unsupported in future targets.
Remove target specific information from API to make it robust against
such architectural changes.
Also different platforms such as MDM, MSM might support some physical
pools but not the other, so choosing a generic name which will could be
mapped internally to different memory pools
Change-Id: I4f003662d9a2a28c17eefa5230530b8608b26c09
Signed-off-by: Harmandeep Singh <hsingh@codeaurora.org>
Rather than enabling compilation of acpuclock-krait on every Krait
target individually, use the Krait Kconfig.
Change-Id: I42fa5e7194bc96d181dcc3d3247022a53c9f90f8
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
The APIs are currently unused. They were added for the benefit of
the acpuclock-8960 driver, which needed them to ensure that CPUs
were really power-collapsed before their clocks were disabled.
The current acpuclock-krait driver solves this problem a different
way, by taking advantage of hardware features that were not
available in early (unreleased) versions of the Krait cores. Now,
instead of disabling the CPUs' clocks, a low-frequency always-on
clock source is selected and hardware clock gating is employed to
save power. With this, it is no longer necessary to wait for the
SPM to confirm the CPU has power-collapsed before acpuclock's
CPU_DEAD callback executed.
Change-Id: If93efea7c0bd4bb2943e1a1782217943eacf31a0
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Refactor the initialization code so that datastructures that must be
kept are kmemduped and the rest are discarded after the kernel has
booted with the help of __initdata markings.
For a typically-compiled all-in-one kernel containing support for
msm8960, apq8064, msm8627 and msm8930, this allows 11.5K to be moved
from the .data to the .init.data section, with less than 10% of that
retained in dynamically-allocated memory (the exact amount varies
depending on the device the kernel is booted on).
Change-Id: I505eef8f10dc0e44bab15954b797252c3c408e50
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
The HFPLL data for the CPU PLLs and the L2 PLL are the same with the
exception of the voltage data specified. The voltage data, however,
is only relevant for the L2 PLLs (since the CPU HFPLL voltage
requirements are captured as part of the CPU frequency/voltage table).
Because of this the tables can be combined.
Change-Id: Ic8c9bdcf3c3c32a62906031fe5ffbc60a8b824f4
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
By referencing L2 frequency table rows by indexes rather than pointers,
we allow for future enhancements which will allocate the L2 frequency
table at runtime.
Change-Id: Icc62962d5d7b27dbf39008bc6eff83c4ee8951c4
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Leverage the optimized code of the new acpuclock-krait driver for
8960. The newer driver is simpler and more efficient than the existing
acpuclock-8960 code, but drops support for Krait v1 processors (which
were not commercialized anyway).
Change-Id: I5cc875446f02a9f169c9997b716e0464a3a20ee1
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Migrate 8064 support from acpuclock-8960 to the newer, optimized
acpuclock-krait driver which is shared among multiple SoCs while
keeping 8064 data in its own file.
Change-Id: I0fc5e5f8ade2976b8e1727c9c560f640450f8837
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
8064v1.x hardware has a known issue where the CPU's primary and secondary
clock source muxes reset to their default states when the L2 cache is
power-collapsed. To work around this, software sets these muxes to their
default positions (QSB selected) before L2 power-collapse so that software
state remains in sync with the hardware.
Replace this workaround with an improved one that incurs less of a latency
penalty in the hotplug path (since selecting the slow QSB source may slow
down hotplug). The improved workaround targets the root of the problem,
which is that the L2CPUVRF8 CP15 register becomes corrupt when L2CPMR or
L2CPUCPMR are written to. It is this corruption that results in the
change in L2 power-collapse behaviour and the muxes getting reset.
Implement the improved workaround, which saves and restores L2CPUVRF8's
value around L2CPMR and L2CPUCPMR writes. Although the register is still
corrupt for a short period of time before the register is restored, this
is of no consequence since L2 power-collapse cannot happen at that time.
Change-Id: I3ac13f286ac903d5f974bf735ebf287d9413216b
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
For 8974 target, pil_get function uses "adsp" string as a param, for
other targets it uses "q6", for pil_get to succeed, we need to try
with both strings before we return an error.
Change-Id: Ia1e05f9ce4d9f09165bdfbd1c68cad9136d62b0f
Signed-off-by: Harmandeep Singh <hsingh@codeaurora.org>
The USB 3.0, USBHS and USB HSIC cores require asynchronous block
reset support for correct operation in certain scenarios. Support
these resets by adding BCR_REG for the relevant clocks.
Change-Id: If4f47201c485ea2060d4b795e767a1c69d34d22e
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Add GSBI8 device and its related interfaces with their configuration
i.e. clock, ADM, GPIO. GSBI8 UARTDM interface can be used for external
Bluetooth SoC.
CRs-Fixed: 375285
Change-Id: I15819862072c92d8ff6f397fdf081f1b619ec235
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
After disconnecting the phone from TV which doesn't support
underscan, and connected to TV which support underscan,
underscan is not working due to non re-initialization of
scan variables. Re-initialize the underscan variables for
every HDP events.
CRs-Fixed: 375862
Change-Id: I22b7b8785ec93f9cf226e9b646a851ffb3ceff62
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
When HDMI is primary, suspend-resume is not happening.
For HDMI as primary case, early suspend and resume can be
used. This change implements early suspend and resume for
hdmi as primary case.
CRs-fixed: 381097
Change-Id: I7b83d07a8b109294f3606c60f58b760836b88685
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>