Commit Graph

1361 Commits

Author SHA1 Message Date
Linux Build Service Account 26b4e48668 Merge "soc: qcom: msm_perf: Add support for enter/exit cycle for io detection" 2015-06-11 13:07:57 -07:00
Linux Build Service Account 36d9d7f6be Merge "defconfig: mdmfermium: Add support for mdmfermium" 2015-06-11 13:07:52 -07:00
Linux Build Service Account a4dc973e3d Merge "soc: qcom: smem: Dump SMEM memory when enable_mini_ramdumps is set" 2015-06-11 08:14:12 -07:00
Linux Build Service Account 995564318b Merge "soc: qcom: pil-msa: Add a module param to handle modem debug" 2015-06-11 08:14:10 -07:00
Jeff Hugo 470c0dabd6 soc: qcom: glink_smd_xprt: Plug information leaks
The close and close ack commands sent over the wire in the control channel
have reserved fields, which are left uninitialized.  This leads to an
unintentional information leak.

Zero initialize these reserved fields before sending the commands over the
wire to plug the leak.

Change-Id: I533a1bd2a7946a17e76806f6c589ea00a993c6e9
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
2015-06-10 08:40:45 -07:00
Jeff Hugo 3b8a24c778 soc: qcom: glink: Increase number of log pages
Three pages of log history in insufficent to capture the complete history
of some issues which hampers analysis.  Increase the number of log pages to
fifteen to provide ample history for debugging issues.

Change-Id: I04e04f9dca84907995e200501dea9ab4a882f720
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
2015-06-10 08:40:12 -07:00
Linux Build Service Account ac9b1a0579 Merge "ARM: dts: msm: Add l2ccc vctl for msm8952" 2015-06-09 13:04:58 -07:00
Venkatesh Yadav Abbarapu 2c6d3ebb50 ARM: dts: msm: Add support for MDMFERMIUM
Add initial set of device tree and board files to build
the mdmfermium target.

Change-Id: I9a0e90ea4e815f1fbbcd2a2ba1c5ab98f4a1c614
Signed-off-by: Venkatesh Yadav Abbarapu <vabbar@codeaurora.org>
2015-06-09 11:04:12 +05:30
Maulik Shah 3a26e99a7d soc: cpu_pwr_ctl: Prevent l2 lpms during cpu coldboot for msm8952
When the first core of a cluster is brought out of reset, the
corresponding l2 is powered on and enabled for low power modes.
Where a core is being brought out of reset and its l2 is already
in power collapse, the l2 is brought out of power collapse and then
the core is brought out of reset. This allows the l2 to re-enter
power collapse before the core is brought out of reset. Prevent
all l2 low power modes until the core is brought out of reset.
Once the core is out of reset re-enable l2 low power modes.

Change-Id: I6fa6e7610a889884f0eeccaac388229bcee8065c
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
2015-06-08 12:47:14 +05:30
Srinivas Ramana 048a4d4317 msm: socinfo: Add socinfo for msm8956
Add SOC information like Chip ID, macros and dummy
socinfo definitions for msm8956.

Change-Id: Ica7c6d8c56b439a105a68d3931ee2c5ba96f527d
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2015-06-07 23:15:16 +05:30
Vikram Mulukutla c114299e27 soc: qcom: smem: Dump SMEM memory when enable_mini_ramdumps is set
Implementations may require the dumping of certain
critical sections of memory during a subsystem restart.
These should be relatively small sections that would
contain enough information for initial triage and
problem classification. Subsystems currently store
such additional information in SMEM; therefore dump
out SMEM memory when a subsystem crashes, if the
new enable_mini_ramdumps flag is set.

Change-Id: I38ea75c9275ad91d9319029c5b265895c70bf4b8
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2015-06-04 19:00:45 -07:00
Deepak Katragadda 2ebb80b935 soc: qcom: Add a delay after sending the SUBSYS_SOC_RESET notification
The smem driver relies on the SUBSYS_SOC_RESET notification
to call the API to collect the SMEM ramdump. Add a delay of
100msec on returning from the notification as a temporary
workaround as the ramdump userspace application is returning
pre-maturely before calling sync() and fclose().

Change-Id: I74f420dfb080ea50907b5a58090adeb3d3f7cdd5
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2015-06-04 18:57:50 -07:00
Vikram Mulukutla 3bda20b220 soc: qcom: subsystem_restart: Support minimized ramdumps
It is useful to retrieve small memory areas from a device
when performing a subsystem restart. For example, shared
memory may contain logging information that can help
triage a problem. Implementations may choose to dump such
memory sections when the enable_mini_ramdumps flag is set.

Change-Id: I217ceed0a5d1ba3130757428b5f48cba4d1203ad
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2015-06-04 17:38:56 -07:00
Linux Build Service Account 71d8956700 Merge "soc: qcom: glink: Add notify_remote_rx_intent callback support" 2015-06-04 08:59:26 -07:00
Linux Build Service Account 86f3000f0d Merge "ARM: dts: msm: Turn on SPM voltage rail for perf cluster of msm8976" 2015-06-04 04:37:56 -07:00
Rajkumar Raghupathy eea61136d7 soc: qcom: pil-msa: Add a module param to handle modem debug
A module parameter modem_dbg_cfg is added to write the value to
QDSP6SS_DBG_CFG register for debugging purposes.

Change-Id: I899ddf5a6144377fb23998c9e8dadd3452f3cc62
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
2015-06-04 16:13:39 +05:30
Linux Build Service Account 473331359e Merge "soc: qcom: memory_dump_v2: use kmemleak_not_leak for mem dump's app table" 2015-06-03 18:27:57 -07:00
Srinivas Ramana a039492996 soc: cpu_pwr_ctl: Turn on SPM rail before powering up the L2 cache
Turn on the necessary voltage rail for SPM before turning on the L2
cache for the CPU.

Change-Id: I8c6bfe26593584fc24e8f3864b94b08df55f3702
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2015-06-03 19:21:21 +05:30
Arun Kumar Neelakantam 89272719f9 soc: qcom: glink: Add notify_remote_rx_intent callback support
In some cases local clients transmit the data without GLINK_TX_REQ_INTENT
flag and fails if remote client not queued the matching rx_intent.

Add callback support to notify the local clients when remote client queue
an RX intent so that the client can track the remote intents.

CRs-Fixed: 847641
Change-Id: I649a054324ae7ed758a849345f41e3e26137f1f1
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2015-06-03 14:20:48 +05:30
Shashank Mittal ea32f46008 soc: qcom: dcc: add support to send SW trigger on/off req to RPM
Add support to request RPM to turn on/off DCC SW trigger.

This request can be used to enable/disable DDR training data verification
before DDR frequency switch.

After receiving enable request RPM assumes that DCC is configured in CRC
mode to verify DDR training data. Hence it starts to send SW trigger to
DCC to run CRC on configured data before DDR frequency switch.

Change-Id: I491bc3e41e11a5366162c65907f41f7cbcdd7809
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
2015-06-02 13:59:16 -07:00
Linux Build Service Account 61d6a80b01 Merge "soc: qcom: Add support for gladiator error reporting" 2015-06-02 07:08:32 -07:00
Abhimanyu Kapur 6ffcf0fd5d soc: qcom: Add support for gladiator error reporting
Add support for gladiator cache interconnect error
detection and reporting. The Gladiator is the cache
coherent interconnect in between two or more CPU
clusters. This driver helps detect the errors related to
snoop data transfer and Distributed Virtual Memory(DVM)
on READ/WRITE transactions.

Change-Id: Ic1aa2066df239672a8ed3d99a63318ed32a11af2
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2015-06-02 07:55:59 +05:30
Tapas Kumar Kundu 464ca24c00 soc: qcom: msm_perf: Add support for enter/exit cycle for io detection
Add support for enter/exit cycle sysfs nodes for io detection

There are some usecases which may benefit from different enter/exit
cycle load criteria for IO load. This change adds support for
that.

Change-Id: Iff135ed11b92becc374ace4578e0efc212d2b731
Signed-off-by: Tapas Kumar Kundu <tkundu@codeaurora.org>
2015-06-01 19:15:46 +05:30
Tapas Kumar Kundu 27be82907e soc: qcom: msm_perf: Add support for multi_cycle entry/exit nodes
Add support for multi_enter_cycles/multi_exit_cycles per cluster

