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?