Enable MHI devices and controllers stack as they are now
present in the host directory.
Change-Id: I23d8f69150020921ac1dcf9e1463c079cc3ab309
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
This commit fixes compilation error resulting due to missing
ampersand in mhi__prepare_for_power_up API.
Change-Id: I7f23e9c67ad95374a4085d1161a6e8d9f8dbe9dc
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
In some devices we have 5 PCIe controllers. This change
enables the 5th PCIe controller.
Change-Id: Ifb4c03eff307afe7f1cd6204eb5baa19a8188570
Signed-off-by: Mrinmay Sarkar <quic_msarkar@quicinc.com>
Signed-off-by: Prudhvi Yarlagadda <quic_pyarlaga@quicinc.com>
Add support for reading tcsr configuration from device tree and
configuring tcsr register dynamically.
This change for supporting sa8195p PCIe1. The default PCIe linkage
status of PCIe1 and 2 on sa8195p is:
PCIe1: not enabled
PCIe2: x4 lane
When config the register TCSR_PCIEPHY_LINK_CONFIG to 0(default 1),
the linkage status becomes:
PCIe1: x2 lane
PCIe2: x2 lane
This change add the ability to read tcsr value from device tree.
Change-Id: Iac53f61a147a839772c8411993f3be233b142b56
Signed-off-by: Xiang Li <lixiang@codeaurora.org>
Signed-off-by: Nitesh Gupta <nitegupt@codeaurora.org>
Signed-off-by: Prudhvi Yarlagadda <quic_pyarlaga@quicinc.com>
Add support for QRTR to forward messages between network clusters. The
network subnet id's are attached to the QRTR subnodes in the MHI and
RPMSG/GLINK nodes.
The current forwarding decisions are done based on the net ids and are
wrapped in a single function for easier maintenance of forwarding
decisions later on. The function will return true once it determines
a subnet has no connection to another subnet.
The NEW_SERVER, DEL_SERVER, and DEL_CLIENT control messages should be
forwarded while the DATA and RESUME_TX commands should be passed along
to their destination node.
The nameservice is expected to send NEW_SERVER commands for it's entire
database instead of just the local service database with these changes.
This is to make sure new nodes get service notifications that came
earlier and were meant to be forwarded to the new node.
This change squashes the following commits from msm-4.14:
commit e5f6a6769ceb ("net: qrtr: Add forwarding support based on net id")
commit 4516ab18718d ("net: qrtr: avoid deadlock in case of recursive
lock for node list")
commit dc2d47cd12d3 ("net: qrtr: Only update pkts with broadcast node
ID")
commit 4277aebeff91 ("net: qrtr: Free skb if qrtr_node_lookup fails
during qrtr_fwd_pkt")
In addition fix minor format issues and update copyright.
Change-Id: Iaf01dd212b07dfbb13ec087ea0aae980cda7c2fd
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
KASAN seems to be flagging that bool
would only be 1 byte while %du would
want to write 4 bytes leading to out
of bounds.
Change-Id: I0e43b1103b882bbd61b5a0bef231efcc3d7d1e1b
Signed-off-by: Badri Sampath <quic_badris@quicinc.com>
As QoS driver takes freq value in s32 format, updated the max
vote value to FREQ_QOS_MAX_DEFAULT_VALUE, instead of UINT_MAX.
Change-Id: I5152ac65a9513ce7cafe9f72bbffc499571a0768
Signed-off-by: Varun Garg <quic_gargv@quicinc.com>
Go through pmu library to read/request perf counters for
msm_performance usecase.
Change-Id: Idfa83c6c7f18b8a85ff13992e3ff5cd65df50c10
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
There is a requirement where slimbus slave don't expect ports
to be disconnected during stream unprepare for sample rates
other than 44.1/88.2k, which is causing mute issues.
Added new slim_stream_unprepare_disconnect_port API to support
disconnect port request from clients without freeing port memory
allocated during stream prepare.
Change-Id: Idb00a1fdf15d864cb6ee82f67c0db4777434b296
Signed-off-by: Anvesh Salveru <quic_asalveru@quicinc.com>
This reverts commit 5c4cca6534.
Since upstream IPCC driver is being used now, remove downstream
driver code.
Change-Id: Icb4bc6bb1bf5ce25b11f0e5b8d6d01d1d744e13d
Signed-off-by: Huang Yiwei <quic_hyiwei@quicinc.com>
Exit with an error from mem_buf_lend_internal() if the driver hasn't
probed.
Change-Id: Ide42166c2f850197f989a228f9139d401411a914
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
Id need to be initialized in function mem_dump_alloc.
Change-Id: Iddc3b4b09ea0a3b3554e5ab16e678240dcefe79e
Signed-off-by: Mao Jinlong <quic_jinlmao@quicinc.com>
Initialize the variable "initialized" to avoid it being used
uninitialized.
Change-Id: I9c7cbedfb0cc0f7519fbc7305cb1c4f2072f61b0
Signed-off-by: Tao Zhang <quic_taozha@quicinc.com>
IPC logging and IRQ naming depend on the name variable in the glink
data structure. Add device tree name reading code that was removed
by upstream.
Change-Id: Id1c521d94b8a3c9557273d8f8b072e7e87a1b759
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
There will be non-atomic work associated with receiving the tx resume
packet from the remote. Move the handling to work function context in
preparation for the non-blocking socket blocking improvement.
In system heavy load cases the rx work queued in global worker queue is
getting delayed and causing clients request timeouts.
Create and use separate worker thread to process qrtr rx packets.
Change-Id: I2389bdcffba068258650bfbb579f8cb98a0ac928
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
synchronize_rcu() is slow and can create delays on creating/removing
sockets.
Some clients have latency requirements for spinning off a
thread that creates a client and lookup sockets for some sessions. They
close the lookup socket during this sequence which causes delays. Each
call to synchronize_rcu takes 20-40 ms which is too long.
Remove the rcu logic and change qrtr_port_lock to a spinlock so it can
be used in qrtr_port_lookup which may be used in atomic context.
Change-Id: I3244e31d3ca0599df794d3936033735bcdd3e972
Signed-off-by: Jay Jayanna <jayanna@codeaurora.org>
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
Give control port access to processes that have root user priveleges,
AID_VENDOR_QRTR user priveleges, or NET_ADMIN capabilities.
Remove the need for SYS_ADMIN priveleges because they will not be
granted on any QTI targets.
This change squashes the following commits from msm-4.14:
commit 17da4da93c96 ("qrtr: Allow net bind service capabilities")
commit 56faadfd27b4 ("qrtr: Fix NET_BIND_SERVICE logic")
commit 82ea58d60c46 ("net: qrtr: Allow control port access to
AID_VENDOR_QRTR")
commit 9db4f5803ce1 ("net: qrtr: Allow Root guid process to bind")
In addition fix minor format issues.
Change-Id: I1441cbf53eb62880333a1031334a5331c1f54a77
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
If a port tries to send a message before the name service binds to the
control port, then that message should succeed. This will allow clients
to operate normally until the name service comes online and causes a
net reset to restart all the ports.
Change-Id: Ica0a5e45df0e51f282e5bf426d11ff8e41b339c4
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
A dl callback can be received anytime after mhi_prepare_for_transfer
has been called. There is a window where the callback may happen
before the probe initializes the qrtr_mhi_dev state. Move
mhi_prepare_for_transfer after the registering the endpoint.
Once moved, the reverse can happen where qrtr will try to send a packet
before the channels are prepared. Add a wait in the sending path to
ensure the channels are prepared before trying to do a ul transfer.
Change-Id: Ib5bf34ec8c1fa56a8ce29c89449d062de7133846
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
Some transports need to know qrtr packet to read complete packet
from underlying transport.
Add API support to get the incoming packet size form qrtr header.
Change-Id: I4e4e4ab2e4c1fe0e1e1261af85a8b8618ce65bb3
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Signed-off-by: Chris Lew <quic_clew@quicinc.com>