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 <wangbowen6@xiaomi.com>
This commit is contained in:
Bowen Wang 2024-02-06 10:20:56 +08:00 committed by Xiang Xiao
parent e11c793b33
commit 8bf8e21614
1 changed files with 4 additions and 1 deletions

View File

@ -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));