From patchwork Thu Nov 26 21:06:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 333053 Delivered-To: patch@linaro.org Received: by 2002:a92:5e16:0:0:0:0:0 with SMTP id s22csp1633909ilb; Thu, 26 Nov 2020 13:08:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJzDT5QACtAHwXLV0V6zpKwudWZiGxUfH+RN2OviWf+EuyMW/GCHERh/lIPXg+XjDV0dxsm4 X-Received: by 2002:a17:906:1752:: with SMTP id d18mr4359173eje.529.1606424895919; Thu, 26 Nov 2020 13:08:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606424895; cv=none; d=google.com; s=arc-20160816; b=O8RU1eieKwaJpOIJL2yb++UWgAF8U7XtPgJHS5XMNONwuWugfqyoIX3iwbn/ZVsAmz glchwhaFMDHGhX7t3XIStxrHk1SCbk++9uhIcx24hOMYl3Ufo8iFzd6PSb4T74YHJreg kcQubZdm7+17qGZLL2Vsix9ZgOqsb5xViTAOyrWC4GP0eepF1yJRXwKE93H2WRkP4oJu 0iSC4bV7RbJlrjrrmiPTGapseP1e8Lr/zJX4WXmDSj66l32Dxxf6wTJB5EEdyUBma2hq hpjr+iXfcBcKtE9zjAhCfpSE0o6tySl/vvBDqcL32/3CwJ3bCP0uXN3iStgH44OGHyEt EuDg== 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:dkim-signature; bh=2RSwp2FaxZrOvHsikh11ndH236WC9DHwtvvMtCMsWVE=; b=Br/7v6QQVcamGSHNGY9blzQsOoWYMY6Kb03bmSissu8KTgsT94IYgRJ0cfjjEAgsPc Q7F0Q0Yh2nvHtD5Kkf6PZXv1XLf6e6Zifv5LlBlHLoG2WREHl+vZiuq0adAXOAtrGQna tkuvufhDpzymEWYcj6GdhdnpdyuRyyU9hMnqzCXhyF+xsmfvMfFfC9XdE1ij8v95c9cn II3LBe+b/nt3YMQBZdNzBd5ok/ZVjZuQR1MEgSFP3axYThZtVkxNjCBsnT9O2y6FX480 9g6oQRjJ56jq2yFq9KtHKzk1Vt6ZXvpEVfjjNLsv9Ng++wFx1YHOhnVllNj8xIQg0M+l Il3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WCLVMJKo; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 k11si3567033ejg.330.2020.11.26.13.08.15; Thu, 26 Nov 2020 13:08:15 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-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=WCLVMJKo; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 S1733051AbgKZVGq (ORCPT + 6 others); Thu, 26 Nov 2020 16:06:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732947AbgKZVGp (ORCPT ); Thu, 26 Nov 2020 16:06:45 -0500 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E519C0617A7 for ; Thu, 26 Nov 2020 13:06:44 -0800 (PST) Received: by mail-pg1-x529.google.com with SMTP id w16so2562393pga.9 for ; Thu, 26 Nov 2020 13:06:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2RSwp2FaxZrOvHsikh11ndH236WC9DHwtvvMtCMsWVE=; b=WCLVMJKohk7tpNgIMveowBplgnFQVZhH9HgOvahmn7+xrODcXctJrrgY00/CccPGwv tyHt5rAF9C2NJvufmc4ZCVcsi8b0UawM/TuHOQjjI4FtHr3jR5w8bh/oirrMYUDsHDpN ttzBDqiYOftZrygCewF/fu1BtQR2MNTVBG+AXFYw2zZMgPEHXiLqxIXeAW1cqORmDjEJ s2mtIMeS+Swup/wHX+wnCOJLH9tsLxVMn+QHdREOG7Hg3WxIJxW72uYkzsIOTdnMSz5Q Rg7Vybd1CsCBms8ONBejFbYhdfccvDBXuCjEBN0zJOGUPhFwp0GlyaXINylnEKYgf8B/ fYsw== 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:mime-version :content-transfer-encoding; bh=2RSwp2FaxZrOvHsikh11ndH236WC9DHwtvvMtCMsWVE=; b=tenTordSrSy/ccjiusTGtv49BmxW2tzSCewgqnKGOTnkfFNx/kcWrzKz3/3BGnD5+/ Bfqsk2YRCFEHTeQY6prKlyQPE3D+t42d4gMKzXvnYN5Ysi8DDKBXN4oiCoo6x3ssRFsg kwCnBCmIkCOy34sjamwBBOlpcaRCKaUsn14C580WIURW/fi9eLlUk5tOeNYkbT7Vsx5v gy+bWKmMhVCqia1//bmqvwAv9hPlQGXwswed4gs8EnE3uXiZe3OmnookwXZJixfpbxue sfVwvTVw66zSil+3ex/yRJ56fqwt8c0QYhDusfkMJVsVt5b5ffmR3gQZhWiPEPAbuCra 4UeA== X-Gm-Message-State: AOAM5330eeaFgASlkUq+srEEjzdlKiaq5X6lefjGPIQVukHkr9LJLJGE m+OcIPEBx8Bcu9lgLlAPOmoz3w== X-Received: by 2002:a63:7b55:: with SMTP id k21mr3901924pgn.256.1606424803641; Thu, 26 Nov 2020 13:06:43 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id c203sm5612676pfc.10.2020.11.26.13.06.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Nov 2020 13:06:43 -0800 (PST) From: Mathieu Poirier To: ohad@wizery.com, bjorn.andersson@linaro.org, robh+dt@kernel.org Cc: linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, arnaud.pouliquen@st.com Subject: [PATCH v3 00/15] remoteproc: Add support for detaching from rproc Date: Thu, 26 Nov 2020 14:06:27 -0700 Message-Id: <20201126210642.897302-1-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Following the work done here [1], this set provides support for the remoteproc core to release resources associated with a remote processor without having to switch it off. That way a platform driver can be removed or the application processor power cycled while the remote processor is still operating. Applies cleanly on rproc-next (c3c21b356505). Thanks, Mathieu [1]. https://lkml.org/lkml/2020/7/14/1600 ---- New for V3: - Added RB from Arnaud where applicable. - Reformatted comments about "detach" operation in struct rproc_ops. - Fixed error path in rproc_shutdown(). - Fixed processing of "start" command in state_store() and rproc_cdev_write(). - Changed binding from "autonomous-on-core-reboot" to "autonomous-on-core-shutdown". - Wrote a proper YAML file for the binding. Mathieu Poirier (15): dt-bindings: remoteproc: Add bindind to support autonomous processors remoteproc: Re-check state in rproc_shutdown() remoteproc: Remove useless check in rproc_del() remoteproc: Add new RPROC_ATTACHED state remoteproc: Properly represent the attached state remoteproc: Properly deal with a kernel panic when attached remoteproc: Add new detach() remoteproc operation remoteproc: Introduce function __rproc_detach() remoteproc: Introduce function rproc_detach() remoteproc: Rename function rproc_actuate() remoteproc: Add return value to function rproc_shutdown() remoteproc: Properly deal with a stop request when attached remoteproc: Properly deal with a start request when attached remoteproc: Properly deal with detach request remoteproc: Refactor rproc delete and cdev release path .../bindings/remoteproc/remoteproc-core.yaml | 25 +++ drivers/remoteproc/remoteproc_cdev.c | 27 ++- drivers/remoteproc/remoteproc_core.c | 182 +++++++++++++++--- drivers/remoteproc/remoteproc_sysfs.c | 20 +- include/linux/remoteproc.h | 18 +- 5 files changed, 225 insertions(+), 47 deletions(-) create mode 100644 Documentation/devicetree/bindings/remoteproc/remoteproc-core.yaml -- 2.25.1