From 8bf8e216143f48d39153ead30206619d1d7698c8 Mon Sep 17 00:00:00 2001 From: Bowen Wang Date: Tue, 6 Feb 2024 10:20:56 +0800 Subject: [PATCH] rptun: should initialize the vring da when da == 0 || da == -1 Be compatible with Linux, Linux remoteproc will init the vring.da when da == FW_RSC_U32_ADDR_ANY Signed-off-by: Bowen Wang --- drivers/rptun/rptun.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/rptun/rptun.c b/drivers/rptun/rptun.c index e3998341f0..b176aecc55 100644 --- a/drivers/rptun/rptun.c +++ b/drivers/rptun/rptun.c @@ -706,7 +706,10 @@ static int rptun_dev_start(FAR struct remoteproc *rproc) v0sz = ALIGN_UP(vring_size(rsc->rpmsg_vring0.num, align0), align0); v1sz = ALIGN_UP(vring_size(rsc->rpmsg_vring1.num, align1), align1); - if (rsc->rpmsg_vring0.da == 0 || rsc->rpmsg_vring1.da == 0) + if (rsc->rpmsg_vring0.da == 0 || + rsc->rpmsg_vring0.da == FW_RSC_U32_ADDR_ANY || + rsc->rpmsg_vring1.da == 0 || + rsc->rpmsg_vring1.da == FW_RSC_U32_ADDR_ANY) { tbsz = ALIGN_UP(sizeof(struct rptun_rsc_s), MAX(align0, align1));