Commit c41767a8 authored by Suman Anna's avatar Suman Anna Committed by Yogesh Lal
Browse files

UPSTREAM: 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.

Bug: 213024513
Change-Id: Ie365179ac296c43c7c5c54b46f9f9f7587d5d263
Reviewed-by: default avatarRishabh Bhatnagar <rishabhb@codeaurora.org>
Signed-off-by: default avatarSuman Anna <s-anna@ti.com>
Link: https://lore.kernel.org/r/20201121032042.6195-1-s-anna@ti.com


Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
(cherry picked from commit 4c1ad562
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

 master)
Signed-off-by: default avatarMukesh Ojha <quic_mojha@quicinc.com>
parent 28d62c68
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment