From: Florian Fainelli <f.fainelli@gmail.com>
To: Richard Cochran <richardcochran@gmail.com>, Andrew Lunn <andrew@lunn.ch>
Cc: Lasse Johnsen <lasse@timebeat.app>,
netdev@vger.kernel.org,
Gordon Hollingworth <gordon@raspberrypi.com>,
Ahmad Byagowi <clk@fb.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
bcm-kernel-feedback-list@broadcom.com,
Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: [PATCH net-next] 1588 support on bcm54210pe
Date: Sat, 23 Apr 2022 07:40:49 -0700 [thread overview]
Message-ID: <01f35484-e8b6-d0bb-dba7-d1e0407c00ca@gmail.com> (raw)
In-Reply-To: <20220422194810.GA9325@hoboy.vegasvil.org>
On 4/22/2022 12:48 PM, Richard Cochran wrote:
> On Fri, Apr 22, 2022 at 05:00:07PM +0200, Andrew Lunn wrote:
>
>>> I am confident that this code is relevant exclusively to the
>>> BCM54210PE.
>
> Not true.
>
>> It will not even work with the BCM54210, BCM54210S and
>>> BCM54210SE PHYs.
>
> The registers you used are also present in the BCM541xx devices.
> Pretty sure your code would work on those devices (after adjusting
> register offsets).
>
>> Florian can probably tell us more, but often hardware like this is
>> shared by multiple devices. If it is, you might want to use a more
>> generic prefix.
>
> My understanding is that there are two implementions, gen1 and gen2.
> Your bcm542xx and the bcm541xx are both gen1, and both support inband
> Rx time stamping.
That is correct. Lasse for your future submission please address the
following:
- conform to the usual patch submission style and break up your changes
between bcmgenet.c (although I doubt you need to change it), broadcom.c
and bcm-phy-lib.[ch]
- do not create a PHY device entry specifically for BCM54210PE, use the
existing BCM54210 entry and add checks using the revision field of
phydev->phy_id where necessary. There are already many entries in this
driver, adding more does not help maintaining it. Also, I went through
several months of work fixing bugs and adding decent power management
features to this driver that all PHYs should leverage, adding a new
entry means we need to verify whether all code paths are hit or not
- move generic code, such as all of the PTP code into bcm-phy-lib.[ch]
where it can easily be re-used across multiple PHY device driver entries
(54810, 54210 etc.)
Thanks!
>
> Because the registers are all the same (just the offsets are
> different), I'd like to see a common module that can be used by all
> gen1 devices. The module could be named bcm-ptp-gen1.c for example.
I would prefer that we just stick to adding that code to
bcm-phy-lib.[ch] which all Broadcom PHY drivers can use and we can
decide whether we want to add a Kconfig option specifically for PTP.
Cheers
--
Florian
next prev parent reply other threads:[~2022-04-23 14:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-20 14:03 Support for IEEE1588 timestamping in the BCM54210PE PHY using the kernel mii_timestamper interface Lasse Johnsen
2022-04-20 19:19 ` Andrew Lunn
2022-04-21 17:32 ` Florian Fainelli
2022-04-22 14:21 ` [PATCH net-next] 1588 support on bcm54210pe Lasse Johnsen
2022-04-22 15:00 ` Andrew Lunn
2022-04-22 19:48 ` Richard Cochran
2022-04-23 14:40 ` Florian Fainelli [this message]
2022-04-23 18:16 ` Richard Cochran
2022-04-21 14:48 ` Support for IEEE1588 timestamping in the BCM54210PE PHY using the kernel mii_timestamper interface Richard Cochran
2022-04-22 15:08 ` [PATCH net-next v2] net: phy: broadcom: 1588 support on bcm54210pe Lasse Johnsen
2022-04-22 15:22 ` Jonathan Lemon
2022-04-22 18:11 ` Lasse Johnsen
2022-04-22 18:20 ` Jonathan Lemon
2022-04-23 10:26 ` Lasse Johnsen
2022-04-22 15:42 ` Andrew Lunn
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=01f35484-e8b6-d0bb-dba7-d1e0407c00ca@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=clk@fb.com \
--cc=gordon@raspberrypi.com \
--cc=hkallweit1@gmail.com \
--cc=lasse@timebeat.app \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@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).