Commit 3d9017d9 authored by Thomas Petazzoni's avatar Thomas Petazzoni Committed by David S. Miller

net: mvpp2: adapt mvpp2_defaults_set() to PPv2.2

This commit modifies the mvpp2_defaults_set() function to not do the
loopback and FIFO threshold initialization, which are not needed for
PPv2.2.
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5eac892a
...@@ -4157,16 +4157,18 @@ static void mvpp2_defaults_set(struct mvpp2_port *port) ...@@ -4157,16 +4157,18 @@ static void mvpp2_defaults_set(struct mvpp2_port *port)
{ {
int tx_port_num, val, queue, ptxq, lrxq; int tx_port_num, val, queue, ptxq, lrxq;
/* Configure port to loopback if needed */ if (port->priv->hw_version == MVPP21) {
if (port->flags & MVPP2_F_LOOPBACK) /* Configure port to loopback if needed */
mvpp2_port_loopback_set(port); if (port->flags & MVPP2_F_LOOPBACK)
mvpp2_port_loopback_set(port);
/* Update TX FIFO MIN Threshold */
val = readl(port->base + MVPP2_GMAC_PORT_FIFO_CFG_1_REG); /* Update TX FIFO MIN Threshold */
val &= ~MVPP2_GMAC_TX_FIFO_MIN_TH_ALL_MASK; val = readl(port->base + MVPP2_GMAC_PORT_FIFO_CFG_1_REG);
/* Min. TX threshold must be less than minimal packet length */ val &= ~MVPP2_GMAC_TX_FIFO_MIN_TH_ALL_MASK;
val |= MVPP2_GMAC_TX_FIFO_MIN_TH_MASK(64 - 4 - 2); /* Min. TX threshold must be less than minimal packet length */
writel(val, port->base + MVPP2_GMAC_PORT_FIFO_CFG_1_REG); val |= MVPP2_GMAC_TX_FIFO_MIN_TH_MASK(64 - 4 - 2);
writel(val, port->base + MVPP2_GMAC_PORT_FIFO_CFG_1_REG);
}
/* Disable Legacy WRR, Disable EJP, Release from reset */ /* Disable Legacy WRR, Disable EJP, Release from reset */
tx_port_num = mvpp2_egress_port(port); tx_port_num = mvpp2_egress_port(port);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment