netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	f.fainelli@gmail.com, hkallweit1@gmail.com,
	antoine.tenart@bootlin.com
Subject: Re: [PATCH net-next] net: phy: mscc: consolidate a common RGMII delay implementation
Date: Tue, 24 Mar 2020 14:40:47 +0100	[thread overview]
Message-ID: <20200324134047.GY3819@lunn.ch> (raw)
In-Reply-To: <20200324124837.21556-1-olteanv@gmail.com>

On Tue, Mar 24, 2020 at 02:48:37PM +0200, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> 
> It looks like the VSC8584 PHY driver is rolling its own RGMII delay
> configuration code, despite the fact that the logic is mostly the same.
> 
> In fact only the register layout and position for the RGMII controls has
> changed. So we need to adapt and parameterize the PHY-dependent bit
> fields when calling the new generic function.

Nice.

> -static void vsc8584_rgmii_set_skews(struct phy_device *phydev)
> -{
> -	u32 skew_rx, skew_tx;
> -
> -	/* We first set the Rx and Tx skews to their default value in h/w
> -	 * (0.2 ns).
> -	 */

I like seeing this comment. It makes it clear that
PHY_INTERFACE_MODE_RGMII does not actually mean 0ns, but 0.2ns.  It
also makes it clear that if PHY_INTERFACE_MODE_RGMII_ID,
PHY_INTERFACE_MODE_RGMII_RXID or PHY_INTERFACE_MODE_RGMII_TXID is not
given, the delay is set to something. We have had PHY drivers which
get this wrong and leave the bootloader/strapping value in place.

So if you can keep the comment in some form, that would be good.

Thanks
	Andrew

  reply	other threads:[~2020-03-24 13:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24 12:48 [PATCH net-next] net: phy: mscc: consolidate a common RGMII delay implementation Vladimir Oltean
2020-03-24 13:40 ` Andrew Lunn [this message]
2020-03-24 14:13   ` Vladimir Oltean
  -- strict thread matches above, loose matches on Subject: below --
2020-03-24 14:13 Vladimir Oltean
2020-03-24 14:18 ` Andrew Lunn
2020-03-24 14:49   ` Antoine Tenart
2020-03-24 14:51     ` Vladimir Oltean
2020-03-24 23:36     ` David Miller

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=20200324134047.GY3819@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=antoine.tenart@bootlin.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    /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).