linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Phil Chang <phil.chang@mediatek.com>
Cc: linux-remoteproc@vger.kernel.org, ohad@wizery.com,
	mathieu.poirier@linaro.org, matthias.bgg@gmail.com,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, yj.chiang@mediatek.com,
	mark-pk.tsai@mediatek.com, weiting.tsai@mediatek.com
Subject: Re: [PATCH] remoteproc: export rproc re/unregister to virtio device APIs
Date: Tue, 29 Jun 2021 11:03:45 -0500	[thread overview]
Message-ID: <YNtEYUuW/OKSQlfp@yoga> (raw)
In-Reply-To: <20210629150002.8050-1-phil.chang@mediatek.com>

On Tue 29 Jun 10:00 CDT 2021, Phil Chang wrote:

> In some case, the remote processor already boot up on previous state,
> but still need register to virtio device, so that exported those APIs.
> 
> Signed-off-by: Phil Chang <phil.chang@mediatek.com>
> Signed-off-by: YJ chiang <yj.chiang@mediatek.com>
> ---
> Hi
> 
> In our case, the remote processor is already boot up in u-boot,
> we don't want to boot again or load fw in driver but register to virtio
> device for rpmsg. so that needs those API exported.
> Furthermore, the rproc_vq_interrupt is exported, so those functions
> should be exported also.
> 

Would the recently introduces support in remoteproc for "attaching" to
an already running remote processor be useful to you?


If you don't need a remoteproc driver, but rather just want e.g. a
platform_driver that spawns the appropriate virtio devices, wouldn't
virtio_mmio work?

Regards,
Bjorn

> thanks
> 
>  drivers/remoteproc/remoteproc_virtio.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c
> index 0cc617f76068..e23658a76f5e 100644
> --- a/drivers/remoteproc/remoteproc_virtio.c
> +++ b/drivers/remoteproc/remoteproc_virtio.c
> @@ -425,6 +425,7 @@ int rproc_add_virtio_dev(struct rproc_vdev *rvdev, int id)
>  out:
>  	return ret;
>  }
> +EXPORT_SYMBOL(rproc_add_virtio_dev);
>  
>  /**
>   * rproc_remove_virtio_dev() - remove an rproc-induced virtio device
> @@ -440,3 +441,4 @@ int rproc_remove_virtio_dev(struct device *dev, void *data)
>  	unregister_virtio_device(vdev);
>  	return 0;
>  }
> +EXPORT_SYMBOL(rproc_remove_virtio_dev);
> -- 
> 2.18.0
> 

      reply	other threads:[~2021-06-29 16:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-29 15:00 [PATCH] remoteproc: export rproc re/unregister to virtio device APIs Phil Chang
2021-06-29 16:03 ` Bjorn Andersson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YNtEYUuW/OKSQlfp@yoga \
    --to=bjorn.andersson@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mark-pk.tsai@mediatek.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=matthias.bgg@gmail.com \
    --cc=ohad@wizery.com \
    --cc=phil.chang@mediatek.com \
    --cc=weiting.tsai@mediatek.com \
    --cc=yj.chiang@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).