There are some usecases which may benefit from different enter/exit
cycle load criteria for multimode cpu load. This change adds support for
that.

Change-Id: I3408405307ca03b9bba3f03e216ef59b98f29832
Signed-off-by: Tapas Kumar Kundu <tkundu@codeaurora.org>
2015-06-01 19:10:31 +05:30
Tapas Kumar Kundu d69075f454 soc: qcom: msm_perf: Add timers to exit SINGLE mode
Certain governors may stop sending out notifications once CPUs enter
idle at min frequency.If governor's notifications stop then single mode
will not exit for long time. It can happen only if the exit conditions are
set in such a way that the time taken to exit single mode exceeds the time
for the governor to ramp down, idle out and hence stop sending
notifications leaving the system in single mode indefinitely.

This change adds seperate enter/exit cycle sysfs nodes along with a per
cluster non-deferrable timer for single mode exit. The timer is armed only
when the load starts falling below the exit load threshold and is
cancelled when either the load starts going up or SINGLE mode is exited
due to exceeding exit cycle count. On expiry the timer resets SINGLE mode
and the enter/exit cycle counts.

Change-Id: I02dd3fa8af39ca320e80da6391eb2b1ea635a433
Signed-off-by: Tapas Kumar Kundu <tkundu@codeaurora.org>
2015-06-01 19:04:53 +05:30
Lingutla Chandrasekhar 897678b8fa soc: qcom: memory_dump_v2: use kmemleak_not_leak for mem dump's app table
table (of type msm_dump_table) is virtual address for app's base
table of memdump, which is converted to physical address and
holds it in the memdump.table_phys. This memory is not intended
to be freed. When kmemleak scans, it can't deduce that the reference
we are holding is via physical address and not virtual address.
Hence, kmemleak will treat this as a leak as it can't find
a reference to this variable. Supress this by using kmemleak_not_leak.

Change-Id: I5236c940688829a3b5f255c5ee9fcf309cf8ebb7
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2015-06-01 18:20:42 +05:30
Rajkumar Raghupathy bb98f13aad soc: qcom: pil-q6v5: Modify the q6 reset sequence for pil-q6v55-mss.
Handle de-asserting CLAMP_QMC_MEM bit before enabling the memories,
as per the HPG.

Change-Id: Icac8f0ef4fd28b57ab5c42e5558dbc18c890f483
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
2015-06-01 03:35:54 -07:00
Linux Build Service Account f72b9d71c5 Merge "soc: qcom: pil-msa: Add support for loading modem debug policy" 2015-05-30 16:23:03 -07:00
Linux Build Service Account baa5787ee2 Merge "soc: qcom: watchdog_v2: use kmemleak_not_leak for cpu context dump data" 2015-05-30 16:22:54 -07:00
Linux Build Service Account 7f99569b7b Merge "soc: qcom: pil: Add pil-force-shutdown property to subsystem dt entries" 2015-05-30 12:32:44 -07:00
Linux Build Service Account 7477735f8c Merge "soc: qcom: smem: add partition information" 2015-05-30 12:32:42 -07:00
Linux Build Service Account ec1def8949 Merge "msm: spm: Prevent l2 lpms during cpu coldboot" 2015-05-30 12:32:37 -07:00
Linux Build Service Account 9adc697137 Merge "soc: cpu_pwr_ctl: Add 8976 cpu retention ldo configure support" 2015-05-30 12:32:35 -07:00
Kishan Kumar f54550da2a soc: qcom: watchdog_v2: use kmemleak_not_leak for cpu context dump data
cpu_data & cpu_buf are virtual addresses,which are
converted to their physical addresses by using
virt_to_phys() API. Then this is added to the mem dump
apps data table by calling msm_dump_table_register().
This memory is not intended to be freed. When kmemleak
scans, it can't deduce that the reference we are
holding is via physical address and not virtual address.
Hence, kmemleak will treat this as a leak as it can't
find a reference to this variable. Supress this by
using kmemleak_not_leak.

Change-Id: I4ee30c87a29d66f34a5c8a6c18f2ebc59760e981
Signed-off-by: Kishan Kumar <kishank@codeaurora.org>
2015-05-29 17:30:45 +05:30
Srinivas Rao L 9f22ebbe1b msm: spm: Prevent l2 lpms during cpu coldboot
When the first core of a cluster is brought out of reset, the
corresponding l2 is powered on and enabled for low power modes.
Where a core is being brought out of reset and its l2 is already
in power collapse, the l2 is brought out of power collapse and then
the core is brought out of reset. This allows the l2 to re-enter
power collapse before the core is brought out of reset. Prevent
all l2 low power modes until the core is brought out of reset.
Once the core is out of reset re-enable l2 low power modes.

Change-Id: I5f47b6c5a309edad9c0864b3623b6ea6d3eff7d7
Signed-off-by: Srinivas Rao L <lsrao@codeaurora.org>
2015-05-29 11:41:22 +05:30
Srinivas Rao L 11f4d90145 soc: cpu_pwr_ctl: Add 8976 cpu retention ldo configure support
Add support to configure the performance cluster cpu retention
ldo voltage. This value needs to be configured when a core is
coldbooted. The core will then be able to enter retention at
the programmed retention voltage.

Change-Id: Idf46c31edfb2be7ce364070baea5550048301a14
Signed-off-by: Srinivas Rao L <lsrao@codeaurora.org>
2015-05-29 11:37:00 +05:30
Junjie Wu 3f656bcb91 soc: qcom: pil-msa: Add support for loading modem debug policy
Add support to load the modem debug policy firmware during
modem boot. This debug policy will be consumed by modem once
it's powered up.

Change-Id: I319d71a74bd27347e445d13519cb71e6c7843e76
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2015-05-28 17:57:30 -07:00
Deepak Katragadda ad6fa6b400 soc: qcom: pil: Add pil-force-shutdown property to subsystem dt entries
It might not always be ideal for the SSR framework to trigger a
graceful shutdown on behalf of the subsystem driver. Add the
"qcom,pil-force-shutdown" property to subsystem dt entries to
indicate this exception for the subsystem.

Change-Id: Ia382750ee9b6befe9940a1aca0bf1c7404e1e3fe
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2015-05-28 14:36:02 -07:00
Banajit Goswami b2e65d1d29 soc: qcom: msm_audio_ion: export ION alloc and free functions
Export the ION memory alloc and free functions so that
other drivers can use these APIs.

Change-Id: I4f1beb51d59f14585c00873626ee79b8627832b7
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2015-05-28 18:09:18 +05:30
Linux Build Service Account ad63bdb45e Merge "ARM: dts: msm: correct msmid of 8976" 2015-05-27 00:29:24 -07:00
Linux Build Service Account 235d3b6b67 Merge "soc: qcom: bam_dmux: Correct payload length handing for dynamic mtu" 2015-05-27 00:29:22 -07:00
Eric Holmberg 851b828128 soc: qcom: smem: add partition information
Upon initialization, SMEM scans the partition table to extract
information for any partitions that APSS is part of and the partition
information is stored for debug purposes.  If the APSS processor is not
part of the edge, then it is skipped and no information about the
partition is logged.

Log non-APSS partition information to assist in system triage.

Change-Id: I1609bb6c6f4f22637b7a709c4c09df783a45fa96
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
2015-05-26 15:54:04 -07:00
Srinivas Ramana 92912f19d9 ARM: dts: msm: correct msmid of 8976
correct the msmid of 8976 to the recommended value.

Change-Id: Id25dcf48f88c71c7bf9add4ef5f89ca8162b656f
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2015-05-26 11:17:48 +05:30
Linux Build Service Account bda55ecce6 Merge "soc: qcom: dcc: add support for CRC mode" 2015-05-25 07:59:12 -07:00
Linux Build Service Account 43576cd57a Merge "soc: qcom: dcc: fix uninitialized variable bug in dcc_ll_cfg function" 2015-05-25 07:59:11 -07:00
Linux Build Service Account b0824ecaa0 Merge "soc: qcom: dcc: add support for DCC driver" 2015-05-25 07:59:11 -07:00
Linux Build Service Account bd42c0f2be Merge "soc: qcom: common_log: Fix a memory leak in common_log driver" 2015-05-25 03:50:18 -07:00
Jeff Hugo 9f2b59a68f soc: qcom: bam_dmux: Correct payload length handing for dynamic mtu
Packets received under the dynamic mtu feature do not have a valid payload
size in the header, so the correct size is computed based on data from
SPS. This computation is incorrect, which results in the client
processing extra data in the scenario where their protocol requires the
packet to be dropped.

