Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp30248pxb; Tue, 23 Feb 2021 17:04:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJymxvjGrBOwC8FT2e1t+ppKlRoIROFCUDaghJy7tnCp0N6nhSwAEINFHFhWZvtg5K21cSVA X-Received: by 2002:a05:6402:4252:: with SMTP id g18mr31515519edb.231.1614128659216; Tue, 23 Feb 2021 17:04:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614128659; cv=none; d=google.com; s=arc-20160816; b=rJ7wlxx6C5kQaFwN9M1HrgkT79RqdNEdpWPotB0IBw8pYz9kj6BtDQkl/OIXmCevRy N426K91ju803XKOnvnfG7CljROYvo1l1ME57g2BdhtA9cK7j3mrOPuHptC4/KGboh9uM gUlZj6LEKO/QtC5LgTblIXu/L5xwLzJIZUN4UPQPDDyx+j21eyrznJAOgiFTHWQpt8v2 CziWfMGz1eVbJ6x+3vfQEM+JhZPI9GbmgBn5UuM1QSkC0QgZ+gZcVEoywBo2w+YtMyeH lu8fR5jYoja+Yw01ZJdit2t16YZXfP/DBHCWBsZ3T44gMuXm3dL1/XcXYAoWsd19HYA0 JD4w== 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=waytkFv28UuOXcaaNeh19CxfKAUzKWp03mnaFrOUKvo=; b=MnQyDMZT21lEPN+MyUqYPZ5QXBB7f/bzsREgaUag4i2B/pQzm2imoaZzjMZUVRMEJD 65AXwm0uNbX0M+UM0xzJrjpeOJVQ8uSUExxyFg8m5+qGnDIEXwx5qkLMDp/JL9GrS9cc aWW77onkVQX50++x6pbNCGi4VBYmnogWJltQA0sHvDniDWBSCxMOvodqnDc6e8xEUWin yekko6c8sQX0cXcNeWhlVOlEWExPUdb2+Ip0MqnGwjR3cfGVdfIWjTF/235L5yHDNpmP Pky8TXfCbjjT/02cGwyCEfFvKNNXzdHDMUmvHxD3KGrDPRbgMJ/losr/6Kf3Iju85C6p i0+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sufk6rE3; 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 j20si130660edq.433.2021.02.23.17.03.10; Tue, 23 Feb 2021 17:04:19 -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=sufk6rE3; 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 S232616AbhBWXss (ORCPT + 99 others); Tue, 23 Feb 2021 18:48:48 -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 S232948AbhBWXhY (ORCPT ); Tue, 23 Feb 2021 18:37:24 -0500 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84AF8C061794 for ; Tue, 23 Feb 2021 15:35:20 -0800 (PST) Received: by mail-pl1-x636.google.com with SMTP id 17so7537933pli.10 for ; Tue, 23 Feb 2021 15:35:20 -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=waytkFv28UuOXcaaNeh19CxfKAUzKWp03mnaFrOUKvo=; b=sufk6rE3/dXnMqzi78VzeEuWwNSyI9Jafh5/gweW9kamLR3HYQEs/qr0R2FCq+SpLV TUHEr6smwUpZYibTMKN+7V+oTpSBLajAf4fbj9gUmGw65vUbNqYScn9J+y3IXVaRdrlk o+YGaCC9XXt/0a3xDztIAps6TaKutwVtyv37jY6lnY0HlCHC6AcZ4+ivZJqp8WjfBJSc uJdJEQnEe6FC5u3mu4/GfQTxlCh1znYrjeWMHinbrt1vE1xJM1XfKZDN6XOCeiv5LUhi fHMpsUs5ArvPYM/UlxQjwiM92KTXDpbOcC4f4zRyqF3aNQP/NtJ9Y1cqQ4JK4nSO3555 nPzg== 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=waytkFv28UuOXcaaNeh19CxfKAUzKWp03mnaFrOUKvo=; b=NaOoxH8wvqFS/gH0IVqCtlgscdJLgwrzlhhgdTjwwSEzA4pRQIh4q9GRZKRQqfdi0D 3wHz2zv+x7vTzMQUhQocvrsboA9NzeRmv1fNFjd7504AZcmZLYZMjBGUBBYk0hZmebPv nlCxzWiiQgBS6LePc9GZXnqPW2i2+F1AOoXzME3MeByVwE0lFRHu+fFDy9ktpt/s3Cz+ fyt31mcAFv5WcAfQ4UHlLPty9ZPhx6mEQM2wV8wkMzjUklGl3C21B6lvp2VG+j4Mp4Fl n3Ys+TV7ICdWzOQtXPEXTa9Ulnzwl23ulKHs2+W31lJ4+vEl/en164uHo6xMWTUPd3O9 e/oA== X-Gm-Message-State: AOAM533YIG9vvF9pJ0skbsqGq6oAALei5L0hxDMn3rgCwNvNhQW8QOwY DdZW58txpGm2VcPyygaUQaOe0A== X-Received: by 2002:a17:902:e993:b029:e4:1426:8e71 with SMTP id f19-20020a170902e993b02900e414268e71mr5806317plb.74.1614123320126; Tue, 23 Feb 2021 15:35:20 -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.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Feb 2021 15:35:19 -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 03/16] remoteproc: Add new RPROC_ATTACHED state Date: Tue, 23 Feb 2021 16:35:02 -0700 Message-Id: <20210223233515.3468677-4-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 a new RPROC_ATTACHED 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 Reviewed-by: Peng Fan Reviewed-by: Arnaud Pouliquen --- drivers/remoteproc/remoteproc_sysfs.c | 1 + include/linux/remoteproc.h | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/remoteproc_sysfs.c b/drivers/remoteproc/remoteproc_sysfs.c index 1dbef895e65e..4b4aab0d4c4b 100644 --- a/drivers/remoteproc/remoteproc_sysfs.c +++ b/drivers/remoteproc/remoteproc_sysfs.c @@ -172,6 +172,7 @@ static const char * const rproc_state_string[] = { [RPROC_RUNNING] = "running", [RPROC_CRASHED] = "crashed", [RPROC_DELETED] = "deleted", + [RPROC_ATTACHED] = "attached", [RPROC_DETACHED] = "detached", [RPROC_LAST] = "invalid", }; diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index f28ee75d1005..b0a57ff73849 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -405,6 +405,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_ATTACHED: device has been booted by another entity and the core + * has attached to it * @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 @@ -421,8 +423,9 @@ enum rproc_state { RPROC_RUNNING = 2, RPROC_CRASHED = 3, RPROC_DELETED = 4, - RPROC_DETACHED = 5, - RPROC_LAST = 6, + RPROC_ATTACHED = 5, + RPROC_DETACHED = 6, + RPROC_LAST = 7, }; /** -- 2.25.1