]> git.karo-electronics.de Git - karo-tx-linux.git/commit
remoteproc: create rpmsg virtio device
authorOhad Ben-Cohen <ohad@wizery.com>
Thu, 20 Oct 2011 16:15:13 +0000 (18:15 +0200)
committerOhad Ben-Cohen <ohad@wizery.com>
Wed, 7 Dec 2011 14:32:58 +0000 (16:32 +0200)
commit3e03cd237933b372101c9074f2d2bd6a6077623a
tree4096837d19c5b8dcf49ae8d338f83279ac0b5cd2
parentdd40edb940069e14d62bd058405be1e4539f2c8e
remoteproc: create rpmsg virtio device

Create an rpmsg virtio device to allow message-based communication
with the remote processor (but only if supported by its firmware).

There are several advantages to provide this functionality at
the remoteproc-level:
- to support it, platforms only have to provide their own ->kick()
  handler; no need to duplicate the rest of the code.
- the virtio device is created only when the remote processor is
  registered and ready to go. No need to depend on initcall magic.
  moreover, we only add the virtio device if the firmware really
  supports it, and only after we know the supported virtio device features.
- correct device model hierarchy can be set, and that is useful
  for natural power management and DMA API behavior.
- when the remote processor crashes (or removed) we only need
  to remove the virtio device, and the driver core will take care of
  the rest. No need to implement any out-of-bound notifiers.
- we can now easily bind the virtio device to its rproc handle, and
  this way we don't need any name-based remoteproc ->get() API.

Currently we only support creating a single rpmsg virtio device per
remote processor, but later this is going to be extended to support
creating numerous virtio devices of other types too (block, net,
console...).

Designed with Brian Swetland <swetland@google.com>.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Cc: Brian Swetland <swetland@google.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg KH <greg@kroah.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
drivers/remoteproc/Makefile
drivers/remoteproc/remoteproc_rpmsg.c [new file with mode: 0644]