Correct the payload length handling for this scenario.

CRs-Fixed: 830835
Change-Id: I37e2d1bfe390657b9cdc2fcd530762d3daf97036
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2015-05-25 12:42:50 +05:30
Linux Build Service Account c3f4ce9f0a Merge "soc: qcom: glink_pkt: Add auto-intent queuing support" 2015-05-24 23:59:49 -07:00
Linux Build Service Account 9d7d7aadce Merge "soc: qcom: update boot sequence of l2 and perf cluster cores" 2015-05-24 23:59:47 -07:00
Shashank Mittal 953e2687e4 soc: qcom: dcc: add support for CRC mode
In CRC mode DCC can perform CRC on configuration data or system memory
after receiving SW or HW trigger.

Change-Id: Iab0a6ffa92ef6e311054756cfe85d1b2b91743c9
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
2015-05-24 19:48:56 -07:00
Shashank Mittal 7447cff065 soc: qcom: dcc: fix uninitialized variable bug in dcc_ll_cfg function
Fix bug due to use of uninitialized 'prev_off' variable.

Change-Id: I773f64209b395eb9f2fc82a53d4a2f1b79b081eb
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
2015-05-24 19:48:35 -07:00
Shashank Mittal eb9fd99418 soc: qcom: dcc: add support for DCC driver
DCC (Data Capture and Compare) is a DMA engine which is used to save
configuration data or system memory contents during catastrophic failure
or SW trigger.

It also can perform CRC over the same configuration or memory space.

Change-Id: Ic8a804250ab8b7ac501bd186d2e6f7506bb9b21a
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
Signed-off-by: Xiaogang Cui <xiaogang@codeaurora.org>
2015-05-25 10:13:35 +08:00
Linux Build Service Account 117cda2cd6 Merge "qcom: common_log: add support to dump VSENSE registers" 2015-05-24 07:51:20 -07:00
Linux Build Service Account 1ec54643f5 Merge "soc: qcom: glink: add error logging for glink_tx failures" 2015-05-23 05:29:52 -07:00
Linux Build Service Account fb81e61f5b Merge "soc: qcom: glink: Remove redundant reinit() of completion variable" 2015-05-23 05:29:51 -07:00
Shashank Mittal 616f519e25 qcom: common_log: add support to dump VSENSE registers
Allocate memory to dump VSENSE registers at the time of crash.

Change-Id: Ibd896873bc40b723071c66ca7cf1a4bc9b38ad5e
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
2015-05-22 13:29:08 -07:00
Linux Build Service Account cddf3e63b3 Merge "soc: qcom: ramdump: Use dma_remap/dma_unremap for ramdump read" 2015-05-22 09:40:55 -07:00
Linux Build Service Account cd86033fd6 Merge "soc: qcom: qmi_interface: Fix the qmi indication callback" 2015-05-22 02:31:37 -07:00
Eric Holmberg da90c3cff1 soc: qcom: glink: add error logging for glink_tx failures
One failure path in glink_tx() does not log a failure message and the
loopback server does not log the return code which causes ambiguity when
triaging logs.

Add logging of missing error path and the return code.

Change-Id: I2ef27c4d71f00c19600b2e2f53f1655f87bbfb18
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
2015-05-22 01:55:10 -07:00
Karthikeyan Ramasubramanian f1913e878c soc: qcom: glink: Remove redundant reinit() of completion variable
The intent request completion variable is re-initialized after returning
from the prior wait. The redundant re-initialization of that completion
variable causes the receive intent event to be missed when that event
happens just before the wait.

Remove the redundant re-initialization of intent request completion
variable.

Change-Id: I3a7851ae5837496824898b827f490f27eb0e3afa
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2015-05-22 01:55:08 -07:00
Arun Kumar Neelakantam 26f9bd495d soc: qcom: glink_pkt: Add auto-intent queuing support
Glink_pkt driver clients have to call the new IOCTL to queue an intent
to receive the data from remote side.

To ensure compatibility with smd_pkt clients add auto-intent queuing
in the read() call when glink_pkt client fails to queue an intent.

Change-Id: Iee8fca114f47921788c19d40247a768038985daa
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2015-05-21 14:44:12 +05:30
Srinivas Ramana e1d4e9a2e8 soc: qcom: update boot sequence of l2 and perf cluster cores
Initial boot sequence has changed for L2 and performance cluster
cores. Update the sequence to reflect hardware needs on msm8976.

Change-Id: I86831ebba58979ddf6d6a02517146c7126b036bd
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2015-05-20 16:14:35 +05:30
Rajkumar Raghupathy 9737a1f387 soc: qcom: ramdump: Use dma_remap/dma_unremap for ramdump read
The memory allocated from the general cma heap cannot be remapped
using ioremap. This problem was encountered on msm8909 when trying
to dump the venus memory.

Hence, handle the ramdump_read mapping using dma_remap/dma_unremap
instead of ioremap_nocache/iounmap.

Change-Id: Ia161851578c2e27f9364cf7c229bc5fd40e43d24
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
2015-05-20 11:18:06 +05:30
Linux Build Service Account dea1e182ee Merge "soc: qcom: bam_dmux: Add fast-shutdown flag" 2015-05-19 14:55:51 -07:00
Linux Build Service Account 13f1c4b95f Merge "soc: qcom: bam_dmux: Use SPS hold mem flag" 2015-05-19 14:55:50 -07:00
Karthikeyan Ramasubramanian 1c97bf239d soc: qcom: qmi_interface: Fix the qmi indication callback
QMI indication messages are delivered to the client along with the QMI
header. This leads to QMI message decode failure.

Pass the QMI indication messages excluding the QMI header to the client.

Change-Id: I988dbf99038a647e1572a18e79d2d455b55f7bde
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2015-05-19 04:27:01 -07:00
Linux Build Service Account 594c83efe7 Merge "cpaccess: Remove memory protection" 2015-05-18 19:47:05 -07:00
Linux Build Service Account 4d85e116c7 Merge "soc: qcom: scm-mpu: Add an API to unlock the kernel text region" 2015-05-18 19:47:05 -07:00
Linux Build Service Account bf6e76d772 Merge "soc: qcom: scm-mpu: Fix bug in unlock code path" 2015-05-18 19:47:04 -07:00
Katish Paran 60f310d4e1 memshare: Change dma attribute to DMA_ATTR_NO_KERNEL_MAPPING
Currently xpu violation is happening as the allocated piece of
memory is being accessed from the apps. Change the attribute to
DMA_ATTR_NO_KERNEL_MAPPING so that apps cannot access the
allocated piece of memory.

Change-Id: Icbda155c3d9ea28570e7d17240ee23f8f12061a9
CRs-Fixed: 825907
Signed-off-by: Katish Paran <kparan@codeaurora.org>
2015-05-18 13:11:57 +05:30
Rama Krishna Phani A 5a857aea52 soc: qcom: bam_dmux: Use SPS hold mem flag
Bam_dmux sometimes calls sps_connect() during time sensitive operations.
Sps_connect() internally has some memory allocations which may stall
during low memory conditions and can cause a timeout in bam_dmux.
SPS supports a configuration flag which changes these memory allocations
to hold memory.
Use this flag to prevent allocations from stalling and
leading to timeouts.

Change-Id: I506d5664e07baf56f4caa10d1868b1795a4439d9
Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
2015-05-14 21:45:39 -07:00
Rama Krishna Phani A eb4187f433 Revert "soc: qcom: bam_dmux: Use SPS atomic allocation flag"
Bam_dmux sometimes calls sps_connect() during time sensitive operations.
Sps_connect() internally has some memory allocations which may stall
during low memory conditions and can cause a timeout in bam_dmux.
SPS supports a configuration flag which changes these memory allocations
to atomic. Use this flag to prevent allocations from stalling and
leading to timeouts.

Additional flag added is resulting in error instead of timeout.
Reverting change Icde45f7b08a4b4a2b664c40d088fd338b48ac8fa as the issue
is not solved. Commit id d2393c2628.

