linux/drivers/remoteproc
Peng Fan ff555fc553 remoteproc: imx_rproc: Add support for poweroff and reboot
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@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20240822-imx_rproc-v3-2-6d943723945d@nxp.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2024-08-26 10:25:15 -06:00
..
da8xx_remoteproc.c remoteproc: da8xx: Convert to platform remove callback returning void 2023-05-09 11:45:22 -06:00
imx_dsp_rproc.c remoteproc: Use of_property_present() 2024-08-13 09:23:11 -06:00
imx_rproc.c remoteproc: imx_rproc: Add support for poweroff and reboot 2024-08-26 10:25:15 -06:00
imx_rproc.h remoteproc: imx_rproc: Add support for poweroff and reboot 2024-08-26 10:25:15 -06:00
ingenic_rproc.c remoteproc: ingenic: Request IRQ disabled 2021-12-06 10:17:44 -07:00
Kconfig remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem 2024-08-21 11:22:54 -06:00
keystone_remoteproc.c remoteproc: keystone: Use devm_rproc_alloc() helper 2024-08-13 09:41:51 -06:00
Makefile remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem 2024-08-21 11:22:54 -06:00
meson_mx_ao_arc.c remoteproc: meson_mx_ao_arc: Convert to platform remove callback returning void 2023-05-09 13:17:22 -06:00
mtk_common.h remoteproc: mediatek: Support setting DRAM and IPI shared buffer sizes 2024-04-30 10:43:59 -06:00
mtk_scp_ipi.c remoteproc: mediatek: Support setting DRAM and IPI shared buffer sizes 2024-04-30 10:43:59 -06:00
mtk_scp.c remoteproc: mediatek: Increase MT8188/MT8195 SCP core0 DRAM size 2024-07-08 09:57:16 -06:00
omap_remoteproc.c remoteproc: omap: Use devm_rproc_add() helper 2024-06-13 10:05:11 -06:00
omap_remoteproc.h remoteproc/omap: Switch to SPDX license identifiers 2020-03-25 22:29:51 -07:00
pru_rproc.c remoteproc: pru: add support for configuring GPMUX based on client setup 2023-08-21 15:19:28 -06:00
pru_rproc.h remoteproc: pru: Add support for PRU specific interrupt configuration 2020-12-10 10:56:01 -06:00
qcom_common.c remoteproc: qcom: enable in-kernel PD mapper 2024-06-25 07:40:38 -07:00
qcom_common.h remoteproc: qcom: enable in-kernel PD mapper 2024-06-25 07:40:38 -07:00
qcom_pil_info.c remoteproc: qcom: pil_info: Don't memcpy_toio more than is provided 2021-12-13 16:58:05 -06:00
qcom_pil_info.h remoteproc: qcom: Introduce helper to store pil info in IMEM 2020-07-01 22:10:18 -07:00
qcom_q6v5_adsp.c remoteproc: qcom: enable in-kernel PD mapper 2024-06-25 07:40:38 -07:00
qcom_q6v5_mss.c remoteproc: qcom: enable in-kernel PD mapper 2024-06-25 07:40:38 -07:00
qcom_q6v5_pas.c remoteproc: qcom: pas: Add support for SA8775p ADSP, CDSP and GPDSP 2024-08-14 19:58:43 -07:00
qcom_q6v5_wcss.c remoteproc: qcom: enable in-kernel PD mapper 2024-06-25 07:40:38 -07:00
qcom_q6v5.c soc: qcom: aoss: Tidy up qmp_send() callers 2023-08-13 19:27:32 -07:00
qcom_q6v5.h remoteproc: qcom: q6v5: Add interconnect path proxy vote 2022-03-11 14:22:03 -06:00
qcom_sysmon.c remoteproc: Explicitly include correct DT includes 2023-07-15 10:35:50 -07:00
qcom_wcnss_iris.c remoteproc: Explicitly include correct DT includes 2023-07-15 10:35:50 -07:00
qcom_wcnss.c remoteproc: qcom_wcnss: Use devm_rproc_alloc() helper 2024-03-05 20:00:04 -08:00
qcom_wcnss.h remoteproc: qcom: wcnss: remove unused qcom_iris_driver declaration 2022-12-28 09:50:07 -06:00
rcar_rproc.c remoteproc: Explicitly include correct DT includes 2023-07-15 10:35:50 -07:00
remoteproc_cdev.c remoteproc: core: Move state checking to remoteproc_core 2022-04-14 11:13:33 -06:00
remoteproc_core.c remoteproc: Make rproc_get_by_phandle() work for clusters 2024-02-06 13:48:09 -08:00
remoteproc_coredump.c remoteproc: core: Export the rproc coredump APIs 2023-07-15 12:56:48 -07:00
remoteproc_debugfs.c remoteproc: Don't bother checking the return value of debugfs_create* 2022-04-11 10:04:40 -06:00
remoteproc_elf_helpers.h remoteproc: fix an typo in fw_elf_get_class code comments 2021-07-28 14:57:30 -05:00
remoteproc_elf_loader.c ELF: fix all "Elf" typos 2023-04-08 13:45:37 -07:00
remoteproc_internal.h remoteproc: Make rproc_class constant 2024-03-26 11:24:38 -06:00
remoteproc_sysfs.c remoteproc: Make rproc_class constant 2024-03-26 11:24:38 -06:00
remoteproc_virtio.c virtio: rename find_vqs_info() op to find_vqs() 2024-07-17 05:20:57 -04:00
st_remoteproc.c remoteproc: st: Use devm_rproc_alloc() helper 2024-02-02 11:36:27 -07:00
st_slim_rproc.c remoteproc: Explicitly include correct DT includes 2023-07-15 10:35:50 -07:00
stm32_rproc.c remoteproc: stm32_rproc: Fix mailbox interrupts queuing 2024-05-28 13:25:38 -06:00
ti_k3_dsp_remoteproc.c remoteproc: k3: Factor out TI-SCI processor control OF get function 2024-08-21 11:21:02 -06:00
ti_k3_m4_remoteproc.c remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem 2024-08-21 11:22:54 -06:00
ti_k3_r5_remoteproc.c remoteproc: k3-r5: Delay notification of wakeup event 2024-08-21 11:27:42 -06:00
ti_sci_proc.h remoteproc: k3: Factor out TI-SCI processor control OF get function 2024-08-21 11:21:02 -06:00
wkup_m3_rproc.c remoteproc: Explicitly include correct DT includes 2023-07-15 10:35:50 -07:00
xlnx_r5_remoteproc.c remoteproc: Use of_property_present() 2024-08-13 09:23:11 -06:00