From: Antoine Tenart <antoine.tenart@bootlin.com>
To: Matt Pelland <mpelland@starry.com>
Cc: netdev@vger.kernel.org, maxime.chevallier@bootlin.com,
antoine.tenart@bootlin.com
Subject: Re: [PATCH v2 net-next 1/2] net: mvpp2: implement RXAUI support
Date: Fri, 9 Aug 2019 10:06:38 +0200 [thread overview]
Message-ID: <20190809080638.GA3516@kwain> (raw)
In-Reply-To: <20190808230606.7900-2-mpelland@starry.com>
Hello Matt,
On Thu, Aug 08, 2019 at 07:06:05PM -0400, Matt Pelland wrote:
>
> +static void mvpp22_gop_init_rxaui(struct mvpp2_port *port)
> +{
> + struct mvpp2 *priv = port->priv;
> + void __iomem *xpcs;
> + u32 val;
> +
> + xpcs = priv->iface_base + MVPP22_XPCS_BASE(port->gop_id);
> +
> + val = readl(xpcs + MVPP22_XPCS_CFG0);
> + val &= ~MVPP22_XPCS_CFG0_RESET_DIS;
> + writel(val, xpcs + MVPP22_XPCS_CFG0);
The reset logic of the various blocks in PPv2 is handled outside of the
GoP init functions. You should only modify the XPCS configuration here,
without taking care of the reset. See mvpp22_pcs_reset_assert() and
mvpp22_pcs_reset_deassert().
Note that gop_init() is always called with the XPCS reset asserted.
> static void mvpp22_gop_init_10gkr(struct mvpp2_port *port)
> {
> struct mvpp2 *priv = port->priv;
> @@ -1065,6 +1089,9 @@ static int mvpp22_gop_init(struct mvpp2_port *port)
> case PHY_INTERFACE_MODE_2500BASEX:
> mvpp22_gop_init_sgmii(port);
> break;
> + case PHY_INTERFACE_MODE_RXAUI:
> + mvpp22_gop_init_rxaui(port);
> + break;
Isn't RXAUI only supported on port #0? (Such as the 10GKR mode below).
> case PHY_INTERFACE_MODE_10GKR:
> if (port->gop_id != 0)
> goto invalid_conf;
> MVPP22_XLG_CTRL4_EN_IDLE_CHECK);
> ctrl4 |= MVPP22_XLG_CTRL4_FWD_FC | MVPP22_XLG_CTRL4_FWD_PFC;
>
> + if (state->interface == PHY_INTERFACE_MODE_RXAUI)
> + ctrl4 |= MVPP22_XLG_CTRL4_USE_XPCS;
You should probably mask MVPP22_XLG_CTRL4_USE_XPCS when the interface
isn't RXAUI (just to be consistent with what's done in the configuration
functions). You can do this a few lines before, some bits of ctrl4 get
masked.
Thanks!
Antoine
--
Antoine Ténart, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2019-08-09 8:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-08 23:06 [PATCH v2 net-next 0/2] net: mvpp2: Implement RXAUI Support Matt Pelland
2019-08-08 23:06 ` [PATCH v2 net-next 1/2] net: mvpp2: implement RXAUI support Matt Pelland
2019-08-09 8:06 ` Antoine Tenart [this message]
2019-08-08 23:06 ` [PATCH v2 net-next 2/2] net: mvpp2: support multiple comphy lanes Matt Pelland
2019-08-09 8:32 ` Antoine Tenart
2019-08-09 22:20 ` Matt Pelland
2019-08-12 7:55 ` Antoine Tenart
2019-08-09 8:39 ` [PATCH v2 net-next 0/2] net: mvpp2: Implement RXAUI Support Antoine Tenart
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=20190809080638.GA3516@kwain \
--to=antoine.tenart@bootlin.com \
--cc=maxime.chevallier@bootlin.com \
--cc=mpelland@starry.com \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).