soc: xilinx: Set CAP_UNUSABLE requirement for versal while powering down domain
authorTejas Patel <tejas.patel@xilinx.com>
Mon, 26 Aug 2019 20:30:44 +0000 (13:30 -0700)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 16 Oct 2019 10:49:41 +0000 (12:49 +0200)
commite502ff8606b32df4f9f2435ab00278312db125b3
treec2019d68a6aa152f04c0a92f9659f059d7fa182b
parent54ecb8f7028c5eb3d740bb82b0f1d90f2df63c5c
soc: xilinx: Set CAP_UNUSABLE requirement for versal while powering down domain

For "0" requirement which is used to inform firmware that device is
not required currently by master, Versal PLM (Platform Loader and
Manager) which runs on Platform Management Controller and is responsible
platform management of devices that disables clock, power it down
and reset the device. genpd_power_off() is being called during runtime
suspend also. So, if any device goes to runtime suspend state during
resumes it needs to be re-initialized again. It is possible that
drivers do not reinitialize device upon resume from runtime suspend
every time ans so dont want it to be powered down or get reset
during runtime suspend.

In Versal PLM new PM_CAP_UNUSABLE capability is added, which disables
clock only and avoids power down and reset during runtime suspend. Power
and reset will be gated with core suspend.So, this patch sets
CAPABILITY_UNUSABLE requirement during gpd_power_off()
if platform is other than zynqmp.

Signed-off-by: Tejas Patel <tejas.patel@xilinx.com>
Signed-off-by: Jolly Shah <jolly.shah@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/soc/xilinx/zynqmp_pm_domains.c
include/linux/firmware/xlnx-zynqmp.h