In the cpuidle-psci case, runtime PM in combination with the generic
PM domain (genpd), may be used when entering/exiting a shared idle
state. More precisely, genpd relies on runtime PM to be enabled for
the attached device (in this case it belongs to a CPU), to properly
manage the reference counting of its PM domain.
This works fine most of the time, but during system suspend in
dpm_suspend_late(), the PM core disables runtime PM for all devices.
Beyond this point, calls to pm_runtime_get_sync() to runtime resume
a device may fail and therefore it could also mess up the reference
counting in genpd.
To fix this problem, let's call wake_up_all_idle_cpus() prior to
disabling runtime PM. In this way a device that belongs to a CPU,
becomes runtime resumed through cpuidle-psci and stays like that
because idle governor will stop selecting deeper idle state when
suspend is started.
Change-Id: I8e046aa9b904ada09c0138499766d6362a9795be
Signed-off-by: Maulik Shah <quic_mkshah@quicinc.com>
Usecases where branch clock will be enabled pre-HLOS and
expectation from the clock provider is to poll on the clock
to ensure it is indeed enabled and not HW gated, thus add
the BRANCH_HALT_POLL flag.
Change-Id: If41a65c64755d062721266ca7ea97822102115a1
Signed-off-by: Kalpak Kawadkar <quic_kkawadka@quicinc.com>
Signed-off-by: Chintan Kothari <quic_ckothari@quicinc.com>
interconnects for Neo
Add master and slave ID constants for all Qualcomm Technologies, Inc.
Neo interconnect providers which consumers can use to set bandwidth
constraints and find paths in the NoC (Network-On-Chip) topology.
This is a snapshot taken from 5.10 kernel.
commit c1275fdbd5e2 ("icc: dt-bindings: add endpoint IDs for
interconnects for Neo").
Change-Id: I2c0e62f96ba6288b6903f0dd13a2d68aa7b3ec49
Signed-off-by: Odelu Kukatla <quic_okukatla@quicinc.com>
Signed-off-by: Chintan Kothari <quic_ckothari@quicinc.com>
Vote for interconnect when in D0, unvote when in D3.
Change-Id: I52f6170b1651b3d6bf508482d4ab35165fd395ca
Signed-off-by: Kamati Srinivas <quic_kamasrin@quicinc.com>
Add support for Deep sleep in ethernet driver.
Change-Id: I6255580b909088c0908674e446ca9d7599051498
Signed-off-by: Shashank Shekhar <quic_sshe@quicinc.com>
sysmon_smem_power_stats_extended pointer will be NULL
in case of invalid dsp_id.
Add NULL check for invalid dsp_id cases.
Change-Id: If4fe03051ff6388307ff137b55d4e15b2e0f88f1
Signed-off-by: Wasim Nazir <quic_wasimn@quicinc.com>
In function tmc_enable_etf_sink_sysfs, the local variable buf
was allocated and assigned to drvdata->buffer, and buf will be
freed because etf can't be enabled, but drvdata->buffer
still point to the address.
So in function tmc_read_unprepare_etb, beacause drvdata->mode
is CS_MODE_DISABLED, local variable buf was assigned by
drvdata->buf and free again.
Change-Id: I7d25e7db0a983fc134e8d8dfb954936233f0d167
Signed-off-by: yingdeng <quic_yingdeng@quicinc.com>
Add macro to check for __scm pointer before accessing.
Also add check for device pointer.
Change-Id: Ib3ef303fd9574bedd87077dcd62a480066d7a7d8
Signed-off-by: Wasim Nazir <quic_wasimn@quicinc.com>
Add support for SREG branch ops as sreg register operations
are needed as part of ASSERT/DEASSERT sequence.
Change-Id: Ic0cc76d5160cd34130afc460b07d5ec4e9ed85eb
Signed-off-by: Kalpak Kawadkar <quic_kkawadka@quicinc.com>
Signed-off-by: Chintan Kothari <quic_ckothari@quicinc.com>
In some HQX targets (where Linux is running as guest OS),
when S2R is triggered from host OS, the GVM is sent to
Deep Sleep state.
Since Deep Sleep is getting triggered from Guest point of view,
ufs spm level is set to 5, Power OFF SSU command is sent to the
ufs device and all regulators are turned off from ufs. But since
it is actually an S2R event from Host PoV, the regulators are
not turned off by the PMIC. This is causing power leakage.
To fix this issue, create a sysfs node "ufs_pm_mode". The Host OS
will write to this node which the event (S2R or Deep Sleep) is
getting triggered at the Host. UFS will set the correct spm level
accordingly. For S2R case, the default spm level is retained while
for Deep Sleep it is set to 5.
The default value for this node is 0( which is set during ufs init).
This means it will not set anything unless "S2R" or "DEEPSLEEP" is
explicitly written to the node.
ufs_pm_mode can have three values: "NONE","S2R","DEEPSLEEP":
1. When "NONE" is written to sysfs node: the spm level
is set to 5 for deep sleep and existing spm value
left unchanged for s2idle case.
2. When "S2R" is written to the node: the default spm level
value is retained.
3. When "DEEPSLEEP" is written to the node: the spm level
is set to 5.
Change-Id: I232449cf93a3b37652897e74a621bf219302b76b
Signed-off-by: Ram Kumar Dwivedi <quic_rdwivedi@quicinc.com>
Add Neo-LA msm-id to the list of soc-ids supported.
Change-Id: I9601135db35026067fc15116879950ece40d9fbe
Signed-off-by: Asit Shah <quic_asitshah@quicinc.com>
Add snapshot of clock handles for CAMCC/DISPCC/GCC/GPUCC/VIDEOCC/TCSRCC
on NEO so that clients can request on the clock ids,from msm-5.10 branch
commit e42f1c7f152e ("bindings: clock: qcom: Add support for
clock IDs for Neo").
Change-Id: If1ed852cb3e7cf91da1953beaaeeda309288ab14
Signed-off-by: Kalpak Kawadkar <quic_kkawadka@quicinc.com>
Signed-off-by: Chintan Kothari <quic_ckothari@quicinc.com>
Added pinctrl module for neo platform in first stage module list.
Change-Id: I9131e3a89ef905d283e2bcc3fecd9d479c6fb693
Signed-off-by: Asit Shah <quic_asitshah@quicinc.com>
Enable TLMM pinctrl driver for neo platform in GKI build.
Change-Id: I5e9a2427e7ab96e7a56da6c0f8fbe80796d8b1d1
Signed-off-by: Asit Shah <quic_asitshah@quicinc.com>
Removed support of reading gpio read using trace hooks in Neo
pinctrl driver, as it is not used anymore in Kernel Platform 3.0.
Change-Id: If367c8e98a51aaa2c8ca52425b2b2da80177c059
Signed-off-by: Asit Shah <quic_asitshah@quicinc.com>
Neo pinctrl driver snapshot from msm-5.10 branch
commit 1c8fbf07237c ("drivers: pinctrl: qcom: Add gpio to pdc
mapping for neo").
Change-Id: I944d2ae61c2f80501442e2ca8d9229c4229c9a2d
Signed-off-by: Asit Shah <quic_asitshah@quicinc.com>
Remove IRQF_ONESHOT flag as it disables incoming interrupts
while running threaded irq.
Change-Id: Ieb045e8aee3fc3b179fc7e7517064ba1c76a4483
Signed-off-by: Pranav Mahesh Phansalkar <quic_pphansal@quicinc.com>
Implement a new operation qcom_hwspinlock_bust() which
can be invoked to bust any locks that are in use when
a remoteproc is stopped or crashed.
Change-Id: I0486d5345a47007f254f17c4b88f802a6c962e3a
Signed-off-by: Richard Maina <quic_rmaina@quicinc.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Chris Lew <quic_clew@quicinc.com>
Link: https://lore.kernel.org/r/20240529-hwspinlock-bust-v3-1-c8b924ffa5a2@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Git-commit: 73100deb59c3892e280234fcc0171a5376c71788
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[quic_deesin@quicinc.com: Adding bust api in core hwspinlock module
is breaking KMI, so exporting bust function from qcom hwspilock module
to avoid dependency on core hwspinlock function]
Signed-off-by: Deepak Kumar Singh <quic_deesin@quicinc.com>
cpu_pm_notifier is acquiring the spinlock before it is initialized,
leading to spinlock with bad magic,
hence moving the initialization prior to that.
Change-Id: Ibae81d3bc2338dd0be5f2bc509cec559b121fc73
Signed-off-by: Sneh Mankad <quic_smankad@quicinc.com>
Currently, wireless power supply (wls_psy) is registered
by default to support wireless charging. However,
on some boards, wireless charging is not supported.
When the properties under wls_psy are read from the
userspace or a client, it times out and prints error
logs unnecessarily leading to a poor user experience.
Hence, add a DT property "qcom,wireless-charging-not-supported"
which if specified wouldn't register the wls_psy.
Change-Id: If4ed36957fa8425018f80dfa43d82ee746a45566
Signed-off-by: Kamal Wadhwa <quic_kamalw@quicinc.com>
Signed-off-by: Jishnu Prakash <quic_jprakash@quicinc.com>
This API is only meant for getting Camera RSC device,
hence preventing any other client to use it for any other device.
Change-Id: I6b1cef1cd98eb1d0c5fa92b67a2af141022ec7a3
Signed-off-by: Sneh Mankad <quic_smankad@quicinc.com>