Skip to content

Commit c774ad0

Browse files
sumanannaandersson
authored andcommitted
remoteproc: Fix and restore the parenting hierarchy for vdev
The commit 086d087 ("remoteproc: create vdev subdevice with specific dma memory pool") has introduced a new vdev subdevice for each vdev declared in the firmware resource table and made it as the parent for the created virtio rpmsg devices instead of the previous remoteproc device. This changed the overall parenting hierarchy for the rpmsg devices, which were children of virtio devices, and does not allow the corresponding rpmsg drivers to retrieve the parent rproc device through the rproc_get_by_child() API. Fix this by restoring the remoteproc device as the parent. The new vdev subdevice can continue to inherit the DMA attributes from the remoteproc's parent device (actual platform device). Cc: [email protected] Fixes: 086d087 ("remoteproc: create vdev subdevice with specific dma memory pool") Signed-off-by: Suman Anna <[email protected]> Reviewed-by: Mathieu Poirier <[email protected]> Acked-by: Arnaud Pouliquen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent db9178a commit c774ad0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/remoteproc/remoteproc_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ static int rproc_handle_vdev(struct rproc *rproc, struct fw_rsc_vdev *rsc,
517517

518518
/* Initialise vdev subdevice */
519519
snprintf(name, sizeof(name), "vdev%dbuffer", rvdev->index);
520-
rvdev->dev.parent = rproc->dev.parent;
520+
rvdev->dev.parent = &rproc->dev;
521521
rvdev->dev.dma_pfn_offset = rproc->dev.parent->dma_pfn_offset;
522522
rvdev->dev.release = rproc_rvdev_release;
523523
dev_set_name(&rvdev->dev, "%s#%s", dev_name(rvdev->dev.parent), name);

0 commit comments

Comments
 (0)