remoteproc: Add remoteproc character device interface
Add the character device interface into remoteproc framework. This interface can be used in order to boot/shutdown remote subsystems and provides a basic ioctl based interface to implement supplementary functionality. An ioctl call is implemented to enable the shutdown on release feature which will allow remote processors to be shutdown when the controlling userspace application crashes or hangs. Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org> Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org> Link: https://lore.kernel.org/r/1596044401-22083-2-git-send-email-sidgup@codeaurora.org [bjorn: s/int32_t/s32/ per checkpatch] Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:

committed by
Bjorn Andersson

parent
2f3ee5e481
commit
4476770881
@@ -38,6 +38,7 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/virtio.h>
|
||||
#include <linux/cdev.h>
|
||||
#include <linux/completion.h>
|
||||
#include <linux/idr.h>
|
||||
#include <linux/of.h>
|
||||
@@ -509,6 +510,8 @@ struct rproc_dump_segment {
|
||||
* @autonomous: true if an external entity has booted the remote processor
|
||||
* @dump_segments: list of segments in the firmware
|
||||
* @nb_vdev: number of vdev currently handled by rproc
|
||||
* @char_dev: character device of the rproc
|
||||
* @cdev_put_on_release: flag to indicate if remoteproc should be shutdown on @char_dev release
|
||||
*/
|
||||
struct rproc {
|
||||
struct list_head node;
|
||||
@@ -546,6 +549,8 @@ struct rproc {
|
||||
int nb_vdev;
|
||||
u8 elf_class;
|
||||
u16 elf_machine;
|
||||
struct cdev cdev;
|
||||
bool cdev_put_on_release;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user