There are Non-VM (Virtual Machine) supported target drivers which
may refer some of the APIs defined for VMs. But those drivers are
compiled irrespective of VM or non-VM configurations. Add stubs to
support to compile drivers for non vm supported targets.
Change-Id: Ibc0c2c55b3b264c43c4793f153e723f8d344423a
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
Register driver should be skipped if reboot is already in progress.
Also firmware boot timer should be stopped if register driver work
has been scheduled but gets killed later to avoid timing out because
of the reboot.
Change-Id: Iae4de860329a82416bfa58967095a4de7b509813
Signed-off-by: Yue Ma <yuem@codeaurora.org>
If RM is not set up, drivers such as ion may be frequently calling
hh_rm_get_vmid and causing a console message that a VMID could not be
found. Drivers should be correctly handling the error case, so remove
the pr_err here to not fill console messages.
Change-Id: I2026d9481b6d58a89fb2f546bf76b29566e5f3d7
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Add library for client drivers to lend interrupts to each other.
Change-Id: I4c60e0443d178e83c0bb4ec824915e4bdadb9c39
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
A VM may release a lent IRQ back to its lender. The lendee VM notifies
the resource manager that it may give the interrupt back to the lender
via its interrupt handle. The lender then must notify the lender VM that
it has released the interrupt. The lender VM must then reclaim the
interrupt via the handle.
Change-Id: Ic76f5a3692b4041bc3f260b4add06da11746f19e
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
An IRQ lender driver will likely ought to need to use the IRQ handle to
reclaim the interrupt when the lendee is done with the interrupt.
Change-Id: I0b791ecfb7b169d5cf2677d324e9aceea51feb5d
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
IRQ notify sends only a standard response without any client data to
parse. Update irq_notify to expect to not receive any client data.
Change-Id: Ie5db403a84a0b237ca34a2b06c8a1b76ec92cf79
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
VMID is represented inconsistently in payload structs. Consistently use
hh_vmid_t to reduce mistakes around sizing of vmid. IRQ notify request
payload was also incorrectly formatted according to specification.
Change-Id: I0875655f69946eb0af609c67bdfdfa0dab5c7acc
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
RM core driver can send out multiple requests in parallel to RM, e.g.
00111002302222113456111 (numbers indicate seq-id, and the recursion of a
number indicates fragments). RM can only process one request at a time
and would reject any messages unrelated to the request it was first
receiving. Thus, add a lock to enforce requests are sent sequentially.
Change-Id: I1e75dd40d7b8bf47ca4120f33c70f1ee452ba7b1
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
RM will only ever send one stream of fragmented messages to a VM.
Additionally, sequence number should not be used to track notification
fragments. We cannot use IDR sequence pool to associate fragments
with a particular connection. Thus, maintain a current connection to
directly append to when receiving continuation fragments.
Connection streams have a consistent num_fragments and message ID which
can be used to do self-sanity checks instead of sequence number. Use
these fields instead.
Change-Id: I18113868b9fd20d3c9f7f66933cdcfb8c0f29362
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Console initialization may send data to driver during call to
hvc_instantiate. Thus, these data structures must be initialized before
this call. Reorganize driver initialization to meet this requirement and
improve comments and error handling during initialization.
Change-Id: Ia7b9bc9e2244516d86695839830ff4a16863342a
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Improve print statements around errors to provide more useful
information and add hex dumps of data being sent to RM and over message
queues. Hex dump of the message is invaluable to validating whether
messages are correctly being formatted.
Change-Id: I95dc665ce00795f347d4820178e09bf43b8f31c3
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Update handling of msgq response to send/recv to update internal state of
rx_empty/tx_full.
Change-Id: I8c744b2ed1dafc9b89576eb216a790d4f59530f5
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
RM accepts "VMID 0" as meaning "self." Thus, add a vm_name "HH_SELF_VM"
which means the same. Haven RM console operates on vm_names and can use
HH_SELF_VM to talk to RM about this VM's console.
Change-Id: I7663db28497ad86a94d4a8c98f3b7068f5644915
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
This is a snapshot of drivers/irqchip/msm_show_resume_irq.c as of
msm-4.14 commit <02ff79e55ddc0aa>. (Merge "perf: don't zombie
certain events in perf_event_release_kernel").
Change-Id: I8d33455c9f482b5742023042e947f0af3d3c2335
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
[rananta@codeaurora.org: Altered the configuration option]
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
Enable voltage cooling device for lahaina. This will enable to build
voltage cooling device using CPUs sharing the same rails.
Change-Id: Ic4df305280006c60bfe3f0287138477a679237c1
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
A single CPU cluster can have CPUs with different frequency plans.
Mitigating individual CPU may or may not bring down the CPU cluster
voltage depending on the operating level of the other CPUs.
CPU voltage cooling device will provide support to apply CPU frequency
mitigation on different CPUs in a cluster to achieve a reduction in
cluster voltage. This is achieved by building a mitigation table mapping
the frequency of different CPUs based on voltage.
Change-Id: Ie09375c6c15a9f81e663fca96c5af87e0b6789c2
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
Remove the duplicated cti map for tmc-etr as only memory mode needs
the cti map.
Change-Id: I5264a41e718924cd2febb8c0e7de03623fbd7c90
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
Remove explicit parent supply management (i.e. regulator_enable(),
regulator_disable(), and regulator_set_voltage calls) from inside
of the qcom_pm8008-regulator regulator_ops callback functions.
This helps to eliminate a source of mutex deadlock introduced by
commit f8702f9e4a ("regulator: core: Use ww_mutex for regulators
locking").
Change-Id: Ib4d731d1230b3a8cf9e1094d0d63a7c99531fa9d
Signed-off-by: David Collins <collinsd@codeaurora.org>
Currently xhci halt timeout is 16ms which sometimes
leads to controller halt failure. This results in
controller accessing addresses which are unmapped
leading to SMMU faults.
This change increases the timeout to 32ms so that
controller has enough time to complete the pending
transactions.
Change-Id: Id3435e8577923536b767da42d24d528ea91e8988
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
Currently, wake-source clients are being created during every new
process init with the same device and client name, which is
unnecessary and redundant. Instead, register the secure and
non-secure wake-source clients during driver init and use the same
clients for all processes.
Change-Id: I685fafae74d18e1004c6adbfada436a33a727bef
Acked-by: Thyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com>
Signed-off-by: Himateja Reddy <hmreddy@codeaurora.org>
Fix the BCM commit bit not getting set for TCS commands that don't wait
for completion. The current code overloads the commit/wait behavior
using the same "commit" argument to tcs_cmd_gen(), which means we'll
only commit commands that wait for completion. The commit bit needs to
be set for the last command in each VCD regardless of the wait behavior.
Add a dedicated "wait" parameter to tcs_cmd_gen() to separate this
behavior.
Change-Id: I8d577f24b07de2f37f13365c43690bae954508f4
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
Change the memory allocation function to vzalloc
as there is no need for physically contiguous memory
for the client structure.
Change-Id: Ic6377953c6acc6442eea8fbee2e1798ac32ebebb
Signed-off-by: Sumukh Hallymysore Ravindra <shallymy@codeaurora.org>
Huayra PLL print registers are required to get the PLL values from
the debugfs, thus add support for the same.
Change-Id: I439f64646d5995943cf8d0ef94daf3f85cd0ae45
Signed-off-by: Naveen Yadav <naveenky@codeaurora.org>
Zonda PLL print registers are required to get the PLL values from
the debugfs, thus add support for the same.
Change-Id: Ie8df05a84c972f412ee6d612ef5a6dde2ae98f9b
Signed-off-by: Naveen Yadav <naveenky@codeaurora.org>
Lucid/Lucid5LPE PLL print registers are required to get the PLL values
from the debugfs, thus add support for the same.
Change-Id: I3a9eac33c80a98a0e612d9c7f740067aa54bde44
Signed-off-by: Taniya Das <tdas@codeaurora.org>
After sending PME_TURNOFF message via ELBI_SYS_CTRL register,
remove read back to the register to avoid possible hang.
Change-Id: Ie424006991f10f12127f9b5a07a93c291c7a2f10
Signed-off-by: Tony Truong <truong@codeaurora.org>
Instead of hardcoding XO resource address in the PDC
initialization sequence, query it from cmd-db driver
to avoid conflict with other resources when it was
hard coded incorrectly.
Change-Id: Icbe903249345f82c8208ce066a22b55a957ee289
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>