diff options
author | Sjur Brændeland <sjur.brandeland@stericsson.com> | 2012-06-19 11:08:18 +0400 |
---|---|---|
committer | Ohad Ben-Cohen <ohad@wizery.com> | 2012-07-15 12:39:01 +0400 |
commit | 4afc89d66c60a372ec15e99eee93621f650b5d17 (patch) | |
tree | a6e8c4cd9ea726de73e967b2f0372230ba73a550 /drivers/remoteproc/remoteproc_core.c | |
parent | 72854fb042b15b6139031a59c4725b3d86708352 (diff) | |
download | linux-4afc89d66c60a372ec15e99eee93621f650b5d17.tar.xz |
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>
Diffstat (limited to 'drivers/remoteproc/remoteproc_core.c')
-rw-r--r-- | drivers/remoteproc/remoteproc_core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index c68b3bb567f4..f4d6f7bb91fd 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -172,6 +172,7 @@ void *rproc_da_to_va(struct rproc *rproc, u64 da, int len) return ptr; } +EXPORT_SYMBOL(rproc_da_to_va); int rproc_alloc_vring(struct rproc_vdev *rvdev, int i) { @@ -1150,6 +1151,9 @@ struct rproc *rproc_alloc(struct device *dev, const char *name, atomic_set(&rproc->power, 0); + /* Set ELF as the default fw_ops handler */ + rproc->fw_ops = &rproc_elf_fw_ops; + mutex_init(&rproc->lock); idr_init(&rproc->notifyids); |