Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp258030pxa; Wed, 26 Aug 2020 09:48:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwH025QCIkJ8PxLPagQ0S7iQhfK6a/+4PdQ6TdoPgn2LJFJO/ioqc51A9oVjOunUsV7WqCo X-Received: by 2002:a17:907:2066:: with SMTP id qp6mr7468403ejb.85.1598460482197; Wed, 26 Aug 2020 09:48:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598460482; cv=none; d=google.com; s=arc-20160816; b=OxZQdQlLeO+rIMD9xXsKg/JDf5rhIaKE7gg4xKArXRlALXMsugHd9ysk36+AXa8G3M 6j9fzW0ueMexuXbS0L+QA+LzwtpehUiuD0Sb880e7SjSnoW6xgxAE3wr06KE0x4iZMFh 5bG3UinX2ji2ota5GyQoMSuneLByKYemDVjDS6Nf1O23e9OQsudArh0P4BMqKlcy88qT kVvy6U2yqPOjU0Z19o9XlULTWLlqj3x7RdTxpRcbcQkCuHPOK4S4VrM19xOuz3CwL2a5 kxi/ja3LdIfwRR52sxd/kY88u4dtAOewRVW+1SVcrqO8/cz0Ynbhs3uMucCsONKVaKxq DQXg== 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=TcCaJSWZ5zZ/Rso84Md8LnddY1FwOKOfNkmuWIoFYnQ=; b=DWVziJt5G2lS5cIpvYY/WeSVhAZGtKXrearQJ9QT/Siy7o3X1NPmdLzYB1zJ+MhpgX zP3mqBQEizpuYu/vns0ELtY2I0zz17KpHUcUtf0ERXxYufuqKTbtw0um29gd0kKaRdAZ yKEtBhc1zjBQ81V74443eYqTW9M4cwQFcZxfnvqI93cHCRMhlOn6dbZ+EtUtMdiK8puN 6P3/vPa9EruNRjjKNJBicljHinrVkfu1/+T3JGuNWe3xJvS71Fik921IrV7w5G66r/Xa wJPxMlajfaI+TcKCGTj7fC5MG5Z3/4F+o/ap/qU8kBnIl/4+msp1DI7SRsXmf8YcsVF8 LJGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dm3yYqUI; 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 h13si1752303eds.293.2020.08.26.09.47.33; Wed, 26 Aug 2020 09:48:02 -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=dm3yYqUI; 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 S1727807AbgHZQqT (ORCPT + 99 others); Wed, 26 Aug 2020 12:46:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727881AbgHZQpl (ORCPT ); Wed, 26 Aug 2020 12:45:41 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09A42C061797 for ; Wed, 26 Aug 2020 09:45:35 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id i13so1150878pjv.0 for ; Wed, 26 Aug 2020 09:45:35 -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=TcCaJSWZ5zZ/Rso84Md8LnddY1FwOKOfNkmuWIoFYnQ=; b=dm3yYqUInguZ89okbV11/vGYlFn82cIagLPzf0RhAV98yFFrfo6gFzi0A+Am5O0Gyc ugVm7/J+o0C60T8u1lkYXbgxuDp1uAWUunJ4hDDQ6aktWXMBcZcE3DFRx7rsZb89V79i phENsosVHMy2FmSQuDkPI5t6YiewbvczlZtupyC7tmVaN41rqiIdwoDsCtwPA3MDM+Um gLbdNlYPKztMByVz7kSoS+1PGlCUjk4Zo6ygy3N0o0rBpLcg2ra4fIgrqwapiqO+xrjZ VqXiWhvM/h4yeN6eBeemv9FFKc6okpYMaLjygSLWkdgijMGF8eATrWjRFfFolw5fBiq7 pD+A== 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=TcCaJSWZ5zZ/Rso84Md8LnddY1FwOKOfNkmuWIoFYnQ=; b=au4khtD3FXAM+dMtjhFungT/8CV+uwAMsnJh6R72y+lRpd0IGTQTzdFVydmx1HZpUC dNbFUudaGwiaZQzY8m2m9fMi+Lbp3CWiBL2uY5qoMWm7mShKjvoAAeDD8Rc9uRGjOyZa z5rAJL9KZH8CGHBjAmN63hXU4WKIawUUUJuyiiBfeUbJ6krRTFri9Enq5/cUU8B4dTe2 UxUzUmZ2IWyvzvaMw0TLKyUYWXu/8eGAyEkltFhc/9EsN1jTWS0MDz9IxGBsLkIYswmV rm5+9kFFF2iMpz0glH6w5dNqtNjOWu8P9mQDfj+VNo53+vFYBwm1EBxrD4CBecONwQ3x mqIg== X-Gm-Message-State: AOAM530fQwm1H9VFAA2lp2NkEA1LBGp2iEvqxtoocN8Vdc2iEytihHYA 0gMwym7tsUKVhThwdFrnUgUSuA== X-Received: by 2002:a17:90a:8909:: with SMTP id u9mr6936602pjn.119.1598460334598; Wed, 26 Aug 2020 09:45:34 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id u3sm2548878pjn.29.2020.08.26.09.45.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 09:45:34 -0700 (PDT) From: Mathieu Poirier To: bjorn.andersson@linaro.org, ohad@wizery.com Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/13] remoteproc: Add new RPROC_ATTACHED state Date: Wed, 26 Aug 2020 10:45:19 -0600 Message-Id: <20200826164529.224476-4-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200826164529.224476-1-mathieu.poirier@linaro.org> References: <20200826164529.224476-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_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 --- 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 eea514cec50e..2d575e6c9eb8 100644 --- a/drivers/remoteproc/remoteproc_sysfs.c +++ b/drivers/remoteproc/remoteproc_sysfs.c @@ -84,6 +84,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 2fa68bf5aa4f..4e107615121a 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -403,6 +403,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 @@ -419,8 +421,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