linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] mailbox: ti-msgmgr: Use polled mode of operation during suspend
@ 2022-02-10  4:16 Dave Gerlach
  2022-02-10  4:16 ` [PATCH 1/2] mailbox: ti-msgmgr: Refactor message read during interrupt handler Dave Gerlach
  2022-02-10  4:16 ` [PATCH 2/2] mailbox: ti-msgmgr: Operate mailbox in polled mode during system suspend Dave Gerlach
  0 siblings, 2 replies; 4+ messages in thread
From: Dave Gerlach @ 2022-02-10  4:16 UTC (permalink / raw)
  To: Jassi Brar
  Cc: Dave Gerlach, linux-kernel, Suman Anna, Nishanth Menon,
	Vignesh Raghavendra

Hi,
This series switches the ti-msgmgr driver to operate in polled mode
during system suspend rather than the current IRQ driven operation.
This allows users of this mailbox, such as the ti_sci firmware driver,
to communicate 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 send messages to disable devices
during the noirq phase, so this must be done using a polled
communication layer. 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 by setting a flag for polled mode in the system
suspend handler that then causes the driver to immediately poll a
mailbox RX channel in the send_data mailbox op, which will either
timeout and return or follow the normal mailbox flow and call
mbox_chan_received_data before returning from mbox_send_message.

These changes do not affect the normal operation of the ti-msgmgr driver
and are transparent outside of the system suspend path. The suspend path
already sees timeouts with messages sent during noirq phase today and
will continue to until a follow on patch for the ti_sci driver is sent
to make communication completely safe during noirq, but this series can
be merged without affecting operation.

Regards,
Dave

Dave Gerlach (2):
  mailbox: ti-msgmgr: Refactor message read during interrupt handler
  mailbox: ti-msgmgr: Operate mailbox in polled mode during system
    suspend

 drivers/mailbox/ti-msgmgr.c      | 181 ++++++++++++++++++++++++-------
 include/linux/soc/ti/ti-msgmgr.h |   8 +-
 2 files changed, 147 insertions(+), 42 deletions(-)

-- 
2.35.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-26  0:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10  4:16 [PATCH 0/2] mailbox: ti-msgmgr: Use polled mode of operation during suspend Dave Gerlach
2022-02-10  4:16 ` [PATCH 1/2] mailbox: ti-msgmgr: Refactor message read during interrupt handler Dave Gerlach
2022-02-26  0:16   ` Suman Anna
2022-02-10  4:16 ` [PATCH 2/2] mailbox: ti-msgmgr: Operate mailbox in polled mode during system suspend Dave Gerlach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).