linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] remoteproc: Add module parameter 'auto_boot'
@ 2020-11-15 11:50 Paul Cercueil
  2020-11-20 22:37 ` Mathieu Poirier
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Cercueil @ 2020-11-15 11:50 UTC (permalink / raw)
  To: Ohad Ben-Cohen, Bjorn Andersson
  Cc: od, linux-remoteproc, linux-kernel, Paul Cercueil

Until now the remoteproc core would always default to trying to boot the
remote processor at startup. The various remoteproc drivers could
however override that setting.

Whether or not we want the remote processor to boot, really depends on
the nature of the processor itself - a processor built into a WiFi chip
will need to be booted for the WiFi hardware to be usable, for instance,
but a general-purpose co-processor does not have any predeterminated
function, and as such we cannot assume that the OS will want the
processor to be booted - yet alone that we have a single do-it-all
firmware to load.

Add a 'auto_boot' module parameter that instructs the remoteproc whether
or not it should auto-boot the remote processor, which will default to
"true" to respect the previous behaviour.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 drivers/remoteproc/remoteproc_core.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index dab2c0f5caf0..687b1bfd49db 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -44,6 +44,11 @@
 
 #define HIGH_BITS_MASK 0xFFFFFFFF00000000ULL
 
+static bool auto_boot = true;
+module_param(auto_boot, bool, 0400);
+MODULE_PARM_DESC(auto_boot,
+		 "Auto-boot the remote processor [default=true]");
+
 static DEFINE_MUTEX(rproc_list_mutex);
 static LIST_HEAD(rproc_list);
 static struct notifier_block rproc_panic_nb;
@@ -2176,7 +2181,7 @@ struct rproc *rproc_alloc(struct device *dev, const char *name,
 		return NULL;
 
 	rproc->priv = &rproc[1];
-	rproc->auto_boot = true;
+	rproc->auto_boot = auto_boot;
 	rproc->elf_class = ELFCLASSNONE;
 	rproc->elf_machine = EM_NONE;
 
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-11-23 22:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-15 11:50 [PATCH] remoteproc: Add module parameter 'auto_boot' Paul Cercueil
2020-11-20 22:37 ` Mathieu Poirier
2020-11-20 23:06   ` Suman Anna
2020-11-21 18:47     ` Paul Cercueil
2020-11-22 17:42       ` Suman Anna
2020-11-21 18:38   ` Paul Cercueil
2020-11-22  5:28     ` Bjorn Andersson
2020-11-23 22:44     ` Mathieu Poirier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).