diff options
author | Suman Anna <s-anna@ti.com> | 2020-11-20 21:20:42 -0600 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2020-11-25 23:05:24 -0600 |
commit | 4c1ad562d303526b5d9b49f5e0d72da13ef78dec (patch) | |
tree | 5303f34be98c41eb1e95b98b6a938c2919e685d9 /include/linux/remoteproc.h | |
parent | 0ac72f909ffe37d829deb1d18d057c83bec5e3b1 (diff) |
remoteproc: Add a rproc_set_firmware() API
A new API, rproc_set_firmware() is added to allow the remoteproc platform
drivers and remoteproc client drivers to be able to configure a custom
firmware name that is different from the default name used during
remoteproc registration. This function is being introduced to provide
a kernel-level equivalent of the current sysfs interface to remoteproc
client drivers, and can only change firmwares when the remoteproc is
offline. This allows some remoteproc drivers to choose different firmwares
at runtime based on the functionality the remote processor is providing.
The TI PRU Ethernet driver will be an example of such usage as it
requires to use different firmwares for different supported protocols.
Also, update the firmware_store() function used by the sysfs interface
to reuse this function to avoid code duplication.
Reviewed-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
Signed-off-by: Suman Anna <s-anna@ti.com>
Link: https://lore.kernel.org/r/20201121032042.6195-1-s-anna@ti.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'include/linux/remoteproc.h')
-rw-r--r-- | include/linux/remoteproc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index 3fa3ba6498e8..e8ac041c64d9 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -653,6 +653,7 @@ rproc_of_resm_mem_entry_init(struct device *dev, u32 of_resm_idx, size_t len, int rproc_boot(struct rproc *rproc); void rproc_shutdown(struct rproc *rproc); +int rproc_set_firmware(struct rproc *rproc, const char *fw_name); void rproc_report_crash(struct rproc *rproc, enum rproc_crash_type type); int rproc_coredump_add_segment(struct rproc *rproc, dma_addr_t da, size_t size); int rproc_coredump_add_custom_segment(struct rproc *rproc, |