Thread (32 messages) flat view 32 messages, 6 authors, 2021-11-24

Re: [PATCH v2 1/7] net: dsa: b53: Add BroadSync HD register definitions

From: Martin Kaistra <hidden>
Date: 2021-11-10 08:19:08
Also in: lkml

Am 09.11.21 um 19:04 schrieb Florian Fainelli:
On 11/9/21 1:50 AM, Martin Kaistra wrote:
quoted
From: Kurt Kanzenbach <kurt@linutronix.de>

Add register definitions for the BroadSync HD features of
BCM53128. These will be used to enable PTP support.

Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: Martin Kaistra <redacted>
---
[snip]
quoted
+/*************************************************************************
+ * ARL Control Registers
+ *************************************************************************/
+
+/* Multiport Control Register (16 bit) */
+#define B53_MPORT_CTRL			0x0e
+#define   MPORT_CTRL_DIS_FORWARD	0
+#define   MPORT_CTRL_CMP_ETYPE		1
+#define   MPORT_CTRL_CMP_ADDR		2
+#define   MPORT_CTRL_CMP_ADDR_ETYPE	3
+#define   MPORT_CTRL_SHIFT(x)		((x) << 1)
+#define   MPORT_CTRL_MASK		0x2
The mask should be 0x3 since this is a 2-bit wide field.
Correct, thanks.
Currently, this mask is not used, as I am just writing
MPORT0_TS_EN |
  (MPORT_CTRL_CMP_ETYPE << MPORT_CTRL_SHIFT(0))
to the register. Should I keep the definition anyway?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help