Userspace does not have access to QGKI configs,
so remove redundant QGKI config checks.
Change-Id: Ia8126e976e5189c0160044f1656709a5692743db
Signed-off-by: Meng Wang <mengw@codeaurora.org>
This reverts commit dc7bb91d61.
The change has been done in userspace. This change is not
needed anymore.
Change-Id: Ie49a4263a2a4760e0538cee4d462654f1f8ac21f
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Avoid any host driver ops access after register driver gets killed
by marking it as NULL.
Change-Id: Idd268d5d8d31569c4272fde566866c4d79bc1cad
Signed-off-by: Yue Ma <yuem@codeaurora.org>
As there is no increment in ref_count on context when debug_fs is
disabled, ensure there is no decrement in ref_count either.
Change-Id: I8da258a78a8b82ee967b1c944209f6777439e682
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
Client drivers may successfully register with a doorbell even before
doorbell capids are known to Linux. However, we do need to know capids
for send, read, reset, and mask functions. Here, we mirror the behavior
of message queues by placing the calling thread in a waitqueue until the
capids are populated by RM.
Change-Id: Ie1cf98d0fe344bb2a878bb655db78705d4292ff9
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
The neuron channels may init and probe before the secondary vm is
loaded and the resources queried from resource manager. This results
in either a blocking call or EAGAIN returned when sending a doorbell.
Move the msgq_init call from the probe to the channel sync thread. This
will ensure the init thread can continue if the doorbell send api needs
to block or busywait loop.
Change-Id: I0f5562968d59a3dc0a361aca9e4e60ffebcb70be
Signed-off-by: Chris Lew <clew@codeaurora.org>
Currently, doorbell registration fails if a client driver attempts to
probe before the doorbell probe since data structures are not
initialized. Add an initialized flag which registration functions can
check if data structures are initialized.
Doorbell RX registration also fails if done before cap table is
populated since RX IRQ is not yet known and RX registration attempts to
register IRQ handler. IRQ registration should happen when populating the
doorbell capabilities regardless of whether a client has registered.
Change-Id: I448b291a5885683bee48b2eb34b51faba69a03bf
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Currently, the cap-ids for doorbells are initialized to 0. However, 0 is
a valid value for cap-id. Instead, initialize cap-ids to HH_CAPID_INVAL
in the doorbell driver.
Change-Id: Ia1588ed372f0657444e1ab39eab9e6c1e6d3d156
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
RM-VM(Resource Manager) send various vm status notifications(INIT/READY/
RUNNING etc) back to primary VM while PIL loader is loading the VM
images. Listern to these notifications and make a call to get the
hypervisor resources to configure doorbell and message queues.
Change-Id: Ia378a1df82ef960e2c11bf715100e38de82b670c
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
VMs need to make GET_HYP_RESOURCE call to get resource information (dbl,
msgqs) associated between VMs. If the caller VM want to get resources
associated with another VM, caller VM has to supply the VMID of the
end point. Add support to get hypervisor resources.
Change-Id: Id5f16796ba2a84917c9a072cfeb36d24010e34da
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
While attempting to block low power modes before sending
commands to modify channel state, make sure that execution
environment is in mission mode as we may run into a race
condition where a forced suspend/resume cycle does not get
a chance to run.
Change-Id: Ibc7ca5a52036e18677bb597dc0cd95be96d6698a
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
When attempting to latch the remote timer value, host should be
using internal sequence numbers that change every time a client
calls the exposed API and rings the time synchronization
doorbell so that device can identify them as different requests.
Change-Id: I2a38b63c6b942df032f096b17b1fdbc2abdb171b
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Some devices support doorbell method to collect time
synchronization information. Add support from host for the
updated way of handling initialization and advertising
support.
Change-Id: I5bc82b946fd64927a2a88babc8d383e5fa664cf6
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Allow a GPU definition to specify a compatible string to match a GPU
target. If specified a matching compatible string will take priority
over the GPU chipid match.
Change-Id: Ic0dedbadd998dcc8e8f9bc5de2e383870258ad48
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Remove the legacy platform id_table and just rely on the standard
of_match_table instead. Use the standard macro for specifying
the match table pointer and set the MODULE_DEVICE_TABLE.
Change-Id: Ic0dedbad84f80b28d1885a7326324eb67ef97d9b
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
While calling hvc_instantiate, current log buffer is flushed through the
newly registered console driver. Presently, no call was made to
CONSOLE_OPEN, thus RM returns an error for all of these CONSOLE_WRITEs.
Move the CONSOLE_OPEN prior to calling hvc_instantiate.
Change-Id: Ia8d02f5cff819fee54ec66c4df140d0af216baa5
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Adding and removing dev PM QoS notifications uses mutex lock and
therefore cannot be called from CPU starting notifications. Update QoS
notifier in a stage when interrupts are allowed.
Change-Id: I21ce6a23d51e97d9f05e96a1772c028c4760ec7d
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Allocate memory on DDR for event RP and providing it
to the GSI context.
Accessing the event RP using the DDR pointer instead
of reading the GSI register.
Change-Id: Ib25ae4ee8abbc73a74f24d360f64b1295a9d4520
Acked-by: Nadav Levintov <nadavl@qti.qualcomm.com>
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
Print the rt_runtime allowed for a given rt_rq in throttling debug
message dump. This helps in catching suboptimal RT runtime tuning
issues.
Change-Id: I58027cb94500cf93eb42b44dcec9a5e68670b5e9
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Measure SPI transactions time. This enables profiling the current
performance of the driver and assess future enhancements.
Change-Id: I5d0ff6ad18061862c0fff9097a03ddabe60e22e4
Signed-off-by: Gidon Studinski <gidons@codeaurora.org>
This optimization reads the data over SPI in a single burst size
transaction, or in multiple equal sized transactions. The equal size
prevents reprogramming of the SPI length register.
Change-Id: Ie1cfa73aa72a796ab7af5c1d9151dbce8414de58
Signed-off-by: Gidon Studinski <gidons@codeaurora.org>
Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
Allow mode change from INITIALIZED to READY_STOPPED only after SPI has been
initialized. This change will prevent mode change before SPI is ready for
operation.
Change-Id: I12b52bb9c9726c2d8e615fa0c504d01c7b1e26e3
Signed-off-by: Gidon Studinski <gidons@codeaurora.org>
Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
The new definition separates error code report from burst_size. This
promotes uniformity in the ioctl definitions and prevents the usage of
errno.
Change-Id: I2145a8ba15cb25a82c1d1a4d4c3465e56f4358d6
Signed-off-by: Gidon Studinski <gidons@codeaurora.org>
Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
wait_event_interruptable_timeout() returns a positive number in a success
case. This positive number needs to be set to 0 so that the calling
function recognizes it as a success.
Change-Id: Ic8565f95976f98682334da84d950257d43d6a320
Signed-off-by: Gidon Studinski <gidons@codeaurora.org>
Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
The CPU node would have the sysfs entry which would indicate the max
limited frequency due to throttle.
Change-Id: I05b82be220111ab7a384349d620e4731d76b7834
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Add code to pick hang data offset based on deviceID.
Change-Id: I865fc90ea558d2626672b51c5cecadfdf93358b3
Signed-off-by: Mohammed Siddiq <msiddiq@codeaurora.org>
This is a snapshot of the RPM-SMD driver functionality as of
'commit 0453f0e705df8b("move rpm-smd initcall to
postcore_initcall_sync")' on msm-4.14 branch.
Change-Id: Ie70bca9c28ae2339b45715f7d82839f39e733832
Signed-off-by: Raghavendra Kakarla <rkakarla@codeaurora.org>
Apparently, serial core calls into the serial driver's .set_termios
and .get_mctrl uart_ops callbacks without checking if it exists or
not. Hence, implement a dummy definition of the callback to satisfy
the serial core.
Change-Id: Ic2e9eda5fb8b20be55c59f93ee05c2aa51a6362e
Signed-off-by: Raghavendra Rao Ananta <rananta@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: Rishabh Bhatnagar <rishabhb@codeaurora.org>
[rananta@codeaurora.org: Resolved trivial merge conflicts]
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>