Netdev List
 help / color / mirror / Atom feed
From: Sergey Shtylyov <sergei.shtylyov@gmail.com>
To: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	"Paul Barker" <paul@pbarker.dev>,
	"Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Richard Cochran" <richardcochran@gmail.com>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [net-next 3/9] net: ethernet: ravb: Simplify gPTP start and stop
Date: Fri, 12 Jun 2026 20:49:51 +0300	[thread overview]
Message-ID: <31cb54ac-8cf7-45fe-9167-becc4cd2aea9@gmail.com> (raw)
In-Reply-To: <20260610102432.3538432-4-niklas.soderlund+renesas@ragnatech.se>

On 6/10/26 1:24 PM, Niklas Söderlund wrote:

> For devices that do not support the gPTP clock in config mode the
> somewhat oddly named flag gptp is set, compared to devices that do
> support the gPTP clock in config and operation mode where the flag
> ccc_gac is set instead. The two flags are mutually exclusive.
> 
> For the gptp-flag devices (Gen2) the clock is tied to the AVB-DMAC, when
> it is stopped so is the gPTP clock. For ccc_gac-flag devices (Gen3) the
> gPTP clock is available whenever the ndev is open.
> 
> Prepare to add Gen4 support which will add a third way by cleaning the
> Gen2 and Gen3 cases up a bit.
> 
> Fold the gptp-flag start and stop calls into ravb_dmac_init() and
> ravb_stop_dma(), which start and stops the AVB-DMAC. There are no

   s/stops/stop/.

> functional change as all call sites to the construct,

   s/,/:/?

> 
>     if (info->gptp)
>         ravb_ptp_init(ndev, priv->pdev);
> 
> Are always just after a call to into ravb_dmac_init() and all call sites

   s/Are/are/.

> to the to the construct,

   "to the" repeated... And s/,/:/?

> 
>     if (info->gptp)
>         ravb_ptp_stop(ndev);
> 
> Are always directly followed by a call to ravb_stop_dma().

   s/Are/are/.

> 
> There are two special cases where the calling construct covers both the
> gptp-flag and info->ccc_gac devices, one for start and one for stop. The
> condition that it is preceded by a call to ravb_dmac_init(), or followed
> by a call to ravb_stop_dma() are however true for them too. Reworked the
> two special cases to drop the check of info->gptp.
> 
> The end result is that the gPTP clock will be started or stopped for the
> gptp-flag devices in tandem with the AVB-DMAC, while the info->ccc_gac
> devices will be controlled, as before, when the ndev is opened or
> closed.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
[...]
MBR, Sergey


  reply	other threads:[~2026-06-12 17:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-10 10:24 [net-next 0/9] ravb: Add gPTP support for Gen4 Niklas Söderlund
2026-06-10 10:24 ` [net-next 1/9] net: ethernet: ravb: Remove gPTP control from WoL setup and restore Niklas Söderlund
2026-06-12 18:12   ` Sergey Shtylyov
2026-06-10 10:24 ` [net-next 2/9] net: ethernet: ravb: Move programming of gPTP timer interval Niklas Söderlund
2026-06-12 18:16   ` Sergey Shtylyov
2026-06-10 10:24 ` [net-next 3/9] net: ethernet: ravb: Simplify gPTP start and stop Niklas Söderlund
2026-06-12 17:49   ` Sergey Shtylyov [this message]
2026-06-10 10:24 ` [net-next 4/9] net: ethernet: ravb: Remove redundant argument to ravb_ptp_init() Niklas Söderlund
2026-06-12 18:17   ` Sergey Shtylyov
2026-06-10 10:24 ` [net-next 5/9] net: ethernet: ravb: Replace gPTP flags with callbacks Niklas Söderlund
2026-06-12 18:31   ` Sergey Shtylyov
2026-06-10 10:24 ` [net-next 6/9] net: ethernet: ravb: Add callback for gPTP probe Niklas Söderlund
2026-06-12 18:48   ` Sergey Shtylyov
2026-06-10 10:24 ` [net-next 7/9] net: ethernet: ravb: Add callback for gPTP clock index Niklas Söderlund
2026-06-10 10:24 ` [net-next 8/9] dt-bindings: net: renesas,etheravb: Add optional gPTP phandle for Gen4 Niklas Söderlund
2026-06-12 18:37   ` Sergey Shtylyov
2026-06-10 10:24 ` [net-next 9/9] net: ethernet: ravb: Add gPTP support " Niklas Söderlund
2026-06-10 10:27 ` [net-next 0/9] " Krzysztof Kozlowski
     [not found]   ` <20260610103812.GE2465390@ragnatech.se>
2026-06-10 10:47     ` Krzysztof Kozlowski

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=31cb54ac-8cf7-45fe-9167-becc4cd2aea9@gmail.com \
    --to=sergei.shtylyov@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=geert+renesas@glider.be \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=pabeni@redhat.com \
    --cc=paul@pbarker.dev \
    --cc=richardcochran@gmail.com \
    --cc=robh@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