OSDN Git Service

sagit-ice-cold/kernel_xiaomi_msm8998.git
8 years agoclk: msm: mdss: fix DSI PLL programming for msmcobalt
Aravind Venkateswaran [Wed, 18 May 2016 22:18:34 +0000 (15:18 -0700)]
clk: msm: mdss: fix DSI PLL programming for msmcobalt

VCO configuration should be based on the requested vco
clock rate and should not factor in the bit clock source
divider. In addition, the bit clock source divider for
the slave controller should always be set to 1. This will
ensure that the PLL is locked at the correct rate.

CRs-Fixed: 1019289
Change-Id: Ie5c171e13dcccc711ba03acb38fcd7876e792cee
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
8 years agoARM: dts: add remote etm devices for msmcobalt
Shashank Mittal [Thu, 12 May 2016 20:29:03 +0000 (13:29 -0700)]
ARM: dts: add remote etm devices for msmcobalt

Add audio, modem and rpm etm devices for msmcobalt. These devices can be
used to configure traces on remote processors.

Change-Id: Idf381b86cd44679ea1f8b6fbfe85b2616232f533
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
8 years agojtagv8: add jtagv8 support snapshot
Shashank Mittal [Wed, 27 Apr 2016 22:21:47 +0000 (15:21 -0700)]
jtagv8: add jtagv8 support snapshot

This snapshot is taken as of msm-3.18 commit:
89be600 (Merge "msm: camera: Fix KW issues in sensor code")

Jtagv8 driver can be used to save and restore debug and ETM registers
across power collapse.

Change-Id: I1537c92ac86964fdbe9abb012f972d5f3b36047a
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
8 years agoARM: dts: add CSR device for msmcobalt
Shashank Mittal [Wed, 4 May 2016 18:38:19 +0000 (11:38 -0700)]
ARM: dts: add CSR device for msmcobalt

Add CSR device for msmcobalt target. CSR device can be used to configure
Coresight slave registers.

Change-Id: I4da057a32b57af6431ead37522f877b114188699
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
8 years agopwm: qpnp: Enable glitch removal selectively
Subbaraman Narayanamurthy [Thu, 5 May 2016 01:45:28 +0000 (18:45 -0700)]
pwm: qpnp: Enable glitch removal selectively

Currently, glitch removal is enabled by default when the PWM
channel is configured. However, that adds delay to the PWM
output which is undesirable for longer PWM period. Disable the
glitch removal when PWM is configured and enable it after the
PWM is enabled.

CRs-Fixed: 1009283
Change-Id: Ibf4abb99e5e3e7aa9a9212b57094876f6ec6e9f0
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
8 years agopwm: qpnp: configure PWM period during bootup
Subbaraman Narayanamurthy [Mon, 11 Apr 2016 19:35:24 +0000 (12:35 -0700)]
pwm: qpnp: configure PWM period during bootup

Currently, PWM period is configured only when the client request
to configure period explicitly. However, there are requirements
to get it configured during bootup based upon the device tree
configuration. Add support for it.

While at it, add some pr_debug statements to the driver so that
it can provide some useful log of PWM specific calculations
runtime.

CRs-Fixed: 984628
Change-Id: I50de4488c32ef78efec1587305c56ab06fb32fed
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
8 years agopwm: qpnp: support DTEST configuration for PWM subtype
Subbaraman Narayanamurthy [Fri, 11 Dec 2015 01:36:33 +0000 (17:36 -0800)]
pwm: qpnp: support DTEST configuration for PWM subtype

Currently, DTEST configuration is supported only based on the
DTEST line and output values for LPG subtype. Though this will
help configuring DTEST mode for PWM subtype, input validation
has to be fixed for supporting the latter properly. Add support
for that.

Also, rename the "lpg-dtest-line" device tree property to
"dtest-line" as this will apply for both LPG and PWM subtypes.

CRs-Fixed: 949595
Change-Id: I96bf477a14bb135cf9196532cf4bf39a45c9ff77
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
8 years agomsm: mdss: Fix elements ordering of all YUV interleaved formats
Ramkumar Radhakrishnan [Fri, 20 May 2016 03:10:42 +0000 (20:10 -0700)]
msm: mdss: Fix elements ordering of all YUV interleaved formats

Pack the elements of all YUV interleaved formats in the same order
in which the elements are stored in the memory.

CRs-Fixed: 1019201
Change-Id: I64472af6e9983929e0d3ea08601d17c7a2b7c4ef
Signed-off-by: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>
8 years agomsm: mdss: Add remaining interleaved YUV format to definition table
Benet Clark [Wed, 11 May 2016 06:26:52 +0000 (23:26 -0700)]
msm: mdss: Add remaining interleaved YUV format to definition table

One remaining supported format for YUV interleaved forats table. Adding
format in this change.

CRs-Fixed: 978785
Change-Id: I025a59d92aca2585335768c94f7a188c339aa788
Signed-off-by: Benet Clark <benetc@codeaurora.org>
8 years agoclk: msm: clock-gpu-cobalt: Correct the CRC enable sequence
Deepak Katragadda [Thu, 19 May 2016 22:28:47 +0000 (15:28 -0700)]
clk: msm: clock-gpu-cobalt: Correct the CRC enable sequence

Correct the sequence to turn on the GPU_GX gdsc as part of
enabling the GFX CRC.

CRs-Fixed: 1018785
Change-Id: I64d0abe7091f81f85e83747f09ece4bc524a4057
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
8 years agoASoC: msm: qdsp6v2: Change audio drivers to use %pK
Ben Romberger [Thu, 19 May 2016 00:15:50 +0000 (17:15 -0700)]
ASoC: msm: qdsp6v2: Change audio drivers to use %pK

Change all qdsp6v2 audio driver to use %pK instead
of %p. %pK hides addresses when the users doesn't
have kernel permissions. If address information
is needed echo 0 > /proc/sys/kernel/kptr_restrict.

Change-Id: I7baa9f127266726fecf9238167a1e0128a258847
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
8 years agosoc: qcom: socinfo: Add soc ids for MSM8996pro and APQ8096pro
Sanrio Alvares [Thu, 14 Jan 2016 19:37:42 +0000 (11:37 -0800)]
soc: qcom: socinfo: Add soc ids for MSM8996pro and APQ8096pro

Adding new SOC IDs for MSM8996pro and APQ8096pro variants.

CRs-Fixed: 1019089
Change-Id: If6aaef3b04a9da15c7f8cfaf1308706b8a2fe793
Signed-off-by: Sanrio Alvares <salvares@codeaurora.org>
8 years agoicnss: Provide test mode through debugfs
Prashanth Bhatta [Mon, 16 May 2016 23:46:02 +0000 (16:46 -0700)]
icnss: Provide test mode through debugfs

Provide a test mode mechanism through debugfs interface for WLAN
firmware CCPM module so that WLAN enable and disable can be
tested without loading WLAN functional driver.

