]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
net: mvpp2: cls: Bypass C2 internals FIFOs at init
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Fri, 24 May 2019 10:05:51 +0000 (12:05 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 25 May 2019 23:38:15 +0000 (16:38 -0700)
The C2 TCAM has internal FIFOs that are only useful for the built-in
self-tests. Disable these FIFOS at init, as recommended in the
functionnal specs.

Suggested-by: Alan Winkowski <walan@marvell.com>
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2.h
drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c

index d5df813e08c4331ad96f20a057904a2557c7f813..bb466af9434b5cb4f560a4ca088a065292e3e016 100644 (file)
 #define MVPP22_CLS_C2_ATTR2                    0x1b6c
 #define     MVPP22_CLS_C2_ATTR2_RSS_EN         BIT(30)
 #define MVPP22_CLS_C2_ATTR3                    0x1b70
+#define MVPP22_CLS_C2_TCAM_CTRL                        0x1b90
+#define     MVPP22_CLS_C2_TCAM_BYPASS_FIFO     BIT(0)
 
 /* Descriptor Manager Top Registers */
 #define MVPP2_RXQ_NUM_REG                      0x2040
index 9ce73297276e7b4afe1e3cf7b2e70cf1d4b3e8b4..d549e9a29d9a9db8f6f16943c9f66b763e100b1f 100644 (file)
@@ -923,6 +923,12 @@ void mvpp2_cls_init(struct mvpp2 *priv)
                mvpp2_cls_c2_write(priv, &c2);
        }
 
+       /* Disable the FIFO stages in C2 engine, which are only used in BIST
+        * mode
+        */
+       mvpp2_write(priv, MVPP22_CLS_C2_TCAM_CTRL,
+                   MVPP22_CLS_C2_TCAM_BYPASS_FIFO);
+
        mvpp2_cls_port_init_flows(priv);
 }