Thread (14 messages) 14 messages, 6 authors, 2024-06-03

Re: [PATCH 1/3] net: ti: icssg-prueth: Enable PTP timestamping support for SR1.0 devices

From: Simon Horman <horms@kernel.org>
Date: 2024-06-01 12:03:40
Also in: linux-arm-kernel, linux-devicetree, lkml

On Wed, May 29, 2024 at 05:05:10PM +0100, Diogo Ivo wrote:
quoted hunk ↗ jump to hunk
Enable PTP support for AM65x SR1.0 devices by registering with the IEP
infrastructure in order to expose a PTP clock to userspace.

Signed-off-by: Diogo Ivo <redacted>
---
 drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c | 49 +++++++++++++++++++++++-
 1 file changed, 48 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c b/drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c
index 7b3304bbd7fc..01cad01965dc 100644
--- a/drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c
+++ b/drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c
@@ -1011,16 +1011,42 @@ static int prueth_probe(struct platform_device *pdev)
 	dev_dbg(dev, "sram: pa %llx va %p size %zx\n", prueth->msmcram.pa,
 		prueth->msmcram.va, prueth->msmcram.size);
 
+	prueth->iep0 = icss_iep_get_idx(np, 0);
+	if (IS_ERR(prueth->iep0)) {
+		ret = dev_err_probe(dev, PTR_ERR(prueth->iep0), "iep0 get failed\n");
Hi Diogo,

A minor nit from my side.
No need to address this unless there will be a v2 for some other reason.

Networking still prefers code to be 80 columns wide or less.
It looks like that can be trivially achieved here.

Flagged by checkpatch.pl --max-line-length=80

+		goto free_pool;
+	}
+
+	prueth->iep1 = icss_iep_get_idx(np, 1);
+	if (IS_ERR(prueth->iep1)) {
+		ret = dev_err_probe(dev, PTR_ERR(prueth->iep1), "iep1 get failed\n");
Likewise, here.
+		goto put_iep0;
+	}
...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help