Change-Id: I8d411e067690443eefea645f4ff8130cf786c32f
Signed-off-by: Prashanth Bhatta <bhattap@codeaurora.org>
8 years agodiag: Fix to proper updation of buffering flag
Manoj Prabhu B [Tue, 17 May 2016 09:00:28 +0000 (14:30 +0530)]
diag: Fix to proper updation of buffering flag

This patch adresses the proper updation of
buffering flag with the check for streaming buffering
mode against the peripheral's buffering mode.

CRs-Fixed: 1017305
Change-Id: Idc4556e568a42aa2441295c9e3caa3f2c92c4cc6
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
8 years agodiag: Fix for possible dci error notification
Manoj Prabhu B [Wed, 4 May 2016 10:16:03 +0000 (15:46 +0530)]
diag: Fix for possible dci error notification

This patch provides the protection on dci session by
checking for the session pid and task pid to be same.

CRs-Fixed: 1008138
Change-Id: I7d78a13032365a42097ad71cfd0abab2792a1b98
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
8 years agomsm: ADSPRPC: Map pages with execute permissions
Sathish Ambley [Tue, 17 May 2016 05:32:01 +0000 (22:32 -0700)]
msm: ADSPRPC: Map pages with execute permissions

Allow for mappings to have execute permissions in Stage 2 SMMU
as dynamic shared object may get loaded and executed from these
pages on the remote processor.

Change-Id: I3d7fb2829defd8efc362253866587652f35e316b
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
8 years agomsm: ADSPRPC: Provide process information in context
Sathish Ambley [Mon, 16 May 2016 23:42:32 +0000 (16:42 -0700)]
msm: ADSPRPC: Provide process information in context

Provide process information as part of context being passed that
allows for messages to be queued appropriately on remote processor.

Change-Id: I93e3c6faa400121612d90f9be8fd5befe45fb39c
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
8 years agomsm: ADSPRPC: Provide SMMU information
Sathish Ambley [Sat, 14 May 2016 22:31:34 +0000 (15:31 -0700)]
msm: ADSPRPC: Provide SMMU information

Expose new IOCTL to provide SMMU information that allows for
userspace to determine the appropriate ION heap to be used.

Change-Id: Iead0966d76acb2d2bbc41fa9cd5d09a252a3429e
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
8 years agodiag: Fix for possible stale task entries
Manoj Prabhu B [Wed, 11 May 2016 03:55:56 +0000 (09:25 +0530)]
diag: Fix for possible stale task entries

The task entries were cleared while closing the
md session and hence are stale while notifying the client.
This patch provides the protection on md session and
also checks for the session pid and task pid being same.

CRs-Fixed: 1008137
Change-Id: I999db2865d10464c7f1ab4a5a940d23c725ac033
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
8 years agodiag: Fix for possible dci stale entries
Manoj Prabhu B [Wed, 18 May 2016 11:18:36 +0000 (16:48 +0530)]
diag: Fix for possible dci stale entries

This patch provides the protection to dci client
entries from corruption.

CRs-Fixed: 984942 992683
Change-Id: Ifcd9f14dc03d9e42a31b3e126839489881e98303
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
8 years agoARM: dts: msm: Enable the GCC clock driver on MSMCOBALT v2
Deepak Katragadda [Fri, 13 May 2016 20:37:46 +0000 (13:37 -0700)]
ARM: dts: msm: Enable the GCC clock driver on MSMCOBALT v2

Enable the linux clock driver support for peripheral
clocks on MSMCOBALT v2.

CRs-Fixed: 1015446
Change-Id: Ibf5a8d7b6bc484281f414dd8491845e509d80123
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
8 years agoclk: msm: clock: Support peripheral clocks on MSMCOBALT v2
Deepak Katragadda [Fri, 6 May 2016 21:43:50 +0000 (14:43 -0700)]
clk: msm: clock: Support peripheral clocks on MSMCOBALT v2

Add support for controlling the peripheral clocks on
MSMCOBALT v2.

CRs-Fixed: 1015446
Change-Id: If69f3752c4295f4cc49cf41854edc03aa90dbbc5
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
8 years agodefconfig: msmcortex: enable wil driver
Maya Erez [Mon, 11 Apr 2016 19:59:52 +0000 (22:59 +0300)]
defconfig: msmcortex: enable wil driver

Enable wil driver as module for msmcobalt.
Wil driver is needed for 11ad wireless card.

CRs-Fixed: 1001827
Change-Id: Ib2118f323b5dc1d64eaa5aa1f600e4725187f05b
Signed-off-by: Maya Erez <merez@codeaurora.org>
8 years agodefconfig: msmcortex: Enable watchdog bite on panic
Runmin Wang [Thu, 12 May 2016 00:31:05 +0000 (17:31 -0700)]
defconfig: msmcortex: Enable watchdog bite on panic

Enable QCOM_FORCE_WDOG_BITE_ON_PANIC flag.

CRs-Fixed: 1017697
Change-Id: I6597746b87c0b7545401a4d51e07d3c8dbfd5906
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
8 years agoclk: msm: clock-alpha-pll: Fix incorrect fabia PLL settings
Deepak Katragadda [Thu, 19 May 2016 18:59:33 +0000 (11:59 -0700)]
clk: msm: clock-alpha-pll: Fix incorrect fabia PLL settings

For the fabia PLL to be in STANDBY mode, the RESET_N bit should
be set so that the PLL comes out of reset. Else, the PLL is
at OFF state and changing it's frequencies would not cause the
ACK_LATCH to be set.

CRs-Fixed: 1018752
Change-Id: I30f1ee0f4fdb8d92a9f6e187c1d8b797a0bdc94d
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
8 years agomsm: camera: cpp: Support conditional reset of micro
Rajakumar Govindaram [Sat, 14 May 2016 00:35:06 +0000 (17:35 -0700)]
msm: camera: cpp: Support conditional reset of micro

The micro clock needs to be conditionally reset based on
target. This can help to avoid probe failures on targets
where it is not supported.

CRs-Fixed: 1017151
Change-Id: Idd7e7255ebc8a08f418289fa172c37f72a21ced0
Signed-off-by: Rajakumar Govindaram <rajakuma@codeaurora.org>
8 years agomsm: defconfig: Enable camera
Seemanta Dutta [Fri, 13 May 2016 01:38:09 +0000 (18:38 -0700)]
msm: defconfig: Enable camera

Enable camera in the kernel by enabling the
camera specific CONFIG_* macros in the kernel defconfig.

Change-Id: I4f812f280688984bd21fc68ae4d18355c9b2aac8
Signed-off-by: Seemanta Dutta <seemanta@codeaurora.org>
8 years agomsm: defconfig: Enable CONFIG_QCOM_KGSL in msmcortex-perf_defconfig
Lokesh Batra [Wed, 11 May 2016 21:24:15 +0000 (14:24 -0700)]
msm: defconfig: Enable CONFIG_QCOM_KGSL in msmcortex-perf_defconfig

Enable CONFIG_QCOM_KGSL config in msmcortex-perf_defconfig file. This
will enable compiling KGSL for msmcortex target perf builds.

