* [PATCH net-next 0/7] Support external snapshots on dwmac1000
@ 2024-10-29 11:54 Maxime Chevallier
2024-10-29 11:54 ` [PATCH net-next 1/7] net: stmmac: Don't modify the global ptp ops directly Maxime Chevallier
` (7 more replies)
0 siblings, 8 replies; 11+ messages in thread
From: Maxime Chevallier @ 2024-10-29 11:54 UTC (permalink / raw)
To: Alexandre Torgue, Jose Abreu, Andrew Lunn, davem, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Richard Cochran
Cc: Maxime Chevallier, Alexis Lothoré, Thomas Petazzoni, netdev,
linux-stm32, linux-arm-kernel, linux-kernel
Hi,
This series is another take on the pervious work [1] done by
Alexis Lothoré, that fixes the support for external snapshots
timestamping in GMAC3-based devices.
The registers that are used to configure this don't have the same layout
in the dwmac1000 compared to dwmac4 and others.
One example would be the TS seconds/nanoseconds registet for snapshots,
which aren't mapped at the 0x48/0x4c but rather at 0x30/0x34.
Another example is the was the snapshots are enabled. DWMAC4 has a
dedicated auxiliary control register (PTP_ACR at 0x40) while on
DWMAC1000, this is controled through the PTP Timestamp Control Reg using
fields maked as reserved on DWMAC4.
Interrupts are also not handled the same way, as on dwmac1000 they are
cleared by reading the Auxiliary Status Reg, which simply doesn't exist
on dwmac4.
All of this means that with the current state of the code, auxiliary
timestamps simply don't work on dwmac1000.
Besides that, there are some limitations in the number of external
snapshot channels. It was also found that the PPS out configuration is
also not done the same way, but fixing PPS out isn't in the scope of
this series.
To address that hardware difference, we introduce dedicated
ptp_clock_info ops and parameters as well as dedicated hwtstamp_ops for
the dwmac100/dwmac1000. This allows simplifying the code for these
platforms, and avoids the introduction of other sets of stmmac internal
callbacks.
The naming for the non-dwmac1000 ops wasn't changed, so we have :
- dwmac1000_ptp & stmmac_ptp
- dwmac1000_ptp_clock_ops & stmmac_ptp_clock_ops
where the "stmmac_*" ops use the dwmac4-or-later behaviour.
I have converted dwmac100 along the way to these ops, however that's
hasn't been tested nor fully confirmed that this is correct, as I don't
have datasheets for devices that uses dwmac100.
I've converted dwmac100 just on the hypothesis that the GMAC3_X PTP offset
being used in both dwmac1000 and dwmac100 means that they share these same
register layouts as well.
Patch 1 prepares the use of per-hw interface ptp_clock_info by avoiding
the modification of the global parameters. This allows making the
stmmac_ptp_clock_ops const.
Patch 2 adds the ptp_clock_info as an hwif parameter.
Patch 3 addresses the autodiscovery of the timestamping features, as
dwmac1000 doesn't provide these parameters
Patch 4 introduces the ptp_clock_info specific to dwmac1000 platforms,
and Patch 5 the hwtstamping info.
Patch 6 enables the timestamping interrupt for external snapshot
Patch 7 removes a non-necessary include from stmmac_ptp.c.
This was tested on dwmac_socfpga, however this wasn't tested on a
dwmac4-based platform.
[1]: https://lore.kernel.org/netdev/20230616100409.164583-1-alexis.lothore@bootlin.com/
Thanks Alexis for laying the groundwork for this,
Best regards,
Maxime
Maxime Chevallier (7):
net: stmmac: Don't modify the global ptp ops directly
net: stmmac: Use per-hw ptp clock ops
net: stmmac: Only update the auto-discovered PTP clock features
net: stmmac: Introduce dwmac1000 ptp_clock_info and operations
net: stmmac: Introduce dwmac1000 timestamping operations
net: stmmac: Enable timestamping interrupt on dwmac1000
net: stmmac: Don't include dwmac4 definitions in stmmac_ptp
drivers/net/ethernet/stmicro/stmmac/common.h | 4 +
.../net/ethernet/stmicro/stmmac/dwmac1000.h | 15 +++-
.../ethernet/stmicro/stmmac/dwmac1000_core.c | 85 +++++++++++++++++++
drivers/net/ethernet/stmicro/stmmac/hwif.c | 14 ++-
.../ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 11 +++
.../net/ethernet/stmicro/stmmac/stmmac_ptp.c | 38 +++++++--
.../net/ethernet/stmicro/stmmac/stmmac_ptp.h | 10 +++
7 files changed, 165 insertions(+), 12 deletions(-)
--
2.47.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH net-next 1/7] net: stmmac: Don't modify the global ptp ops directly
2024-10-29 11:54 [PATCH net-next 0/7] Support external snapshots on dwmac1000 Maxime Chevallier
@ 2024-10-29 11:54 ` Maxime Chevallier
2024-10-29 11:54 ` [PATCH net-next 2/7] net: stmmac: Use per-hw ptp clock ops Maxime Chevallier
` (6 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Maxime Chevallier @ 2024-10-29 11:54 UTC (permalink / raw)
To: Alexandre Torgue, Jose Abreu, Andrew Lunn, davem, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Richard Cochran
Cc: Maxime Chevallier, Alexis Lothoré, Thomas Petazzoni, netdev,
linux-stm32, linux-arm-kernel, linux-kernel
The stmmac_ptp_clock_ops are copied into the stmmac_priv structure
before being registered to the PTP core. Some adjustments are made prior
to that, such as the number of snapshots or max adjustment parameters.
Instead of modifying the global definition, then copying into the local
private data, let's first copy then modify the local parameters.
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
index a6b1de9a251d..11ab1d6b916a 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
@@ -298,20 +298,21 @@ void stmmac_ptp_register(struct stmmac_priv *priv)
priv->pps[i].available = true;
}
- if (priv->plat->ptp_max_adj)
- stmmac_ptp_clock_ops.max_adj = priv->plat->ptp_max_adj;
-
/* Calculate the clock domain crossing (CDC) error if necessary */
priv->plat->cdc_error_adj = 0;
if (priv->plat->has_gmac4 && priv->plat->clk_ptp_rate)
priv->plat->cdc_error_adj = (2 * NSEC_PER_SEC) / priv->plat->clk_ptp_rate;
- stmmac_ptp_clock_ops.n_per_out = priv->dma_cap.pps_out_num;
- stmmac_ptp_clock_ops.n_ext_ts = priv->dma_cap.aux_snapshot_n;
+ priv->ptp_clock_ops = stmmac_ptp_clock_ops;
+
+ priv->ptp_clock_ops.n_per_out = priv->dma_cap.pps_out_num;
+ priv->ptp_clock_ops.n_ext_ts = priv->dma_cap.aux_snapshot_n;
+
+ if (priv->plat->ptp_max_adj)
+ priv->ptp_clock_ops.max_adj = priv->plat->ptp_max_adj;
rwlock_init(&priv->ptp_lock);
mutex_init(&priv->aux_ts_lock);
- priv->ptp_clock_ops = stmmac_ptp_clock_ops;
priv->ptp_clock = ptp_clock_register(&priv->ptp_clock_ops,
priv->device);
--
2.47.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH net-next 2/7] net: stmmac: Use per-hw ptp clock ops
2024-10-29 11:54 [PATCH net-next 0/7] Support external snapshots on dwmac1000 Maxime Chevallier
2024-10-29 11:54 ` [PATCH net-next 1/7] net: stmmac: Don't modify the global ptp ops directly Maxime Chevallier
@ 2024-10-29 11:54 ` Maxime Chevallier
2024-10-29 11:54 ` [PATCH net-next 3/7] net: stmmac: Only update the auto-discovered PTP clock features Maxime Chevallier
` (5 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Maxime Chevallier @ 2024-10-29 11:54 UTC (permalink / raw)
To: Alexandre Torgue, Jose Abreu, Andrew Lunn, davem, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Richard Cochran
Cc: Maxime Chevallier, Alexis Lothoré, Thomas Petazzoni, netdev,
linux-stm32, linux-arm-kernel, linux-kernel
The auxiliary snapshot configuration was found to differ depending on
the dwmac version. To prepare supporting this, allow specifying the
ptp_clock_info ops in the hwif array
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
drivers/net/ethernet/stmicro/stmmac/common.h | 2 ++
drivers/net/ethernet/stmicro/stmmac/hwif.c | 10 ++++++++++
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 4 +---
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h
index 684489156dce..4a0a1708c391 100644
--- a/drivers/net/ethernet/stmicro/stmmac/common.h
+++ b/drivers/net/ethernet/stmicro/stmmac/common.h
@@ -551,6 +551,8 @@ struct mac_device_info;
extern const struct stmmac_hwtimestamp stmmac_ptp;
extern const struct stmmac_mode_ops dwmac4_ring_mode_ops;
+extern const struct ptp_clock_info stmmac_ptp_clock_ops;
+
struct mac_link {
u32 caps;
u32 speed_mask;
diff --git a/drivers/net/ethernet/stmicro/stmmac/hwif.c b/drivers/net/ethernet/stmicro/stmmac/hwif.c
index 88cce28b2f98..caa8d9810cd3 100644
--- a/drivers/net/ethernet/stmicro/stmmac/hwif.c
+++ b/drivers/net/ethernet/stmicro/stmmac/hwif.c
@@ -112,6 +112,7 @@ static const struct stmmac_hwif_entry {
const void *dma;
const void *mac;
const void *hwtimestamp;
+ const void *ptp;
const void *mode;
const void *tc;
const void *mmc;
@@ -133,6 +134,7 @@ static const struct stmmac_hwif_entry {
.dma = &dwmac100_dma_ops,
.mac = &dwmac100_ops,
.hwtimestamp = &stmmac_ptp,
+ .ptp = &stmmac_ptp_clock_ops,
.mode = NULL,
.tc = NULL,
.mmc = &dwmac_mmc_ops,
@@ -151,6 +153,7 @@ static const struct stmmac_hwif_entry {
.dma = &dwmac1000_dma_ops,
.mac = &dwmac1000_ops,
.hwtimestamp = &stmmac_ptp,
+ .ptp = &stmmac_ptp_clock_ops,
.mode = NULL,
.tc = NULL,
.mmc = &dwmac_mmc_ops,
@@ -170,6 +173,7 @@ static const struct stmmac_hwif_entry {
.dma = &dwmac4_dma_ops,
.mac = &dwmac4_ops,
.hwtimestamp = &stmmac_ptp,
+ .ptp = &stmmac_ptp_clock_ops,
.mode = NULL,
.tc = &dwmac4_tc_ops,
.mmc = &dwmac_mmc_ops,
@@ -190,6 +194,7 @@ static const struct stmmac_hwif_entry {
.dma = &dwmac4_dma_ops,
.mac = &dwmac410_ops,
.hwtimestamp = &stmmac_ptp,
+ .ptp = &stmmac_ptp_clock_ops,
.mode = &dwmac4_ring_mode_ops,
.tc = &dwmac510_tc_ops,
.mmc = &dwmac_mmc_ops,
@@ -210,6 +215,7 @@ static const struct stmmac_hwif_entry {
.dma = &dwmac410_dma_ops,
.mac = &dwmac410_ops,
.hwtimestamp = &stmmac_ptp,
+ .ptp = &stmmac_ptp_clock_ops,
.mode = &dwmac4_ring_mode_ops,
.tc = &dwmac510_tc_ops,
.mmc = &dwmac_mmc_ops,
@@ -230,6 +236,7 @@ static const struct stmmac_hwif_entry {
.dma = &dwmac410_dma_ops,
.mac = &dwmac510_ops,
.hwtimestamp = &stmmac_ptp,
+ .ptp = &stmmac_ptp_clock_ops,
.mode = &dwmac4_ring_mode_ops,
.tc = &dwmac510_tc_ops,
.mmc = &dwmac_mmc_ops,
@@ -251,6 +258,7 @@ static const struct stmmac_hwif_entry {
.dma = &dwxgmac210_dma_ops,
.mac = &dwxgmac210_ops,
.hwtimestamp = &stmmac_ptp,
+ .ptp = &stmmac_ptp_clock_ops,
.mode = NULL,
.tc = &dwxgmac_tc_ops,
.mmc = &dwxgmac_mmc_ops,
@@ -272,6 +280,7 @@ static const struct stmmac_hwif_entry {
.dma = &dwxgmac210_dma_ops,
.mac = &dwxlgmac2_ops,
.hwtimestamp = &stmmac_ptp,
+ .ptp = &stmmac_ptp_clock_ops,
.mode = NULL,
.tc = &dwxgmac_tc_ops,
.mmc = &dwxgmac_mmc_ops,
@@ -355,6 +364,7 @@ int stmmac_hwif_init(struct stmmac_priv *priv)
priv->hw = mac;
priv->ptpaddr = priv->ioaddr + entry->regs.ptp_off;
priv->mmcaddr = priv->ioaddr + entry->regs.mmc_off;
+ memcpy(&priv->ptp_clock_ops, entry->ptp, sizeof(*entry->ptp));
if (entry->est)
priv->estaddr = priv->ioaddr + entry->regs.est_off;
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
index 11ab1d6b916a..41581f516ea9 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
@@ -265,7 +265,7 @@ static int stmmac_getcrosststamp(struct ptp_clock_info *ptp,
}
/* structure describing a PTP hardware clock */
-static struct ptp_clock_info stmmac_ptp_clock_ops = {
+const struct ptp_clock_info stmmac_ptp_clock_ops = {
.owner = THIS_MODULE,
.name = "stmmac ptp",
.max_adj = 62500000,
@@ -303,8 +303,6 @@ void stmmac_ptp_register(struct stmmac_priv *priv)
if (priv->plat->has_gmac4 && priv->plat->clk_ptp_rate)
priv->plat->cdc_error_adj = (2 * NSEC_PER_SEC) / priv->plat->clk_ptp_rate;
- priv->ptp_clock_ops = stmmac_ptp_clock_ops;
-
priv->ptp_clock_ops.n_per_out = priv->dma_cap.pps_out_num;
priv->ptp_clock_ops.n_ext_ts = priv->dma_cap.aux_snapshot_n;
--
2.47.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH net-next 3/7] net: stmmac: Only update the auto-discovered PTP clock features
2024-10-29 11:54 [PATCH net-next 0/7] Support external snapshots on dwmac1000 Maxime Chevallier
2024-10-29 11:54 ` [PATCH net-next 1/7] net: stmmac: Don't modify the global ptp ops directly Maxime Chevallier
2024-10-29 11:54 ` [PATCH net-next 2/7] net: stmmac: Use per-hw ptp clock ops Maxime Chevallier
@ 2024-10-29 11:54 ` Maxime Chevallier
2024-10-29 12:50 ` Alexis Lothoré
2024-10-29 11:54 ` [PATCH net-next 4/7] net: stmmac: Introduce dwmac1000 ptp_clock_info and operations Maxime Chevallier
` (4 subsequent siblings)
7 siblings, 1 reply; 11+ messages in thread
From: Maxime Chevallier @ 2024-10-29 11:54 UTC (permalink / raw)
To: Alexandre Torgue, Jose Abreu, Andrew Lunn, davem, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Richard Cochran
Cc: Maxime Chevallier, Alexis Lothoré, Thomas Petazzoni, netdev,
linux-stm32, linux-arm-kernel, linux-kernel
Some DWMAC variants such as dwmac1000 don't support disovering the
number of output pps and auxiliary snapshots. Allow these parameters to
be defined in default ptp_clock_info, and let them be updated only when
the feature discovery yielded a result.
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
index 41581f516ea9..8ea2b4226234 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
@@ -303,8 +303,14 @@ void stmmac_ptp_register(struct stmmac_priv *priv)
if (priv->plat->has_gmac4 && priv->plat->clk_ptp_rate)
priv->plat->cdc_error_adj = (2 * NSEC_PER_SEC) / priv->plat->clk_ptp_rate;
- priv->ptp_clock_ops.n_per_out = priv->dma_cap.pps_out_num;
- priv->ptp_clock_ops.n_ext_ts = priv->dma_cap.aux_snapshot_n;
+ /* Update the ptp clock parameters based on feature discovery, when
+ * available
+ */
+ if (priv->dma_cap.pps_out_num)
+ priv->ptp_clock_ops.n_per_out = priv->dma_cap.pps_out_num;
+
+ if (priv->dma_cap.aux_snapshot_n)
+ priv->ptp_clock_ops.n_ext_ts = priv->dma_cap.aux_snapshot_n;
if (priv->plat->ptp_max_adj)
priv->ptp_clock_ops.max_adj = priv->plat->ptp_max_adj;
--
2.47.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH net-next 4/7] net: stmmac: Introduce dwmac1000 ptp_clock_info and operations
2024-10-29 11:54 [PATCH net-next 0/7] Support external snapshots on dwmac1000 Maxime Chevallier
` (2 preceding siblings ...)
2024-10-29 11:54 ` [PATCH net-next 3/7] net: stmmac: Only update the auto-discovered PTP clock features Maxime Chevallier
@ 2024-10-29 11:54 ` Maxime Chevallier
2024-10-29 11:54 ` [PATCH net-next 5/7] net: stmmac: Introduce dwmac1000 timestamping operations Maxime Chevallier
` (3 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Maxime Chevallier @ 2024-10-29 11:54 UTC (permalink / raw)
To: Alexandre Torgue, Jose Abreu, Andrew Lunn, davem, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Richard Cochran
Cc: Maxime Chevallier, Alexis Lothoré, Thomas Petazzoni, netdev,
linux-stm32, linux-arm-kernel, linux-kernel
The PTP configuration for GMAC3_X differs from the other implementations
in several ways :
- There's only one external snapshot trigger
- The snapshot configuration is done through the PTP_TCR register,
whereas the other dwmac variants have a dedicated ACR (auxiliary
control reg) for that purpose
- The layout for the PTP_TCR register also differs, as bits 24/25 are
used for the snapshot configuration. These bits are reserved on other
variants.
On GMAC3_X, we also can't discover the number of snapshot triggers
automatically.
The GMAC3_X has one PPS output, however it's configuration isn't
supported yet so report 0 n_per_out for now.
Introduce a dedicated set of ptp_clock_info ops and configuration
parameters to reflect these differences specific to GMAC3_X.
This was tested on dwmac_socfpga.
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
drivers/net/ethernet/stmicro/stmmac/common.h | 1 +
.../net/ethernet/stmicro/stmmac/dwmac1000.h | 5 +++
.../ethernet/stmicro/stmmac/dwmac1000_core.c | 45 +++++++++++++++++++
drivers/net/ethernet/stmicro/stmmac/hwif.c | 4 +-
.../net/ethernet/stmicro/stmmac/stmmac_ptp.c | 18 ++++++++
.../net/ethernet/stmicro/stmmac/stmmac_ptp.h | 6 +++
6 files changed, 77 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h
index 4a0a1708c391..6f68a6b298c9 100644
--- a/drivers/net/ethernet/stmicro/stmmac/common.h
+++ b/drivers/net/ethernet/stmicro/stmmac/common.h
@@ -552,6 +552,7 @@ extern const struct stmmac_hwtimestamp stmmac_ptp;
extern const struct stmmac_mode_ops dwmac4_ring_mode_ops;
extern const struct ptp_clock_info stmmac_ptp_clock_ops;
+extern const struct ptp_clock_info dwmac1000_ptp_clock_ops;
struct mac_link {
u32 caps;
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
index 4296ddda8aaa..01eafeb1272f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
@@ -329,5 +329,10 @@ enum rtc_control {
#define GMAC_MMC_RX_CSUM_OFFLOAD 0x208
#define GMAC_EXTHASH_BASE 0x500
+/* PTP and timestamping registers */
+
+#define GMAC_PTP_TCR_ATSFC BIT(24)
+#define GMAC_PTP_TCR_ATSEN0 BIT(25)
+
extern const struct stmmac_dma_ops dwmac1000_dma_ops;
#endif /* __DWMAC1000_H__ */
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
index d413d76a8936..b6930009ea06 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
@@ -18,6 +18,7 @@
#include <linux/io.h>
#include "stmmac.h"
#include "stmmac_pcs.h"
+#include "stmmac_ptp.h"
#include "dwmac1000.h"
static void dwmac1000_core_init(struct mac_device_info *hw,
@@ -551,3 +552,47 @@ int dwmac1000_setup(struct stmmac_priv *priv)
return 0;
}
+
+/* DWMAC 1000 ptp_clock_info ops */
+
+int dwmac1000_ptp_enable(struct ptp_clock_info *ptp,
+ struct ptp_clock_request *rq, int on)
+{
+ struct stmmac_priv *priv =
+ container_of(ptp, struct stmmac_priv, ptp_clock_ops);
+ void __iomem *ptpaddr = priv->ptpaddr;
+ int ret = -EOPNOTSUPP;
+ u32 tcr_val;
+
+ switch (rq->type) {
+ case PTP_CLK_REQ_EXTTS:
+ mutex_lock(&priv->aux_ts_lock);
+ tcr_val = readl(ptpaddr + PTP_TCR);
+
+ if (on) {
+ tcr_val |= GMAC_PTP_TCR_ATSEN0;
+ tcr_val |= GMAC_PTP_TCR_ATSFC;
+ priv->plat->flags |= STMMAC_FLAG_EXT_SNAPSHOT_EN;
+ } else {
+ tcr_val &= ~GMAC_PTP_TCR_ATSEN0;
+ priv->plat->flags &= ~STMMAC_FLAG_EXT_SNAPSHOT_EN;
+ }
+
+ netdev_dbg(priv->dev, "Auxiliary Snapshot %s.\n",
+ on ? "enabled" : "disabled");
+ writel(tcr_val, ptpaddr + PTP_TCR);
+
+ mutex_unlock(&priv->aux_ts_lock);
+
+ /* wait for auxts fifo clear to finish */
+ ret = readl_poll_timeout(ptpaddr + PTP_TCR, tcr_val,
+ !(tcr_val & GMAC_PTP_TCR_ATSFC),
+ 10, 10000);
+ break;
+
+ default:
+ break;
+ }
+
+ return ret;
+}
diff --git a/drivers/net/ethernet/stmicro/stmmac/hwif.c b/drivers/net/ethernet/stmicro/stmmac/hwif.c
index caa8d9810cd3..4af6a5fceb20 100644
--- a/drivers/net/ethernet/stmicro/stmmac/hwif.c
+++ b/drivers/net/ethernet/stmicro/stmmac/hwif.c
@@ -134,7 +134,7 @@ static const struct stmmac_hwif_entry {
.dma = &dwmac100_dma_ops,
.mac = &dwmac100_ops,
.hwtimestamp = &stmmac_ptp,
- .ptp = &stmmac_ptp_clock_ops,
+ .ptp = &dwmac1000_ptp_clock_ops,
.mode = NULL,
.tc = NULL,
.mmc = &dwmac_mmc_ops,
@@ -153,7 +153,7 @@ static const struct stmmac_hwif_entry {
.dma = &dwmac1000_dma_ops,
.mac = &dwmac1000_ops,
.hwtimestamp = &stmmac_ptp,
- .ptp = &stmmac_ptp_clock_ops,
+ .ptp = &dwmac1000_ptp_clock_ops,
.mode = NULL,
.tc = NULL,
.mmc = &dwmac_mmc_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
index 8ea2b4226234..430905f591b2 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
@@ -282,6 +282,24 @@ const struct ptp_clock_info stmmac_ptp_clock_ops = {
.getcrosststamp = stmmac_getcrosststamp,
};
+/* structure describing a PTP hardware clock */
+const struct ptp_clock_info dwmac1000_ptp_clock_ops = {
+ .owner = THIS_MODULE,
+ .name = "stmmac ptp",
+ .max_adj = 62500000,
+ .n_alarm = 0,
+ .n_ext_ts = 1,
+ .n_per_out = 0,
+ .n_pins = 0,
+ .pps = 0,
+ .adjfine = stmmac_adjust_freq,
+ .adjtime = stmmac_adjust_time,
+ .gettime64 = stmmac_get_time,
+ .settime64 = stmmac_set_time,
+ .enable = dwmac1000_ptp_enable,
+ .getcrosststamp = stmmac_getcrosststamp,
+};
+
/**
* stmmac_ptp_register
* @priv: driver private structure
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h
index fce3fba2ffd2..fa4611855311 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h
@@ -94,4 +94,10 @@ enum aux_snapshot {
AUX_SNAPSHOT3 = 0x80,
};
+struct ptp_clock_info;
+struct ptp_clock_request;
+
+int dwmac1000_ptp_enable(struct ptp_clock_info *ptp,
+ struct ptp_clock_request *rq, int on);
+
#endif /* __STMMAC_PTP_H__ */
--
2.47.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH net-next 5/7] net: stmmac: Introduce dwmac1000 timestamping operations
2024-10-29 11:54 [PATCH net-next 0/7] Support external snapshots on dwmac1000 Maxime Chevallier
` (3 preceding siblings ...)
2024-10-29 11:54 ` [PATCH net-next 4/7] net: stmmac: Introduce dwmac1000 ptp_clock_info and operations Maxime Chevallier
@ 2024-10-29 11:54 ` Maxime Chevallier
2024-10-29 11:54 ` [PATCH net-next 6/7] net: stmmac: Enable timestamping interrupt on dwmac1000 Maxime Chevallier
` (2 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Maxime Chevallier @ 2024-10-29 11:54 UTC (permalink / raw)
To: Alexandre Torgue, Jose Abreu, Andrew Lunn, davem, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Richard Cochran
Cc: Maxime Chevallier, Alexis Lothoré, Thomas Petazzoni, netdev,
linux-stm32, linux-arm-kernel, linux-kernel
In GMAC3_X, the timestamping configuration differs from GMAC4 in the
layout of the registers accessed to grab the number of snapshots in FIFO
as well as the register offset to grab the aux snapshot timestamp.
Introduce dedicated ops to configure timestamping on dwmac100 and
dwmac1000. The latency correction doesn't seem to exist on GMAC3, so its
corresponding operation isn't populated.
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
drivers/net/ethernet/stmicro/stmmac/common.h | 1 +
.../net/ethernet/stmicro/stmmac/dwmac1000.h | 7 ++++
.../ethernet/stmicro/stmmac/dwmac1000_core.c | 40 +++++++++++++++++++
drivers/net/ethernet/stmicro/stmmac/hwif.c | 4 +-
.../ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 11 +++++
.../net/ethernet/stmicro/stmmac/stmmac_ptp.h | 4 ++
6 files changed, 65 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h
index 6f68a6b298c9..1367fa5c9b8e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/common.h
+++ b/drivers/net/ethernet/stmicro/stmmac/common.h
@@ -549,6 +549,7 @@ extern const struct stmmac_desc_ops ndesc_ops;
struct mac_device_info;
extern const struct stmmac_hwtimestamp stmmac_ptp;
+extern const struct stmmac_hwtimestamp dwmac1000_ptp;
extern const struct stmmac_mode_ops dwmac4_ring_mode_ops;
extern const struct ptp_clock_info stmmac_ptp_clock_ops;
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
index 01eafeb1272f..600fea8f712f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
@@ -331,8 +331,15 @@ enum rtc_control {
/* PTP and timestamping registers */
+#define GMAC3_X_ATSNS GENMASK(19, 16)
+#define GMAC3_X_ATSNS_SHIFT 16
+
#define GMAC_PTP_TCR_ATSFC BIT(24)
#define GMAC_PTP_TCR_ATSEN0 BIT(25)
+#define GMAC3_X_TIMESTAMP_STATUS 0x28
+#define GMAC_PTP_ATNR 0x30
+#define GMAC_PTP_ATSR 0x34
+
extern const struct stmmac_dma_ops dwmac1000_dma_ops;
#endif /* __DWMAC1000_H__ */
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
index b6930009ea06..ba2ced3a9320 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
@@ -553,6 +553,46 @@ int dwmac1000_setup(struct stmmac_priv *priv)
return 0;
}
+/* DWMAC 1000 HW Timestaming ops */
+
+void dwmac1000_get_ptptime(void __iomem *ptpaddr, u64 *ptp_time)
+{
+ u64 ns;
+
+ ns = readl(ptpaddr + GMAC_PTP_ATNR);
+ ns += readl(ptpaddr + GMAC_PTP_ATSR) * NSEC_PER_SEC;
+
+ *ptp_time = ns;
+}
+
+void dwmac1000_timestamp_interrupt(struct stmmac_priv *priv)
+{
+ struct ptp_clock_event event;
+ u32 ts_status, num_snapshot;
+ unsigned long flags;
+ u64 ptp_time;
+ int i;
+
+ /* Clears the timestamp interrupt */
+ ts_status = readl(priv->ioaddr + GMAC3_X_TIMESTAMP_STATUS);
+
+ if (!(priv->plat->flags & STMMAC_FLAG_EXT_SNAPSHOT_EN))
+ return;
+
+ num_snapshot = (ts_status & GMAC3_X_ATSNS) >> GMAC3_X_ATSNS_SHIFT;
+
+ for (i = 0; i < num_snapshot; i++) {
+ read_lock_irqsave(&priv->ptp_lock, flags);
+ stmmac_get_ptptime(priv, priv->ptpaddr, &ptp_time);
+ read_unlock_irqrestore(&priv->ptp_lock, flags);
+
+ event.type = PTP_CLOCK_EXTTS;
+ event.index = 0;
+ event.timestamp = ptp_time;
+ ptp_clock_event(priv->ptp_clock, &event);
+ }
+}
+
/* DWMAC 1000 ptp_clock_info ops */
int dwmac1000_ptp_enable(struct ptp_clock_info *ptp,
diff --git a/drivers/net/ethernet/stmicro/stmmac/hwif.c b/drivers/net/ethernet/stmicro/stmmac/hwif.c
index 4af6a5fceb20..ac3d37841dd5 100644
--- a/drivers/net/ethernet/stmicro/stmmac/hwif.c
+++ b/drivers/net/ethernet/stmicro/stmmac/hwif.c
@@ -133,7 +133,7 @@ static const struct stmmac_hwif_entry {
.desc = NULL,
.dma = &dwmac100_dma_ops,
.mac = &dwmac100_ops,
- .hwtimestamp = &stmmac_ptp,
+ .hwtimestamp = &dwmac1000_ptp,
.ptp = &dwmac1000_ptp_clock_ops,
.mode = NULL,
.tc = NULL,
@@ -152,7 +152,7 @@ static const struct stmmac_hwif_entry {
.desc = NULL,
.dma = &dwmac1000_dma_ops,
.mac = &dwmac1000_ops,
- .hwtimestamp = &stmmac_ptp,
+ .hwtimestamp = &dwmac1000_ptp,
.ptp = &dwmac1000_ptp_clock_ops,
.mode = NULL,
.tc = NULL,
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
index 5ef52ef2698f..a94829ef8cfb 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c
@@ -269,3 +269,14 @@ const struct stmmac_hwtimestamp stmmac_ptp = {
.timestamp_interrupt = timestamp_interrupt,
.hwtstamp_correct_latency = hwtstamp_correct_latency,
};
+
+const struct stmmac_hwtimestamp dwmac1000_ptp = {
+ .config_hw_tstamping = config_hw_tstamping,
+ .init_systime = init_systime,
+ .config_sub_second_increment = config_sub_second_increment,
+ .config_addend = config_addend,
+ .adjust_systime = adjust_systime,
+ .get_systime = get_systime,
+ .get_ptptime = dwmac1000_get_ptptime,
+ .timestamp_interrupt = dwmac1000_timestamp_interrupt,
+};
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h
index fa4611855311..4cc70480ce0f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h
@@ -96,8 +96,12 @@ enum aux_snapshot {
struct ptp_clock_info;
struct ptp_clock_request;
+struct stmmac_priv;
int dwmac1000_ptp_enable(struct ptp_clock_info *ptp,
struct ptp_clock_request *rq, int on);
+void dwmac1000_get_ptptime(void __iomem *ptpaddr, u64 *ptp_time);
+void dwmac1000_timestamp_interrupt(struct stmmac_priv *priv);
+
#endif /* __STMMAC_PTP_H__ */
--
2.47.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH net-next 6/7] net: stmmac: Enable timestamping interrupt on dwmac1000
2024-10-29 11:54 [PATCH net-next 0/7] Support external snapshots on dwmac1000 Maxime Chevallier
` (4 preceding siblings ...)
2024-10-29 11:54 ` [PATCH net-next 5/7] net: stmmac: Introduce dwmac1000 timestamping operations Maxime Chevallier
@ 2024-10-29 11:54 ` Maxime Chevallier
2024-10-29 11:54 ` [PATCH net-next 7/7] net: stmmac: Don't include dwmac4 definitions in stmmac_ptp Maxime Chevallier
2024-10-29 14:45 ` [PATCH net-next 0/7] Support external snapshots on dwmac1000 Alexis Lothoré
7 siblings, 0 replies; 11+ messages in thread
From: Maxime Chevallier @ 2024-10-29 11:54 UTC (permalink / raw)
To: Alexandre Torgue, Jose Abreu, Andrew Lunn, davem, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Richard Cochran
Cc: Maxime Chevallier, Alexis Lothoré, Thomas Petazzoni, netdev,
linux-stm32, linux-arm-kernel, linux-kernel
The default configuration for the interrupts on dwmac1000 have the
timestamping interrupt masked. Now that the timestamping has been
adapted to dwmac1000, enable the timestamping interrupt on these
platforms.
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac1000.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
index 600fea8f712f..9cc98f21a83f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
@@ -41,8 +41,7 @@
#define GMAC_INT_DISABLE_PCS (GMAC_INT_DISABLE_RGMII | \
GMAC_INT_DISABLE_PCSLINK | \
GMAC_INT_DISABLE_PCSAN)
-#define GMAC_INT_DEFAULT_MASK (GMAC_INT_DISABLE_TIMESTAMP | \
- GMAC_INT_DISABLE_PCS)
+#define GMAC_INT_DEFAULT_MASK GMAC_INT_DISABLE_PCS
/* PMT Control and Status */
#define GMAC_PMT 0x0000002c
--
2.47.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH net-next 7/7] net: stmmac: Don't include dwmac4 definitions in stmmac_ptp
2024-10-29 11:54 [PATCH net-next 0/7] Support external snapshots on dwmac1000 Maxime Chevallier
` (5 preceding siblings ...)
2024-10-29 11:54 ` [PATCH net-next 6/7] net: stmmac: Enable timestamping interrupt on dwmac1000 Maxime Chevallier
@ 2024-10-29 11:54 ` Maxime Chevallier
2024-10-29 14:45 ` [PATCH net-next 0/7] Support external snapshots on dwmac1000 Alexis Lothoré
7 siblings, 0 replies; 11+ messages in thread
From: Maxime Chevallier @ 2024-10-29 11:54 UTC (permalink / raw)
To: Alexandre Torgue, Jose Abreu, Andrew Lunn, davem, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Richard Cochran
Cc: Maxime Chevallier, Alexis Lothoré, Thomas Petazzoni, netdev,
linux-stm32, linux-arm-kernel, linux-kernel
The stmmac_ptp code doesn't need the dwmac4 register definitions, remove
the inclusion.
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
index 430905f591b2..429b2d357813 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
@@ -9,7 +9,6 @@
*******************************************************************************/
#include "stmmac.h"
#include "stmmac_ptp.h"
-#include "dwmac4.h"
/**
* stmmac_adjust_freq
--
2.47.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH net-next 3/7] net: stmmac: Only update the auto-discovered PTP clock features
2024-10-29 11:54 ` [PATCH net-next 3/7] net: stmmac: Only update the auto-discovered PTP clock features Maxime Chevallier
@ 2024-10-29 12:50 ` Alexis Lothoré
0 siblings, 0 replies; 11+ messages in thread
From: Alexis Lothoré @ 2024-10-29 12:50 UTC (permalink / raw)
To: Maxime Chevallier, Alexandre Torgue, Jose Abreu, Andrew Lunn,
davem, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Richard Cochran
Cc: Thomas Petazzoni, netdev, linux-stm32, linux-arm-kernel,
linux-kernel
Hello Maxime,
thanks for reviving this !
On 10/29/24 12:54, Maxime Chevallier wrote:
> Some DWMAC variants such as dwmac1000 don't support disovering the
> number of output pps and auxiliary snapshots. Allow these parameters to
> be defined in default ptp_clock_info, and let them be updated only when
> the feature discovery yielded a result.
>
> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
nit: s/disovering/discovering/
Thanks,
Alexis
--
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH net-next 0/7] Support external snapshots on dwmac1000
2024-10-29 11:54 [PATCH net-next 0/7] Support external snapshots on dwmac1000 Maxime Chevallier
` (6 preceding siblings ...)
2024-10-29 11:54 ` [PATCH net-next 7/7] net: stmmac: Don't include dwmac4 definitions in stmmac_ptp Maxime Chevallier
@ 2024-10-29 14:45 ` Alexis Lothoré
2024-10-29 14:49 ` Maxime Chevallier
7 siblings, 1 reply; 11+ messages in thread
From: Alexis Lothoré @ 2024-10-29 14:45 UTC (permalink / raw)
To: Maxime Chevallier, Alexandre Torgue, Jose Abreu, Andrew Lunn,
davem, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
Richard Cochran
Cc: Thomas Petazzoni, netdev, linux-stm32, linux-arm-kernel,
linux-kernel
Hello Maxime,
On 10/29/24 12:54, Maxime Chevallier wrote:
> Hi,
>
> This series is another take on the pervious work [1] done by
> Alexis Lothoré, that fixes the support for external snapshots
> timestamping in GMAC3-based devices.
>
[...]
> [1]: https://lore.kernel.org/netdev/20230616100409.164583-1-alexis.lothore@bootlin.com/
>
> Thanks Alexis for laying the groundwork for this,
>
> Best regards,
>
> Maxime
Thanks for making this topic move forward. I suspect the series to be missing
some bits: in the initial series you mention in [1], I also reworked
stmmac_hwtstamp_set in stmmac_main.c, which is also currently assuming a GMAC4
layout ([2]). I suspect that in your series current state, any new call to
stmmac_hwtstamp_set will overwrite any previously configured hardware timestamping.
[2]
https://lore.kernel.org/netdev/20230616100409.164583-8-alexis.lothore@bootlin.com/
>
> Maxime Chevallier (7):
> net: stmmac: Don't modify the global ptp ops directly
> net: stmmac: Use per-hw ptp clock ops
> net: stmmac: Only update the auto-discovered PTP clock features
> net: stmmac: Introduce dwmac1000 ptp_clock_info and operations
> net: stmmac: Introduce dwmac1000 timestamping operations
> net: stmmac: Enable timestamping interrupt on dwmac1000
> net: stmmac: Don't include dwmac4 definitions in stmmac_ptp
>
> drivers/net/ethernet/stmicro/stmmac/common.h | 4 +
> .../net/ethernet/stmicro/stmmac/dwmac1000.h | 15 +++-
> .../ethernet/stmicro/stmmac/dwmac1000_core.c | 85 +++++++++++++++++++
> drivers/net/ethernet/stmicro/stmmac/hwif.c | 14 ++-
> .../ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 11 +++
> .../net/ethernet/stmicro/stmmac/stmmac_ptp.c | 38 +++++++--
> .../net/ethernet/stmicro/stmmac/stmmac_ptp.h | 10 +++
> 7 files changed, 165 insertions(+), 12 deletions(-)
>
--
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH net-next 0/7] Support external snapshots on dwmac1000
2024-10-29 14:45 ` [PATCH net-next 0/7] Support external snapshots on dwmac1000 Alexis Lothoré
@ 2024-10-29 14:49 ` Maxime Chevallier
0 siblings, 0 replies; 11+ messages in thread
From: Maxime Chevallier @ 2024-10-29 14:49 UTC (permalink / raw)
To: Alexis Lothoré
Cc: Alexandre Torgue, Jose Abreu, Andrew Lunn, davem, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Richard Cochran,
Thomas Petazzoni, netdev, linux-stm32, linux-arm-kernel,
linux-kernel
Hi Alexis,
On Tue, 29 Oct 2024 15:45:07 +0100
Alexis Lothoré <alexis.lothore@bootlin.com> wrote:
> Hello Maxime,
>
> On 10/29/24 12:54, Maxime Chevallier wrote:
> > Hi,
> >
> > This series is another take on the pervious work [1] done by
> > Alexis Lothoré, that fixes the support for external snapshots
> > timestamping in GMAC3-based devices.
> >
>
> [...]
>
> > [1]: https://lore.kernel.org/netdev/20230616100409.164583-1-alexis.lothore@bootlin.com/
> >
> > Thanks Alexis for laying the groundwork for this,
> >
> > Best regards,
> >
> > Maxime
>
> Thanks for making this topic move forward. I suspect the series to be missing
> some bits: in the initial series you mention in [1], I also reworked
> stmmac_hwtstamp_set in stmmac_main.c, which is also currently assuming a GMAC4
> layout ([2]). I suspect that in your series current state, any new call to
> stmmac_hwtstamp_set will overwrite any previously configured hardware timestamping.
You are correct indeed, I missed this bit in the series. I'll update
that for v2.
Thanks,
Maxime
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-10-29 15:06 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-29 11:54 [PATCH net-next 0/7] Support external snapshots on dwmac1000 Maxime Chevallier
2024-10-29 11:54 ` [PATCH net-next 1/7] net: stmmac: Don't modify the global ptp ops directly Maxime Chevallier
2024-10-29 11:54 ` [PATCH net-next 2/7] net: stmmac: Use per-hw ptp clock ops Maxime Chevallier
2024-10-29 11:54 ` [PATCH net-next 3/7] net: stmmac: Only update the auto-discovered PTP clock features Maxime Chevallier
2024-10-29 12:50 ` Alexis Lothoré
2024-10-29 11:54 ` [PATCH net-next 4/7] net: stmmac: Introduce dwmac1000 ptp_clock_info and operations Maxime Chevallier
2024-10-29 11:54 ` [PATCH net-next 5/7] net: stmmac: Introduce dwmac1000 timestamping operations Maxime Chevallier
2024-10-29 11:54 ` [PATCH net-next 6/7] net: stmmac: Enable timestamping interrupt on dwmac1000 Maxime Chevallier
2024-10-29 11:54 ` [PATCH net-next 7/7] net: stmmac: Don't include dwmac4 definitions in stmmac_ptp Maxime Chevallier
2024-10-29 14:45 ` [PATCH net-next 0/7] Support external snapshots on dwmac1000 Alexis Lothoré
2024-10-29 14:49 ` Maxime Chevallier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox