Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp32027pxb; Tue, 23 Feb 2021 17:06:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJx8CWXWmKMUIrcNTdFhZkHLqNpwFtgenai9oZqtG7jfflyMiPgSan0yzIB/wgnRS6X02yPP X-Received: by 2002:a05:6402:5194:: with SMTP id q20mr8886494edd.267.1614128815130; Tue, 23 Feb 2021 17:06:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614128815; cv=none; d=google.com; s=arc-20160816; b=VX7xLWdKXGV5ATqVP3pkf3bpxmnYbbsve65zbnCXwoII7dEM7ccT1K/T4S7kCFF55B v4Va4H2ISDqKfH0USNfiG+2Xo+aBUuIzulLiUsKgsIdRjQ5ErwNKSd+qg/cwyNQohG0u O7bk52QzR2pMKAV6GMy5S7ZFyud0wVx17+R5/0mBW0ZFoSNtVULh93qrsp/kdAcHYeLv vlTCtuO8jdhDD+ug0b8QF/mR32RfBVMi1AJCXHxqYK5R0pExy1ve6qS2m5VIaYRxE8Ho L7kpSoYCMxm9ITkQxliBm5O9HJFUExdMuHleYksRJv5vAsCR15ps8V23gmTnToF+WAt8 J2dw== 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=laocm7TAbOT+hL0uJYKwnUCEAJ9QdefRBFUjDBBm0h5FiNiwscJBWDiJFl165bBAXP TC4Ho9fy0bXu/oYmK+HdJ7nG/nPiLkjmhDiM5pkO53NnBXivK2hVzpDmAlZlYcrlcO0U O7tzPlwQ9F9pJqUIwFzqqJ0xLhnza9CJbt3a9nLLkGU8RmAmRxNYH86F4veUW6TmQri6 eg0h+XCh8k7hfa9p7OXRKQ+2XfKWKiV+26JBg7l9tXtnxnW+wCs9RLsl37XAHBEgB1Gc U/g/uWZFwbPLVGWpXdll6KDUZl7yEfaaYPkyy+mrOLCF2JJAu4VC2u04RVfQ8hwMwkmU PysA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="MVV3vhm/"; 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 f16si120430edy.263.2021.02.23.17.06.12; Tue, 23 Feb 2021 17:06: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="MVV3vhm/"; 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 S233996AbhBWX4i (ORCPT + 99 others); Tue, 23 Feb 2021 18:56:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233666AbhBWXju (ORCPT ); Tue, 23 Feb 2021 18:39:50 -0500 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95917C06121E for ; Tue, 23 Feb 2021 15:35:26 -0800 (PST) Received: by mail-pf1-x42a.google.com with SMTP id r5so28698pfh.13 for ; Tue, 23 Feb 2021 15:35:26 -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=MVV3vhm//Qy9ZrlCKMb16NdKTMroR2imuUkINcRxjjux/bl+uLuSLPbpRD1+1mGIZ2 /+sbA0DrgyiBvh1ce7jR11k4/prDQABZEu8ZLl3253su/2GxBM+oPNcmyeOpwTYRE+7z +rEw6KT7cYrDATX1TD0OrKkoCUkaxwMFoCtsF8rAZqLVI00FRRM7Smxj+VDWVRSjMIV3 OThZC45qFdxVv2NFrY+eZC93qdE+bRPGGmbzveBgWmpKZ2ubGAN8sVI9cO3knHgUkDs5 DIp1kZYv0d42wEBFiWsihBdlBZHobFfXoZup1cI+LlhkMqK7Dncr90uKVhwBfkAxZDjG Lq9Q== 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=DnZquPbuxA8caBd/j7PzrxeyhRxG4a3E2PA6BxW1aAjYAVTsgnNZUsJVXLiYInfpJG zgcInT/vpQYovWfJtdolKuDeTbkL7stYMm5ee7rG7ylWeC+BVab3Bg1rtmBlaT3sO2MQ RCkf1KpswgO3ka6fYJPA5lMPRPpHqQRRYmUzAx7aGe4JxkyEGXplSZYtQoFHqcpRpusu WepGx0zWi6aLgpcG8lPSbyPKhx5oMpMGVdw0zVmDzBY/kQZ4dg6TsOYYyrr5LUZENvjP 59v85K8J2dzP01PAWHPT0WZQvZUQicPKdMJWD2VKRBpmB5dxrIKf70o52jTY6Vt0PRm+ MAmQ== X-Gm-Message-State: AOAM53005SSYsWdY6k7spiRnii1aU2C8BX2HuJqEdTMX9KMNG0QApbr+ WVMFrUvj8dc/lhFSez5V/fMl/w== X-Received: by 2002:a63:fc1c:: with SMTP id j28mr26149581pgi.281.1614123326234; Tue, 23 Feb 2021 15:35:26 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id c24sm311999pfd.11.2021.02.23.15.35.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Feb 2021 15:35:25 -0800 (PST) From: Mathieu Poirier To: ohad@wizery.com, bjorn.andersson@linaro.org, arnaud.pouliquen@st.com Cc: 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 v6 08/16] remoteproc: Add new detach() remoteproc operation Date: Tue, 23 Feb 2021 16:35:07 -0700 Message-Id: <20210223233515.3468677-9-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210223233515.3468677-1-mathieu.poirier@linaro.org> References: <20210223233515.3468677-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