CRs-Fixed: 1018471
Change-Id: I41d6520eea1d4a5ef1ad002797cf2c8433078570
Signed-off-by: Lokesh Batra <lbatra@codeaurora.org>
8 years agomsm: camera: isp: For testgen disable camif on frame boundary
Shubhraprakash Das [Wed, 20 Apr 2016 22:41:22 +0000 (15:41 -0700)]
msm: camera: isp: For testgen disable camif on frame boundary

When testgen is used then we cannot gate the input testgen on a frame
boundary and then stop camif. In this case if camif is stopped
immediately then it causes hardware failures on next camif start.
To avoid these errors from hardware always stop camif on frame
boundary when testgen is used.

Change-Id: I4e8e58626e5e8bd8468f3d216eadb2b326a84f75
CRs-Fixed: 987962
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
8 years agomsm: camera: isp: Set init rate for mnoc_maxi_clk
Shubhraprakash Das [Thu, 21 Apr 2016 22:13:22 +0000 (15:13 -0700)]
msm: camera: isp: Set init rate for mnoc_maxi_clk

The mnoc_maxi_clk requires a rate to be set before voting, set
the initial rate for this clock.

CRs-Fixed: 987962
Change-Id: I6c4f8fd494b6206b0e1fae8ddfe9d7bc708723d2
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
8 years agoiommu/arm-smmu: Don't enable/disable clocks in inv_range_nosync
Mitchel Humpherys [Tue, 23 Feb 2016 21:35:08 +0000 (13:35 -0800)]
iommu/arm-smmu: Don't enable/disable clocks in inv_range_nosync

TLB invalidation is done during unmap with clocks already enabled, but
we still have calls to enable/disable clocks in
arm_smmu_tlb_inv_range_nosync.  Remove the extra calls.

CRs-Fixed: 997751
Change-Id: Ic5f890fda6b4fc8bb2dcd5e6ff49050d5a934c31
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agoiommu/io-pgtable-fast: Prove correctness of TLB maintenance
Mitchel Humpherys [Mon, 21 Dec 2015 23:06:34 +0000 (15:06 -0800)]
iommu/io-pgtable-fast: Prove correctness of TLB maintenance

A common software error when it comes to page table code is missing TLB
maintenance.  Add some checks to the io-pgtable-fast code to detect when
an address that might be stale in the TLB is being re-used.  This can be
accomplished by writing a "stale TLB" flag value to the reserved bits of
the PTE during unmap and then removing the flag value when the TLBs are
invalidated (by sweeping the entire page table).  That way, whenever we
map we can know that there might be a stale TLB in the location being
mapped into if it contains the "stale TLB" flag value.

CRs-Fixed: 997751
Change-Id: Icf9c1e41977cb71e8b137190adb3b4a201c339da
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agoiommu/iommu-debug: Add debugfs file to enable config clocks
Mitchel Humpherys [Tue, 2 Feb 2016 00:53:39 +0000 (16:53 -0800)]
iommu/iommu-debug: Add debugfs file to enable config clocks

It's fairly common while debugging to need to enable the config clocks
for an SMMU so that you can poke around at the registers.  Add a debugfs
file to do this.

CRs-Fixed: 997751
Change-Id: I31b90d64c2facb0a681f9da586e2c90803776819
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agoiommu/iommu-debug: Add functional test for ARM DMA IOMMU mapper
Mitchel Humpherys [Wed, 16 Dec 2015 02:45:57 +0000 (18:45 -0800)]
iommu/iommu-debug: Add functional test for ARM DMA IOMMU mapper

The vanilla ARM DMA IOMMU mapper is used by many clients in our system,
but we have no functional test coverage of it.  Add some functional
testing for it by leveraging the tests that were recently added for the
Fast DMA mapper.  Since the Fast mapper and the ARM mapper are both DMA
API implementations we can share most of the code.

CRs-Fixed: 997751
Change-Id: I58734a82f4dc3e4658ab7995b6682205097da991
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agoiommu/iommu-debug: Add functional tests for fast mapper
Mitchel Humpherys [Fri, 11 Dec 2015 23:22:15 +0000 (15:22 -0800)]
iommu/iommu-debug: Add functional tests for fast mapper

Functional tests are good.  Add some for the fast DMA mapper.

CRs-Fixed: 997751
Change-Id: Iefb80124c335d65ea5bd8a15406c685125030003
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agoiommu/iommu-debug: Add file for profiling the fast DMA APIs
Mitchel Humpherys [Thu, 8 Oct 2015 22:08:01 +0000 (15:08 -0700)]
iommu/iommu-debug: Add file for profiling the fast DMA APIs

The fast DMA API implementation that was recently needs to be profiled.
Add a new debugfs file (similar to the original "profiling" file) to do
this.

CRs-Fixed: 997751
Change-Id: I1236d9b6aaeab9d34b39e7f5d7b285691d1779da
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agoiommu: Add DMA mapper for io-pgtable-fast
Mitchel Humpherys [Thu, 8 Oct 2015 22:03:09 +0000 (15:03 -0700)]
iommu: Add DMA mapper for io-pgtable-fast

io-pgtable-fast does some underhanded tricks to achieve performance.
One of those tricks is that it expects clients to call its map function
directly, rather than going through the IOMMU framework.  Add a DMA API
implementation that goes through io-pgtable-fast.

CRs-Fixed: 997751
Change-Id: Iebcafeb630d9023f666078604898069e9f26dfdd
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agoiommu/arm-smmu: Implement DOMAIN_ATTR_PGTBL_INFO
Mitchel Humpherys [Fri, 12 Feb 2016 22:18:02 +0000 (14:18 -0800)]
iommu/arm-smmu: Implement DOMAIN_ATTR_PGTBL_INFO

The DOMAIN_ATTR_PGTBL_INFO attribute will be useful in implementing DMA
APIs that can leverage the fast page table mapping routines.  Implement
it.

CRs-Fixed: 997751
Change-Id: Id3acec0089b126e7d6ad44d8d322bf473614f716
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agoiommu: Add domain attribute for getting page table info
Mitchel Humpherys [Fri, 12 Feb 2016 22:10:31 +0000 (14:10 -0800)]
iommu: Add domain attribute for getting page table info

For certain DMA API implementations, the overhead of going through the
IOMMU framework is too much.  Such an implementation might want to
perform some rudimentary page table management using bits of information
from the underlying page tables.  Add a domain attribute and structure
for querying this type of information.  For now, the only information
supported is the kernel virtual address of the PMDs (assumed to be
virtually contiguous).

CRs-Fixed: 997751
Change-Id: I29d31e9649c24d30a5a7ffaa4b238a0203846594
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agoiommu/arm-smmu: Implement {enable,disable}_config_clocks
Mitchel Humpherys [Tue, 15 Dec 2015 00:12:00 +0000 (16:12 -0800)]
iommu/arm-smmu: Implement {enable,disable}_config_clocks

