Commit Graph

5 Commits

Author SHA1 Message Date
Hou Zhiqiang
46856a00ce [HRPN-917] rpmsg: imx_rpmsg: Change the notifying to timeout mode
Currently, after the rpmsg link up it will use mailbox
channel in blocking mode to send the notifications. So
it will be stuck in the notification when the remote side
unable to respond for some reason, such as crashed.

To avoid interlock, this patch changes the notifying to
timeout mode, and treats the virtqueue as broken when
the remote side doesn't respond within 1 second.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2023-10-30 16:10:27 +08:00
Richard Zhu
65c13fcb7c LF-44 rpmsg: imx: add the rpmsg tty demo
Add the rpmsg tty demo for iMX AMP platforms.
Use the "echo <string> > /dev/*RPMSG*", after insmod the module.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
[ Aisheng: cope with tty_operations::write() change ]
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
2023-10-30 16:10:26 +08:00
Richard Zhu
49c5b8cd1e rpmsg: imx: enable the tx_block mechanism in the flow
- Enable the tx_block mechanism to make sure that every transmission is
  complete when mailbox is used.
- Refine the data exchange in the rpmsg_rx_callback and some info
  messages and codes comments.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
2023-10-30 16:10:26 +08:00
Robin Gong
a388cfc5b5 rpmsg: imx_rpmsg: add partition reset notify
Add partition reset notify if m4 reset so that rpmsg channel
could re-create again while m4 come back.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
2023-10-30 16:10:26 +08:00
Richard Zhu
1cd9e0aaf0 rpmsg: imx: add the initial imx rpmsg support
Based on "virtio_rpmsg_bus" driver, This patch-set is used to set up
the communication mechanism between A core and M core on i.MX AMP SOCs.

Add the initial imx rpmsg support glue driver and one pingpong demo,
demonstrated the data transactions between A core and remote M core.
Distributed framework is used in IMX RPMSG implementation, refer to the
following requirements:
  - The CAN functions contained in M core and RTOS should be ready and
    complete functional in 50ms after AMP system is turned on.
  - Partition reset. System wouldn't be stalled by the exceptions (e.x
    the reset triggered by the system hang) occurred at the other side.
    And the RPMSG mechanism should be recovered automactilly after the
    partition reset is completed.
In this scenario, the M core and RTOS would be kicked off by bootloader
firstly, then A core and Linux would be loaded later. Both M core/RTOS
and A core/Linux are running independly.

One physical memory region used to store the vring is mandatory required
to pre-reserved and well-knowned by both A core and M core

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
2023-10-30 16:10:26 +08:00