Change-Id: I0e33168fb328be540a22ee214d81ea181c1beaa3
Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
2015-05-14 11:25:48 +05:30
Arun Kumar Neelakantam f681aba313 soc: qcom: bam_dmux: Add fast-shutdown flag
The UL_TIMOUT_DELAY of 1sec is very high in CDRX usecase where
the Modem and the network agree that no data will be exchanged for
a set amount of time. In this case A2 want to power collapse early
which is done by UL unvote from BAM DMUX.

Add a flag to reduce the UL_TIMEOUT_DELAY for early UL unvote from
BAM DMUX to allow A2 early power collapse.

CRs-Fixed: 826107
Change-Id: Iea99d59f0eadf2f385c66e3280a194be38c6d003
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2015-05-14 10:13:10 +05:30
Patrick Daly d92472e2d7 cpaccess: Remove memory protection
The kernel text region may be xpu protected. Disable xpus before modifing
assembly code.

Change-Id: Ide2d8d788a28b0f6db007f87a4cb76daa1ad2f7f
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2015-05-13 19:12:14 -07:00
Patrick Daly 9ced33893e soc: qcom: scm-mpu: Add an API to unlock the kernel text region
The cpaccess driver writes to the kernel text section during normal
operation. Add an API to disable any protection of this region by the
scm-mpu driver.

Protection is not reenabled after cpaccess operations since this is
expected to be an uncommon usecase.

Change-Id: I83caa906b94f4a522a203c1170f1d913681fc704
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2015-05-13 19:12:14 -07:00
Patrick Daly 5f451e1a25 soc: qcom: scm-mpu: Fix bug in unlock code path
The default behavior for xpus is to zero out the protected region when
it is unlocked. Pass a flag to the scm call to leave the memory region
unchanged.

Change-Id: Ib714d6db93bed2940006f8c0196b59da3fbd3161
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2015-05-13 19:12:13 -07:00
Linux Build Service Account 5abae12653 Merge "soc: qcom: glink: Handle intents queued on intentless transports" 2015-05-12 22:01:40 -07:00
Steven Cahail 6c99be3e93 soc: qcom: glink: Handle intents queued on intentless transports
The core currently just returns an error code if an intent is queued on
an intentless transport.

Instead, track the intent in the core, but do not notify the remote side
about it (as the transport cannot support it).

Change-Id: I6a88a3473c6e4f237cfc01631782c01d4f75009f
Signed-off-by: Steven Cahail <scahail@codeaurora.org>
2015-05-12 13:36:46 -07:00
Venkatesh Yadav Abbarapu 67756de31c ARM: dts: msm: Remove mdmferrum changes
Remove the mdmferrum changes as they are not applicable
anymore.

Change-Id: Ifbe0a3a1b8e17dcf414f9412c343835cedef0f62
Signed-off-by: Venkatesh Yadav Abbarapu <quicvenkat@codeaurora.org>
2015-05-12 12:11:17 +05:30
Prasad Sodagudi 2936963d34 soc: qcom: common_log: Fix a memory leak in common_log driver
Fix the memory leak in common_log_register_log_buf() function
when registering log_first_idx with the memory with dump v2 driver.
Also use kmemleak_not_leak when msm_dump_data_register() calls
are successful to ensure that kmemleak doesn't report it as a memory
leak.

CRs-Fixed: 832905
Change-Id: I36eaeebf821f64dd7503ec823aca3c7aec846bd0
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
2015-05-12 11:34:48 +05:30
Linux Build Service Account 18b7023e44 Merge "msm: socinfo: Add support for APQ8052" 2015-05-11 14:57:26 -07:00
Linux Build Service Account 299aa8d8a0 Merge "msm: spm: Add C1 FSM control support" 2015-05-10 05:12:24 -07:00
Linux Build Service Account d1ebb25d47 Merge "soc: qcom: pil-msa: Notify MBA about PIL loading failure" 2015-05-08 21:50:30 -07:00
Linux Build Service Account 5f26f2002c Merge "soc: qcom: pil-msa: Free mba region if metadata authentication fails" 2015-05-08 21:50:29 -07:00
Linux Build Service Account f71f4b85d5 Merge "soc: qcom: smp2p: Add support for TZ subsystem" 2015-05-06 19:59:48 -07:00
Srinivas Rao L da6988b83b msm: spm: Add C1 FSM control support
Add C1 FSM control settings based on the low power mode
selected.

Change-Id: I36a4614220de042feccd2862077c290fe46a0fd8
Signed-off-by: Srinivas Rao L <lsrao@codeaurora.org>
2015-05-06 19:15:56 +05:30
Rajkumar Raghupathy 37522ccea6 soc: qcom: pil-msa: Notify MBA about PIL loading failure
If modem loading fails during pil_boot, the allocated mba region
is freed. But the region is still in locked state as the MBA does not
know about the modem loading failure. This leads to XPU violation,
when the locked mba region is accessed by other modules.

Hence, before freeing the MBA region, notify the MBA about the failure
so that MBA can remove memory protection.

Change-Id: Ib3489504f2aa49dc886ea9a5f2eae3da57fcf7d4
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
2015-05-06 18:56:26 +05:30
Rajkumar Raghupathy a4be209b6c soc: qcom: pil-msa: Free mba region if metadata authentication fails
There is a memory leak in the error path when modem metadata
authentication fails. Free the MBA region to fix this.

Change-Id: I3b33af58bba6532c7714070a62dce1dd99c63601
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
2015-05-06 18:55:45 +05:30
Arun Kumar Neelakantam c8bdb4368d soc: qcom: glink_pkt: use generic data type in ioctl
The size variable reading from userspace in IOCTL call
is using architecture specific data type size_t which
depends on 32-bit or 64-bit platform.

Remove the platform dependence code by using generic data type
uint32_t for the size variable.

Change-Id: I462c8e136403694354b4f85636625d9e1a6da1b4
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2015-05-04 17:50:10 +05:30
Linux Build Service Account 35607652f4 Merge "soc: qcom: smem: Fix debugfs entry for smem native transport" 2015-05-02 03:36:48 -07:00
Linux Build Service Account 40fa64f100 Merge "soc: qcom: glink_pkt: Map the smd_trans signal to TIOCM_X" 2015-05-02 00:27:32 -07:00
Atish Kumar Patra cb45db1b9c soc: qcom: smem: Fix debugfs entry for smem native transport
The smem transport debugfs initialization  expects the transport
to be already registered with glink to avoid creation of required
directory structure twice. Interrupt information is also not present
in the current debugfs entry.

Fix the debugfs entry by initializing it after the smem transport gets
registered with glink core. The interrupt information is also updated.

Change-Id: I93e7326fedc85dfc8bbce5bf886e17ba4fc4e478
Signed-off-by: Atish Kumar Patra <apatra@codeaurora.org>
2015-05-02 00:14:46 -07:00
Linux Build Service Account 40e359a3a0 Merge "soc: qcom: smp2p: Update mock processor ID" 2015-05-01 20:28:28 -07:00
Linux Build Service Account e63918ab84 Merge "soc: qcom: glink_debugfs: Fix array size check in helper function" 2015-05-01 20:27:54 -07:00
Steven Cahail d01018dca3 soc: qcom: smp2p: Add support for TZ subsystem
The TZ subsystem now supports SMP2P communication, so add the necessary
support to allow the apps subsystem to talk to the TZ subsystem.

Change-Id: I09512a9af6f5f8da486156c7e063fd1155ece402
Signed-off-by: Steven Cahail <scahail@codeaurora.org>
2015-05-01 16:15:27 -07:00
Steven Cahail 7e4819b9f2 soc: qcom: smp2p: Update mock processor ID
The mock processor ID in SMP2P is currently one greater than the last
actual processor ID. If a new processor is added, this requires updating
the mock processor ID as well, which requires updating the DT files for
all targets.

Update the mock processor ID to 16, which leaves room to add several new
processors.

Change-Id: I2ea82c38f5e100ddb3229b90380ddd1769cdbeb9
Signed-off-by: Steven Cahail <scahail@codeaurora.org>
2015-05-01 15:23:59 -07:00
Linux Build Service Account bf874b8e55 Merge "soc: qcom: loopback_server: Fix loopback test failure" 2015-05-01 03:12:24 -07:00
Linux Build Service Account 1379881cf6 Merge "soc: qcom: smp2p_test: Make remote SSR ack test use correct SSR name" 2015-05-01 03:12:18 -07:00
Linux Build Service Account 5ae6af7bb2 Merge "soc: qcom: glink_debugfs: fix compilation errors if debugfs is disabled" 2015-05-01 03:12:18 -07:00
Atish Kumar Patra fe2e3b77f1 soc: qcom: glink_debugfs: Fix array size check in helper function
The helper functions to get transport state and channel state name
use wrong array in array size function.

