]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/arm-smmu: Add clk_bulk_{prepare/unprepare} to system pm callbacks
authorSai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Tue, 10 Aug 2021 06:48:08 +0000 (12:18 +0530)
committerWill Deacon <will@kernel.org>
Tue, 10 Aug 2021 13:15:34 +0000 (14:15 +0100)
commit4b36c4560f299029b9e69b2a8893bfe1c0e51068
treee98ce8477b1a67087fe094f74e0fed96b65b48ee
parent46b2d7f2b01eedc3e3fa50546419b54d6b9429ec
iommu/arm-smmu: Add clk_bulk_{prepare/unprepare} to system pm callbacks

Some clocks for SMMU can have parent as XO such as gpu_cc_hub_cx_int_clk
of GPU SMMU in QTI SC7280 SoC and in order to enter deep sleep states in
such cases, we would need to drop the XO clock vote in unprepare call and
this unprepare callback for XO is in RPMh (Resource Power Manager-Hardened)
clock driver which controls RPMh managed clock resources for new QTI SoCs.

Given we cannot have a sleeping calls such as clk_bulk_prepare() and
clk_bulk_unprepare() in arm-smmu runtime pm callbacks since the iommu
operations like map and unmap can be in atomic context and are in fast
path, add this prepare and unprepare call to drop the XO vote only for
system pm callbacks since it is not a fast path and we expect the system
to enter deep sleep states with system pm as opposed to runtime pm.

This is a similar sequence of clock requests (prepare,enable and
disable,unprepare) in arm-smmu probe and remove.

Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Co-developed-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Link: https://lore.kernel.org/r/20210810064808.32486-1-saiprakash.ranjan@codeaurora.org
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu/arm-smmu.c