diff options
| author | Peng Fan <[email protected]> | 2022-09-28 14:47:55 +0800 |
|---|---|---|
| committer | Mathieu Poirier <[email protected]> | 2022-09-28 10:46:21 -0600 |
| commit | 49f27f2b4bfa8b6e26f02df615e544f52648bfb2 (patch) | |
| tree | 214422e36799b09e9bd331b84e2b6a246974e564 /include/linux | |
| parent | 1d7b61c06dc310421911dac7c5d2d15b754c8b63 (diff) | |
remoteproc: Introduce rproc features
remote processor may support:
- boot recovery with help from main processor
- self recovery without help from main processor
- iommu
- etc
Introduce rproc features could simplify code to avoid adding more bool
flags
Acked-by: Arnaud Pouliquen <[email protected]>
Signed-off-by: Peng Fan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mathieu Poirier <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/remoteproc.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index 1abf56ad02da..fe8978eb69f1 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -490,6 +490,20 @@ struct rproc_dump_segment { }; /** + * enum rproc_features - features supported + * + * @RPROC_FEAT_ATTACH_ON_RECOVERY: The remote processor does not need help + * from Linux to recover, such as firmware + * loading. Linux just needs to attach after + * recovery. + */ + +enum rproc_features { + RPROC_FEAT_ATTACH_ON_RECOVERY, + RPROC_MAX_FEATURES, +}; + +/** * struct rproc - represents a physical remote processor device * @node: list node of this rproc object * @domain: iommu domain @@ -530,6 +544,7 @@ struct rproc_dump_segment { * @elf_machine: firmware ELF machine * @cdev: character device of the rproc * @cdev_put_on_release: flag to indicate if remoteproc should be shutdown on @char_dev release + * @features: indicate remoteproc features */ struct rproc { struct list_head node; @@ -570,6 +585,7 @@ struct rproc { u16 elf_machine; struct cdev cdev; bool cdev_put_on_release; + DECLARE_BITMAP(features, RPROC_MAX_FEATURES); }; /** |