From patchwork Wed Jul 5 11:41:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 700538 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87F72EB64DD for ; Wed, 5 Jul 2023 11:46:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231703AbjGELqi (ORCPT ); Wed, 5 Jul 2023 07:46:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231680AbjGELqh (ORCPT ); Wed, 5 Jul 2023 07:46:37 -0400 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3A6E819AF; Wed, 5 Jul 2023 04:46:12 -0700 (PDT) X-IronPort-AV: E=Sophos;i="6.01,183,1684767600"; d="scan'208";a="170615155" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 05 Jul 2023 20:46:11 +0900 Received: from localhost.localdomain (unknown [10.166.15.32]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 71479400C458; Wed, 5 Jul 2023 20:46:11 +0900 (JST) From: Yoshihiro Shimoda To: jingoohan1@gmail.com, gustavo.pimentel@synopsys.com, lpieralisi@kernel.org, robh+dt@kernel.org, kw@linux.com, bhelgaas@google.com, kishon@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Cc: marek.vasut+renesas@gmail.com, fancer.lancer@gmail.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda Subject: [PATCH v17 01/20] PCI: Add INTx Mechanism Messages macros Date: Wed, 5 Jul 2023 20:41:47 +0900 Message-Id: <20230705114206.3585188-2-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230705114206.3585188-1-yoshihiro.shimoda.uh@renesas.com> References: <20230705114206.3585188-1-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add "Implicit Message Routing" and "INTx Mechanism Messages" macros to send a message by a PCIe driver. Signed-off-by: Yoshihiro Shimoda --- drivers/pci/pci.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index a4c397434057..45673cc9c724 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -13,6 +13,24 @@ #define PCIE_LINK_RETRAIN_TIMEOUT_MS 1000 +/* Implicit Message Routing (r[2:0]) */ +#define PCI_MSG_TYPE_R_ROUTING_RC 0 +#define PCI_MSG_TYPE_R_ROUTING_ADDR 1 +#define PCI_MSG_TYPE_R_ROUTING_ID 2 +#define PCI_MSG_TYPE_R_ROUTING_BC 3 +#define PCI_MSG_TYPE_R_ROUTING_LOCAL 4 +#define PCI_MSG_TYPE_R_ROUTING_GATHER 5 + +/* INTx Mechanism Messages */ +#define PCI_MSG_CODE_ASSERT_INTA 0x20 +#define PCI_MSG_CODE_ASSERT_INTB 0x21 +#define PCI_MSG_CODE_ASSERT_INTC 0x22 +#define PCI_MSG_CODE_ASSERT_INTD 0x23 +#define PCI_MSG_CODE_DEASSERT_INTA 0x24 +#define PCI_MSG_CODE_DEASSERT_INTB 0x25 +#define PCI_MSG_CODE_DEASSERT_INTC 0x26 +#define PCI_MSG_CODE_DEASSERT_INTD 0x27 + extern const unsigned char pcie_link_speed[]; extern bool pci_early_dump;