FROMLIST: iommu/arm-smmu: Add pm_runtime/sleep ops
The smmu needs to be functional only when the respective master's using it are active. The device_link feature helps to track such functional dependencies, so that the iommu gets powered when the master device enables itself using pm_runtime. So by adapting the smmu driver for runtime pm, above said dependency can be addressed. This patch adds the pm runtime/sleep callbacks to the driver and also the functions to parse the smmu clocks from DT and enable them in resume/suspend. Also, while we enable the runtime pm add a pm sleep suspend callback that pushes devices to low power state by turning the clocks off in a system sleep. Also add corresponding clock enable path in resume callback. Signed-off-by:Sricharan R <sricharan@codeaurora.org> Signed-off-by:
Archit Taneja <architt@codeaurora.org> [vivek: rework for clock and pm ops] Signed-off-by:
Vivek Gautam <vivek.gautam@codeaurora.org> Reviewed-by:
Tomasz Figa <tfiga@chromium.org> Tested-by:
Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by:
Robin Murphy <robin.murphy@arm.com> (am from https://patchwork.kernel.org/patch/10581899/) (also found at https://lkml.kernel.org/r/20180830144541.17740-2-vivek.gautam@codeaurora.org) BUG=b:110260554, b:74036927, b:112610860 TEST=Build and boot on Cheza Change-Id: If3934431c39c4afd3094c8252d0714094d474d62 Reviewed-on: https://chromium-review.googlesource.com/1249165 Commit-Ready: Douglas Anderson <dianders@chromium.org> Tested-by:
Vivek Gautam <vivek.gautam@codeaurora.org> Reviewed-by:
Douglas Anderson <dianders@chromium.org>
Loading