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: 1406888 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=WCLVMJKo; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4Chr1B0qw9z9sSf for ; Fri, 27 Nov 2020 08:07:10 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733051AbgKZVGq (ORCPT ); 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-Google-Smtp-Source: ABdhPJwxeEQIjKpTn0OagaY59ueQhB39UvCG8dzpWHbg09mghBOlddWBx1rNZdnGkC3DTz6y4QOb0g== 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 Reviewed-by: Arnaud Pouliquen Reviewed-by: Arnaud Pouliquen Reviewed-by: Arnaud Pouliquen Reviewed-by: Arnaud Pouliquen