Commit graph

99 commits

Author SHA1 Message Date
Steven Cahail
ea74beeae9 soc: qcom: glink: Add RX intent request timeout to G-Link channels
During glink_tx(), G-Link can wait for an unlimited amount of time for
the remote side to queue an RX intent. In some cases, e.g. SSR, the wait
must be restricted to a short time, but in the current implementation,
glink_tx() can continue to block indefinitely.

Add a configurable timeout value to the G-Link channel context, which is
set in the channel open configuration. If the value is set to 0, treat
it as an infinite timeout. This allows a timeout to be put in place by
the client for sensitive cases such as SSR where a very limited amount of
time can be spent waiting for an intent.

Change-Id: I1e480fac286d285f871fe3059de7ae761fc4581e
Signed-off-by: Steven Cahail <scahail@codeaurora.org>
2016-03-23 21:13:25 -07:00
Amir Samuelov
09e5b18869 soc: qcom: add secure processor communication (spcom) driver
This driver supports communication with secure processor subsystem
over glink transport layer.
The communication is based on using shared memory and interrupts.
This driver exposes interface to both kernel and user space.

Change-Id: Iec5fc78c8370002643b549e43015c06b09d8ab8b
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2016-03-23 21:12:11 -07:00
Junjie Wu
f4c9a4a1f9 qcom: core_ctl_helper: Add wrapper for CPU hotplug
Different kernel version needs to use different kernel APIs for
hotplug. Add wrapper for CPU hotplug so that external module can be
used across different kernel releases.

Use device_online/offline() API for CPU hotplug.

Change-Id: Id21855f4ddc62bc9e9e6b45a856c245fd18d1514
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
2016-03-23 21:10:44 -07:00
Bryan Huntsman
bcbb9ead97 qcom: core_ctl: Add support functions for core control
Add support functions for core control driver. Also introduce
Kconfig for enabling core control.

Change-Id: Ic127b6ed7d9450338883b13d9c42abfe49ff8b35
Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
[satyap: trivial merge conflict resolution]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2016-03-23 21:10:43 -07:00
Neil Leeder
303b5bd525 qcom: add support for kryo CPU PMU
The performance Monitor Unit on the kryo processor
has additional performance events over the architected
events in ARM processors. This adds support for these
additional events.

Change-Id: I90356b7d2cfebd9d985ec6f92c6d000be9911a7c
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
[satyap: trivial merge conflict resolution and remove check_event &
         map_event functionality to align with kernel 4.4]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2016-03-23 20:48:23 -07:00
Lakshmi Narayana Kalavala
a47c5d5076 msm: camera: Update camera drivers
Add changes to update camera drivers to:

1. Update necessary Kconfig files to support camera driver
compilation.
2. Support minor changes to V4L framework.
3. Export uapi headers to header_install export location.

Signed-off-by: Seemanta Dutta <seemanta@codeaurora.org>
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2016-03-23 20:48:08 -07:00
Lakshmi Narayana Kalavala
12d7df3314 msm: camera: Add all camera drivers
Add all camera drivers by picking them up from
AU_LINUX_ANDROID_LA.HB.1.3.1.06.00.00.187.056 (e70ad0cd)

Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2016-03-23 20:48:07 -07:00
Sudheer Papothi
be1a516dcb ASoC: msm: Add Audio drivers for MSM targets
Add snapshot for audio drivers for MSM targets. The code is
migrated from msm-3.18 kernel at the below commit/AU level -

AU_LINUX_ANDROID_LA.HB.1.3.1.06.00.00.187.056
(e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1)
(Promotion of kernel.lnx.3.18-151201.)

Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:11:25 -07:00
Saravana Kannan
6be4cb0755 PM / devfreq: devbw: Add suspend/resume APIs
Absence of traffic is guaranteed when the device sitting behind a devbw
device is suspended. In such cases, it is a waste of power to make non-zero
bandwidth votes or to scale the devbw device. So, provide APIs to
suspend/resume the devbw device as needed.

Change-Id: Id58072aec7a9710eb917f248d9b9bd08d3a1ec6a
Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
2016-03-23 20:03:54 -07:00
Matt Wagantall
d30f7c6607 PM / OPP: Add missing devfreq_devbw.h header
When devfreq_devbw was added, the header was omitted since it was
unused.  Add it now so that clients can call APIs exported by this
driver.

Change-Id: I39d52f6bf5ca65ab85ae573abbe8cff8796e5971
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
2016-03-23 20:03:54 -07:00
Lior David
add338b4a5 msm_11ad: add support for subsystem_restart framework
Add 11ad as a subsystem (WIGIG) within the subsystem_restart
framework, in order to allow proper support for recovery from
11ad firmware crashes, and support automated collection of
crash dumps for offline analysis and bug reporting.

Change-Id: I7acbe8860e046cdba2ce027f91ed2fa995a70c70
Signed-off-by: Lior David <liord@codeaurora.org>
[merez@codeaurora.org: fixed merge conflicts]
Signed-off-by: Maya Erez <merez@codeaurora.org>
2016-03-23 19:58:03 -07:00
Yue Ma
791a6a69a5 net: icnss: Add snapshot of icnss driver
This is a snapshot of the icnss driver and associated files as of
msm-3.18 commit:

e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1 (Promotion of kernel.lnx.
3.18-151201.)

Signed-off-by: Yue Ma <yuem@codeaurora.org>
2016-03-22 11:16:42 -07:00
Yue Ma
f590819cde net: cnss: Add snapshot of cnss driver
This is a snapshot of the cnss driver and associated files as of
msm-3.18 commit:

e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1 (Promotion of kernel.lnx.
3.18-151201.)

Signed-off-by: Yue Ma <yuem@codeaurora.org>
2016-03-22 11:16:41 -07:00
Prasad Sodagudi
805c18d71c lib: spinlock: Trigger a watchdog bite on spin_dump for rwlock
Currently dump_stack is printed once a spin_bug is detected for rwlock.
So provide an options to trigger a panic or watchdog bite for debugging
rwlock magic corruptions and lockups.

Change-Id: I20807e8eceb8b81635e58701d1f9f9bd36ab5877
[abhimany: replace msm with qcom]
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:16:32 -07:00
Rohit Vaswani
77d758e283 lib: spinlock: Cause a watchdog bite on spin_dump
Currently we cause a BUG_ON once a spin_bug is detected, but
that causes a whole lot of processing and the other CPUs would
have proceeded to perform other actions and the state of the system
is moved by the time we can analyze it.
Provide an option to trigger  a watchdog bite instead so that we
can get the traces as close to the issue as possible.

Change-Id: Ic8d692ebd02c6940a3b4e5798463744db20b0026
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
2016-03-22 11:16:31 -07:00
Puja Gupta
35012c464e soc: qcom: Add generic irq handler for secure processor
This patch adds the code to handle watchdog, err_ready and other
interrupts from secure processor subsystem to the PIL driver.

CRs-Fixed: 972423
Change-Id: I65455229ee14bd4da357358ac3977f2137f3c07e
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
2016-03-22 11:16:21 -07:00
Mitchel Humpherys
e2dc9b3652 msm: secure_buffer: Add missing include
secure_buffer.h makes use of the scatterlist structure, but doesn't
include the header file that defines it.  Until now we've been getting
lucky that all users of secure_buffer.h have been including the
scatterlist header file themselves, but this might not always be the
case.  Add the missing include.

Change-Id: If7598c26a1ef3551132c6eb62ac9bd6d447654d0
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2016-03-22 11:14:21 -07:00
Neeti Desai
f6ee2b6ea3 msm: secure_buffer: Update the hyp_assign_phys() api
The hyp_assign_phys() api can be called by different
usecases where it is not guaranteed that the source vm is
always VMID_HLOS.

Pass the responsibility of setting the source_vm to
caller of the function.

Change-Id: I3851a6681f49d4bb6fa5b7a889a16a158497e9e6
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
2016-03-22 11:13:01 -07:00
Neeti Desai
1b458c04b4 msm: Return -ENOSYS when secure buffer apis are not implemented
The return value -EINVAL is returned in the case of invalid
arguments, and is not the correct value when the function is not
implemented.

Return -ENOSYS instead.

Change-Id: I196537f121d5a290fec74e2b7bcb1cfd490468c7
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
[pdaly@codeaurora.org Resolve minor conflicts]
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-03-22 11:12:48 -07:00
Pratik Patel
ebce13ea36 soc: qcom: hvc: add hypervisor call support
Add API support for calling into the hypervisor. This will allow
various drivers to avail hypervisor services.

Change-Id: I0a0e8f8fe13a550ad20c5421b712e207933c82f3
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
[pdaly@codeaurora.org Resolve minor conflicts]
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-03-22 11:12:06 -07:00
Mitchel Humpherys
b1399c8015 soc: qcom: add library for SMMU TZ interface
Some targets require calling into TZ for various bits of SMMU
configuration.  Add a library to provide a clean interface for such
configuration.

