diff options
author | Richard Zhu <hongxing.zhu@nxp.com> | 2018-09-14 16:29:58 +0800 |
---|---|---|
committer | Jason Liu <jason.hui.liu@nxp.com> | 2019-02-12 10:34:04 +0800 |
commit | 859ec31b3a7cfefab190ab0047dee6084ddf4ef2 (patch) | |
tree | e95191157309726be98e5c8e7d41b3732ad0418c /drivers/rpmsg | |
parent | 6038fc9d37645c45046ed6787a197fa7f5b2f6d6 (diff) |
MLK-19588-1 imx: rpmsg: use timeout for MU_SendMessage function
- Add the timeout mu msg send api.
- Use the timeout mu send message function to do the
notification when multi-vdev is enabled on one channel.
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Diffstat (limited to 'drivers/rpmsg')
-rw-r--r-- | drivers/rpmsg/imx_rpmsg.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/rpmsg/imx_rpmsg.c b/drivers/rpmsg/imx_rpmsg.c index 7b6e772393fe..4fed5b07f2bc 100644 --- a/drivers/rpmsg/imx_rpmsg.c +++ b/drivers/rpmsg/imx_rpmsg.c @@ -121,8 +121,13 @@ static bool imx_rpmsg_notify(struct virtqueue *vq) mu_rpmsg = rpvq->vq_id << 16; mutex_lock(&rpvq->rpdev->lock); - /* send the index of the triggered virtqueue as the mu payload */ - MU_SendMessage(rpvq->rpdev->mu_base, 1, mu_rpmsg); + /* + * Send the index of the triggered virtqueue as the mu payload. + * Use the timeout MU send message here. + * Since that M4 core may not be loaded, and the first MSG may + * not be handled by M4 when multi-vdev is enabled. + */ + MU_SendMessageTimeout(rpvq->rpdev->mu_base, 1, mu_rpmsg, 200); mutex_unlock(&rpvq->rpdev->lock); return true; |