Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp614607pxf; Wed, 10 Mar 2021 13:14:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxR4p8CTR2aUCU4eYd8Bv4avEw69O1zKI1VuE6R81JDrFYfVUanY2u4zeOcJb5VtNnabWOd X-Received: by 2002:a17:907:b06:: with SMTP id h6mr380690ejl.144.1615410875010; Wed, 10 Mar 2021 13:14:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615410875; cv=none; d=google.com; s=arc-20160816; b=JAL347ax4iayJrEStKaximSbAG1nr4ZEbOJ2mfUV4oiq9wOGQjdjd6eSzRXjEgOGdI de3q52DkMrxfG5MTkn9xF2wToW1xUqlM4pqBb+uH4DnRhHOJm6ADA17Ej8QIG4njGgeX blqCNc4ARyX2h4twVq5Zy0iytAldFeH1R9EH70yOpPX9w7yhaa6fudTKbDRuG88pDEX/ CUg51kuWFmkKIn/DLGNAE2VpYVMcHDE5DPP0Q0hXgIR6PrCR4rGUUAYr69z+a9Fh3E5P Hcj/GepnGMmPwBrpEs0jXQOlzQz8BGkmzL3q1sYpvmqGRKBXsRiOg6cNGfLsnTQHUlUM QbCg== 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=jibtymtLtv+gyh3Q7f8pov9DKKXUXfRQUkIzgxhKPasTjA//nU/xR/7CT3YiwnzVLW 9jdAY4C3Vkb3tzA4ZVSrNZUQ3TPhJvJYo1PXuab80h8FyajAoVX65ZwzT5O0DTEAu02e Wmt0khQ6/xknOIRiNfNsEPaHnLD/1acL5nzOLieRRzCKFFb46NLToqJAVbWFHCVy1CB6 78FmDSa2N2qp8V9DNVNnPlnvVXJi7lqRR58eo8XVmduVAqyRL8ZVkKvXf+o9RY6y+llF Zn48pDaquQZSV80G3qLwIipJCLz1F19U9eV8hIVat2aBbsOMf9TfFPXaJT41jgBIPirn ZUxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QN2KSeHT; 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 o22si330872ejm.138.2021.03.10.13.14.12; Wed, 10 Mar 2021 13:14:34 -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=QN2KSeHT; 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 S233695AbhCJVLL (ORCPT + 99 others); Wed, 10 Mar 2021 16:11:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232220AbhCJVKu (ORCPT ); Wed, 10 Mar 2021 16:10:50 -0500 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FC07C061762 for ; Wed, 10 Mar 2021 13:10:39 -0800 (PST) Received: by mail-pg1-x535.google.com with SMTP id t37so1425137pga.11 for ; Wed, 10 Mar 2021 13:10:39 -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=QN2KSeHTMIJVqStmupfWoNju+6b6lOBn7SeIpMOv7ikOVNn+APCCBDhoTdRY4ayYYa DptUaojNxDDqkPdyGwyoMDGjz8G//29zZ8+77VxB0lMNsAwpaK1Uc8xYwG7rasPF5M8+ qgL8IEYDPr3MgBl67MFqc6OHDjwO3uNRTituyHBHXX4jkZqdKnRnOpPkahGQp5/KW5Ml pHqZZhPKTuSjgNuhsmR5IzkA3tWw+kWOQA8768qsOYsSxdZH6ddNekUAxGYO5ATssmJb AIx5lNqpjNNxpKs03apoKVWtQGx2ezRAlySvHwEUTQZW3x3WPw+tKzBIJpF5HOBmydCv JhqQ== 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=GZh/gJnIL/Y1kRXJA3qYpMgB3sBbfJr+vEQ6Bxm3DWlno2PynFpoNZYaYyZ3db1bG4 FRjpnDLx1EIFeb7N7+Y9i5e663jloFAPzYD8RWeEDIDf2Z+KxdqQ9U4kNTCGr1038g33 CPVeFIwXowdH3i7sExlhenbpt9/i4WLM5nG6oS5IzvHLMCb4d/AGzESJL1RY8k3D6TbE iBGPJQtaeNFNiuBqST4Nt5MFklXlHIdQlHtCZRjRYvH3CG8g5fQ/R90JodJnyJkuH6a/ oBeajl+Vp/4GQEQjMXumIc3/zOshEVuuXXau/ogWK5wudZfKFHeFCihK7ISygyABd9Yy di+w== X-Gm-Message-State: AOAM530jYMfkORO1sb1ZReZo6whDkYIbHzXM74ALP98sZZfHXAu0Ax12 +rlGAbu06akiiOtvAs8mUsvDZg== X-Received: by 2002:a65:584d:: with SMTP id s13mr4406136pgr.226.1615410639176; Wed, 10 Mar 2021 13:10:39 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id j21sm371508pfc.114.2021.03.10.13.10.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 13:10:38 -0800 (PST) From: Mathieu Poirier To: ohad@wizery.com, bjorn.andersson@linaro.org 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 v7 08/17] remoteproc: Add new detach() remoteproc operation Date: Wed, 10 Mar 2021 14:10:16 -0700 Message-Id: <20210310211025.1084636-9-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210310211025.1084636-1-mathieu.poirier@linaro.org> References: <20210310211025.1084636-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