mbox series

[0/1] firmware: ti_sci: Use polled mode of operation during suspend

Message ID 20220210175858.11247-1-d-gerlach@ti.com (mailing list archive)
Headers show
Series firmware: ti_sci: Use polled mode of operation during suspend | expand

Message

Dave Gerlach Feb. 10, 2022, 5:58 p.m. UTC
Hi,
This series allows the ti_sci driver to be able operate safely in noirq
mode.  It depends on the ti-msgmgr series here for updates to the
ti-msgmgr header [1], and together with that series will stop timeouts
that are seen when attempting to suspend platforms using TI SCI.

This allows communication with TISCI firmware without the need of
interrupts, which is critical during the system suspend path. Currently,
the ti_sci_pm_domains genpd driver will communicate with firmware during
the noirq phase, so this must be done using a polled communication
layer, however it still makes sense to use IRQ mode during normal
operation, so continue to support that as well, and only switch to
polled mode during low power path.

This is accomplished in the ti_sci driver by setting a flag to indicate
we are in the suspend path in the system suspend handler that then
causes the message handling logic to manually poll the completion used
to indicate message response using try_wait_for_completion rather than
the original wait_for_completion_timeout, which cannot be used in noirq
phase.

Regards,
Dave

[1] https://lore.kernel.org/lkml/20220210041631.26767-1-d-gerlach@ti.com/

Dave Gerlach (1):
  firmware: ti_sci: Switch transport to polled mode during system
    suspend

 drivers/firmware/ti_sci.c | 61 +++++++++++++++++++++++++++++++++++----
 1 file changed, 55 insertions(+), 6 deletions(-)