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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This is a snapshot of the Sleep driver and realted functionality as of
e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1 on msm-3.18 branch
Change-Id: I98fec26849898c5c66abbb1b094439780c23964d
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>