[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEnQRZD8sEAZ94W3qawxgb=31C-XGGg29L9WRKmdzqjYkxT6uQ@mail.gmail.com>
Date: Fri, 23 Aug 2024 11:12:20 +0300
From: Daniel Baluta <daniel.baluta@...il.com>
To: "Peng Fan (OSS)" <peng.fan@....nxp.com>
Cc: Bjorn Andersson <andersson@...nel.org>, Mathieu Poirier <mathieu.poirier@...aro.org>,
Shawn Guo <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>, Fabio Estevam <festevam@...il.com>,
Daniel Baluta <daniel.baluta@....com>, Iuliana Prodan <iuliana.prodan@....com>,
Marek Vasut <marex@...x.de>, linux-remoteproc@...r.kernel.org, imx@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Peng Fan <peng.fan@....com>
Subject: Re: [PATCH v3 2/2] remoteproc: imx_rproc: Add support for poweroff
and reboot
On Thu, Aug 22, 2024 at 4:40 PM Peng Fan (OSS) <peng.fan@....nxp.com> wrote:
>
> From: Peng Fan <peng.fan@....com>
>
> On some NXP platforms (e.g i.MX7ULP) the poweroff and reboot operations
> are done via a separate remote core.
>
> Typically Linux needs to send a message to the remote core and requests
> for poweroff or reboot.
>
> By default the communication between Linux core and the remote core is
> is done via a blocking mailbox mechanism but Linux doesn't allow blocking
> operations in the system off (reboot, power off) handlers.
>
> So, we need to make sure the mailbox message send operations do not block
> for this specific operations. Fortunately, Linux allows us to register
> handlers that are called in preparation of the system off operations.
>
> Thus, before carrying the power off or reboot preparations, just destroy
> the existing mailboxes and create them as non-blocking.
>
> Note that power off and restart are totally different operations and are
> not complementary.
>
> We introduce a new flag in the imx remoteproc per device data which tells
> us when a device needs this special setup. For now, only imx7ulp needs it.
>
> Signed-off-by: Peng Fan <peng.fan@....com>
Reviewed-by: Daniel Baluta <daniel.baluta@....com>
Powered by blists - more mailing lists