Some of our users need to be able to call
iommu_{enable,disable}_config_clocks on domains for SMMUs that we
control.  Implement them.

CRs-Fixed: 997751
Change-Id: Idc3692679409093faf8f458d53326e669d7f6479
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agoiommu: Add {enable,disable}_config_clocks ops
Mitchel Humpherys [Tue, 15 Dec 2015 00:04:46 +0000 (16:04 -0800)]
iommu: Add {enable,disable}_config_clocks ops

There are certain use cases where it might be necessary to leave the
IOMMU's configuration clocks on.  This might happen in places where an
IOMMU's clocks might not be known.  A good example of this would be a
test library that needs to be able to do TLB invalidation from atomic
context.  It would need to enable clocks up front (outside of atomic
context) and leave them on for the duration of the test.

Add some ops for enabling and disabling configuration clocks.

CRs-Fixed: 997751
Change-Id: I95056952f60494fe5745f2183f9af8aab3a40315
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agoiommu/arm-smmu: Implement the .tlbi_domain op
Mitchel Humpherys [Thu, 3 Dec 2015 19:20:03 +0000 (11:20 -0800)]
iommu/arm-smmu: Implement the .tlbi_domain op

The upcoming "fast" DMA mapper will need to take control of TLB
invalidation.  Doing so allows us to perform fewer TLB invalidation
operations since the DMA mapper layer has more knowledge about when
"stale" TLB entries might actually become a problem, so it can do TLB
invalidation much less frequently.  Implement the tlbi_domain op for
this purpose.

CRs-Fixed: 997751
Change-Id: Iba9f499dba89db91c1150947b9599d85ade65b0e
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agoiommu: Add tlbi_domain op
Mitchel Humpherys [Thu, 3 Dec 2015 19:17:23 +0000 (11:17 -0800)]
iommu: Add tlbi_domain op

Some higher-level DMA mappers might be able to squeeze out more
performance if TLB invalidation can be delegated to them, since they
might have more knowledge about when a stale TLB is problem than the
IOMMU driver.  Add a callback for this purpose that can be implemented
by individual IOMMU drivers.

CRs-Fixed: 997751
Change-Id: If817f5514fdd5d24b9c592440760b81b88ec71a8
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agoiommu/iommu-debug: Add file for profiling fast mapper
Mitchel Humpherys [Mon, 5 Oct 2015 21:44:58 +0000 (14:44 -0700)]
iommu/iommu-debug: Add file for profiling fast mapper

We'd like to understand the performance of the fast page table mapper,
which only supports 4K page sizes.  Add a debugfs file to profile the
new mapper.

CRs-Fixed: 997751
Change-Id: I5adc3c3ecd432552386b600b9e66e3db42e73138
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agoiommu/arm-smmu: Wire up io-pgtable-fast for domains that request it
Mitchel Humpherys [Wed, 7 Oct 2015 21:03:50 +0000 (14:03 -0700)]
iommu/arm-smmu: Wire up io-pgtable-fast for domains that request it

An io-pgtable implementation for fast 4K mappings was recently added,
and we've now implemented all of the domain attributes necessary to use
it.  Wire it up.

CRs-Fixed: 997751
Change-Id: I9ddd2dd2cad91ac3d3ccce7c0cd0abb37cd57075
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agoiommu: Add DOMAIN_ATTR_FAST for requesting a fast domain
Mitchel Humpherys [Fri, 12 Feb 2016 21:53:20 +0000 (13:53 -0800)]
iommu: Add DOMAIN_ATTR_FAST for requesting a fast domain

Some IOMMU drivers offer "fast" page table management routines for
special cases.  There is often a trade-off with memory, etc. with these
so make their usage explicit with a domain attribute.

CRs-Fixed: 997751
Change-Id: Ia9f8ad6d924b294b6758970da2e9767f183b5649
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agodefconfig: msm: Enable the "fast" IOMMU page table mapper
Mitchel Humpherys [Wed, 30 Sep 2015 22:24:32 +0000 (15:24 -0700)]
defconfig: msm: Enable the "fast" IOMMU page table mapper

It's fast for use cases that require super fast IOMMU mappings (in
exchange for memory).  Enable it.

CRs-Fixed: 997751
Change-Id: I016937309ac8e16775d13e63b630bb98469c9fca
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agoiommu/io-pgtable: Add fast page table mapper for ARMv8L
Mitchel Humpherys [Wed, 30 Sep 2015 21:23:58 +0000 (14:23 -0700)]
iommu/io-pgtable: Add fast page table mapper for ARMv8L

Certain use cases require performance that can't be achieved with the
general-purpose SMMU page table code.  By limiting ourselves to 4K page
mappings (no block mappings) and pre-populating the first and second
levels of the page tables up front, we can eliminate a lot of the work
needed for page table mapping and unmapping.

Add a performance-tuned io-pgtable implementation for ARMv8L page tables
that only supports 4K page mappings.  Any size can be mapped, but only
4K page mappings will be installed in the page tables.

CRs-Fixed: 997751
Change-Id: I5861270709675016988052360d196e0a16a0d103
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agoiommu/arm-smmu: Implement .get_pgsize_bitmap for domain
Mitchel Humpherys [Tue, 22 Mar 2016 17:57:24 +0000 (10:57 -0700)]
iommu/arm-smmu: Implement .get_pgsize_bitmap for domain

Currently we restrict the pgsize_bitmap for the entire SMMU every time
we allocate some new page tables.  However, certain io-pgtable
implementations might wish to restrict the formats beyond the
restrictions of the SMMU itself, which forces all domains on that SMMU
to the same pgsize_bitmap, even if the other domains would prefer to use
a more permissive page table format.  Besides that, some SMMUs in the
system might have different supported page sizes at the hardware level,
so applying those to everyone else is wrong.

Fix these issues by implementing the new .get_pgsize_bitmap IOMMU op.

CRs-Fixed: 997751
Change-Id: I9a73a31ee63a054cc44c50a21f7a616efd4af964
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agoiommu: Support dynamic pgsize_bitmap
Mitchel Humpherys [Tue, 5 Apr 2016 20:21:53 +0000 (13:21 -0700)]
iommu: Support dynamic pgsize_bitmap

Currently we use a single pgsize_bitmap per IOMMU driver.  However, some
IOMMU drivers might service different IOMMUs with different supported
page sizes.  Some drivers might also want to restrict page sizes for
different use cases.  Support these use cases by adding a
.get_pgsize_bitmap function to the iommu_ops which can optionally be
used by the driver to return a domain-specific pgsize_bitmap.

CRs-Fixed: 997751
Change-Id: I46d70733be647599e148fe52258a4d8f009ac48a
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agomsm: gsi: fix for clearing IEOB interrupt
Skylar Chang [Wed, 11 May 2016 21:36:58 +0000 (14:36 -0700)]
msm: gsi: fix for clearing IEOB interrupt

Clear IEOB interrupt only for channels that have
IEOB interrupt enabled. This is needed to make sure IEOB interrupt
is not missed after switching from polling to interrupt.

