Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp130187ybz; Fri, 24 Apr 2020 13:04:31 -0700 (PDT) X-Google-Smtp-Source: APiQypKZaZ2hEKeGEvt3N0lcmd3R1Rpt72isazKQCgX96dcf126pnkcGkTFMeXqytCaW0gJURoVJ X-Received: by 2002:a50:b003:: with SMTP id i3mr8965410edd.303.1587758671343; Fri, 24 Apr 2020 13:04:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587758671; cv=none; d=google.com; s=arc-20160816; b=PUkbNSp63D8rkul9pxK2+Vl69hlZKEi0xlh9XtF+Lkbo45jsNG3IVmw3Qmaxwop8fF T5Q2MtQ2ZqJkGXCEF7M1A0X3182eC2QKXAX8PbokD+nJ/vMV5uo9uZNhoSASUIUtsI9v Wav9BLMgzfCEpKADytY+iCGgfaG4DuLmIrfI/RaB16aRg6Jho56qDAqdzcLntzsCTL+S x0LJ5dmp09r73oxefbIFVI8w4ct2jyUu7esgGrJ9F0UC/uXZtIFy8rdhqmmS0L1CGOyj Xe+xbxrt37aEHoNjqJfXM6Dnjv1TQmYsJrNrs5hTiFzT7s4yugqoCrlaH1cmOPmtQztj o6YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Rb70E/sjGdouOLoWnX7vl3Ag+u7wzfoBCVwZVo3HJd8=; b=zbKbtaaIlW/HMM/SGL6ywsHSpDIlIH4mhIW6fsFk7NZ9fbO8xsNN1CQ+rl06cWMb6U pBSsRtTIeASXj6A0pGrE2dOs+w3c4PmA+RtzQtY93irp0umExq8Xn77bjlr/VRujlITf 8eWjtd9gJc/ebPTBEJiGd3HgvkbOB7oXAN6RGMudAh98N9pPxdYbi2KJ4LL0jfmOWuJW 3sLqJwpL47qMvbu6TWDvWYeGMZ0aoZwW8o6ZTf0Whs3yzu82jJRudaKmAR4lvrgu+GJb I57rDQx/KCnTS3g0wlr/1JUnJFF52SIFW7/1ZG6rKe4iSpnSWuPeK4TjGDKbIlT8V5YD rKwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nQ2U1b8k; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w26si3470527ejb.118.2020.04.24.13.03.53; Fri, 24 Apr 2020 13:04:31 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=nQ2U1b8k; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729538AbgDXUCJ (ORCPT + 99 others); Fri, 24 Apr 2020 16:02:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729499AbgDXUB4 (ORCPT ); Fri, 24 Apr 2020 16:01:56 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EC16C09B04B for ; Fri, 24 Apr 2020 13:01:55 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id k18so4130058pll.6 for ; Fri, 24 Apr 2020 13:01:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Rb70E/sjGdouOLoWnX7vl3Ag+u7wzfoBCVwZVo3HJd8=; b=nQ2U1b8khZFfIfjOuvs7xqMrSwowogjemD4mPQXzUxFybJtnqqu0wz83C9Xy9WzxjK BR5SM0fkeuVtP00aV10s31vFYUrPfKfroOSGtQ+x6c7zp9iEYrg9LYxy2nQo6XVNJK9o tA1hkmNN3wXKGrpFuueUK2WquyplBhHywJqkjiteGWj/SpancKa4wHsaBVd3r+ITQLt5 nZYDGLys/6olCPsbJAs2TYqvlArstuJvbBTyyWSo1tvYu1Yfjaa8t/JPfuKttZwiLnGS kmn3KZKlGNFMPu+I4r7/7/mGV+j+taV3mOtBzqEvITyaCXnXG+PF4q1J1AJATywYH+TO AAhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Rb70E/sjGdouOLoWnX7vl3Ag+u7wzfoBCVwZVo3HJd8=; b=t4rkaA50sz9vKijVkhzlU/CqP6WFNys3Jts0Cm6AP0gcass8YcCgCC3sYcru2AjLlI gu/9sPv4R7pnMxlLhHrz78DRXQQknyPRaW+Rh7PvoMqbZdrHjfqDWkBzoVJAZAzDlhMs 6ak6i7A22aHYtYR5SbtFIVe6fOt1LHF6nclvn2OoYZEMUyV1Il0OSWokAi/dKVygM0nN Nu3lTO4Upa7syZrAOAIP2EEeiYHEp3crlkuRFuaUXjauQ/PzoZtKTl3+6v7IAgfA0wav mxHkTtMJXfn79PzyUPhq6sQo7LSTlLriWInzZYkFcPOtFjuttoaGWi5DMMZfo6+MZY9q htJg== X-Gm-Message-State: AGi0PuYv19HPug8OAarAvhnVM6TWSRhVHwYoGHaPVtXb8yqbJY8JgJYj opKBqH+xTSk0B1sIMTgtOANidg== X-Received: by 2002:a17:90a:1b67:: with SMTP id q94mr8348667pjq.84.1587758514536; Fri, 24 Apr 2020 13:01:54 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id o11sm5532224pgd.58.2020.04.24.13.01.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Apr 2020 13:01:53 -0700 (PDT) From: Mathieu Poirier To: bjorn.andersson@linaro.org, ohad@wizery.com Cc: loic.pallardy@st.com, arnaud.pouliquen@st.com, s-anna@ti.com, linux-remoteproc@vger.kernel.org, corbet@lwn.net, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 13/14] remoteproc: Document function rproc_set_state_machine() Date: Fri, 24 Apr 2020 14:01:34 -0600 Message-Id: <20200424200135.28825-14-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200424200135.28825-1-mathieu.poirier@linaro.org> References: <20200424200135.28825-1-mathieu.poirier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a few words on the newly added rproc_set_state_machine() in order to adversite the new API and help put people into context. Signed-off-by: Mathieu Poirier --- Documentation/remoteproc.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/remoteproc.txt b/Documentation/remoteproc.txt index 2be1147256e0..550ed9a06a27 100644 --- a/Documentation/remoteproc.txt +++ b/Documentation/remoteproc.txt @@ -132,6 +132,23 @@ On success, the new rproc is returned, and on failure, NULL. **never** directly deallocate @rproc, even if it was not registered yet. Instead, when you need to unroll rproc_alloc(), use rproc_free(). +:: + + int rproc_set_state_machine(struct rproc *rproc, + const struct rproc_ops *sync_ops, + struct rproc_sync_flags sync_flags) + +This function should be called for cases where the remote processor has +been started by another entity, be it a boot loader or trusted environment, +and the remoteproc core is to synchronise with the remote processor rather +then boot it. The synchronisation flags @sync_flags tell the core whether +it should synchronise with a remote processor when the core initialises, after +a remote processor has crashed and after it was voluntarily stopped. Operations +provided in the @sync_ops should reflect the reality of the use case. For +example if the remoteproc core is to synchronise with a remote processor at +initialisation time, sync_ops::find_loaded_rsc_table should provide a pointer to +the resource table in memory rather than fetch it from the firmware image. + :: void rproc_free(struct rproc *rproc) -- 2.20.1