]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - rpmsg/rpmsg.git/commit
remoteproc: Add a rproc_set_firmware() API
authorSuman Anna <s-anna@ti.com>
Wed, 20 Feb 2019 23:52:00 +0000 (17:52 -0600)
committerSuman Anna <s-anna@ti.com>
Sun, 24 Feb 2019 01:17:12 +0000 (19:17 -0600)
commit8541b4dfdfbac7fbdf6d4190ec9e94328dd96593
tree76f59f1e811e5b8007d60b7f4e76a911324b763b
parent6f85a831b4aa90797bfe59ec7614bd3cd2db775b
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.

Signed-off-by: Suman Anna <s-anna@ti.com>
drivers/remoteproc/remoteproc_core.c
drivers/remoteproc/remoteproc_sysfs.c
include/linux/remoteproc.h