Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Kurt Kanzenbach <kurt@linutronix.de>,
	Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Richard Cochran <richardcochran@gmail.com>,
	Kamil Alkhouri <kamil.alkhouri@hs-offenburg.de>,
	ilias.apalodimas@linaro.org, Vladimir Oltean <olteanv@gmail.com>
Subject: Re: [PATCH v1 3/8] net: dsa: hellcreek: Add PTP clock support
Date: Sat, 11 Jul 2020 13:38:47 -0700	[thread overview]
Message-ID: <01981d4a-6e28-2789-6d15-5d825e7ce09b@gmail.com> (raw)
In-Reply-To: <20200710113611.3398-4-kurt@linutronix.de>



On 7/10/2020 4:36 AM, Kurt Kanzenbach wrote:
> From: Kamil Alkhouri <kamil.alkhouri@hs-offenburg.de>
> 
> The switch has internal PTP hardware clocks. Add support for it. There are three
> clocks:
> 
>  * Synchronized
>  * Syntonized
>  * Free running
> 
> Currently the synchronized clock is exported to user space which is a good
> default for the beginning. The free running clock might be exported later
> e.g. for implementing 802.1AS-2011/2020 Time Aware Bridges (TAB). The switch
> also supports cross time stamping for that purpose.
> 
> The implementation adds support setting/getting the time as well as offset and
> frequency adjustments. However, the clock only holds a partial timeofday
> timestamp. This is why we track the seconds completely in software (see overflow
> work and last_ts).
> 
> Furthermore, add the PTP multicast addresses into the FDB to forward that
> packages only to the CPU port where they are processed by a PTP program.
> 
> Signed-off-by: Kamil Alkhouri <kamil.alkhouri@hs-offenburg.de>
> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>

Are not you missing an depends on PTP_1588_CLOCK somewhere?

> ---

[snip]

>  
> +static int hellcreek_setup_fdb(struct hellcreek *hellcreek)
> +{
> +	static struct hellcreek_fdb_entry ptp = {
> +		/* MAC: 01-1B-19-00-00-00 */
> +		.mac	      = { 0x01, 0x1b, 0x19, 0x00, 0x00, 0x00 },
> +		.portmask     = 0x03,	/* Management ports */

Should not this depend on the actual number of ports enabled by the user
and so it would be more logical to program those entries (or update
them) at port_enable() time?
-- 
Florian

  parent reply	other threads:[~2020-07-11 20:38 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-10 11:36 [PATCH v1 0/8] Hirschmann Hellcreek DSA driver Kurt Kanzenbach
2020-07-10 11:36 ` [PATCH v1 1/8] net: dsa: Add tag handling for Hirschmann Hellcreek switches Kurt Kanzenbach
2020-07-12  2:57   ` Florian Fainelli
2020-07-10 11:36 ` [PATCH v1 2/8] net: dsa: Add DSA driver " Kurt Kanzenbach
2020-07-11 20:33   ` Florian Fainelli
2020-07-13  6:30     ` Kurt Kanzenbach
2020-07-16  8:29       ` Vladimir Oltean
2020-07-16  9:23         ` Kurt Kanzenbach
2020-07-16  9:39           ` Vladimir Oltean
2020-07-16 10:06             ` Kurt Kanzenbach
2020-07-10 11:36 ` [PATCH v1 3/8] net: dsa: hellcreek: Add PTP clock support Kurt Kanzenbach
2020-07-11 20:30   ` Richard Cochran
2020-07-11 20:38   ` Florian Fainelli [this message]
2020-07-13  6:34     ` Kurt Kanzenbach
2020-07-10 11:36 ` [PATCH v1 4/8] net: dsa: hellcreek: Add support for hardware timestamping Kurt Kanzenbach
2020-07-11 20:38   ` Richard Cochran
2020-07-13  6:35     ` Kurt Kanzenbach
2020-07-13  9:57   ` Vladimir Oltean
2020-07-13 10:57     ` Kurt Kanzenbach
2020-07-13 14:01       ` Richard Cochran
2020-07-13 14:12         ` Vladimir Oltean
2020-07-13 15:38           ` Richard Cochran
2020-07-10 11:36 ` [PATCH v1 5/8] net: dsa: hellcreek: Add TAPRIO offloading support Kurt Kanzenbach
2020-07-10 11:36 ` [PATCH v1 6/8] net: dsa: hellcreek: Add PTP status LEDs Kurt Kanzenbach
2020-07-10 11:36 ` [PATCH v1 7/8] dt-bindings: Add vendor prefix for Hirschmann Kurt Kanzenbach
2020-07-11 20:11   ` Florian Fainelli
2020-07-20 22:49   ` Rob Herring
2020-07-10 11:36 ` [PATCH v1 8/8] dt-bindings: net: dsa: Add documentation for Hellcreek switches Kurt Kanzenbach
2020-07-11 20:18   ` Florian Fainelli
2020-07-13  6:45     ` Kurt Kanzenbach
2020-07-13 14:44       ` Rob Herring

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=01981d4a-6e28-2789-6d15-5d825e7ce09b@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=kamil.alkhouri@hs-offenburg.de \
    --cc=kuba@kernel.org \
    --cc=kurt@linutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=richardcochran@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=vivien.didelot@gmail.com \
    --subject='Re: [PATCH v1 3/8] net: dsa: hellcreek: Add PTP clock support' \
    /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

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox