Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp6461397rwb; Wed, 18 Jan 2023 05:36:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXtsyB1P1+xsNdpnPn3Venays6ceM+eFp5vAltKAncpDYfesSmdoWBX70lW5NlCWq2lrjnBd X-Received: by 2002:a05:6402:524f:b0:49d:6503:9743 with SMTP id t15-20020a056402524f00b0049d65039743mr9623409edd.9.1674048971381; Wed, 18 Jan 2023 05:36:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674048971; cv=none; d=google.com; s=arc-20160816; b=jEDYM/FiSInMAnvAx4KxvF9ED5a12lKVRJ4XhOOBpjTjlRjPB8w7qxhhbp7+M+FpVr tfn0bVqoWAiWxO9szviaNkGhWq00Pbu9zkBOAzCoDjgVD4QJdWprbVcNXUVHdZ8r9Acf ZlGbfpigEvGImQX1ys3OR4GwdhDaDmVcjkYiJg6TJQPGNsFLloF3md23qMvJrscrWZKm pTokBJJiIE0hHNGo07zYiGaFefDzEkufCinP9ASiSFVHjdsDhNuo7ObGIISR3gE5+nl0 Co6DYZuoulPYf8bvJJfSSgaa4EKpPGlaMCGh5EQ9Xkl4w2RVsSRT2WEV6usz6LPpsSDB r2DQ== 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; bh=5E6rG3ubWj6D0VFrrINaf+/PGZw/QHwLQPgaLo3j04A=; b=iERf7iy2fVpkdhN+CjGd36cmFjnhxNeXavZGZ4MLVm492xanBZCx/+fjFVJd6IGJmV 3WxpHlgXmDJygVVcpc/SIupkGmJjVB+5tfWS2vhlESyZRTQz6OM0h2o+M19flpydLGZv ouBHYAhToqFEjdgqzXPhlkKmmgb/91+AlEKDAyR2u0nmT2UkFpORAAzfueBVQ5/j8cov PuIC9oh9hzfWbT5B2cNrCz+8YTKgL0TjVJQrA//xSoG/FZie5U4VmdNJ6ChZGCyhdlAJ 4MePGDt+ZxsdvpwRKA4Quw31HBHrFWlwujXiCbsUMjz3V3qxxHy1TIKvciv8yF3pRhXz DqTw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v17-20020a056402349100b0049e1b840be0si11486526edc.9.2023.01.18.05.36.00; Wed, 18 Jan 2023 05:36:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231250AbjARMxK (ORCPT + 45 others); Wed, 18 Jan 2023 07:53:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230518AbjARMvy (ORCPT ); Wed, 18 Jan 2023 07:51:54 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 364EA46171 for ; Wed, 18 Jan 2023 04:15:11 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 35B631713; Wed, 18 Jan 2023 04:15:53 -0800 (PST) Received: from e120937-lin.. (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 07A943F71A; Wed, 18 Jan 2023 04:15:08 -0800 (PST) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: sudeep.holla@arm.com, james.quinlan@broadcom.com, Jonathan.Cameron@Huawei.com, f.fainelli@gmail.com, etienne.carriere@linaro.org, vincent.guittot@linaro.org, souvik.chakravarty@arm.com, wleavitt@marvell.com, peter.hilber@opensynergy.com, nicola.mazzucato@arm.com, tarek.el-sherbiny@arm.com, quic_kshivnan@quicinc.com, cristian.marussi@arm.com Subject: [PATCH v8 04/17] firmware: arm_scmi: Add flags field to xfer Date: Wed, 18 Jan 2023 12:14:13 +0000 Message-Id: <20230118121426.492864-5-cristian.marussi@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230118121426.492864-1-cristian.marussi@arm.com> References: <20230118121426.492864-1-cristian.marussi@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a flags field to xfer and define a flagbit and related macro to easily identify xfers originated from Raw transmissions. Signed-off-by: Cristian Marussi --- v5 --> v6 - convert is_raw boolean to a bitflag --- drivers/firmware/arm_scmi/protocols.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/firmware/arm_scmi/protocols.h b/drivers/firmware/arm_scmi/protocols.h index 2f3bf691db7c..b5941beb8b03 100644 --- a/drivers/firmware/arm_scmi/protocols.h +++ b/drivers/firmware/arm_scmi/protocols.h @@ -115,6 +115,7 @@ struct scmi_msg_hdr { * - SCMI_XFER_SENT_OK -> SCMI_XFER_RESP_OK [ -> SCMI_XFER_DRESP_OK ] * - SCMI_XFER_SENT_OK -> SCMI_XFER_DRESP_OK * (Missing synchronous response is assumed OK and ignored) + * @flags: Optional flags associated to this xfer. * @lock: A spinlock to protect state and busy fields. * @priv: A pointer for transport private usage. */ @@ -135,6 +136,9 @@ struct scmi_xfer { #define SCMI_XFER_RESP_OK 1 #define SCMI_XFER_DRESP_OK 2 int state; +#define SCMI_XFER_FLAG_IS_RAW BIT(0) +#define SCMI_XFER_IS_RAW(x) ((x)->flags & SCMI_XFER_FLAG_IS_RAW) + int flags; /* A lock to protect state and busy fields */ spinlock_t lock; void *priv; -- 2.34.1