CRs-Fixed: 1014388
Change-Id: Ia6484ed03d9508b827f8c7e4dadb84c14e306bd9
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
8 years agodefconfig: arm64: msm: Add defconfigs needed for data calls
Subash Abhinov Kasiviswanathan [Thu, 19 May 2016 20:16:50 +0000 (14:16 -0600)]
defconfig: arm64: msm: Add defconfigs needed for data calls

Add the DUMMY network interface and the crypto ECHAINIV module
needed for tunneling in advanced data call scenarios.

ECHAINIV is the default algorithm for CBC which is needed for
setting up a tunnel using XFRM state. Dummy network device is used
to route the IPv6 tunneled traffic when there is no IPv6 route
present on a wireless device. The default route in the dummy
interface routing table will route egress packets.

CRs-Fixed: 1017216
Change-Id: I8638814f7e06b0e63638c5acd268663d6a627718
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
8 years ago[media] v4l: Add qcom video color formats
Arun Menon [Sat, 14 May 2016 01:14:20 +0000 (18:14 -0700)]
[media] v4l: Add qcom video color formats

Update v4l_fill_fmtdesc() with qcom specific video
color formats to prevent it from throwing up
a warning stacktrace and flooding the logs.

CRs-Fixed: 1018787
Change-Id: Ia140bfb2fcd699937cd845c4489458e5fefb5150
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
8 years agoclk: msm: clock-osm: register cycle counter callbacks with scheduler
Osvaldo Banuelos [Thu, 10 Mar 2016 22:03:32 +0000 (14:03 -0800)]
clk: msm: clock-osm: register cycle counter callbacks with scheduler

Implement clk_osm_get_cpu_cycle_counter() which returns the
running cycle counter value. Register these two functions with
a scheduler-provided callback to allow the scheduler to estimate
CPU frequency without notification. Lastly, setup the cycle
counter to be increased on every rising edge of the XO clock
for improved accuracy.

Change-Id: Ie0f60ca79efc05901a88da13f7a6476f390518a5
CRs-Fixed: 988356
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
8 years agosched: simplify CPU frequency estimation and cycle counter API
Joonwoo Park [Wed, 18 May 2016 03:04:54 +0000 (20:04 -0700)]
sched: simplify CPU frequency estimation and cycle counter API

Most of CPUs increase cycle counter by one every cycle which makes
frequency = cycles / time_delta is correct.  Therefore it's reasonable
to get rid of current cpu_cycle_max_scale_factor and ask cycle counter
read callback function to return scaled counter value when it's needed
in such a case that cycle counter doesn't increase every cycle.

Thus multiply NSEC_PER_SEC / HZ_PER_KHZ to CPU cycle counter delta
as we calculate frequency in khz and remove cpu_cycle_max_scale_factor.
This allows us to simplify frequency estimation and cycle counter API.

Change-Id: Ie7a628d4bc77c9b6c769f6099ce8d75740262a14
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
8 years agodefconfig: Enable DDR bus scaling governor
Rohit Gupta [Wed, 11 May 2016 20:27:23 +0000 (13:27 -0700)]
defconfig: Enable DDR bus scaling governor

Enable bimc_bwmon device and the associated bw_hwmon governor
to scale DDR frequency as per the bandwidth between CPU and DDR.

Change-Id: I4efa37b8bb84ab62e82086b622896173b7d2fc7d
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
8 years agoPM / devfreq: Change the 'MSM' in devfreq device names to 'QCOM'
Rohit Gupta [Wed, 11 May 2016 17:36:52 +0000 (10:36 -0700)]
PM / devfreq: Change the 'MSM' in devfreq device names to 'QCOM'

Substitute 'MSM' in the devfreq device/config names to 'QCOM' to
comply with the current standards.

Change-Id: I156ba6e2b5f8e06a28540ca5def5b178c3604512
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
8 years agoARM: dts: Add BIMC bandwidth monitor node for msmcobalt
Rohit Gupta [Tue, 17 May 2016 00:34:11 +0000 (17:34 -0700)]
ARM: dts: Add BIMC bandwidth monitor node for msmcobalt

Add cpu-bwmon device that monitors the traffic between CPU and
DDR and raises an interrupt when the byte count crosses a
threshold.

Change-Id: Ib9b508591d28d22e7d5aa8f33d8d829d3378ccea
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
8 years agomsm: mdss: Add newly supported writeback formats to MDP driver
Benet Clark [Fri, 1 Apr 2016 17:45:46 +0000 (10:45 -0700)]
msm: mdss: Add newly supported writeback formats to MDP driver

Writeback display now supports more MDP formats. This change adds
the definitions for those formats.

CRs-Fixed: 978785
Change-Id: I72fc29a8d7b286b0766c0483ba69d6e02d29b661
Signed-off-by: Benet Clark <benetc@codeaurora.org>
8 years agomsm: sde: Correct resource release upon rotator exit
Alan Kwong [Fri, 13 May 2016 13:42:55 +0000 (09:42 -0400)]
msm: sde: Correct resource release upon rotator exit

This patch turns off clock and bus control as well releases other
software resources upon driver exit.  This patch
corrects crash due to resource leakage.

CRs-Fixed: 1018309
Change-Id: Ie0c6639fff9b829a58e12037f88c6508864b60a0
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
8 years agomsm: sde: Enable rotator r3 driver to support r3 minor versions
Alan Kwong [Wed, 18 May 2016 23:21:57 +0000 (19:21 -0400)]
msm: sde: Enable rotator r3 driver to support r3 minor versions

Enable rotator driver to use r3 driver for r3 minor versions.

CRs-Fixed: 1018722
Change-Id: Ida9a93db8459d065ab7850de506e5b9124f6fdd4
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
8 years agodefconfig: msm: enable HBTP input drivers for cobalt
Alex Sarraf [Thu, 5 May 2016 18:14:40 +0000 (11:14 -0700)]
defconfig: msm: enable HBTP input drivers for cobalt

Enable HBTP drivers for cobalt.

Change-Id: Ifddcce1ff9cdbb35dc5645d0ed85963c18dec54e
Signed-off-by: Alex Sarraf <asarraf@codeaurora.org>
8 years agoswr-wcd-ctrl: Ensure soundwire banks are always in sync
Phani Kumar Uppalapati [Sat, 30 Apr 2016 19:16:00 +0000 (12:16 -0700)]
swr-wcd-ctrl: Ensure soundwire banks are always in sync

Copy speaker configuration from active to inactive bank
and perform bank switch operation while speaker channels
are getting enabled or disabled. This will make sure that
soundwire banks are always in sync and allow independent
control of speaker channels.

CRs-fixed: 1007465
Change-Id: Ic1653194c22fa5669b1c04fd9630158633fb00a5
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
8 years agoASoC: wsa881x: Request device ungroup for speaker disable
Phani Kumar Uppalapati [Sat, 30 Apr 2016 19:58:30 +0000 (12:58 -0700)]
ASoC: wsa881x: Request device ungroup for speaker disable

Request device ungroup of speaker channels for independent
disable. It is possible that stereo speaker channels can be
disabled one after other, so remove them from group otherwise
speaker can be left in enabled state.

CRs-fixed: 1007465
Change-Id: I358ab4edcb85ec65b064ca28368ad744f2d36870
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
8 years agoswr-wcd-ctrl: Handle soundwire slave device ungroup
Phani Kumar Uppalapati [Sat, 30 Apr 2016 19:48:11 +0000 (12:48 -0700)]
swr-wcd-ctrl: Handle soundwire slave device ungroup

Handle soundwire slave devices ungroup in master controller.
Set the group device id to 0 when soundwire slave devices
request ungroup for independent control.

CRs-fixed: 1007465
Change-Id: I4f1b39dac949aa3f6aa3abb12ff0310fb0e98d1c
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
8 years agosoundwire: Add API to ungroup soundwire slave devices
Phani Kumar Uppalapati [Fri, 22 Apr 2016 23:48:48 +0000 (16:48 -0700)]
soundwire: Add API to ungroup soundwire slave devices

Add soundwire API to remove the soundwire slave devices
from group so that the devices can be controlled
independently as required.

CRs-fixed: 1007465
Change-Id: Ibca3e33c0e85629ae5ce121e75526f4786d6408a
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
8 years agosoundwire: Add support for 48x2 frame structure
Phani Kumar Uppalapati [Wed, 13 Apr 2016 07:53:11 +0000 (00:53 -0700)]
soundwire: Add support for 48x2 frame structure

Add support for 48x2 frame structure in soundwire
so that when slave device data path is not enabled,
all control messaging will happen with 48x2 frame.
Soundwire slave devices send an explicit request to
enable data path which in turn change the frame
structure to 48x16.

CRs-fixed: 996586
Change-Id: Ia4329ac982eb2a29a2b925897cd87ca9711c30e3
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
8 years agodefconfig: msmcortex: enable qpnp flash
Mohan Pallaka [Thu, 5 May 2016 22:02:35 +0000 (15:02 -0700)]
defconfig: msmcortex: enable qpnp flash

Enable QPNP flash v2 driver.

CRs-fixed: 1015501
Change-Id: I30618e6e4b983171d4a616a8a316c76f13ceee2d
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
8 years agoARM: dts: msm: enable flash LED on cobalt
Chun Zhang [Tue, 5 Apr 2016 04:24:23 +0000 (21:24 -0700)]
ARM: dts: msm: enable flash LED on cobalt

Add in device tree info to enable flash LED.

CRs-fixed: 1015501
Change-Id: I0c6471549dfa7af435a5ce5f21a56caab1c4ea09
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Signed-off-by: Chun Zhang <chunz@codeaurora.org>
8 years agoicnss: Avoid power-off if driver is registered
Prashanth Bhatta [Fri, 13 May 2016 22:03:42 +0000 (15:03 -0700)]
icnss: Avoid power-off if driver is registered

If driver is registered before FW ready indication then bus error
observed because of powering off the hardware before calling
driver probe. Fix the issue by powering off only when driver is
not registered.
Also add top level reset after FW ready without which bus error
is observed.

CRs-fixed: 1015484
Change-Id: I26609c4011f10c1a9ee62b092050394e064ee2a2
Signed-off-by: Prashanth Bhatta <bhattap@codeaurora.org>
8 years agoarm64: defconfig: msm: disable CPUSETS for msm chipsets
Satya Durga Srinivasu Prabhala [Wed, 11 May 2016 22:00:35 +0000 (15:00 -0700)]
arm64: defconfig: msm: disable CPUSETS for msm chipsets

CONFIG_CPUSET sets affinity to cpu 0 without cgroup setting.
Due to this performance regressed.

CRs-Fixed: 1014436
Change-Id: Icf96a123b8d6e9c007198c2969d60e3707a57098
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
8 years agoARM: dts: msm: add wil6210 node for msmcobalt
Maya Erez [Thu, 19 May 2016 17:26:35 +0000 (20:26 +0300)]
ARM: dts: msm: add wil6210 node for msmcobalt

Wil driver is needed for 11ad wireless card.

CRs-Fixed: 1001827
Change-Id: I9b6109ccaf2858732a779d781222422c928128a1
Signed-off-by: Maya Erez <merez@codeaurora.org>
8 years agodefconfig: Enable EA driver for msmcortex targets
Archana Sathyakumar [Wed, 18 May 2016 17:48:36 +0000 (11:48 -0600)]
defconfig: Enable EA driver for msmcortex targets

Enable energy aware driver for msmcortex targets to support energy aware
scheduler feature.

CRs-fixed: 1018108
Change-Id: I5745dbcbb946ee2f937d1e77a68a4e87bc85e08e
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
8 years agodiag: Fix possible kernel addresses leak
Manoj Prabhu B [Tue, 12 Apr 2016 05:57:39 +0000 (11:27 +0530)]
diag: Fix possible kernel addresses leak

This patch addresses kernel addresses leak by changing
the format specifier to adhere to the kptr_restrict system setting.

CRs-Fixed: 987013
Change-Id: I32649a26f54d96c56d80aa2a1bd5f5d9dd0dd9d3
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
8 years agosoc: qcom: pil: timeouts to be disabled from pil-imem
Puja Gupta [Sat, 14 May 2016 01:48:49 +0000 (18:48 -0700)]
soc: qcom: pil: timeouts to be disabled from pil-imem

Allow modem mba, modem pbl and err_ready timeouts to be disabled by
writing to starting of pil_imem region.

CRs-Fixed: 1015492
Change-Id: I786d8edcd89e3624ef05ffc9a6953a8f840bbac0
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
8 years agoARM: dts: msm: Add DSP memory region for msmcobalt
Sathish Ambley [Wed, 11 May 2016 02:08:36 +0000 (19:08 -0700)]
ARM: dts: msm: Add DSP memory region for msmcobalt

Add DSP memory region node that allows for buffers
to be created to be shared with DSP.

Change-Id: Iffd95234813a5dcd8ab7ec07a4ff1d2c679bb26f
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
8 years agoARM: dts: msm: disable PCIe on msmcobalt RUMI and SIM
Tony Truong [Tue, 17 May 2016 01:04:01 +0000 (18:04 -0700)]
ARM: dts: msm: disable PCIe on msmcobalt RUMI and SIM

PCIe is not used or tested on RUMI or SIM for msmcobalt.
Thus, disable PCIe on these platforms.

Change-Id: I0682801c0893a1b1516033b2ec0b0e2ec2713fdd
Signed-off-by: Tony Truong <truong@codeaurora.org>
8 years agomsm: ADSPRPC: Support for secure context banks
Sathish Ambley [Fri, 11 Sep 2015 21:55:37 +0000 (14:55 -0700)]
msm: ADSPRPC: Support for secure context banks

Add support for secure session that checks whether the
buffer being passed was allocated from a secure heap and
appropriately maps the buffers in the secure context bank.

