Update RAMdisk offset to accommodate increase in DTB img
size from 2 MB to 3 MB. This is required because many targets
are now using same DTB for different platforms and the DTB size
of 2 MB was reached.
Change-Id: I31d2304aef7222bf85671fb260ba9f2193f54164
Signed-off-by: Naman Jain <quic_namajain@quicinc.com>
The Glink helioscom driver can guarantee that the packet gets queued
to the glinkpkt driver but cannot guarantee the client process will
get time to run if auto sleep is enabled. This config will help
mitigate missed packets on systems where auto sleep is too aggressive.
Use the pm_wakeup_ws_event() api so a hard wakeup can be specified.
This will ensure a resume occurs if the data coming in happens while
the device is going into suspend.
Change-Id: I774f7e402d6daad9d6625d9e1659a994a9dd7f0c
Signed-off-by: Kishore Kumar Ravi <quic_kiskum@quicinc.com>
Send rx_done after calling into client callback.
Added retry mechanism for helioscom_fifo_write and
helioscom_ahb_read to handle situations where system
suspend might happen while receiving data or sending
rx_done or other FIFO commands.
Change-Id: I497501b56e6735f5856e183eb83da5b8dda5b906
Signed-off-by: Kishore Kumar Ravi <quic_kiskum@quicinc.com>
There should not be a need to decouple the channel from rpdev in the
rpdev release since that should only happen from the close commands.
Change-Id: Ie3326104119ceb1f463bcf21f47a38e339bb0826
Signed-off-by: Kishore Kumar Ravi <quic_kiskum@quicinc.com>
Send EAGAIN on helios responding with intent NACK.
Change-Id: Ia250c7d10cb49b0f86a8a72d008be69c4dff404d
Signed-off-by: Kishore Kumar Ravi <quic_kiskum@quicinc.com>
Un-register and register of rpmsg driver is giving an error while
re-opening closed channel. Due to decoupling rpdev from channel
before unregistering rpmsg device, the device is not being removed
giving duplication error while registering device on reopen of channel.
Added support to improve logic in destroy endpoint function.
Change-Id: I62491bea239d2e373d11f3ec8a928284e3d81e7c
Signed-off-by: Kishore Kumar Ravi <quic_kiskum@quicinc.com>
Added support to avoid aborting packets after partial
send to remote side. Added check to confirm if there
is enough space in fifo to send complete packet before
sending data and short commands.
Change-Id: Idd0f3d2f30e382a5b519c25cdbac52886d40c5ac
Signed-off-by: Kishore Kumar Ravi <quic_kiskum@quicinc.com>
Add reset support for gcc_ddrss_spad_clk on NEO.
Change-Id: I901789e6e9869b5e7f9d0806e54f1438c7536c3d
Signed-off-by: Kalpak Kawadkar <quic_kkawadka@quicinc.com>
Add clock reset support for gcc_ddrss_spad_clk on NEO.
Change-Id: I3900fe310ed716c1470cf23b759ec21dc89f1242
Signed-off-by: Kalpak Kawadkar <quic_kkawadka@quicinc.com>
Move from generic_sxr_defconfig to gki_defconfig for Anorak target.
Enable the additional perf and debug configs from
generic_sxr_defconfig, which are absent in gki_defconfig.
Change-Id: I7a40f05ee7a19573a24160149398562249809333
Signed-off-by: Hrishabh Rajput <quic_hrishabh@quicinc.com>
Migrate kernel client for Helios PIL TA usecase from legacy Qseecom
framework to pure SMCInvoke transport mechanism.
Change-Id: I717e717c6ee59bde973153f229fc277c92293a4b
Signed-off-by: Deepansh Rastogi <quic_deeprast@quicinc.com>
Change: During Callback request from TZ, out and in buffers
needed explicit cache coherency to be performed.
Change-Id: I2b2aee7dce3d75dc07576079f4b0d268488c5951
Signed-off-by: Nitesh Gupta <quic_nitegupt@quicinc.com>
If wireless FW name is not specified for battery_charger device,
then it's better to print an error log and bail out without
requesting a firmware.
Change-Id: Iaf384bee625b1ec69b87de6b5d309569b4b10a17
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
When RM sends an error for a given call, Linux can re-use that sequence
number later. Presently, the sequence number is kept as reserved and
could cause a denial of service if many messages are crafted which
always return an RM error.
Change-Id: Icc2b054ab8d110c63759e30d62650ebc9d02b234
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
The message buffer received by gh_msgq_recv is now not directly used by
any upper layers and always copied to a "buff" in gh_rm_connection, so
the same buffer can be re-used in the gh_msgq_recv loop.
Change-Id: I92988711b84b6f1e6b653c7d8cb5b66abc7a322e
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
No need to allocate a message queue buffer for each message queue
fragment, re-use the same one.
Change-Id: I5743a704ec08732a2e405724ba795d2d8cea90e3
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Gracefully handle non-standard sequences of messages such as
continuation messages without receiving a reply/notification message
first, or a new reply/notification message without having finished the
last message sequence.
Change-Id: I52922fc9ccefb1f7dbb40fbffd2ad6b7fd1162b7
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Consolidate the handling of complete replies or notifications into one
common function that is called after each message is received. This
reduces redundant lines of code.
Change-Id: Iaa52c9d07d86327498f6aa2b60fa8aaa6bfe2c7f
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Rename "recv_buff" and "recv_buff_size" to "payload" and "size",
respectively. gh_rm_connection on tracks received buffers, so it is
redundant to add "recv". Rename "reply_err_code" to "rm_error" to make
it clear that this field is used for the resource manager's return error
code, and not some other value. While here, re-org and document the
gh_rm_connection struct.
Change-Id: I101262dd907a0e678d8d2c5232a17745f057edaf
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
current_recv_buffer tracks the current end of an ongoing message from
resource manager. It can be easily tracked by "conection->recv_buff +
connection->recv_buff_size". Do that instead to make code clearer.
Change-Id: I191dbdbf39c802868e1c6a262ef5420c02f127b2
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Currently, there is an optimized path to directly use the message queue
buffer when a received notification fits within a single message and
there aren't any fragments. This greatly complicates buffer management
and might not provide any measurable benefit.
Suppose Linux receives a notification with one fragment then a
notification with 3 fragments. In current flow, there is 1 alloc for the
first notification and 4 allocations for the 2nd notification (1 for
each message + 1 for overall combined buffer). In the new flow, we could
optimize this to 0 allocations for each message because we can re-use
the same message buffer for each fragment and then a single alloc for
the entire payload.
There is, however, a slightly increased cost for single-message
notifications in the form of an extra memcpy from the message buffer to
notification buffer. Under the code optimizations and simplifications
that come with this cost, it is a worthy cost.
Change-Id: Ib52bd332f59b108d7dab9121c0beefed0aa66994
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Preparation for cleaning up the resource manager core.
Notification size validation needs to only be performed on the payload
size. The RM RPC header will always be present, else the RM driver would
not have been able to determine that the message is a notification.
Thus, considering the RPC header is not required.
Change-Id: Id6a561a77d693e4f8f307d9d0d96b8d173940c60
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>