Netdev Archive on lore.kernel.org
 help / color / Atom feed
From: Michael Walle <michael@walle.cc>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: netdev <netdev@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
	Alex Marginean <alexandru.marginean@nxp.com>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	Heiko Thiery <heiko.thiery@gmail.com>,
	Russell King - ARM Linux admin <linux@armlinux.org.uk>
Subject: Re: [PATCH net-next v3 0/3] net: enetc: remove bootloader dependency
Date: Thu, 28 May 2020 11:11:45 +0200
Message-ID: <043ef77349823caa9e2b058f44a11a06@walle.cc> (raw)
In-Reply-To: <CA+h21hruQkYEYatnOSSc6r2EPR+SY-NbcKCRF6sX2oNLy84itg@mail.gmail.com>

Am 2020-05-28 10:43, schrieb Vladimir Oltean:
> On Thu, 28 May 2020 at 11:18, Michael Walle <michael@walle.cc> wrote:
>> 
>> Am 2020-05-28 08:38, schrieb Michael Walle:
>> > These patches were picked from the following series:
>> > https://lore.kernel.org/netdev/1567779344-30965-1-git-send-email-claudiu.manoil@nxp.com/
>> > They have never been resent. I've picked them up, addressed Andrews
>> > comments, fixed some more bugs and asked Claudiu if I can keep their
>> > SOB
>> > tags; he agreed. I've tested this on our board which happens to have a
>> > bootloader which doesn't do the enetc setup in all cases. Though, only
>> > SGMII mode was tested.
>> >
>> > changes since v2:
>> >  - removed SOBs from "net: enetc: Initialize SerDes for SGMII and
>> > USXGMII
>> >    protocols" because almost everything has changed.
>> >  - get a phy_device for the internal PCS PHY so we can use the phy_
>> >    functions instead of raw mdiobus writes
>> 
>> mhh after reading,
>> https://lore.kernel.org/netdev/CA+h21hoq2qkmxDFEb2QgLfrbC0PYRBHsca=0cDcGOr3txy9hsg@mail.gmail.com/
>> this seems to be the wrong way of doing it.
>> 
>> -michael
> 
> FWIW, some time after the merge window closes, I plan to convert the
> felix and seville drivers to mdio_device. It wouldn't be such a big
> deal to also convert enetc to phylink then, and also do this
> phy_device -> mdio_device for it too.


Btw. you/we can also remove that magic SGMII link timer numbers:

#define ENETC_PCS_LINK_TIMER_VAL(ms) \
    ((u32)(125000000 * (ms) / 1000))

Then for SGMII its ENETC_PCS_LINK_TIMER_VAL(1.6) and for 1000BaseX
(and 2500BaseX?) its ENETC_PCS_LINK_TIMER_VAL(10) (which also match
to the default value in the registers).

Please note, that the current hardcoded values doesn't match the
calculated ones precisely. I don't know where these are coming from,
but the 1.6ms matches the SGMII spec.

-michael

      reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28  6:38 Michael Walle
2020-05-28  6:38 ` [PATCH net-next v3 1/3] net: dsa: felix: move USXGMII defines to common place Michael Walle
2020-05-28  6:38 ` [PATCH net-next v3 2/3] net: enetc: Initialize SerDes for SGMII and USXGMII protocols Michael Walle
2020-05-28  6:38 ` [PATCH net-next v3 3/3] net: enetc: Use DT protocol information to set up the ports Michael Walle
2020-05-28  8:18 ` [PATCH net-next v3 0/3] net: enetc: remove bootloader dependency Michael Walle
2020-05-28  8:43   ` Vladimir Oltean
2020-05-28  9:11     ` Michael Walle [this message]

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=043ef77349823caa9e2b058f44a11a06@walle.cc \
    --to=michael@walle.cc \
    --cc=alexandru.marginean@nxp.com \
    --cc=andrew@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=heiko.thiery@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --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

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git