Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp613176pxf; Wed, 10 Mar 2021 13:12:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJyrXncB1eBNkIiWDpeehxYamTQHriO/EtcLsQe6vW5JTOF+1EOM56GdbXz3tyCLx1QbaDuk X-Received: by 2002:a50:f314:: with SMTP id p20mr5379293edm.236.1615410749626; Wed, 10 Mar 2021 13:12:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615410749; cv=none; d=google.com; s=arc-20160816; b=ctl3PLm80032Q9TSNo85Ycyz3NP+GHN1kD5p1lH4vF9WDTJwQxpxFavhWIcGYCutKD vM/BxPqEtMw+12it0AyXQTxTbNE9spXqZABxJt5W6Zs6ETn5PzykiF2Hlc4c9tn4jrKj BUK9toKRXkQmmS+21F6f4WaDd3hi5vDKhws1bD+Vo0h84qNY68tGJr8A1G1C4e4bMW7N 4TlOJatR8bB86d6UBCWM+y4DHtRbofQ8xRBLkr/mTy0KxdqrHkmzk6zMD/YtP8ZIvYED r7b/nUHdkGpBvsqvWd4LxxKse/fZnyOKjRyx9no8AFjB/pdOVsSSy5fBtv8TrxLWFqsE /Gpw== 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=D10Ii0C2zDBz+rpje2b+AwIRtjYohVSc9V3yji0HIshvxfmYHys/6kDc9Kq1P1cZ3d avVXTh0SWt/9mxZlhJEzK5O8u27fMmdn426BRlUFh56fs516XyeBs+fEEeiFp4FCx7on DxB/H/5LS5rC0dkZ8hluvrwCEhvcTXGIBhZtTvi26YMcbaqWZ9ICPXm1Ghyz5j5OEWKO uHrW9OThVURQPNHAxUaL/vmN27mszQx9u6ImX6vhRiljKbFHo1mhM9TvuXqP9ujy0XUn trA26q+rZEQQPVbs+vNvU3BWZ+m6s4VtvES3+Hd4UrZE1QpxKOwuDNpM9at5vO5D5HwK Q9Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MV3MtVCf; 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 l19si346198ejz.43.2021.03.10.13.11.52; Wed, 10 Mar 2021 13:12:29 -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=MV3MtVCf; 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 S231964AbhCJVK7 (ORCPT + 99 others); Wed, 10 Mar 2021 16:10:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232127AbhCJVKc (ORCPT ); Wed, 10 Mar 2021 16:10:32 -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 8FD4DC061761 for ; Wed, 10 Mar 2021 13:10:32 -0800 (PST) Received: by mail-pj1-x1036.google.com with SMTP id bt4so2331332pjb.5 for ; Wed, 10 Mar 2021 13:10:32 -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=MV3MtVCfys36kxQjse/S+dduV1se8BJOpsCuwXqynbBzsVV007DjUIdgS8PAkz/DRW Ej/2xzVT48CGwzLBvCOE8zYFSEj0t5dx8YugIuy7KPnnJ3xAeP11GRahnIWyiRwGytsF i/AxAG17QYGhD25AGcRPdmcRJ2vE8t449jSBBxzbwcDjOc+tIzRq8M52JjlPapGl29ih Al7k/5/J177VSC7hiTV/T2Qv4rXaBm0nFBH9X2Y7RbGpwYnY4fkS80/2q7+VCM+bhUXW U+a5AD/m7Ub3Soj0YvDU4NrDWg2rNLEDIBf01Aq1+XOxF7QfCyBV2ggNilj/0N3g3bAF lZWA== 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=FAfEwLkn6IqclRVEcD8g33WTtF5gKbId3hD3jVP195SmiQP7/m65bLobRQb49J1ahw QxLkTGvZpl2yqU7BF8/AYmRVvGIDPtKmJc7gTsnJ9nlDYzT9yQ1LIsbfcyO0A4ZPDw+O ara2Tr9iI4/kfDBK5IdfsWj3R5+uWqzI4NzAHFFnZ+l21cG6LeLJLBZVfUfFhWmfq6X0 TD8Oe64ZHO3DX7dFts+vbD2xTI7ZtpmTemGtoIWEA07dORrH6wmN9hbcdJqUGXJ/pCC3 GOGVGyGzwbaiZ4rmr7iAv0OOf+nyd3ur7dD2HxZCY28Q+4T5UTHrGZFllClGNS7z4FFp SaMg== X-Gm-Message-State: AOAM533Q1v9fDoV5tDRCBnoWoUKmZlhF8Y0wXMud4jshfJhvCvrvutrq l4Vo4BfybCylUCHXeuA6JTD5uA== X-Received: by 2002:a17:90a:7e94:: with SMTP id j20mr5658408pjl.8.1615410632062; Wed, 10 Mar 2021 13:10:32 -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.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 13:10:31 -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 03/17] remoteproc: Add new RPROC_ATTACHED state Date: Wed, 10 Mar 2021 14:10:11 -0700 Message-Id: <20210310211025.1084636-4-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 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