remoteproc: Support custom firmware handlers
Firmware handling is made customizable. This is done by creating a separate ops structure for the firmware functions that depends on a particular firmware format (such as ELF). The ELF functions are default used unless the HW driver explicitly injects another firmware handler by updating rproc->fw_ops. The function rproc_da_to_va() is exported, as custom firmware handlers may need to use this function. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> [ohad: namespace fixes, whitespace fixes, style fixes] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
This commit is contained in:

committed by
Ohad Ben-Cohen

parent
72854fb042
commit
4afc89d66c
@@ -369,6 +369,7 @@ enum rproc_state {
|
||||
* @priv: private data which belongs to the platform-specific rproc module
|
||||
* @ops: platform-specific start/stop rproc handlers
|
||||
* @dev: virtual device for refcounting and common remoteproc behavior
|
||||
* @fw_ops: firmware-specific handlers
|
||||
* @power: refcount of users who need this rproc powered up
|
||||
* @state: state of the device
|
||||
* @lock: lock which protects concurrent manipulations of the rproc
|
||||
@@ -391,6 +392,7 @@ struct rproc {
|
||||
void *priv;
|
||||
const struct rproc_ops *ops;
|
||||
struct device dev;
|
||||
const struct rproc_fw_ops *fw_ops;
|
||||
atomic_t power;
|
||||
unsigned int state;
|
||||
struct mutex lock;
|
||||
|
Reference in New Issue
Block a user