Commit Graph

1112335 Commits

Author SHA1 Message Date
qctecmdr
e0302f11eb Merge "coresight: Add snapshot of Coresight TPDM and TPDA driver" 2022-08-30 20:43:55 -07:00
qctecmdr
5b9fa50765 Merge "arm64: defconfig: Enable watchdog and dload_mode driver for kalama" 2022-08-30 18:48:39 -07:00
qctecmdr
c11a99600a Merge "power: supply: qti_battery_charger: Fix NULL pointer dereference" 2022-08-30 18:48:38 -07:00
qctecmdr
6056678a5e Merge "coresight: Add dual etr sink support" 2022-08-30 17:13:37 -07:00
qctecmdr
fa66ffdbd9 Merge "soc: qcom: rpmh-rsc: Fix setting driver data" 2022-08-30 17:13:36 -07:00
qctecmdr
0aedb59688 Merge "config: Adding defconfigs for vm on pineapple" 2022-08-30 17:13:35 -07:00
qctecmdr
3e52b48682 Merge "power: supply: qti_battery_charger: Handle state only if driver is initialized" 2022-08-30 15:05:05 -07:00
qctecmdr
a156e06635 Merge "defconfig: pineapple-gki: Enable ADSP remoteproc drivers" 2022-08-30 10:02:40 -07:00
Huang Yiwei
9432074da2 arm64: defconfig: Enable watchdog and dload_mode driver for kalama
Enable watchdog and dload_mode driver for kalama.

Change-Id: I9caba786ff8d33723c6af7dbc620354f412a3f68
Signed-off-by: Huang Yiwei <quic_hyiwei@quicinc.com>
2022-08-30 17:34:29 +08:00
Mao Jinlong
2bea8be20a coresight: Add snapshot of Coresight TPDM and TPDA driver
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>
2022-08-29 23:12:51 -07:00
Subbaraman Narayanamurthy
d0afae2596 power: supply: qti_battery_charger: Fix NULL pointer dereference
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>
2022-08-26 12:56:18 -07:00
Peng Yang
56e065b0af config: Adding defconfigs for vm on pineapple
Adding defconfigs for vm on pineapple.

Change-Id: I3058b49305389e0f01e99bdbdb8de2230716388e
Signed-off-by: Peng Yang <quic_penyan@quicinc.com>
2022-08-26 04:04:01 -07:00
Tao Zhang
b31f6c0fd6 coresight: Add dual etr sink support
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>
2022-08-26 02:43:25 -07:00
Maulik Shah
1b5445f26f soc: qcom: rpmh-rsc: Fix setting driver data
Fix setting driver data pointer.

