HW breakpoint driver interferes with debug registers save and restore
code and causes loss of HW breakpoints across power collapse.
Disabling this driver to enable debug registers save and restore
functionality across power collapse.
Change-Id: Iff5ba04b2e494f7a5de00e4d05606878ee3d8148
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
The function trace_printk() performs optimization by determining if
there are no format parameters in argument string and calls appropriate
apis to write to ftrace buffer. Add STM logging to support this
optimization in order to allow CoreSight STM tracing for optimized
trace_printk path.
Change-Id: I1a77291e77410c6ed99474335a6d25742c409e47
Signed-off-by: Aparna Das <adas@codeaurora.org>
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
Dup ftrace event traffic and writes to trace_marker file from
userspace to STM. Also dup trace printk traffic to STM. This
allows Linux tracing and log data to be correlated with other
data transported over STM.
Change-Id: I4fcb42f2e97ab963fdc85853f4f3ea1f208bfc3c
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
[spjoshi@codeaurora.org: 3.18 code fixup]
Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org>
[mittals@codeaurora.org: 4.4 code fixup]
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
Since the cpuidle driver considers the mode selected by qcom governor
for trace events now, remove duplicate traces that report the same
information.
CRs-fixed: 991557
Change-Id: I2a470fb906bb9747f0e1b2c08a231edecc184036
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Add support for controlling the peripheral clocks on
MSMCOBALT v2.
CRs-Fixed: 1015446
Change-Id: If69f3752c4295f4cc49cf41854edc03aa90dbbc5
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>