From: Ley Foon Tan <leyfoon.tan@starfivetech.com>
To: Alexandre Torgue <alexandre.torgue@foss.st.com>,
Jose Abreu <joabreu@synopsys.com>
Cc: "David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
lftan.linux@gmail.com, leyfoon.tan@starfivetech.com
Subject: [PATCH net-next, v1 1/3] net: stmmac: dwmac4: Fix MTL_OP_MODE_RTC mask and shift macros
Date: Mon, 21 Oct 2024 13:48:46 +0800 [thread overview]
Message-ID: <20241021054849.1801838-2-leyfoon.tan@starfivetech.com> (raw)
In-Reply-To: <20241021054849.1801838-1-leyfoon.tan@starfivetech.com>
RTC fields are located in bits [1:0]. Correct the _MASK and _SHIFT
macros to use the appropriate mask and shift.
Fixes: 35f74c0c5dce ("stmmac: add GMAC4 DMA/CORE Header File")
Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h
index 93a78fd0737b..acbe5a027c85 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h
@@ -389,8 +389,8 @@ static inline u32 mtl_chanx_base_addr(const struct dwmac4_addrs *addrs,
#define MTL_OP_MODE_EHFC BIT(7)
-#define MTL_OP_MODE_RTC_MASK 0x18
-#define MTL_OP_MODE_RTC_SHIFT 3
+#define MTL_OP_MODE_RTC_MASK GENMASK(1, 0)
+#define MTL_OP_MODE_RTC_SHIFT 0
#define MTL_OP_MODE_RTC_32 (1 << MTL_OP_MODE_RTC_SHIFT)
#define MTL_OP_MODE_RTC_64 0
--
2.34.1
next prev parent reply other threads:[~2024-10-21 6:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-21 5:48 [PATCH net-next, v1 0/3] net: stmmac: dwmac4: Fixes bugs in dwmac4 Ley Foon Tan
2024-10-21 5:48 ` Ley Foon Tan [this message]
2024-10-21 5:48 ` [PATCH net-next, v1 2/3] net: stmmac: dwmac4: Fix the MTL_OP_MODE_*_MASK operation Ley Foon Tan
2024-10-21 5:48 ` [PATCH net-next, v1 3/3] net: stmmac: dwmac4: Receive Watchdog Timeout is not in abnormal interrupt summary Ley Foon Tan
2024-10-23 11:20 ` [PATCH net-next, v1 0/3] net: stmmac: dwmac4: Fixes bugs in dwmac4 Simon Horman
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=20241021054849.1801838-2-leyfoon.tan@starfivetech.com \
--to=leyfoon.tan@starfivetech.com \
--cc=alexandre.torgue@foss.st.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=joabreu@synopsys.com \
--cc=kuba@kernel.org \
--cc=lftan.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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.