public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Wong Vee Khee <vee.khee.wong@linux.intel.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	Jose Abreu <joabreu@synopsys.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Voon Weifeng <weifeng.voon@intel.com>,
	Ong Boon Leong <boon.leong.ong@intel.com>,
	netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 1/1] net: stmmac: Add support for external trigger timestamping
Date: Wed, 7 Apr 2021 16:21:09 +0200	[thread overview]
Message-ID: <YG2/1fbNNIsbafZp@lunn.ch> (raw)
In-Reply-To: <20210407141537.2129-1-vee.khee.wong@linux.intel.com>

On Wed, Apr 07, 2021 at 10:15:37PM +0800, Wong Vee Khee wrote:
> From: Tan Tee Min <tee.min.tan@intel.com>
> 
> The Synopsis MAC controller supports auxiliary snapshot feature that
> allows user to store a snapshot of the system time based on an external
> event.
> 
> This patch add supports to the above mentioned feature. Users will be
> able to triggered capturing the time snapshot from user-space using
> application such as testptp or any other applications that uses the
> PTP_EXTTS_REQUEST ioctl request.

You forgot to Cc: the PTP maintainer.

> @@ -159,6 +163,37 @@ static int stmmac_enable(struct ptp_clock_info *ptp,
>  					     priv->systime_flags);
>  		spin_unlock_irqrestore(&priv->ptp_lock, flags);
>  		break;
> +	case PTP_CLK_REQ_EXTTS:
> +		priv->plat->ext_snapshot_en = on;
> +		mutex_lock(&priv->aux_ts_lock);
> +		acr_value = readl(ptpaddr + PTP_ACR);
> +		acr_value &= ~PTP_ACR_MASK;
> +		if (on) {
> +			/* Enable External snapshot trigger */
> +			acr_value |= priv->plat->ext_snapshot_num;
> +			acr_value |= PTP_ACR_ATSFC;
> +			pr_info("Auxiliary Snapshot %d enabled.\n",
> +				priv->plat->ext_snapshot_num >>
> +				PTP_ACR_ATSEN_SHIFT);

dev_dbg()?

> +			/* Enable Timestamp Interrupt */
> +			intr_value = readl(ioaddr + GMAC_INT_EN);
> +			intr_value |= GMAC_INT_TSIE;
> +			writel(intr_value, ioaddr + GMAC_INT_EN);
> +
> +		} else {
> +			pr_info("Auxiliary Snapshot %d disabled.\n",
> +				priv->plat->ext_snapshot_num >>
> +				PTP_ACR_ATSEN_SHIFT);

dev_dbg()?

Do you really want to spam the kernel log with this?


  reply	other threads:[~2021-04-07 14:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-07 14:15 [PATCH net-next 1/1] net: stmmac: Add support for external trigger timestamping Wong Vee Khee
2021-04-07 14:21 ` Andrew Lunn [this message]
2021-04-07 16:54   ` Wong Vee Khee

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=YG2/1fbNNIsbafZp@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=alexandre.torgue@st.com \
    --cc=boon.leong.ong@intel.com \
    --cc=davem@davemloft.net \
    --cc=joabreu@synopsys.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --cc=vee.khee.wong@linux.intel.com \
    --cc=weifeng.voon@intel.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