Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1390176pxf; Fri, 12 Mar 2021 08:26:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzH6vCVyjhP80zgu8pgc92HhVlKwKb3hlLWHuAcppms47jTy1vKpJtgNV6mq0ItqWcyhkR9 X-Received: by 2002:aa7:c3c4:: with SMTP id l4mr14807238edr.335.1615566413682; Fri, 12 Mar 2021 08:26:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615566413; cv=none; d=google.com; s=arc-20160816; b=ShQtklyiFCkeioFpsaYey/YqGqZu2pDaydlHa1+fH1h1zkCoeStytW4xMz5VyRZKR/ EjJ/JFtbholB8jR5lbtBzo1hlnm/M/2ya/tmh+oXvI91S7SvhK2vE3NZL5JUn7bbHggi HC22N2JUShqzAlq0bCC/FA2eS9mPmxx/VxFYemRcF4ryuCVyK5rIuNCpYgY3ZOl/k9RY pIFfHwD8LdOwqXt5xlqHNF9IAvlRCN+ij8BhpbTh0k6ijUQIf9TqbGodzMAZ5tko6RqD 2wj6ynksOBv5So/qXVGxKddIAqN9+3HJw9YKqLzNgqvW6rSebFwPJejukhqswWGCjtf8 RX2A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XYqKe5JHKTsf6qqgvmLT8SEOr6JSbsFQUrC6la75+Tk=; b=gmCIQi/Pgsa2/mutnnwE+lAehunbrfeBDKhbAKPeeckHkG14x9hdZ/nSMQ72AQecjF Rmo2qpZeCbcWp5ByhKht/hKimxNH1kMdAZHRJ0mMJJU48yJ5JuIDjFkLcniceG6QGe4j fnNzk5HIfPhAwCftfbe2OVNl4k5kLQHndIpTuSK9gMVnwBeje6MFzhCBwvKvbqiwjTQ3 bnvhLI1kia6zDuVwTCjRI+zO/MUHkliP24NXATORCG1JCe/ELBsVkKq8T7EPA86urVkM OloYN+THBtUQ7Udajr7s5ODDi02etIBBIjOcJfRi76gq0V3RlIGkt2aW/fMaGx7K+Frt 0eIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NSR3WPj9; 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 n15si4790217edy.108.2021.03.12.08.26.30; Fri, 12 Mar 2021 08:26:53 -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; dkim=pass header.i=@linaro.org header.s=google header.b=NSR3WPj9; 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 S232840AbhCLQZl (ORCPT + 99 others); Fri, 12 Mar 2021 11:25:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232702AbhCLQZF (ORCPT ); Fri, 12 Mar 2021 11:25:05 -0500 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44735C061761 for ; Fri, 12 Mar 2021 08:25:05 -0800 (PST) Received: by mail-pj1-x1030.google.com with SMTP id kk2-20020a17090b4a02b02900c777aa746fso11294600pjb.3 for ; Fri, 12 Mar 2021 08:25:05 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=XYqKe5JHKTsf6qqgvmLT8SEOr6JSbsFQUrC6la75+Tk=; b=NSR3WPj9kVNOA3Z+lyfGa5gZK8OdIdz44lqCk0bWIR75Fl1XpX52MaSy+gCFgyriLE lk3wU8lymjl4n+0SAKdE1CIpBYg/f5vhemjcwiFSjYdBfe4sqHxIGz/+vYqBR2OQW3vg IJnDoVl6TVZ2ce64zpgNhkrPkjrEG1Bj5LpvC8HF9FKweSh44nXA9NdTL7tZPeVhj2xi jzPe8ViHhVICXCW919IGffk6+BuRtqZszzqbEDzkTvckOF4FuvM/0L8u7aO16VxXz9GN HEb7ln5+PTDT2fHC8gVGNdXOOrO+SmFIBMggLrCZjvZxAcz2XpQ08fyev+TxEdbqXvEd uVrQ== 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=XYqKe5JHKTsf6qqgvmLT8SEOr6JSbsFQUrC6la75+Tk=; b=ZSCPpbq1OtsUH24mAu/o2Fdefkfnt8XhJ8cYPPIdZHGu7PdNeTU+4Ub0NMYgNFjMXn y1iD43vx+gj0ZzDFF3bcLGgNdmJLosEH+Rb9SxAyVsA5gGeeg1wtvxL8zCdhsRf5cqNX 6bMhw6BiLSuEb+UFwIdVReMQIaNVDJ4k7Kj/277MkIJFqfLkwpKlpvAcPc7jzKl5SpX6 +9haZZOk1v+0KMD6cYLG/EwC7Lh3DoppTMF493hpcQ1YmB7pynCzEhFaBJUiEYuwM2rq EhBbFe+qbyZ7AZZxaHP6Cb6iUxKExJ7yhBsfr4b+iRqeHoKwtRTKud5Ri9qn5ZIBqpT0 tLuw== X-Gm-Message-State: AOAM530KPtx7VRJyVtzQC4hSXwwhHAEDmCXujWGaOEWgCAwOA8nmhUbY jmg7b5fb+Zw3ACS4U0V9mYpXgw== X-Received: by 2002:a17:902:e806:b029:e5:cb85:dc4d with SMTP id u6-20020a170902e806b02900e5cb85dc4dmr14247156plg.11.1615566304850; Fri, 12 Mar 2021 08:25:04 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id e8sm5899599pgb.35.2021.03.12.08.25.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 08:25:04 -0800 (PST) From: Mathieu Poirier To: bjorn.andersson@linaro.org, ohad@wizery.com Cc: arnaud.pouliquen@st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v8 08/17] remoteproc: Add new detach() remoteproc operation Date: Fri, 12 Mar 2021 09:24:44 -0700 Message-Id: <20210312162453.1234145-9-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210312162453.1234145-1-mathieu.poirier@linaro.org> References: <20210312162453.1234145-1-mathieu.poirier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add an new detach() operation in order to support scenarios where the remoteproc core is going away but the remote processor is kept operating. This could be the case when the system is rebooted or when the platform driver is removed. Signed-off-by: Mathieu Poirier Reviewed-by: Peng Fan Reviewed-by: Arnaud Pouliquen --- include/linux/remoteproc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index 51538a7d120d..eff55ec72e80 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -361,6 +361,7 @@ enum rsc_handling_status { * @start: power on the device and boot it * @stop: power off the device * @attach: attach to a device that his already powered up + * @detach: detach from a device, leaving it powered up * @kick: kick a virtqueue (virtqueue id given as a parameter) * @da_to_va: optional platform hook to perform address translations * @parse_fw: parse firmware to extract information (e.g. resource table) @@ -385,6 +386,7 @@ struct rproc_ops { int (*start)(struct rproc *rproc); int (*stop)(struct rproc *rproc); int (*attach)(struct rproc *rproc); + int (*detach)(struct rproc *rproc); void (*kick)(struct rproc *rproc, int vqid); void * (*da_to_va)(struct rproc *rproc, u64 da, size_t len); int (*parse_fw)(struct rproc *rproc, const struct firmware *fw); -- 2.25.1