firmware: ti_sci: Switch transport to polled mode during system suspend
authorDave Gerlach <d-gerlach@ti.com>
Tue, 12 Apr 2022 19:21:38 +0000 (14:21 -0500)
committerNishanth Menon <nm@ti.com>
Tue, 3 May 2022 11:52:11 +0000 (06:52 -0500)
commitb9e8a7d950ffed4cdd81e6457cfb8049227da2d1
tree600d961e6b2e9290a91926327fcb03ff9d77da39
parentf226041424cf87245d39a1b2dfae304308b36b6b
firmware: ti_sci: Switch transport to polled mode during system suspend

During system suspend it is completely valid for devices to invoke TISCI
commands during the noirq phase of the suspend path. Specifically this
will always be seen for devices that define a power-domains DT property
and make use of the ti_sci_pm_domains genpd implementation.
The genpd_finish_suspend call will power off devices during the noirq
phase, which will invoke TISCI.

In order to support this, the ti_sci driver must switch to not use
wait_for_completion_timeout during suspend, but instead rely on a manual
check for if the completion is not yet done, and proceed only if this is
the case.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20220412192138.31189-1-d-gerlach@ti.com
drivers/firmware/ti_sci.c