Change-Id: I1dc5cd21d4a09e321039d69cc760eaf6f356c6cf
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
[pdaly@codeaurora.org Resolve minor conflicts]
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-03-22 11:11:47 -07:00
Zhen Kong
848e0a86b6 qseecom: add snapshot of qseecom driver
This snapshot is taken as of msm-3.18 commit e70ad0cd
(Promotion of kernel.lnx.3.18-151201.)

Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2016-03-22 11:10:18 -07:00
Karthikeyan Ramasubramanian
a8d687d1ee soc: qcom: Add snapshot of System Health Monitor
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:08:47 -07:00
Karthikeyan Ramasubramanian
cdb2ce4239 soc: qcom: Add snapshot of QMI
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:08:08 -07:00
Karthikeyan Ramasubramanian
29b6603c1e soc: qcom: Add snapshot of SMEM_LOG Driver
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:07:55 -07:00
Jeremy Gebben
bfa70fb909 msm: secure_buffer: fix stub functions
All of these need to be 'static inline' to avoid multiple
definition problems when MSM_SECURE_BUFFER=n.

Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2016-03-22 11:07:50 -07:00
David Keitel
e1395a4987 soc: qcom: add snapshot of PIL, SSR and SYSMON drivers/libraries
This is a snapshot of PIL, SSR and SYSMON drivers and libraries as
of msm-3.18 commit
	5cef33a285e91869cebe40a25e6294ae1e5fc9cc
	(Merge "ASoC: msm: Update the AFE clock API support")

Change-Id: Ibebddee32b15fbcb5b18cceac43769d3309e609c
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
2016-03-22 11:07:41 -07:00
Mahesh Sivasubramanian
c184ee865f soc: qcom: idle: Snapshot of idle/sleep driver as of msm-3.18
This is a snapshot of the Sleep driver and realted functionality as of
e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1 on msm-3.18 branch

Change-Id: I98fec26849898c5c66abbb1b094439780c23964d
2016-03-22 11:07:18 -07:00
Neeti Desai
a20c28af03 msm: Add secure vmid for msa
For sharing the memory between hlos and modem,
a new secure vmid is needed to be used in the
assign api. Define that.

Change-Id: Ibcddbafeb1fc430aae3fcda7c609bca4d81e57a9
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
2016-03-22 11:04:50 -07:00
Mitchel Humpherys
8a9d07bc98 msm: secure_buffer: Add helper function to convert VMIDs into strings
It can be useful to convert secure VMID values into strings.  Provide a
helper function to do so.

Change-Id: If907a0bac92c5d164154c0e5dfe67933115163c8
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2016-03-22 11:04:49 -07:00
Neeti Desai
a04defd9b7 msm: secure_buffer: Update the hyp_assign_phys() api
The hyp_assign_phys() api can be called by different
usecases where it is not guaranteed that the source vm is
always VMID_HLOS.

Pass the responsibility of setting the source_vm to
caller of the function.

Change-Id: I3851a6681f49d4bb6fa5b7a889a16a158497e9e6
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
2016-03-22 11:04:48 -07:00
Shrenuj Bansal
40eb383998 msm: kgsl: Add EXEC permission to the unassign call
When calling hyp_assign to free a secure buffer we need to pass
in RWX permissions so that when the Hypervisor unmaps the buffer
and maps it back to HLOS, the HLOS is able to use the same
memory for data and instructions.

Change-Id: I71e06a81df85891fecb11c5f197acd54979d2887
Signed-off-by: Shrenuj Bansal <shrenujb@codeaurora.org>
2016-03-22 11:04:45 -07:00
Neeti Desai
3eac23bf1a msm: ion: Add secure cma heap
Add the infrastructure to support a secure cma heap
needed for secure usecases. The new heap uses
the existing cma heap infrastructure, along with adding
the assign call to assign the correct VM to the buffers
during allocation and free.

Change-Id: I0c959f46ffa6eb67128b6794e9e60c470a3d292e
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
2016-03-22 11:04:38 -07:00
Neeti Desai
5cd0d2091e msm: Update the assign api to secure buffers
The assign call apis have been updated by TZ to
include more usecases. Update the secure_buffer
api files with the same. The system secure heap
needs to be updated to reflect the change in
the api calls.

Change-Id: Idc784ddac222e6ad9f5defafc422e6e3fb88aa0c
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
2016-03-22 11:04:32 -07:00
Neeti Desai
aa786020de msm: move types and declarations to header file
Move all function declarations and types to the header
file to make the macros and definitions available even
when the CONFIG_MSM_SECURE_BUFFER is not enabled. Rename
rid of the msm_ion_secure_table and msm_ion_unsecure_table
to something more generic.

Change-Id: Ia5ca0c52f971a67c7936c64b42cd2522aa1773fa
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
2016-03-22 11:04:32 -07:00
Runmin Wang
b6b338fcc5 soc: qcom: socinfo: Add MSMCOBALT chip ID
Add MSMCOBALT chip ID and relevant macros.

Change-Id: I0f97ed3eafdc54636849a58e5dfc34750d5dcea3
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>

Conflicts:
	include/soc/qcom/socinfo.h