Change-Id: If590f65d033e264c04f0ad782895b02765ff4f3d
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
8 years agoARM: dts: msm: add HW event device for msmcobalt
Shashank Mittal [Mon, 2 May 2016 23:14:22 +0000 (16:14 -0700)]
ARM: dts: msm: add HW event device for msmcobalt

Add device node for HW event driver. HW event driver can be used to
configure HW events on msmcobalt device.

Change-Id: I5e633e798a0655d783554538b83b4642ec428c8c
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
8 years agoARM: dts: msm: Add TCSR_USB3_DP_PHYMODE register on msmcobalt
Hemant Kumar [Fri, 13 May 2016 01:34:37 +0000 (18:34 -0700)]
ARM: dts: msm: Add TCSR_USB3_DP_PHYMODE register on msmcobalt

This register write allows to select the usb3 phy mode. It is
recommended to explicitly select the usb3 phy mode before
programming the phy init sequence.

Change-Id: I2cb648b976d72d2020357881768674241557c56b
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
8 years agousb: phy: qmp: Add support to select usb3 phy mode
Hemant Kumar [Thu, 12 May 2016 01:26:31 +0000 (18:26 -0700)]
usb: phy: qmp: Add support to select usb3 phy mode

qmp phy can run in display port mode or in usb3 mode.
It is recommended to explicitly select the usb3 phy
mode before programming the phy init sequence, since
TCSR_USB3_DP_PHYMODE register is commonly used to
select mode between display port driver as well as
ssphy driver.

Change-Id: I270596868762ccd4f2f2cc9b0daaca647a2bee88
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
8 years agomsm: vidc: Enabling DPB-OPB split for NV12 color format
Praneeth Paladugu [Tue, 5 Apr 2016 00:13:33 +0000 (17:13 -0700)]
msm: vidc: Enabling DPB-OPB split for NV12 color format

Video firmware will send a HFI_PIC_STRUCT field in sequence changed
event, which indicates whether the clip is interlaced or progressive.
If the color format is NV12 and the clip is interlaced, DPB mode
would be combined NV12 while the DPB mode is split i.e. DPB is in
UBWC and OPB is in NV12. Also combining the pic struct change and
bit depth change into a single event to the userspace.

CRs-fixed: 1017209
Change-Id: Ife71e31622a53d0ea4cc418d434998e710352e10
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
8 years agoiommu/arm-smmu: configure stream IDs for PCI-e devices dynamically
Mitchel Humpherys [Wed, 4 May 2016 23:07:54 +0000 (16:07 -0700)]
iommu/arm-smmu: configure stream IDs for PCI-e devices dynamically

PCI-e devices on MSM systems need to have their stream IDs configured at
device add time, since they're not known at system design time and
therefore can't be placed in the device tree.  Add the necessary calls
into the MSM PCI-e driver to obtain stream IDs for devices behind PCI-e
at device add time.

CRs-Fixed: 1012229
Change-Id: I3645a525c3ab5ef6d89eeaa99894542bd3aa261f
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agosoc: qcom: ramdump: Fix bug introduced in kernel upgrade
Puja Gupta [Wed, 18 May 2016 19:19:10 +0000 (12:19 -0700)]
soc: qcom: ramdump: Fix bug introduced in kernel upgrade

Uncomment some code which got commented during kernel upgrade by mistake

CRs-Fixed: 1015492
Change-Id: Id46bff3b3803d1316ea769581c0f1b0e7fa41498
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
8 years agoASoC: msmcobalt: Add slimbus_6_rx back-end dai-link and hostless
Kuirong Wang [Sat, 7 May 2016 22:06:58 +0000 (15:06 -0700)]
ASoC: msmcobalt: Add slimbus_6_rx back-end dai-link and hostless

Add slimbus 6 playback hostless and slimbus_6_rx back-end
dai-link to enable independent backend for different devices
during audio playback.

Change-Id: Idac26ac45f1177db96fc3fb5d4a5e2f837f86d1b
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
8 years agoASoC: msmcobalt: Add USB audio via ADSP support
Kuirong Wang [Thu, 5 May 2016 17:37:58 +0000 (10:37 -0700)]
ASoC: msmcobalt: Add USB audio via ADSP support

Add USB audio via ADSP support in the machine driver.

Change-Id: I9773555fb025a41afd27e078f6ef23a4d140128f
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
8 years agoASoC: pcm: Add support for fixup callback
Anish Kumar [Tue, 9 Sep 2014 07:57:49 +0000 (00:57 -0700)]
ASoC: pcm: Add support for fixup callback

Fixup callback is added for dais which
do not follow the FE and BE convention
and is directly controlled by userspace
such as hostless dais. This will restrict
the hw_params based on what is supported by
hardware rather than blindly setting what
is given by userspace.

Change-Id: I401c70ab5de1df10363ec808cb68f72d8d74af96
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
8 years agoARM: dts: msm: do not configure secondary pon reset for pmicobalt
Subbaraman Narayanamurthy [Wed, 11 May 2016 00:46:41 +0000 (17:46 -0700)]
ARM: dts: msm: do not configure secondary pon reset for pmicobalt

As per the hardware documentation, PON device in pmicobalt need
not have to be configured during any type of reset. Hence remove
the DT property "qcom,secondary-pon-reset" from pmicobalt PON
device.

CRs-Fixed: 1001210
Change-Id: Iaf46a2247e70e17ed0b0032038860bfa64e7f7c6
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
8 years agoARM: dts: msm: Update MPM interrupt mappings for cobalt
Mahesh Sivasubramanian [Thu, 12 May 2016 16:59:26 +0000 (10:59 -0600)]
ARM: dts: msm: Update MPM interrupt mappings for cobalt

Update MPM interrupt mapping to monitor system wakeup interrupts per HW
specfication.

Change-Id: I0fff3caee8f4e2e1ed4e036f9fa9e6717f5cdfd7
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
8 years agoiommu/iommu-debug: Maintain list of domains during alloc
Susheel Khiani [Tue, 25 Aug 2015 11:55:42 +0000 (17:25 +0530)]
iommu/iommu-debug: Maintain list of domains during alloc

Current list of domains in iommu-debug was only
maintained during attach/detach calls. But for
masters like graphics this won't account for all
the domains, as it allocates multiple different
domains but attaches only one domain at a time.

Add support for maintaining list of unattached
domains too by adding them to debug_attachments
list during domain alloc but keeping dev as NULL.
We would add entry in debugfs attachment directory
only on actual attach call.

Change-Id: Ifde043e5c39f356b4187a30cbdf020ee943618f1
Signed-off-by: Susheel Khiani <skhiani@codeaurora.org>
8 years agoarm64: process: Use continuation prints for show_data
Trilok Soni [Sun, 1 May 2016 22:38:50 +0000 (15:38 -0700)]
arm64: process: Use continuation prints for show_data

show_data messages for the value at the addresses
needs to printed in the continuation.