Change-Id: I368371b60f9b659197f2c5fac9f4f198a1d35136
Signed-off-by: Maulik Shah <quic_mkshah@quicinc.com>
2022-08-26 02:30:37 -07:00
Tao Zhang
f2d33d76c3 coresight: Add snapshot of CSR driver
Add snapshot for coresight CSR driver from kernel/msm-5.15
commit 31049b19c8cd ("kernel/sched/walt: 64/32bit tasks can
execve 32/64bit tasks").

Change-Id: Iac26b18e8c53ba9acef8a05757997d5e102b7433
Signed-off-by: Tao Zhang <taozha@codeaurora.org>
Signed-off-by: Mao Jinlong <quic_jinlmao@quicinc.com>
2022-08-26 02:26:41 -07:00
qctecmdr
156019ea33 Merge "build.config: kalama: Enable ABL image generation" 2022-08-25 23:02:25 -07:00
qctecmdr
49d89cf55f Merge "remoteproc: Add snapshot of all remoteproc drivers" 2022-08-25 23:02:25 -07:00
qctecmdr
2409376bd4 Merge "swiotlb: fix compilation issue and correct the value of vaddr" 2022-08-25 23:02:25 -07:00
Subbaraman Narayanamurthy
4c710643e5 power: supply: qti_battery_charger: Fix unintended invocation of state_cb()
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>
2022-08-25 21:44:20 -07:00
Subbaraman Narayanamurthy
8e42f9587d power: supply: qti_battery_charger: Handle state only if driver is initialized
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>
2022-08-25 21:43:48 -07:00
Subbaraman Narayanamurthy
b57cad08fb soc: qcom: pmic_glink: use semaphore in pmic_glink_register_client()
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>
2022-08-25 21:43:24 -07:00
Subbaraman Narayanamurthy
3a218c2979 soc: qcom: pmic_glink: Add ipc logging support
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>
2022-08-25 21:42:47 -07:00
qctecmdr
fbc1e2c363 Merge "modules.list.msm.kalama: Add qcom-cpufreq-hw module" 2022-08-25 18:13:11 -07:00
qctecmdr
605d080567 Merge "modules.list.msm.pineapple: Add qcom-cpufreq-hw module" 2022-08-25 18:13:11 -07:00
qctecmdr
f5df0ed8d3 Merge "build.config.msm.pineapple.vm: Introduce PREFERRED_USERSPACE" 2022-08-25 13:25:10 -07:00
qctecmdr
41845c2721 Merge "android: abi_gki_aarch64_qcom: Add symbols for DMA-BUF heap testing" 2022-08-25 13:25:08 -07:00
qctecmdr
d866179836 Merge "defconfig: pineapple-gki: Enable qcom stats driver" 2022-08-25 13:25:07 -07:00
qctecmdr
1740454258 Merge "remoteproc: qcom: Add notification timeout" 2022-08-25 10:05:03 -07:00
Guru Das Srinagesh
23abf2b70c defconfig: pineapple-gki: Enable ADSP remoteproc drivers
Enable drivers required for ADSP remoteproc.

Change-Id: I0844ca3bb39a50e0ada1bfab94fa89216aedb0ca
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
2022-08-25 10:03:41 -07:00
Guru Das Srinagesh
2cc69038a9 abi_gki_aarch64_qcom: Add symbols required by ADSP remoteproc
Add symbols required by ADSP remoteproc snapshot.

Change-Id: I06cfa926f0c79a753e5a77b0575273fee8750cfa
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
2022-08-25 10:03:41 -07:00
Guru Das Srinagesh
d328597f1d remoteproc: qcom_q6v5_pas: Add support for pineapple adsp
Add configuration struct and compatible for pineapple adsp.

Change-Id: I8342722044b3e7dcfcab355a4380bfd7c259be19
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
2022-08-25 10:03:40 -07:00
Siddharth Gupta
0a1512cb6f remoteproc: qcom: Add subdevice tracing
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>
2022-08-25 10:03:39 -07:00
Guru Das Srinagesh
69135cae7d remoteproc: Add snapshot of all remoteproc drivers
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>
2022-08-25 10:03:37 -07:00
Gokul krishna Krishnakumar
d1d5c9c42a remoteproc: qcom: Add notification timeout
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>
2022-08-23 21:14:02 -07:00
Rashid Zafar
101f4ae598 defconfig: pineapple-gki: Enable qcom stats driver
Enable the qcom_stats driver on pineapple SoC.

Change-Id: Iafa302e234283bfd3b7ed727f202f16e0dec804d
Signed-off-by: Rashid Zafar <quic_rzafar@quicinc.com>
2022-08-22 21:39:07 -07:00
Peng Yang
e1838928dd swiotlb: fix compilation issue and correct the value of vaddr
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>
2022-08-22 05:11:03 -07:00
Huang Yiwei
f139228232 build.config: kalama: Enable ABL image generation
Enable the generation of both signed and unsigned ABL images for
Kalama.

Change-Id: I3ed63bbd9c7283f8310c43239830d3bcb64186cf
Signed-off-by: Huang Yiwei <quic_hyiwei@quicinc.com>
2022-08-22 11:13:34 +08:00
qctecmdr
bc59f92e71 Merge "rpmsg: glink: multi enter for unregister path" 2022-08-19 10:38:30 -07:00
qctecmdr
3002dfd5aa Merge "coresight: add node to reset all coresight devices" 2022-08-19 05:21:25 -07:00
Xubin Bai
18d9f74759 modules.list.msm.kalama: Add qcom-cpufreq-hw module
Add qcom-cpufreq-hw module for Kalama.

Change-Id: I627561b2a68159d633834d08f69fa8398a9e8eab
Signed-off-by: Xubin Bai <quic_xubibai@quicinc.com>
2022-08-18 23:02:19 -07:00
Xubin Bai
b574996bb7 defconfig: kalama-gki: Enable qcom-cpufreq-hw module
Enable qcom-cpufreq-hw module for Kalama.

Change-Id: Ie8865d29e47f06a3682c06f8724010f2ea76f0a4
Signed-off-by: Xubin Bai <quic_xubibai@quicinc.com>
2022-08-18 22:57:49 -07:00
Xubin Bai
14c0058610 modules.list.msm.pineapple: Add qcom-cpufreq-hw module
Add qcom-cpufreq-hw module for Pineapple.

Change-Id: I07bea969efcda9dc4610ccd8e19822bc4263dea8
Signed-off-by: Xubin Bai <quic_xubibai@quicinc.com>
2022-08-18 19:27:39 -07:00
Xubin Bai
93be356256 defconfig: pineapple-gki: Enable qcom-cpufreq-hw module
Enable qcom-cpufreq-hw module for Pineapple.

Change-Id: Ic166b479f3d60fe86fa4cba31ef95f8f82b2a571
Signed-off-by: Xubin Bai <quic_xubibai@quicinc.com>
2022-08-18 19:24:54 -07:00
qctecmdr
a364155fa4 Merge "Merge keystone/android-mainline-keystone-qcom-release.5.19-rc8 (c4a88a9) into msm-pineapple" 2022-08-18 15:36:52 -07:00
Maria Yu
1cb52ea9b9 rpmsg: glink: multi enter for unregister path
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>
2022-08-18 10:13:28 -07:00
Chris Lew
153212bcc8 rpmsg: glink: Add mutual exclusion to irq
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>
2022-08-18 10:13:22 -07:00
qctecmdr
274629818d Merge "coresight: etm4x: avoid build failure with unrolled loops" 2022-08-18 08:36:22 -07:00
Peng Yang
475356ca04 build.config.msm.pineapple.vm: Introduce PREFERRED_USERSPACE
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>
2022-08-18 01:10:19 -07:00
Mao Jinlong
5f0efc2265 coresight: add node to reset all coresight devices
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>
2022-08-17 23:41:10 -07:00
qctecmdr
a5ac71d228 Merge "interconnect: qcom: pineapple: Add local clock for qnm_ubwc_p" 2022-08-17 21:39:35 -07:00