Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7d2d3956 authored by Mark Grosen's avatar Mark Grosen Committed by Ohad Ben-Cohen
Browse files

remoteproc: avoid registering a virtio device if not supported



Let remoteproc know when the firmware doesn't support any virtio
functionality, so registering a virtio device can be avoided.

This is needed for remote processors that doesn't require any
virtio-based communications, but are still controlled via remoteproc.

[ohad@wizery.com: write commit log]

Signed-off-by: default avatarMark Grosen <mgrosen@ti.com>
Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
parent 0798e1da
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -695,7 +695,7 @@ static int
rproc_handle_virtio_rsc(struct rproc *rproc, struct fw_resource *rsc, int len)
rproc_handle_virtio_rsc(struct rproc *rproc, struct fw_resource *rsc, int len)
{
{
	struct device *dev = rproc->dev;
	struct device *dev = rproc->dev;
	int ret = 0;
	int ret = -ENODEV;


	for (; len >= sizeof(*rsc); rsc++, len -= sizeof(*rsc))
	for (; len >= sizeof(*rsc); rsc++, len -= sizeof(*rsc))
		if (rsc->type == RSC_VIRTIO_DEV) {
		if (rsc->type == RSC_VIRTIO_DEV) {