Fix the array size check by using correct array.

Change-Id: Ie725355df0f42b31e49373abf89fbaf38072b7a1
Signed-off-by: Atish Kumar Patra <apatra@codeaurora.org>
2015-05-01 02:47:01 -07:00
Atish Kumar Patra 2d637b2f39 soc: qcom: loopback_server: Fix loopback test failure
As the memory allocated for rx_work_info structure is not zeroed
out, the tracer_pkt flag may take any garbage value leading to
loopback test failure for non-tracer packets.

Fix the loopback test failure by initializing the allocated memory
for the specified structure to zero.

Change-Id: I388018c5853ca2c67dbc2a99fed5075b8224454f
Signed-off-by: Atish Kumar Patra <apatra@codeaurora.org>
2015-04-30 16:40:06 -07:00
Steven Cahail 0940c26a11 soc: qcom: smp2p_test: Make remote SSR ack test use correct SSR name
The remote SSR ack unit test currently uses the subsystem name
associated with the interrupt config, which may not be the correct name
to use with the subsystem_restart() API.

Introduce a table containing the possible names of each subsystem, and
modify the unit test to try each name with the subsystem_restart() API
until the correct name is found. If none of the names in the table work,
print an error message indicating this issue.

Change-Id: I0dc2f65a67f44ca67de48d6eb28e58fa7a666be5
Signed-off-by: Steven Cahail <scahail@codeaurora.org>
2015-04-30 12:37:48 -07:00
Subhash Jadavani c2b042f020 soc: qcom: glink_debugfs: fix compilation errors if debugfs is disabled
This change fixes the compilation errors seen when DEBUG_FS is disabled.

Change-Id: I009c1192533c9fc40c7a84eb4fecc3b0859fec59
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2015-04-30 12:37:41 -07:00
Arun Kumar Neelakantam c7f3efbb83 soc: qcom: glink_pkt: Map the smd_trans signal to TIOCM_X
SMD transitional transport plugin uses different signal bits compare
to the normal TIOCM signals to indicate the DTR, CTS, CD and RI bits.

Map the SMD transitional signal into TIOCM_X format so that user space
glink clients can depend only on TIOCM signals.

Change-Id: I864fbe1b8a28f22182e7b645747c57dd95549940
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2015-04-30 18:53:48 +05:30
Ian Maund cd50d4cdb5 Update target name references for 8976
With the official announcement of 8976, remove all references to its
internal code name, and replace them with 8976.

Change-Id: I6d507418e5259908addedf2975e391200b4e0c83
Signed-off-by: Ian Maund <imaund@codeaurora.org>
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2015-04-29 15:07:39 +05:30
Kaushal Kumar 5391f0dfef msm: socinfo: Add support for APQ8052
Add the MSM SoC ID information for supporting
the APQ8052 target.

Change-Id: Id23033e1897b61ed288eac1bac2ab12eda6c4783
Signed-off-by: Kaushal Kumar <kaushalk@codeaurora.org>
2015-04-28 19:16:44 +05:30
Linux Build Service Account 3f93ae67f3 Merge "ASoC: change audio drivers to accomodate sid 33bit in 32-mode" 2015-04-28 06:29:27 -07:00
Laxminath Kasam d11c6a5da7 ASoC: change audio drivers to accomodate sid 33bit in 32-mode
In kernel 32-mode, SID address being 33bit is truncated.
To address this issue, update audio drivers to fetch
SMMU SID info from audio ion driver and fill the upper 32 bits
accordingly for 32-bit mode.

Change-Id: Ie2fa573def36d7b346d6a96249239ef1ecc7f8e0
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2015-04-27 17:24:51 +05:30
Linux Build Service Account 15cce8a35d Merge "soc: qcom: smd: Update SMD driver to support SLPI SSR" 2015-04-25 21:56:39 -07:00
Linux Build Service Account cfaaefa6b0 Merge "soc: qcom: smem: Update SMEM driver to support SLPI SSR" 2015-04-25 21:56:38 -07:00
Linux Build Service Account 36785b35af Merge "soc: qcom: glink: modify the Signal get APIs prototype" 2015-04-24 08:20:55 -07:00
Linux Build Service Account ed2430dc51 Merge "soc: qcom: glink_pkt: send remote signals in TIOCMGET" 2015-04-24 08:20:55 -07:00
Linux Build Service Account e9844b7faf Merge "msm: apr: allow apr_register only for valid destination" 2015-04-23 23:28:58 -07:00
Steven Cahail 584c7863b4 soc: qcom: smd: Update SMD driver to support SLPI SSR
The SMD driver currently does not listen for SLPI SSR events.

Update the driver to listen for SLPI SSR events by adding an element for
SLPI in the driver's restart notifiers list.

Change-Id: I7ffc3f822e615d0e52a36965398033e21c98c634
Signed-off-by: Steven Cahail <scahail@codeaurora.org>
2015-04-23 21:23:00 -07:00
Steven Cahail 04fe06ea38 soc: qcom: smem: Update SMEM driver to support SLPI SSR
The SMEM driver currently does not listen for SLPI SSR events.

Update the driver to listen for SLPI SSR events by adding an element for
SLPI in the driver's restart notifiers list.

Change-Id: I7a3be62638e52ea75fc5783d298d233bd6117ab1
Signed-off-by: Steven Cahail <scahail@codeaurora.org>
2015-04-23 10:47:50 -07:00
Arun Kumar Neelakantam 1f4f526d33 soc: qcom: glink: modify the Signal get APIs prototype
The local and remote signal get APIs are using INT return type
to return both negative error codes and unsigned INT value as
signal causes problem if the most significant bit set in signal field.

Use extra parameter to pass the unsigned signal value to the caller
and return 0 for success and negative error code for failure.

Change-Id: I3f4f3c0a5551af3094c24e5d6463f14298c9ffe7
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2015-04-23 20:11:45 +05:30
Taniya Das 35364897e8 soc: qcom: pil-q6v5: Add support for CX corners
As new level based voting is introduced for CX/MX, add the support to take
input from DT for min/max levels.

Change-Id: Icf7aeb8029d141fe1e5f187f2e75aeb04f06c1b7
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2015-04-21 20:33:01 -07:00
Linux Build Service Account e231bb4a45 Merge "soc: qcom: glink: Fix channel debugfs entry for channel migration" 2015-04-20 21:48:59 -07:00
Linux Build Service Account 775aeab8b5 Merge "soc: qcom: glink_debugfs: Fix transport entry in glink debugfs" 2015-04-20 21:48:58 -07:00
Linux Build Service Account 7b13811af5 Merge "soc: qcom: glink_debugfs: Validate transport and edge name" 2015-04-20 21:48:57 -07:00
Linux Build Service Account c2660d72b0 Merge "soc: qcom: glink: Fix the feature negotiation implementation" 2015-04-20 14:23:03 -07:00
Linux Build Service Account ef9bf9026a Merge "soc: qcom: glink: Add tracer packet support in G-Link" 2015-04-20 14:23:02 -07:00
Arun Kumar Neelakantam b2571296f0 soc: qcom: glink_pkt: send remote signals in TIOCMGET
TIOCMGET ioctl is returning the local signal of the channel and
user space client has no option to get the remote signals.

Send the remote signals of the channel in TIOCMGET ioctl.

Change-Id: I3525c2b1aeadd2206d5a2437fe29ccd7961845a3
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2015-04-20 14:44:30 +05:30
Aravind Kumar 84b738e926 msm: apr: allow apr_register only for valid destination
The present code allows apr_register call to proceed
for invalid destination id. Return immediately if
detination is invalid.

