Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp657194ybg; Mon, 1 Jun 2020 10:57:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzh0D5eh6vWvTYjn2q/hisAElowBQXBqJ6YCMxxP6vcGlrALUmx/yHiMM64KuYNuQAECFs0 X-Received: by 2002:a17:906:2b04:: with SMTP id a4mr20929900ejg.98.1591034253508; Mon, 01 Jun 2020 10:57:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591034253; cv=none; d=google.com; s=arc-20160816; b=qPbftNTgWrbo0GB3J9tkMTPFfC6KGIsst5mMgxkrm/AeUqkSfB5dfCSd7oCcXFGVgk cnZFOPooJcRjb1AtduESVGGAgHSjWL5vB5BzwzH6ymThQpbWlux3zp37RpT8AjsNARAr RDtKkTUKLYXgEzPXGXO7fhrDhq9ZHg0J2vMRGdt5g1a0S70yMF4CGE/JG+XdrJxfYO2W wsljI1ix/5lHzD3MRUm/6YYJH+mZ9vMndsK1cT+uvyp5dS3JUn952iQt2L9oNZFwnIFG fJs9ZOco8giPxW2q1kuHWdwX918Cij0s0Q3lbiGaCiORwSLYjW/vbBeS3iyvov8DQ4V8 /b9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=P8PjysMxQsTesyBq9RtPxt40SNxrNk3UpGWSe+KaZAk=; b=QJjE2T7LQoNU8GERi3OBycU3Vp4vkGhKkrTbkYgDdq4TPwVaTSA+k9brcJBgQabhwp jNmrailhGut/iT+gfghFXZ6BoBai20m6Q7C34dcGGMGpP56Kra739t1OW7Mf8KOQ5Ztz aP7Kd0gWPMpeCyHw2PiVmCQHNHcoyDDy03NMxuLg6ZX/FXgnpUda2L9SwsZNQFqndEB6 XL9lrEz+HhfqhtK6/6+E0GglMihWiJuh1vn3VXk1gVCyM5a9a8OZ0HVYt3aRtZrFlB+M Hf8rS2kjVhCz0pDm79Gfak/Q/DPn5lA466BBQKAXEoNxR2ZK8XY+oa1Laql4dvgolU9e V9bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="BWXu/xDa"; 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 i16si118814ejh.449.2020.06.01.10.57.07; Mon, 01 Jun 2020 10:57:33 -0700 (PDT) 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="BWXu/xDa"; 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 S1727924AbgFARvo (ORCPT + 99 others); Mon, 1 Jun 2020 13:51:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727113AbgFARvm (ORCPT ); Mon, 1 Jun 2020 13:51:42 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71B38C08C5C9 for ; Mon, 1 Jun 2020 10:51:42 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id nu7so150310pjb.0 for ; Mon, 01 Jun 2020 10:51:42 -0700 (PDT) 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=P8PjysMxQsTesyBq9RtPxt40SNxrNk3UpGWSe+KaZAk=; b=BWXu/xDaB7Gom168KNfT9sEGUCx9HCvG2fUEZZzcFrkLnf5pak77an8GMxPHPV3YG9 jAzqED+enSbOrtks+Jj5ZMLpCDxB1t/ppugU8ByhTPalu3JGukALAk4DBEd4tNP5Sw5m 6rycEYQ+9FQmP5PY6T2ZsS4fM08Rmr2tF2yWS4SGWDNNp/hLmAvu/wYut4z7LBqIjopY j60SEWC1Lfro3r+KbKVlCI1YsRUqdEknRi1S1EUTOT5cgiewamDhcIAqiLHrcdJd3gJL VmwNw8Z2MkXlfb9WuMWiNehklpcZs5IG8gnB/qHXf60jtNRUGRmlVhX1R8NEBQKgw4g5 R4bg== 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=P8PjysMxQsTesyBq9RtPxt40SNxrNk3UpGWSe+KaZAk=; b=k/zxZIv6FV4QQ3Dr6GRaz5B8zuCiyEEJ5I7dC+ZYIKcdcM5NFJuz/FNP1laNDjF7co wa131lW/Ghk7K9GFHC34JklXQErAeqTGGr0bSSjTiqc14KiX9MeDMvxhs2ukfdLCpf/r FFBCqCVabPO2Z1NL9C+rGkuRA8kidE1Sct/UEtUwEwctVS2WahBpniCq5ytDYDvXi/iT YsRLrXUevBNzJd2H/h2XAqzm/DKzO6iHEq/0DvMDC6LpPUHbcosmDxuVKjeSwhb0Ksw+ ND49OOWL01eggnCQpKtERDIHa8zPYOk55ZwsyMq86TaQ6RqtKeaO2R3S++xyjHasKA+h fc9g== X-Gm-Message-State: AOAM533CjHyVBY4xfchRxyEXpZSiQZmhr0NonySGtsBgQIhKUm212TU9 4I73U45jQ3qsXHSnFXWCXLYJDg== X-Received: by 2002:a17:902:bb94:: with SMTP id m20mr9344835pls.148.1591033901984; Mon, 01 Jun 2020 10:51:41 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id k12sm58219pfg.177.2020.06.01.10.51.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2020 10:51:41 -0700 (PDT) From: Mathieu Poirier To: bjorn.andersson@linaro.org, ohad@wizery.com Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, loic.pallardy@st.com, arnaud.pouliquen@st.com, s-anna@ti.com Subject: [PATCH v4 1/9] remoteproc: Add new RPROC_DETACHED state Date: Mon, 1 Jun 2020 11:51:31 -0600 Message-Id: <20200601175139.22097-2-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200601175139.22097-1-mathieu.poirier@linaro.org> References: <20200601175139.22097-1-mathieu.poirier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a new RPROC_DETACHED state to take into account scenarios where the remoteproc core needs to attach to a remote processor that is booted by another entity. Signed-off-by: Mathieu Poirier --- drivers/remoteproc/remoteproc_sysfs.c | 1 + include/linux/remoteproc.h | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/remoteproc_sysfs.c b/drivers/remoteproc/remoteproc_sysfs.c index 7f8536b73295..8b462c501465 100644 --- a/drivers/remoteproc/remoteproc_sysfs.c +++ b/drivers/remoteproc/remoteproc_sysfs.c @@ -71,6 +71,7 @@ static const char * const rproc_state_string[] = { [RPROC_RUNNING] = "running", [RPROC_CRASHED] = "crashed", [RPROC_DELETED] = "deleted", + [RPROC_DETACHED] = "detached", [RPROC_LAST] = "invalid", }; diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index e7b7bab8b235..21182ad2d059 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -400,6 +400,8 @@ struct rproc_ops { * @RPROC_RUNNING: device is up and running * @RPROC_CRASHED: device has crashed; need to start recovery * @RPROC_DELETED: device is deleted + * @RPROC_DETACHED: device has been booted by another entity and waiting + * for the core to attach to it * @RPROC_LAST: just keep this one at the end * * Please note that the values of these states are used as indices @@ -414,7 +416,8 @@ enum rproc_state { RPROC_RUNNING = 2, RPROC_CRASHED = 3, RPROC_DELETED = 4, - RPROC_LAST = 5, + RPROC_DETACHED = 5, + RPROC_LAST = 6, }; /** -- 2.20.1