Add snapshot for coresight TPDM and TPDA driver from kernel/msm-5.15
commit efe1f86d0fc2 ("i3c: i3c-master-msm-geni: Defer probe if QUPV3
wrapper is NULL").
Change-Id: I315baf552706ea59921b2f8f7641ca17a5c5c4a3
Signed-off-by: Tao Zhang <taozha@codeaurora.org>
Signed-off-by: Mao Jinlong <quic_jinlmao@quicinc.com>
With psy initialized in battery_chg_init_psy(), read_property_id()
when called from battery_chg_parse_dt() can try accessing
psy->desc->name when dynamic debugging is enabled. Fix it.
Change-Id: I88114ea9779d5113524b8b15659bf8bafe6364ed
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
Add dual etr sink support to coresight tmc. User can assign the trace
of the source to go to assigned ETR sink.
- Add sink_name node to each source folder. When enable source, it
will find the sink by sink name if sink_name is valid
- Add atid for each coresight device. The atid will get from each
source node in device tree. It will be passed to etr driver when
enable the source. ETR driver will set the csr atid register based
on the atid.
Change-Id: I262c25c880c5fa6c8a16283c1c97769f418cf169
Signed-off-by: Tao Zhang <quic_taozha@quicinc.com>
Signed-off-by: Mao Jinlong <quic_jinlmao@quicinc.com>
Currently, pmic_glink_register_client() is getting called even
before battery_chg_register_panel_notifier() is called. However,
if of_drm_find_panel() doesn't return an active panel, then
battery_chg_register_panel_notifier() returns -EPROBE_DEFER which
would end up in calling pmic_glink_unregister_client() and this
would happen forever. Though this error return path is handled
properly, when SSR/PDR event is triggered, pmic_glink driver can
invoke state_cb() for all of its clients if they've registered.
With the following sequence happening occasionally, it can end up
accessing an invalid bcdev pointer use-after-free.
- Battery charger driver calling pmic_glink_register_client()
- PDR event
- pmic_glink driver invoking state_cb() for all clients
- Battery charger driver schedules subsys_work
- Battery charger driver calling pmic_glink_unregister_client()
because battery_chg_register_panel_notifier() returns
-EPROBE_DEFER
- Battery charger driver's subsys work runs with an invalid bcdev
pointer
Fix this by moving battery_chg_register_panel_notifier() before
calling pmic_glink_register_client(). With this, battery charger
driver won't register with pmic_glink driver if it can't get an
active panel from using of_drm_find_panel() on the boards where
"qcom,display-panels" is specified. Also, update bcdev->state to
PMIC_GLINK_STATE_UP only after pmic_glink_register_client()
succeeds so that battery_chg_write() won't go through. In the
driver probe error return path, cancel subsys_up_work to ensure
that it's not invoked after pmic_glink_register_client() succeeds
but an error path follows that.
CRs-Fixed: 3274512
Fixes: 94f2a1746953 ("power: supply: qti_battery_charger: Disable notifications while in sleep")
Change-Id: I12b9f9137602b760a751ad0119fce1cd10ba8fbd
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
There is a chance that battery_chg_state_cb() can get invoked before the
battery charger driver finishes initialization. Handle it.
Change-Id: If959b00d3055e0194184b5c3992b0c0906d29213
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
Commit 922e045cea2f3 ("soc: qcom: pmic_glink: Fix a race condition
in removing rpmsg device") added a semaphore to protect rpdev
usage when it is added/removed when rpmsg driver is probed/removed
so that clients can use it in pmic_glink_write() concurrently.
When a client tries to register using pmic_glink_register_client()
it checks for the state of pmic_glink device. It's logical to use
the semaphore before reading the state.
Change-Id: Ib715819ea2008f14d204fe097ac1631dbd129e40
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
Add ipc logging support for pmic_glink devices so that logs can
be obtained for debugging.
Change-Id: I3710ac0fb5b9d53d5db8d28967ed02f501364e64
Signed-off-by: Subbaraman Narayanamurthy <quic_subbaram@quicinc.com>
Enable drivers required for ADSP remoteproc.
Change-Id: I0844ca3bb39a50e0ada1bfab94fa89216aedb0ca
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
Add symbols required by ADSP remoteproc snapshot.
Change-Id: I06cfa926f0c79a753e5a77b0575273fee8750cfa
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
Add configuration struct and compatible for pineapple adsp.
Change-Id: I8342722044b3e7dcfcab355a4380bfd7c259be19
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
This change adds trace events to rproc subdevices to get an
estimate of how long each subdevice takes to run.
Change-Id: I513a6d2c3c73c03202a042d2704c79818a4f0aa0
Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
[quic_gurus@quicinc.com: Fix merge conflicts]
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
Add snapshot of all remoteproc drivers from msm-5.15 'commit
4eea71951526 ("virt: gunyah: rm_core: Clean up sequence idr earlier")'.
Also remove duplicate definition of sm8350_cdsp_resource.
Change-Id: I7391d4c61eb3b389e186cb7846ca0442e1a0bdef
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
If the notification clients are taking too long or are stuck somewhere we
want to be notified of such problems. This change adds the notification
timeout logic that either causes a panic or dumps the stack when a timeout
occurs.
Change-Id: Ifaa7e20a697f920ffffd7345c9794d39a718f9b0
Signed-off-by: Gokul krishna Krishnakumar <gokukris@codeaurora.org>
[quic_gurus@quicinc.com: Fix Minor merge conflict]
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
Update the parameter for call swiotlb_init_io_tlb_mem to fix
the compilation issue. And correct the value of vaddr.
Change-Id: I619e891446d33b4be11773e7abf4671aabd6564c
Signed-off-by: Peng Yang <quic_penyan@quicinc.com>
Enable the generation of both signed and unsigned ABL images for
Kalama.
Change-Id: I3ed63bbd9c7283f8310c43239830d3bcb64186cf
Signed-off-by: Huang Yiwei <quic_hyiwei@quicinc.com>
Support multi enter for unregister path.
Change-Id: I3dd37604e740582ee851c208a4c67fe08f20d83f
Signed-off-by: Maria Yu <quic_aiquny@quicinc.com>
[quic_clew@quicinc.com: This is a work around until remoteproc resolves
a race where unregister is called from multiple contexts]
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
The change to defer excessive glink processing to threaded irq context
uses the IRQF_ONESHOT flags and assumes the hardirq handler will never
run when the threaded irq is running.
There are a couple instances where this does not hold true. One known
instance is during irq_resend() where an interrupt is resent in tasklet
context. In this case, it has been observed that the hard irq handler
will run even if the threaded portion of the interrupt is running.
Add a lock and state to check if the irq is running. If it is already
running, then bail out of the irq.
If threaded handler is already in execution when suspend happens and
next glink interrupt is received in suspend, interrupt handler returns
without waking up system.
Move wakeup logic in the beginning of interrupt handler.
Change-Id: Ied7808962e525ff0b7430d3fac666f7fee032722
Signed-off-by: Chris Lew <clew@codeaurora.org>
Used to indicate preferred userspace to external scripts which help pack
the kernel images.
Change-Id: If453042506198208160c85d214ee1700c8d65930
Signed-off-by: Peng Yang <quic_penyan@quicinc.com>
Add new reset_source_sink node to be able to disable all
active coresight devices.
Change-Id: Ic9daeb35d7aacd334911683d41a2f0f278719725
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>