Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2551315pxb; Thu, 11 Feb 2021 15:52:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9Zdp7LUrwUpOhXZ5Qepd4Jyf8ViUuUoUfl9RU6ifR5kUH1hdvGvh8heIEPJtHbKTUnGyU X-Received: by 2002:a17:906:af86:: with SMTP id mj6mr145106ejb.509.1613087576000; Thu, 11 Feb 2021 15:52:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613087575; cv=none; d=google.com; s=arc-20160816; b=0MwJkXq+54RBZ0hOtSAiKlQuwrBQ99NiTTqVZW/FtBR3WMqRHejBpLoCXhBxPT6gfA zEP9OOGkNRwKF9TNykm6FUFuHCw79C71Q8ejepzgfdMTfiggNDRSwrBJfbjjuNO8eOIw yV053GBjbVeYqE35xLR9Og6HbSGYBTsVb7EIILsDdmYmHcOcOJiLb0LhU7DTOJKY3qDa pJWbjOpFH+TvHkdKfBKjgqIQpGNT+CdO0DWlwLvFsaaqr1YySoahgUeBcNt4ucYmiG5h ifXB6FQBWwt3Y2Pxo2g8sLKCRwyLOtZxmDH0VJUnGTWK1FVDTNooP3q9V2t48+jtfjd9 TtAw== 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=jC3QduA1mR6wm1ekKwXEjm7hb+Nzwy5I+tY/vZ+uxG+aFQS3G3MSorBBf4HTI79mhX GC2/huGab/jITAwMDv0ZPuchcc5T/WFL8rOQ67vXn+ysqcrwCGQhzG7OXHVhCMdqygF2 IwApUMgRKvuSXz+C1BjP0HMOx+86jEwbF2k8ZWc4kKRIhuo8YytIInt4M+HOtAdKk3LE RvyQ1CSW6bfiXBXc9AbHDm1DunyTuFFmg9rOk+C1Mz429CiUcer6ff4pYwztkeHJVhuJ PVwh3r+IVlPUWhhpZJAfOIl9eZZNYPIvlwBrwXvli2G3uqRE6xcoDE/kpwoS2w7H2CXM oqYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JdchHoa7; 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 v14si4728586edr.521.2021.02.11.15.52.32; Thu, 11 Feb 2021 15:52:55 -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=JdchHoa7; 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 S230489AbhBKXvi (ORCPT + 99 others); Thu, 11 Feb 2021 18:51:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230368AbhBKXsy (ORCPT ); Thu, 11 Feb 2021 18:48:54 -0500 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 316CAC061A2B for ; Thu, 11 Feb 2021 15:46:39 -0800 (PST) Received: by mail-pj1-x1036.google.com with SMTP id d2so4363524pjs.4 for ; Thu, 11 Feb 2021 15:46: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=JdchHoa7ZVlV5+MdQYZdmvDbjBv5SZjvgzlftSjTAhzph9zIe1p3ew7E3tWtnmAOCq lGFo9sYQDG5tnaXPXoZoXsJxuAle5HmFzbLqhh5pCtluiiaK/nbN+MUixIqVYE1eRGEi s//hd0GCI6nxFs6WVeTc6uH8o7x8Utj9y18AWzaus3ak/KiN0BCqKInCWbXLoN0saB/Q 7pU7ki04U0wtCaOK8bWw4dxnxDblsoe+jjI6+AA9VDTHoH/s1R3Joa3bhSsR9Z0MWlG7 5+gNu0rtYfxoa5iH/WSEg6d4ZrebBa+a7T4Zg2pg01qVMSMJgBVdiUvOlVKwmkMcUU7L zTpg== 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=d95KlFLKfzOoKm5hThZ5Ntb9anRzdYh94KmPZVxG1GsDwiYT2zIOP+XQLbSYWIjsHq ElaW6TZUkWJikNv2d4yy/oeJ9/4mshScwlWamhPmY48FlU1TCgRgOxlDTikQNK7a1VAB If//GfdiBmJX+67JsTBLAFzNakameUw/4ErkRVlnZGqyJU/AUQlTidQnVYwp7Pz5afOa sIeKEW04XLM3ZINiO5yE1wASIhafujBn26O2Un6yBmiUWrbHQ77m+xAFII41n4cylolX SHWeJIzNbd9c6E7TEnnLf8ma+0SMjTG68M9z+fAtaXLaWwHs1NbuZFIO7Bp4/tmFW5e/ rqBw== X-Gm-Message-State: AOAM530QomjPQeqak2vcG9AjvoVzxtR2Z2d/tO4iIT71H2ka+isOcQU5 G5r8NSpYOari0Ak1fKPcE8lwGQ== X-Received: by 2002:a17:902:8c8f:b029:e0:1663:fd34 with SMTP id t15-20020a1709028c8fb02900e01663fd34mr489602plo.84.1613087198802; Thu, 11 Feb 2021 15:46:38 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id iq6sm5932740pjb.6.2021.02.11.15.46.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 15:46:38 -0800 (PST) From: Mathieu Poirier To: ohad@wizery.com, bjorn.andersson@linaro.org, arnaud.pouliquen@st.com Cc: robh+dt@kernel.org, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 10/19] remoteproc: Add new detach() remoteproc operation Date: Thu, 11 Feb 2021 16:46:18 -0700 Message-Id: <20210211234627.2669674-11-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210211234627.2669674-1-mathieu.poirier@linaro.org> References: <20210211234627.2669674-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