From: Manikanta Maddireddy <mmaddireddy@nvidia.com>
To: <jingoohan1@gmail.com>, <mani@kernel.org>,
<lpieralisi@kernel.org>, <kwilczynski@kernel.org>,
<bhelgaas@google.com>, <linux-pci@vger.kernel.org>
Cc: <robh@kernel.org>, <thierry.reding@kernel.org>,
<jonathanh@nvidia.com>, <vidyas@nvidia.com>, <cassel@kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-tegra@vger.kernel.org>,
<mmaddireddy@nvidia.com>
Subject: [PATCH v2 1/5] PCI: dwc: Add RAS event counter field masks
Date: Fri, 16 Oct 2026 13:10:22 +0530 [thread overview]
Message-ID: <20261016074026.564302-2-mmaddireddy@nvidia.com> (raw)
In-Reply-To: <20261016074026.564302-1-mmaddireddy@nvidia.com>
Add complete bit masks for the DesignWare RAS-DES event counter
fields so consumers can use FIELD_PREP() and FIELD_MODIFY() without
open-coded shifts.
Keep the existing shift-based definitions for now so current users
keep building until their call sites are converted.
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
---
drivers/pci/controller/dwc/pcie-designware.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/pci/controller/dwc/pcie-designware.h b/drivers/pci/controller/dwc/pcie-designware.h
index 61e9c4e979af..fa51c81f315c 100644
--- a/drivers/pci/controller/dwc/pcie-designware.h
+++ b/drivers/pci/controller/dwc/pcie-designware.h
@@ -280,14 +280,17 @@
#define EVENT_COUNTER_ALL_CLEAR 0x3
#define EVENT_COUNTER_ENABLE_ALL 0x7
#define EVENT_COUNTER_ENABLE_SHIFT 2
+#define EVENT_COUNTER_ENABLE_MASK GENMASK(4, 2)
#define EVENT_COUNTER_EVENT_SEL_MASK GENMASK(7, 0)
#define EVENT_COUNTER_EVENT_SEL_SHIFT 16
+#define EVENT_COUNTER_EVENT_SEL_FIELD_MASK GENMASK(23, 16)
#define EVENT_COUNTER_EVENT_Tx_L0S 0x2
#define EVENT_COUNTER_EVENT_Rx_L0S 0x3
#define EVENT_COUNTER_EVENT_L1 0x5
#define EVENT_COUNTER_EVENT_L1_1 0x7
#define EVENT_COUNTER_EVENT_L1_2 0x8
#define EVENT_COUNTER_GROUP_SEL_SHIFT 24
+#define EVENT_COUNTER_GROUP_SEL_MASK GENMASK(27, 24)
#define EVENT_COUNTER_GROUP_5 0x5
#define RAS_DES_EVENT_COUNTER_DATA 0xc
--
2.34.1
next prev parent reply other threads:[~2026-10-16 7:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 7:40 [PATCH v2 0/5] PCI: dwc: Clean up RAS-DES and register field handling Manikanta Maddireddy
2026-10-16 7:40 ` Manikanta Maddireddy [this message]
2026-10-16 7:45 ` [PATCH v2 1/5] PCI: dwc: Add RAS event counter field masks sashiko-bot
2026-10-16 7:40 ` [PATCH v2 2/5] PCI: tegra194: Use FIELD_*() for register fields Manikanta Maddireddy
2026-10-16 7:51 ` sashiko-bot
2026-10-16 7:40 ` [PATCH v2 3/5] PCI: dwc: Drop unused shift macros Manikanta Maddireddy
2026-10-16 7:48 ` sashiko-bot
2026-10-16 7:40 ` [PATCH v2 4/5] PCI: tegra194: Use standard RAS event selector mask Manikanta Maddireddy
2026-10-16 7:48 ` sashiko-bot
2026-10-16 7:40 ` [PATCH v2 5/5] PCI: dwc: Consolidate RAS-DES event counter fields Manikanta Maddireddy
2026-10-16 7:48 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261016074026.564302-2-mmaddireddy@nvidia.com \
--to=mmaddireddy@nvidia.com \
--cc=bhelgaas@google.com \
--cc=cassel@kernel.org \
--cc=jingoohan1@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=robh@kernel.org \
--cc=thierry.reding@kernel.org \
--cc=vidyas@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.