CRs-Fixed: 1010438
Change-Id: I41c48e090ec4c44aeccd0e8fbbcb814b55c0416d
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
8 years agoASoC: compare CPU DAI stream name to find BE DAI
Banajit Goswami [Sun, 5 Jul 2015 05:14:27 +0000 (22:14 -0700)]
ASoC: compare CPU DAI stream name to find BE DAI

While setting up route for a particular device, compare
stream name of CPU DAI and Backend DAI to find the correct
Backend DAI.

Change-Id: Ic3f7c0e5b2a1055e7fdf52c78ded797a9a126d03
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
8 years agomsm: wlan: Add new country XA
Amar Singhal [Tue, 17 May 2016 18:26:16 +0000 (11:26 -0700)]
msm: wlan: Add new country XA

New country XA is based on Japan. The channels 5170-5250 are marked
as PASSIVE.

CRs-Fixed: 990486
Change-Id: I6dad4ce061316680239b3f9c23e64b23a875eb75
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
8 years agousb: gadget: gsi: Use drain_workqueue instead of flush_workqueue
Mayank Rana [Thu, 12 May 2016 00:57:45 +0000 (17:57 -0700)]
usb: gadget: gsi: Use drain_workqueue instead of flush_workqueue

USB GSI function driver uses usb_ipa_w work to queue different events
like EVT_CONNECTED, EVT_DISCONNECTED and more. ipa_event_handler()
uses those events as inputs to make necessary decision about performing
connect and disconnect with IPA driver. It is required that before USB
GSI driver calls ipa_usb_deinit_teth_prot(), it has invoked IPA
disconnect API ipa_usb_xdci_disconnect() if it has called
ipa_usb_xdci_connect() API. Current code is making sure that any
running usb_ipa_w work is being completed before calling
ipa_usb_deinit_teth_prot() but if work is not scheduled and pending,
ipa_usb_xdci_connect() is not called (i.e. later when usb_ipw_w work is
scheduled, EVT_DISCONNECTED is being processed but gsi_unbind() has
changed sm_state as STATE_UNINITIALIZED which results into no-ops.)
which results into USB and IPA driver go out of sync in terms of
expected state machine. Hence calling ipa_usb_init_teth_prot() on next
USB cable connect from gsi_bind_config() fails which results into no
USB GSI functionality. Fix this issue by using drain_workqueue() instead
of flush_workqueue() which makes sure that re-queue work is flushed.

CRs-Fixed: 1005018
Change-Id: I64ff559b85f901688a4abd0110ebb32a5317e34d
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
8 years agodefconfig: arm64: msmcortex: enable QPNP_POWER_ON support for msmcobalt
Subbaraman Narayanamurthy [Fri, 8 Apr 2016 20:18:50 +0000 (13:18 -0700)]
defconfig: arm64: msmcortex: enable QPNP_POWER_ON support for msmcobalt

Enable QPNP_POWER_ON device support for msmcobalt platform so
that the power-on/off reasons of PMIC PON devices can be
printed out during bootup. Also, based on the reset type, PON
devices needs to be configured as per the hardware documentation.

CRs-Fixed: 1001210
Change-Id: I3db5f233e7c182e330f5144b4ab0d0769abf4a8d
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
8 years agodefconfig: msm: Sync up with Kbuild defaults
Mitchel Humpherys [Tue, 17 May 2016 21:14:36 +0000 (14:14 -0700)]
defconfig: msm: Sync up with Kbuild defaults

The defconfigs have gotten out of sync again.  Sync them up.

CRs-Fixed: 1017606
Change-Id: I7d2ac7172396e5e08cde8ef156685222eb8941d8
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agoARM: dts: msm: Add snapshot of power-on.h
Subbaraman Narayanamurthy [Fri, 8 Apr 2016 01:46:48 +0000 (18:46 -0700)]
ARM: dts: msm: Add snapshot of power-on.h

This DT bindings header file snapshot is taken as of msm-3.18
'commit 0b20839e37187 ("Merge "slim-msm: Synchronize SSR callbacks"")'.

CRs-Fixed: 1001210
Change-Id: Ic132efb650d4e8de561c3d1f95a281afeef4ce42
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
8 years agomsm: camera: sensor: Updating soc layer clock API for i2c drivers
Sureshnaidu Laveti [Tue, 3 May 2016 22:17:19 +0000 (15:17 -0700)]
msm: camera: sensor: Updating soc layer clock API for i2c drivers

Updating SOC layer clock API to support both platform drivers and
i2c driver.

Change-Id: I3d4a2e5c778c23dd80644080fdad7512c5e71e33
Signed-off-by: Sureshnaidu Laveti <lsuresh@codeaurora.org>
8 years agoblock: zram: Fix compilation issues
Satya Durga Srinivasu Prabhala [Wed, 11 May 2016 18:36:13 +0000 (11:36 -0700)]
block: zram: Fix compilation issues

While porting changes to 4.4, looks like some functionality lost
and causing below compilation issues if we try to enable ZRAM.

[1]
drivers/block/zram/zram_drv.c: In function 'zram_bvec_write':
drivers/block/zram/zram_drv.c:724:9: error: 'ALLOC_ERROR_LOG_RATE_MS' \
undeclared (first use in this function)
         ALLOC_ERROR_LOG_RATE_MS))
         ^
drivers/block/zram/zram_drv.c:724:9: note: each undeclared identifier \
is reported only once for each function it appears in
drivers/block/zram/zram_drv.c: In function 'zram_add':
drivers/block/zram/zram_drv.c:1239:34: error: 'struct zram' has no \
member named 'queue'
  __set_bit(QUEUE_FLAG_FAST, &zram->queue->queue_flags);
                                  ^
make[4]: *** [drivers/block/zram/zram_drv.o] Error 1
make[3]: *** [drivers/block/zram] Error 2
make[2]: *** [drivers/block] Error 2
make[1]: *** [drivers] Error 2

[2]
drivers/block/zram/zram_drv.c: In function 'zram_add':
drivers/block/zram/zram_drv.c:1241:34: error: 'struct zram' \
has no member named 'queue'
  __set_bit(QUEUE_FLAG_FAST, &zram->queue->queue_flags);
                                  ^
make[4]: *** [drivers/block/zram/zram_drv.o] Error 1
make[3]: *** [drivers/block/zram] Error 2
make[2]: *** [drivers/block] Error 2

CRs-Fixed: 1013947
Change-Id: I4f7944069306ba92e1fd82625bc15c7fa3bcdb0c
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
8 years agoARM: dts: msm: Enable Camera VFE, Pproc, jpeg nodes for msmcobalt
JinHee Kim [Sun, 8 May 2016 14:38:46 +0000 (07:38 -0700)]
ARM: dts: msm: Enable Camera VFE, Pproc, jpeg nodes for msmcobalt

Enable camera VFE, Pproc and jpeg nodes in dtsi.

CRs-Fixed: 1017151
Change-Id: I33b172ca712064dcc86a87ae413f868f8d7d4342
Signed-off-by: JinHee Kim <jinheek@codeaurora.org>