Change-Id: I61085bce1f895a91ef0097b9152ffce486de2272
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
2015-04-20 14:02:34 +05:30
Linux Build Service Account 9847c5c7c7 Merge "soc: qcom: glink: Avoid race condition in ch_close_ack" 2015-04-17 11:11:29 -07:00
Atish Kumar Patra 2adae3cbe2 soc: qcom: glink: Fix channel debugfs entry for channel migration
The current debugfs directory structure has channel directory under
a directory named with the corresponding subsystem. This results in
wrong channel information in case of channel migration scenario as
same channel name can exist on different transports on the same
subsystems.

Modify the directory name to have subsystem_transport format to avoid
the issue.

Change-Id: I600bfce5b693c5ae1bcb6ae07a2b5608a5107da6
Signed-off-by: Atish Kumar Patra <apatra@codeaurora.org>
2015-04-17 02:15:30 -07:00
Atish Kumar Patra af1d9b9acc soc: qcom: glink_debugfs: Validate transport and edge name
The transport and edge name is passed to next function without
validation. This may lead to invalid dereferencing in case the
name is NULL.

Check both of them for NULL before passing on to the next function.

Change-Id: I6f4c5e5011902fa70ecbaa16842d5100347d55d3
Signed-off-by: Atish Kumar Patra <apatra@codeaurora.org>
2015-04-17 02:15:25 -07:00
Atish Kumar Patra 036c7fe065 soc: qcom: glink_debugfs: Fix transport entry in glink debugfs
The glink transport entry in debugfs have version and features
data in wrong order.

Fix the entry by swapping the version with features.

Change-Id: Icfea327fc551561f2870708c11d20ea58d48f06d
Signed-off-by: Atish Kumar Patra <apatra@codeaurora.org>
2015-04-17 02:15:23 -07:00
Karthikeyan Ramasubramanian 3e89be340f soc: qcom: glink: Fix the feature negotiation implementation
If the local feature set does not match with the remote feature set, G-Link
Core negotiates the feature set with the local transport. But it does not
cache the feature set negotiated by the local transport. This results in an
infinited feature negotiation loop.

Cache the negotiated local feature set in the transport context.

Change-Id: I2068fb4437031bf55738ccc49d05c0c0a82f3771
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2015-04-16 15:35:51 -07:00
Karthikeyan Ramasubramanian 9cb131bcde soc: qcom: glink: Add tracer packet support in G-Link
Update G-Link to support tracer packet to profile the performance of
G-Link and its transports.

Change-Id: I18266f339cd7a12d1ee31507dd8043f9adce7706
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2015-04-16 15:35:49 -07:00
Atish Kumar Patra 2012756fcb soc: qcom: glink: Avoid race condition in ch_close_ack
There is a race condition between channel deletion from list and freeing
the channel context pointer by decrementing the reference count. The
channel can be closed between list deletion and decrementing the
reference count in ch_close_ack.

Fix the race condition by doing list deletion and reference count
decrement at one place.

Change-Id: I94df0feb4145405c99a84dc38d81fe5e4cb3e3ed
Signed-off-by: Atish Kumar Patra <apatra@codeaurora.org>
2015-04-15 16:39:11 -06:00
Linux Build Service Account 2e189893d3 Merge "rpm-stats: Export rpm-stats info to sysfs interface" 2015-04-14 17:49:05 -07:00
Linux Build Service Account 904fe06948 Merge "ASoC: qcom: qdsp6v2: change the audio driver for 8952 bring up" 2015-04-14 17:49:00 -07:00
Linux Build Service Account 7529808611 Merge "soc: qcom: pil-q6v5: Add support for new qdsp6 version" 2015-04-13 23:19:09 -07:00
Taniya Das 1f93a202b6 soc: qcom: pil-q6v5: Add support for new qdsp6 version
Add a new device tree property "qcom,qdsp6v56-1-8," to support a new
qdsp6 1.8 version. Add the corresponding steps to enable memories of
the new version.

Change-Id: I6658e5fedcfa0569222cc2c9acdd1df51999b90f
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2015-04-14 00:16:20 +05:30
Santosh Mardi 400de3932a ASoC: qcom: qdsp6v2: change the audio driver for 8952 bring up
Driver name apr is conflicting from the SMD driver, causing fake probe
calls to apr driver, changing the driver name from apr to adsp_audio.

Differentiate the pinctrl names for the 2 different gpio sets for
different configuration.

Change-Id: Ic6e1af3d26663575e63098f3b8d0f48e073b9dc6
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2015-04-13 23:33:59 +05:30
Linux Build Service Account c70728df6a Merge "soc: qcom: glink_pkt: Initialize the glink handle to NULL" 2015-04-13 02:43:50 -07:00
Linux Build Service Account 67d6a0f2e6 Merge "soc: qcom: glink_pkt: Remove mmap() function" 2015-04-13 02:43:50 -07:00
Linux Build Service Account 19d85ae5a5 Merge "msm: spm: Add new API to set only SPM start address" 2015-04-11 05:18:23 -07:00
Linux Build Service Account b40aeaea9b Merge "soc: qcom: qmi: Read remove client control message" 2015-04-11 05:18:21 -07:00
Linux Build Service Account 2a29bc7ff8 Merge "soc: qcom: glink_ssr: Validate subsystem info during channel close" 2015-04-10 09:50:26 -07:00
Linux Build Service Account 0b65711291 Merge "soc: qcom: glink_smem_native_xprt: Plug open command memory leak" 2015-04-10 09:50:23 -07:00
Maulik Shah 22425ccd3c msm: spm: Add new API to set only SPM start address
The start addresses for different L2 low power modes could
be different between HLOSes. So HLOS cannot rely on secure
world to correctly program the L2 SPM.

Program L2 spm start address in HLOS and allow secure world
to configure only spm enable bit.

Change-Id: I3ae5d7a1574808a7fc33ab7d62294592fdc1fdf8
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
2015-04-10 09:50:55 +05:30
Steven Cahail a81555bd16 soc: qcom: glink_ssr: Validate subsystem info during channel close
In the glink_ssr client's close function, the subsystem information
structure is obtained using the get_info_for_edge() function. This
function returns NULL if no subsystem information structure is found for
the requested edge. The close function does not check whether NULL was
returned, which could lead to a perceived NULL pointer dereference.
However, this is not possible since the edge info is configured from the
device tree before the channel is opened and should always be valid.

Add check to ensure that the design assumption that get_info_for_edge()
is valid is still true.

Change-Id: If88cbc1419669fa240667ae92ce2e78e49ad970c
Signed-off-by: Steven Cahail <scahail@codeaurora.org>
2015-04-09 20:31:53 -07:00
Linux Build Service Account 966c71b47f Merge "soc: qcom: pil-femto-modem: Modify q6-freq-row maximum" 2015-04-09 12:59:01 -07:00
Jeff Hugo b448fab4e2 soc: qcom: glink_smem_native_xprt: Plug open command memory leak
When processing an open command, the smem native transport allocates some
memory to store the name of the channel, which gets passed up to the core.
The core makes a copy of the name, so the memory can be freed once the call
to the core returns.  The transport does not free this memory, leading to a
leak.

Free the memory allocated for the channel name after calling into the core
to plug the leak.

Change-Id: Ia789c06a7f7104c4e1f145996dc006d07d292752
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
2015-04-09 08:34:28 -07:00
Linux Build Service Account fd21c0b5e0 Merge "soc: qcom: sleepstate: Send interrupt on state update" 2015-04-09 06:38:01 -07:00
Arun Kumar Neelakantam 1eda71f1b3 soc: qcom: glink_pkt: Initialize the glink handle to NULL
In error case the glink_open() API returns different error codes
in pointers and assigning these error code pointer to the handle
will fail NULL check conditions.

Initialize the handle pointer to NULL when glink_open() fails.

Change-Id: I2ea24005c127da4ff5d8aabbeaac9944d061c518
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2015-04-09 14:44:11 +05:30
Arun Kumar Neelakantam 08d6ff8b29 soc: qcom: glink_pkt: Remove mmap() function
mmap() implementation requires the page align address to map
but the glink rx buffers are not always page align so mmap() API
is not working correctly.

Remove the mmap() API implementation.

Change-Id: Ic01e938a665e08b3004bb8e86b05b92195c7d6f5
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2015-04-09 14:38:22 +05:30
Arun Kumar Neelakantam a02a6c468c soc: qcom: qmi: Read remove client control message
Kernel QMI interface is not reading the remove client command
posted to control ports and hence not releasing the port specific
wake lock acquired by the IPCROUTER.

Read the remove client command to release the wake lock held by
IPCROUTER.

CRs-Fixed: 815051
Change-Id: I77a6c40d59d84887b9df83c646dcf79174b0a68a
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2015-04-08 23:25:27 -07:00
Linux Build Service Account 10f39688ce Merge "msm: rpm-stats: Add support to get updated master stats" 2015-04-08 22:11:29 -07:00
Linux Build Service Account 51a0c56120 Merge "msm: spm: Configure Q2S settings with SPM Disabled" 2015-04-08 22:11:26 -07:00
Linux Build Service Account c61aa5e698 Merge "msm: spm: Confirm spm register writes complete with a read" 2015-04-08 22:11:25 -07:00
Venkatesh Yadav Abbarapu c24eb911d1 soc: qcom: pil-femto-modem: Modify q6-freq-row maximum
The maximum Q6 frequency row value is now one less than previous
due to a redundant row in the table.

Change-Id: I4dd6bdc4fdd2630a64a06c092553d3681777dd6b
Acked-by: Jennifer L. Zenner <jzenner@qti.qualcomm.com>
Signed-off-by: Venkatesh Yadav Abbarapu <quicvenkat@codeaurora.org>
2015-04-08 07:49:41 -04:00
Arun Kumar Neelakantam fdbdf722c1 soc: qcom: sleepstate: Send interrupt on state update
SMP2P interrupt is masked to avoid waking up the remote core on
modifying the sleep state bit, but the remote side cannot always
poll for the awake status.

Trigger the SMP2P interrupt to notify the remote core about item update.

Change-Id: I898695558e25d2c0a753f0811a5ea5f30e5deedf
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2015-04-07 05:32:00 -07:00
Jeff Hugo e39569f905 soc: qcom: glink_smem_native_xprt: Make poll() atomic
A Glink client requires that the poll processing be atomic and cannot
tolerate a context switch.  Change the poll() implementation so that packet
processing is done on the calling context.

Change-Id: I0d429691a7dd01ebc1ddf2357e6115984f6043cc
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
2015-04-07 05:21:29 -07:00
Linux Build Service Account 120e3b2b03 Merge "msm: cpu: Add l2 and core initialization sequence for msmterbium" 2015-04-05 08:30:25 -07:00
Linux Build Service Account 7480eabff7 Merge "soc: qcom: glink: Enable G-Link verification from sensors processor" 2015-04-04 23:47:41 -07:00
Linux Build Service Account c83ac00393 Merge "soc: qcom: glink_ssr: Handle multiple link-up notifications correctly" 2015-04-04 05:38:45 -07:00
Linux Build Service Account f522fd2201 Merge "soc: qcom: glink: Fix race condition for dummy transport deletion" 2015-04-04 05:38:45 -07:00
Karthikeyan Ramasubramanian a03c4cd95d soc: qcom: glink: Enable G-Link verification from sensors processor
Add support in G-Link Loopback Server to open the control channel towards
sensors processor.

CRs-Fixed: 805925
Change-Id: Ie0266f51199b1a8ccf1b18aee6bead2c3c7c93b8
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2015-04-03 14:12:48 -07:00
Srinivas Ramana 13102a14c6 msm: cpu: Add l2 and core initialization sequence for msmterbium
L2 and core initialization sequences on msmterbium are different
from existing targets, so add the new sequences.

Change-Id: I9660d4cc7d6b8c39b2fbdb2d360bb221205aac68
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2015-04-02 23:34:35 +05:30
Steven Cahail d2134075e3 soc: qcom: glink_ssr: Handle multiple link-up notifications correctly
The glink_ssr driver currently attempts to open a new glink_ssr channel for
every link_up notification it receives. Since each subsystem information
structure only stores one channel handle, this can cause communication
failures when more than one link_up notification is received for the same
edge.

Once an edge's glink_ssr channel is opened successfully, unregister from
receiving link-up notifications on that edge. When the channel is closed,
re-register for notifications on that edge. This ensures that only one
glink_ssr channel is opened for each link-up notification.

Change-Id: I45dd649e1b003e0398e07b478eece10d0d5271b8
Signed-off-by: Steven Cahail <scahail@codeaurora.org>
2015-04-01 15:08:21 -07:00
Atish Kumar Patra a91ec3d323 soc: qcom: glink: Fix race condition for dummy transport deletion
In ssr/unregister_transport scenario, remote disconnect is faked
to all clients and the channels are moved to a dummy transport
to be closed in future. The dummy transport is deleted once all
the channels on it are fully closed. This may lead to a race
condition where the dummy transport can be deleted while some
channels are still being moved to it.

Fix the race condition by first moving the channels to dummy
transport together and fake remote disconnect to the clients
one by one so that dummy transport will be deleted only
after all the channels are closed.

Change-Id: I0a8e78e562594751b2984f4df4d6030c5abb5d41
Signed-off-by: Atish Kumar Patra <apatra@codeaurora.org>
2015-04-01 15:08:53 -06:00
Pratik Patel ebf34a82b2 soc: qcom: memory_dump_v2: write 64-bit address to imem
Use memcpy_toio() to write 64-bit address to imem instead of
writel_relaxed which is causing truncation as its a 32-bit api.

Change-Id: I0c0922e1eeff72bacb788bd70e6381e9c1dcf7fd
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
2015-04-01 10:35:42 -07:00
Linux Build Service Account 880636a2dd Merge "soc: qcom: mpm: Fix the offset calculation of virtual mpm fields" 2015-03-30 21:54:00 -07:00
Linux Build Service Account 757d8e9add Merge "soc: qcom: glink_smd_xprt: Add support for streaming channels" 2015-03-28 15:12:43 -07:00
Linux Build Service Account 3088a9b880 Merge "soc: qcom: glink: Allow NULL packet private in queue_rx API" 2015-03-28 15:12:42 -07:00
Linux Build Service Account 76c2cd761b Merge "soc: qcom: glink_pkt: Decouple the channel name and device name" 2015-03-28 09:49:46 -07:00
Jeff Hugo 4753a53bc1 soc: qcom: glink_smd_xprt: Add support for streaming channels
Some legacy SMD clients still use the deprecated streaming channel type,
but are looking to migrate to Glink.  To facilitate this, add support for
correctly handling streaming type SMD channels.

Change-Id: I3371fc9d2d94d99cdc3e5a58cccf507ee1dbd985
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
2015-03-25 13:02:29 -07:00
Jeff Hugo 2bba452302 soc: qcom: glink: Allow NULL packet private in queue_rx API
The glink_queue_rx_intent API accepts a void * as one of its parameters
for use by the client.  The client can choose to use this parameter as an
opaque value, which is then returned to the client when the intent is
consumed.  It should be valid to allow the client to specify NULL for this
parameter, indicating that the client does not require this facility.  The
implementation of the glink_queue_rx_intent API does not allow NULL to be
specified.

Fix the glink_queue_rx_intent API to allow the client to specify a NULL
private pointer, which is a valid usecase.

Change-Id: I09eb32b727999e6d66404148a40ecde2f895fa7e
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
2015-03-25 13:36:26 -06:00
Arun Kumar Neelakantam a1938670f4 soc: qcom: glink_pkt: Decouple the channel name and device name
Glink packet driver create the device node with same name as
the channel name which creates dependence for clients on channel name.

Decouple the channel and device name to allow clients to write generic
drivers  using same device node by removing the dependence on transport
channel names.

Change-Id: I60ef9dbd14b442a9bc05d73f8489c43b79a35b85
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2015-03-24 11:32:56 +05:30
Linux Build Service Account cdad5296d9 Merge "soc: qcom: msm_audio_ion: append IOVA with SID info" 2015-03-23 19:24:37 -07:00
Archana Sathyakumar 470d2520dd soc: qcom: mpm: Fix the offset calculation of virtual mpm fields
Virtual mpm enable, detect and detectcl3 and status writes are 3
words off the actual field position. Fix the calculation.

