[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220210041631.26767-1-d-gerlach@ti.com>
Date: Wed, 9 Feb 2022 22:16:29 -0600
From: Dave Gerlach <d-gerlach@...com>
To: Jassi Brar <jassisinghbrar@...il.com>
CC: Dave Gerlach <d-gerlach@...com>, <linux-kernel@...r.kernel.org>,
Suman Anna <s-anna@...com>, Nishanth Menon <nm@...com>,
Vignesh Raghavendra <vigneshr@...com>
Subject: [PATCH 0/2] mailbox: ti-msgmgr: Use polled mode of operation during suspend
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
Powered by blists - more mailing lists