Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2425776pxb; Sun, 15 Nov 2020 04:24:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJzo7HwypN+arskGccZ0pRD+yZUheeQFWrn1rUI+UYx6YT4CDQLSVupTMF78nkz9AzeCtqTk X-Received: by 2002:a17:906:40c9:: with SMTP id a9mr9829782ejk.518.1605443044580; Sun, 15 Nov 2020 04:24:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605443044; cv=none; d=google.com; s=arc-20160816; b=JU2GoqrO4YOingPjeiSxzhh06jwIcL8+c7CXveTmjNwfA3dQvkDW8HJ9wsee/liaun B3ThgnXJPw7CkzoySr1ksykTH1lUxU0sMGcJUpJQOpbNomNlnxyEs/rLVEQSIuJv1sd4 7nubl4S1qX3kHuJZm+3Dd+sc4V7uMzesdBA4hlw+JP7IxtIYuBCypSCRaRpwqPWDMe+e bp6Qcp72Ntb2AAVht92W7Qsmb5xG8V2iXzrnSlR3YDCwJSdw+9ET2R+4c57XSx4ZCU6Z 2424WvqWaG2VHp5fXtKu87iS3s9ZuN28uGz1WJlEwMRwnmXRY7MQso0OnUa9B8kbW9OX aPjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=HsZMAQrd/r0nNR9dFWUrzaeAP9gcED34n7wyCTX5+7c=; b=J7oVm+Tvsx+pihuj1y5AzeCqMV9b+SgKTAtGoU7miID0Q5wYnWur7ROvZ7KovGosv1 Uynp30owLjkaKXrTup0WL4dhGddL0bz8sP3jyEqzKf4xKGYto9Z07DAkoflhRyZwkMeh T919En7yHQCTuMjIcYmAdIw609utE6P1LNdo2eolrVJpjskKXaSiQtMeBdkeOuiePzMV uV596Yof+DxKsu9lUGNxC1Tf7TE0vEqHTIuWfCABTqO9wXcounZKIsjddjxIiDbNSSzo HAWWQRVQ8hv+05Q9baAikS2Hyd6F3bPZxNEAwJFAHd+tbttXp5HATeZ8M84IOuvuQp7Z tTEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y63si2649876ede.581.2020.11.15.04.23.42; Sun, 15 Nov 2020 04:24:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726827AbgKOLvH (ORCPT + 99 others); Sun, 15 Nov 2020 06:51:07 -0500 Received: from aposti.net ([89.234.176.197]:40412 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726537AbgKOLvH (ORCPT ); Sun, 15 Nov 2020 06:51:07 -0500 From: Paul Cercueil To: Ohad Ben-Cohen , Bjorn Andersson Cc: od@zcrc.me, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil Subject: [PATCH] remoteproc: Add module parameter 'auto_boot' Date: Sun, 15 Nov 2020 11:50:56 +0000 Message-Id: <20201115115056.83225-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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