Change-Id: I7df1124023266eb1c09d0f40e3653f7bf9a4951a
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
Signed-off-by: Anil Kumar Mamidala <amami@codeaurora.org>
2015-03-23 12:54:15 +05:30
Linux Build Service Account 6d55055355 Merge "soc: qcom: qmi: Fix service event notification" 2015-03-23 00:01:18 -07:00
Linux Build Service Account 4a8ceac494 Merge "soc: qcom: bam_dmux: Sync SSR with disconnect/reconnect" 2015-03-21 21:52:58 -07:00
Linux Build Service Account 6a2ff39276 Merge "memshare: Add query size api support for clients" 2015-03-21 21:52:55 -07:00
Linux Build Service Account 50b55fb045 Merge "soc: qcom: glink: Fix channel cleanup behavior" 2015-03-21 17:25:17 -07:00
Jeff Hugo 00a0fd1c6d soc: qcom: bam_dmux: Sync SSR with disconnect/reconnect
The disconnect and reconnect bam events access the hardware which may not
be permitted during subsystem restart due to the risk of a stalled access.

Put an explicit sync event between SSR and the disconnect/reconnect events
to eliminate any risk of hardware accesses which are not permitted.

CRs-Fixed: 771505
Change-Id: I206c1cf6f18955320aa20c1dac56eb2173675c4c
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
2015-03-20 14:32:07 -06:00
Linux Build Service Account 9a6003209b Merge "soc: qcom: msm_perf: Optionally compile out hotplug tunables" 2015-03-20 08:19:22 -07:00
Katish Paran 95c114c39b memshare: Add query size api support for clients
Clients can now query for the maximum size allowed for
themselves. Depending on the maximum allowed size for the
client, each of them can send allocation request accordingly.

Change-Id: Iee337ee617b935c04cbb8956fcc51c90d000506b
Signed-off-by: Katish Paran <kparan@codeaurora.org>
2015-03-20 14:13:17 +05:30
Aravind Kumar dca583bccf soc: qcom: msm_audio_ion: append IOVA with SID info
For some MSM targets stream ID of ADSP SMMU used for
Audio IO buffers needs to be appended to IOVA addresses
before the address is shared with ADSP. Add a mechanism
to pass the Stream ID information from devicetree and
append to the buffer addresses in the Audio ION driver.

Change-Id: Id243dfb1dff89f044222206a49088b091a70a362
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
2015-03-20 13:14:30 +05:30
Linux Build Service Account 5699c0e32d Merge "ASoC: qcom: qdsp6v2: configure apr using the device tree" 2015-03-19 19:21:49 -07:00
Atish Kumar Patra 21ea0b6577 soc: qcom: glink: Fix channel cleanup behavior
The existing channel clean up process wait till all clients
invoke close to finish the link_down process. This may lead
to undesired delay for ssr/unregister transport case.

Fix the channel clean up by deleting the channel context in
glink_close after faking a close_ack.

Change-Id: Id25e591fba504939bc7cdeaebc22cd70c8943bdd
Signed-off-by: Atish Kumar Patra <apatra@codeaurora.org>
2015-03-19 14:10:07 -06:00
Karthik Parsha e6852ff090 msm: spm: Configure Q2S settings with SPM Disabled
When configuring Q2S the corresponding SPM needs to be disabled.
If the SPM is enabled, the SPM may end up getting triggered while
the q2s is being configured.

Also relocate the Q2S register initialization to avoid initializing
the register twice for the online cpus.

Signed-off-by: Karthik Parsha <kparsha@codeaurora.org>
Change-Id: If8857e05c403e9bd4cca3fd008761bd48319b8f3
2015-03-19 10:03:59 -07:00
Karthik Parsha 0e25748858 msm: spm: Confirm spm register writes complete with a read
After every register write, read the same register to confirm
that the write has complete. Also, remove any memory barriers,
that are redundant due to the register read.

Signed-off-by: Karthik Parsha <kparsha@codeaurora.org>
Change-Id: I4d310d6b9d99bf5781fe36894d2275e1a23c501a
2015-03-19 10:01:51 -07:00
Karthik Parsha c048b032e5 msm: rpm-stats: Add support to get updated master stats
RPM Master stats now supports additional info such as time stamps
for last entered and last exited from XO and total accumulated time
spent in XO shutdown. Add support to get and print this info when
rpm master stats is queried.

Change-Id: I06a0fd42e0c1dfaa9e41e02ca3cccafca62a501d
Signed-off-by: Karthik Parsha <kparsha@codeaurora.org>
2015-03-18 10:16:05 -07:00
Prachee Ramsinghani 3ab61eba31 soc: qcom: msm_perf: Optionally compile out hotplug tunables
If msm_performance module and some other module with the
core hotplug capability (like core_ctl) co-exist and
both of them try to hotplug the cores system inconsistencies
can occur. To avoid such behavior sysfs nodes needed for hotplug
support in msm_performance module are compiled out.

Change-Id: I25e8404ce0581e718d6b55cd0e1f5c7da8e92db5
Signed-off-by: Prachee Ramsinghani <pracheer@codeaurora.org>
2015-03-18 12:30:11 +05:30
Steven Cahail 58464d1427 soc: qcom: glink_smd_xprt: Remove erroneous uses of mutex
The mutex protecting the in_ssr flag in the edge information structure is
locked and unlocked in places where this flag is already protected by an
RCU, and in functions which may be called in atomic context.

Remove these uses of the mutex. Protection of the flag is maintained by the
RCU in these cases.

Change-Id: I2be88be0b42fd403437ff53d9d6acd7f1c3f4fa1
Signed-off-by: Steven Cahail <scahail@codeaurora.org>
2015-03-17 17:10:24 -06:00
Linux Build Service Account 765b4432b0 Merge "soc: qcom: glink_smem_native_xprt: Store interrupt state" 2015-03-17 11:16:31 -07:00
Linux Build Service Account beb9035737 Merge "soc: qcom: glink_smd_xprt: Store interrupt state" 2015-03-17 11:16:30 -07:00
Steven Cahail 223c63a2d7 soc: qcom: glink_smem_native_xprt: Store interrupt state
The interrupt state (whether the interrupt is enabled or disabled) is not
stored in the edge information strucutre in the SMEM native transport. This
state could be useful for debugging and should be stored.

Modify the edge information structure to store the current interrupt state,
and modify the transport to update this state when it changes.

Change-Id: I7726bfbfb94e8a7d94ae1d1d7c608079348930e9
Signed-off-by: Steven Cahail <scahail@codeaurora.org>
2015-03-16 14:43:54 -06:00
Steven Cahail 71f8e9af5b soc: qcom: glink_smd_xprt: Store interrupt state
The interrupt state (whether the interrupt is enabled or disabled) is
not stored in the edge information structure in the SMD transitional
transport. This state could be useful for debugging and should be
stored.

Modify the edge information structure to store the current interrupt
state, and modify the transport to update this state when it changes.

Change-Id: I549a21364f2754a1af819b53cf00dd272855ce6d
Signed-off-by: Steven Cahail <scahail@codeaurora.org>
2015-03-16 14:31:35 -06:00
Linux Build Service Account 8806521ff4 Merge "soc: qcom: glink_ssr: Check callback data pointer before dereference" 2015-03-16 12:30:39 -07:00
Linux Build Service Account e965326e3d Merge "soc: qcom: glink_smd_xprt: Check for SSR when processing control events" 2015-03-16 12:30:38 -07:00
Linux Build Service Account cb1bb084d2 Merge "soc: qcom: glink_ssr: Export notify_for_subystem() function for testing" 2015-03-16 12:30:36 -07:00
Aravind Kumar 09fdf383ee ASoC: qcom: qdsp6v2: configure apr using the device tree
APR services can be implemented on the adsp block which may be present
on modem/lpass depending on the msm architecture.
This change will enable the apr driver to read from device tree,
the hardware block on which APR services are implemented and expose them
to other modules

Change-Id: I967c29a6c60df600b0b5c9e0de58a5491c31a478
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
2015-03-16 11:47:47 -07:00
Atish Kumar Patra 9ea586a212 soc: qcom: qmi: Fix service event notification
Currently QMI interface registers a platform driver to know about
service arrival/exit events. This causes problem for the clients
who registers their callback in probe function.

Fix the service event notification by creating a control port to
receive specific service events.

Change-Id: Ife889ac76a98e93dc7f23296c86e646b181f3b35
Signed-off-by: Atish Kumar Patra <apatra@codeaurora.org>
2015-03-16 11:37:46 -06:00
Linux Build Service Account 49312ee567 Merge "soc: qcom: cache_dump: Don't assume phys addresses can't exceed 4GB" 2015-03-16 00:56:12 -07:00