Add error messages into the regulator_check_voltage() and
regulator_check_consumers() functions which explain exactly what
is not correct about given voltage requests. This makes
debugging regulator_set_voltage() errors easier.
Change-Id: I8b3ec8d6a78c94b436b57bd2228b8bd5c362cecd
Signed-off-by: David Collins <collinsd@codeaurora.org>
GDSC can be specified as a regulator in device tree as
'USB3_GDSC-supply'. If present, use it and enable it
prior to enabling the clocks.
Change-Id: I50c056dd920b457fe77fd364414657e98413f4d0
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Enable the rpmh-regulator driver so that consumers can manage
PMIC regulator states via RPMh.
Change-Id: Ia5ee73dc04d9fcbd6412d49fd82172ff7d006a47
Signed-off-by: David Collins <collinsd@codeaurora.org>
The important part of qrtr_port_lookup() wrt synchronization is that the
function returns a reference counted struct qrtr_sock, or fail.
As such we need only to ensure that an decrement of the object's
refcount happens inbetween the finding of the object in the idr and
qrtr_port_lookup()'s own increment of the object.
By using RCU and putting a synchronization point after we remove the
mapping from the idr, but before it can be released we achieve this -
with the benefit of not having to hold the mutex in qrtr_port_lookup().
Change-Id: Ia9907a9c97a29e92a92e67afa988207f501a2f48
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Patch-mainline: linux-arm-kernel @ 07/05/19, 23:06
Signed-off-by: Chris Lew <clew@codeaurora.org>
In order to prevent overconsumption of resources on the remote side QRTR
implements a flow control mechanism.
The mechanism works by the sender keeping track of the number of
outstanding unconfirmed messages that has been transmitted to a
particular node/port pair.
Upon count reaching a low watermark (L) the confirm_rx bit is set in the
outgoing message and when the count reaching a high watermark (H)
transmission will be blocked upon the reception of a resume_tx message
from the remote, that resets the counter to 0.
This guarantees that there will be at most 2H - L messages in flight.
Values chosen for L and H are 5 and 10 respectively.
Change-Id: Ifa3c0c5821d31e385c34428d0bd4f5b5eec2fb77
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Patch-mainline: linux-arm-kernel @ 07/05/19, 23:06
[clew@codeaurora.org: Fix uninitialized qrtr_tx_lock mutex]
Signed-off-by: Chris Lew <clew@codeaurora.org>
Move operations on the qrtr_nodes radix tree under a separate spinlock
and make the qrtr_nodes tree GFP_ATOMIC, to allow operation from atomic
context in a subsequent patch.
Change-Id: I8f5ce15edf6043e5b27ef280f1c09f4c64ebe3bb
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Patch-mainline: linux-arm-kernel @ 07/05/19, 23:06
Signed-off-by: Chris Lew <clew@codeaurora.org>
The confirm-rx bit is used to implement a per port flow control, in
order to make sure that no messages are dropped due to resource
exhaustion. Move the resume-tx transmission to recvmsg to only confirm
messages as they are consumed by the application.
Change-Id: Icd990ef9dc46c983c9231fe1e72ba9dcbef5a0c3
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Patch-mainline: linux-arm-kernel @ 07/05/19, 23:06
Signed-off-by: Chris Lew <clew@codeaurora.org>
As the endpoint is unregistered there might still be work pending to
handle incoming messages, which will result in a use after free
scenario. The plan is to remove the rx_worker, but until then (and for
stable@) ensure that the work is stopped before the node is freed.
Change-Id: Ic35d1c0f5e5e4f297c7c05dd09c7c8a4d8b23cf4
Fixes: bdabad3e36 ("net: Add Qualcomm IPC router")
Cc: stable@vger.kernel.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Git-commit: 73f0c11d11
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Chris Lew <clew@codeaurora.org>
This snapshot is taken as of msm-4.19 'commit <d2f41beab007i>
("Merge "msm: npu: Add bandwidth monitor support"")'.
This change brings the rpmsg and rpmsg glink drivers up to date with
the fixes from msm-4.19. In addition, change the copyrights to SPDX format.
Also, irq_set_affinity and sched_setaffinity can not be used when compiling
a driver as a module. Hence, moving to module-friendly APIs.
Change-Id: Id8c0bd13535c91cbecb11445bf798be44083abb6
Signed-off-by: Jay Jayanna <jayanna@codeaurora.org>
ATOS operation can be fatal when performed on invalid pfn. Validate mapped
entry pfn for validity before performing ATOS operation.
Change-Id: Ie1b118d768c396f91618ee1eb101754cbee5318e
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
[isaacm@codeaurora: Move PFN validity check prior to IOVA assignment]
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
A new application level feature has NAT running out of SRAM, DDR, or
both. The addtion of just this feature's header to the kernel will
allow it to be propagated to older kernels, such that they can be
compatible (in terms of structure size) with the new application level
feature.
Change-Id: I16b5bfaa1156c69e0a6ae0c2ca4be416a283d049
CRs-Fixed: 2437567
Signed-off-by: Perry Randise <prandise@codeaurora.org>
In addition to logging using FTRACE. let's also log in the IPC logging
for all RPMH transactions.
Change-Id: I2b19006bbc776053f63eee55b447428fdb023ba4
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
To debug issues when TCS is busy, report interrupt status as well. If
the interrupt line is pending at GIC, then Linux was too busy to process
the interrupt and if not pending then AOSS was too busy to handle the
request.
Change-Id: I8fd8289c74a8e1d6c771b77c2800a52f18c3a0b2
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
During flush of current cached data, Sleep and Wake TCSes have
previously programmed data present. Due to this incorrect data
is sent.
Fix this by cleaning TCSes and freshly program current cached
sleep and wake data.
Change-Id: I8f1cb9925a7800aad65d665192d3b129c76dd9de
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Record and export if an IPI is pending on the current CPU. Knowing if an
IPI is pending helps make better idle state determinations.
Change-Id: I92ab0aaeb3162cd312aa00a4e3eb978be2ad8efc
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Sleep driver needs to program the absolute clock value for next expiry
into pdc register for system wake up. Add an API to read the cval low
and high counters.
Change-Id: I3f08b3320ea281894d46f3c4bb0862784cc337a1
Signed-off-by: Channagoud Kadabi <ckadabi@codeaurora.org>
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Changes to add wake up handle for coalescing pipe.
Change-Id: I0cfc38c91a6a5b93211933f0af87640cbec8a4bf
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>