Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2688819rdh; Wed, 27 Sep 2023 09:41:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGqDpzwLh3O0h7zh8amWVJUgkKwenLJoobGDBdXgvKsCdMnstO7SfIE26NEHla1D94/bQcf X-Received: by 2002:a17:902:ced0:b0:1c6:2a77:ef50 with SMTP id d16-20020a170902ced000b001c62a77ef50mr2876424plg.29.1695832884991; Wed, 27 Sep 2023 09:41:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695832884; cv=none; d=google.com; s=arc-20160816; b=xfygRK5xwtl2zrPdEic58Zsom2uBjmOhJMewrIt01utD68j/w68f9TzIAOn68U5puL rRzpizY9xf2MLsecjWhFAAgZOCipS5JHxSFzYg6Hn4cn1Przs5UtZVqFsY7Y4O0SzCdE hwMBoovQRNzFPAsCNOdVDB5MNLwlP8PeT8GyGGNsTHgQCE5pK3HffXvP/rvjlXRS9BrO aN0VnbTjgjErsFp96Z/wbrCE3r07k7ecOfFZHJet0P8lqls5TR6JF+Ytr22nwPMLVSxW DIZCzmPpRk8d7lkTEcUOUUh9aPEKVhmxwMabIclbUH1h6AJwBpJhR2CMm1C5AMJ5Mt4V I3KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=/EfuRbbtOD4S8bSH5paEha4tqAHt7JaiI2tG7JkYSmk=; fh=A2fpulUSJa3Z3RbyjIFX9wjax+SVXSZM7OKN6SOoJBI=; b=HAOBW7lJTYTst7SANaj7ykRMJ8m7oZPjQOqUZn24lT8JLokcC2Dr5d7QksTqdpJJjF 7+wVtXdIjeWG4ABYlnjVtMB3lo6HEVoeuOGx+S2+8vHoQcRe5WQHbN7m/aeDcdMwwoZY cy6/umYbg/IYdEVoE5HzWw7lXDPoce3DHFuK2OvDKc9HsSeekEKrCJ9SKEOxEEHn2gzn pLMRctlq/l4OPikfJ+9gQ+DI5Ac46HARzcewQDCGmEDd7NkCcYRKA2Q6VHefWQJnkYmH VB2lJibrhcjfNKJ+M7znV/qLHIbX1Rt/V1Fma89Tt9FjqUwAtD/rrTQTp9NQL1CO10EX 3Dgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id f6-20020a170902684600b001bbca0a8393si9104418pln.56.2023.09.27.09.41.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 09:41:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id CF856802A6E4; Wed, 27 Sep 2023 09:26:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231772AbjI0Q0q (ORCPT + 99 others); Wed, 27 Sep 2023 12:26:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231707AbjI0Q0o (ORCPT ); Wed, 27 Sep 2023 12:26:44 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E1CCD91; Wed, 27 Sep 2023 09:26:42 -0700 (PDT) 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 CFEF5DA7; Wed, 27 Sep 2023 09:27:20 -0700 (PDT) Received: from e103737-lin.cambridge.arm.com (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7C3BD3F59C; Wed, 27 Sep 2023 09:26:41 -0700 (PDT) From: Sudeep Holla Date: Wed, 27 Sep 2023 17:26:10 +0100 Subject: [PATCH v2 1/4] ACPI: PCC: Add PCC shared memory region command and status bitfields MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230927-pcc_defines-v2-1-0b8ffeaef2e5@arm.com> References: <20230927-pcc_defines-v2-0-0b8ffeaef2e5@arm.com> In-Reply-To: <20230927-pcc_defines-v2-0-0b8ffeaef2e5@arm.com> To: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org Cc: Sudeep Holla , "Rafael J. Wysocki" , Andi Shyti , Jean Delvare , Guenter Roeck , Huisong Li X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1393; i=sudeep.holla@arm.com; h=from:subject:message-id; bh=9gga6E/NnFW9yCBghSYbPIOChbwQimJQ3QU3cLoDpm0=; b=owEBbQKS/ZANAwAIAQBBurwxfuKYAcsmYgBlFFe/Me9jLT2XV71r3uVNlo9aPALmZxxlCrgOw X8MaCVxgRiJAjMEAAEIAB0WIQS6ceUSBvMeskPdk+EAQbq8MX7imAUCZRRXvwAKCRAAQbq8MX7i mCA0EACf+1nskGS7DbkO6Bb+xst1fMMtA6+zGRPIS1A70mWfBaih2si4tLQQW3e8g+W3MZPuHwu z21Frb3/hUz7AUY63gcpZS4RcRAP/SSKDsbko3MC2zY0W0maIg2S+hJ03RJ0Eed3aei3/d1515+ AejrTrWhbrNyiRKfPYljB395pUZ+ggYzvrrfDVj46iF/uq4A6KiBLbw0T+Qy5v+Dnyb8Ex4gWl6 FqfkQc2BakOeQrSyxYwjuQQvnWzr155gSsioREoHQv91Lo2xlOJeA1mFCXKiszxAa5xFkaicTxJ rohZFAAgkEKuAI+fpVG9327S3M6QKzUUKZ2bNtzKJHGUCBrjM0k1odWnjadskRJ+UjdK5HOnBK5 noZZe/jjNNKJKBCeL7FFajsSMDbmgMPnnAcdh27KeRFxTmLhPXw+BY8WmmTjE7Iof5boNynuiRB OSKVg5SfX4sZocpU8KJvIS8S0LKULh3pu5alVJ6P5mEjYdLdiXrlehxdtlFsXyZdxPKfLeNNZin I92/l6ZawK/eQ/qvTt28UeZkA0wkDe/8kiD+wOhOpE42kCAgu8st1EAOyWgXgFIMOjNOigPIg4D X225AnPHli9OB9WtyzAf6dRHkr4PYVZyRgPWrwbwQRuaVlmUs30QSwqlucMPWyXwhbFylFNr3Vh sqf0M2/eP9PZlIQ== X-Developer-Key: i=sudeep.holla@arm.com; a=openpgp; fpr=7360A21742ADF5A11767C1C139CFD4755FE2D5B4 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 27 Sep 2023 09:26:56 -0700 (PDT) Define the common macros to use when referring to various bitfields in the PCC generic communications channel command and status fields. Currently different drivers that need to use these bitfields have defined these locally. This common macro is intended to consolidate and replace those. Cc: Rafael J. Wysocki Signed-off-by: Sudeep Holla --- include/acpi/pcc.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/acpi/pcc.h b/include/acpi/pcc.h index 73e806fe7ce7..021891a7434f 100644 --- a/include/acpi/pcc.h +++ b/include/acpi/pcc.h @@ -18,7 +18,20 @@ struct pcc_mbox_chan { u16 min_turnaround_time; }; +/* Generic Communications Channel Shared Memory Region */ +#define PCC_SIGNATURE 0x50424300 +/* Generic Communications Channel Command Field */ +#define PCC_CMD_GENERATE_DB_INTR BIT(15) +/* Generic Communications Channel Status Field */ +#define PCC_STATUS_CMD_COMPLETE BIT(0) +#define PCC_STATUS_SCI_DOORBELL BIT(1) +#define PCC_STATUS_ERROR BIT(2) +#define PCC_STATUS_PLATFORM_NOTIFY BIT(3) +/* Initiator Responder Communications Channel Flags */ +#define PCC_CMD_COMPLETION_NOTIFY BIT(0) + #define MAX_PCC_SUBSPACES 256 + #ifdef CONFIG_PCC extern struct pcc_mbox_chan * pcc_mbox_request_channel(struct mbox_client *cl, int subspace_id); -- 2.42.0