2016-03-22 11:02:38 -07:00
Matt Wagantall
a1df69adc5 soc: qcom: socinfo: remove APIs without any clients
socinfo exports a number of APIs left over from the days before
device tree, for targets which are no longer supported in the
current kernel. Remove these unused APIs:
 get_core_count()
 read_msm_cpu_type()
 cpu_is_*()
 soc_class_is_*()

Change-Id: I2fb23c44649f0582fb0e2523a0235470f76a3da9
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
2016-03-22 11:02:33 -07:00
Matt Wagantall
9cab115446 soc: qcom: socinfo: separate major and minor format versions
The socinfo format version includes a 16-bit major field number
field that has always been zero, but may be changed in the future
to indicate a non-backwards-compatible format change. Update
current prints and checks to properly interpret both the major
and minor components.

Change-Id: I87a6d2e3f9379662857e03bb5b7e918f699c61ab
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
2016-03-22 11:02:28 -07:00
Ian Maund
52dabc73a5 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: Iadedabf16a7bef92c582524ae6ea38b31ba26ac4
Signed-off-by: Ian Maund <imaund@codeaurora.org>
2016-03-22 11:02:26 -07:00
Abhimanyu Kapur
791e7caba5 soc: qcom: Add socinfo driver snapshot
This is a snapshot of the socinfo driver as of
msm-3.14 commit:

3bc54cf86bdc7affa7cd4bf7faa3c57fe8f8819d (Merge "msm:
camera: Add dummy sub module in sensor pipeline")

Change-Id: I6b5b866ede0e84432fad460e9d95babfdbc556fc
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:02:24 -07:00
Subbaraman Narayanamurthy
aff6914761 soc: qcom: watchdog_v2: Add support to trigger watchdog bite on panic
In certain cases during a kernel panic,the interrupts on non-panicking
CPUs are disabled. Since CPU context cannot be collected by sending IPI
to those CPUs, we're limited to debug the problem. Forcing a watchdog
bite during kernel panic will ensure us getting the proper CPU context.
Hence adding support for the same.

Change-Id: Id06030d9bc46d94209da7f0ef8c47bfd3477baf6
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
[abhimany: resolve trivial merge conflicts]
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:02:15 -07:00
Josh Cartwright
b47b146f86 power: reset: replace upstream msm-poweroff driver
This is a snapshot of the msm-poweroff driver as of msm-3.10 commit

acdce027751d5a7488b283f0ce3111f873a5816d (Merge "defconfig: arm64: Enable
ONESHOT_SYNC for msm8994")

In addition, make this driver selectable when ARCH_MSM || ARCH_QCOM.

Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
[abhimany: resolve trivial merge conflicts]
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>

Change-Id: Ifca5e017ad67cd78cbd507864fd3a0ee37d8713e
2016-03-22 11:02:14 -07:00
Devesh Jhunjhunwala
832a53931e soc: qcom: Include the kryo-l2-accessors driver in build
Add the kryo-l2-accessors driver to the build.

Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
2016-03-22 10:58:51 -07:00
Devesh Jhunjhunwala
786761b291 soc: qcom: Add kryo l2 accessors driver snapshot
This is a snapshot of kryo l2 accessors driver as of
msm-3.18 commit:

e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1 (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
2016-03-01 13:00:26 -08:00
Taniya Das
1ec7358a61 clk: msm: Add support for MSM clocks
Support added for MSM clock and modifications in the clk framework to use
the MSM clock framework.

Change-Id: Ibbcf0ffbf9d30dde2dcb0e943225ad95dd4e857d
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-03-01 13:00:24 -08:00
Abhijeet Dharmapurikar
de64ab2e86 soc: spm: Snapshot of the SPM driver from 3.18 kernel
This is a snapshot of the SPM driver from 3.18 kernel. The upstream spm.c
file is used as a idle driver. So updated spm driver from 3.18 kernel to
msm-spm.c on 4.4 kernel.

Change-Id: I73b020214fdcc7eb695cf8f5b52cf7885a0a10cd
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
2016-03-01 12:22:38 -08:00
Abhijeet Dharmapurikar
77dd355971 qpnp: Add snapshot of some qpnp, regulator and charger drivers
This snapshot is taken as of msm-3.18 commit
9da4ddc (Merge "clk: msm: clock-gcc: Associate gfx rail
voting with gfx3d branch")

Change-Id: Idd2f467f1f1863a156d1757589dfe78158f0e43f
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-03-01 12:22:31 -08:00
Karthikeyan Ramasubramanian
6c2ca35f21 soc: qcom: Add snapshot of RPM SMD Driver
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-01 12:22:30 -08:00
Karthikeyan Ramasubramanian
987bbebd9a soc: qcom: Add snapshot of G-Link driver
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-01 12:22:29 -08:00
Karthikeyan Ramasubramanian
82e136e3fd soc: qcom: Add snapshot of SMD driver
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-01 12:22:28 -08:00