summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ti/icssg/icssg_prueth.c
diff options
context:
space:
mode:
authorMD Danish Anwar <danishanwar@ti.com>2024-08-22 14:26:52 +0200
committerJakub Kicinski <kuba@kernel.org>2024-08-26 18:35:49 +0200
commit550ee90ac61c1f0cd987c68a9ac6c4c9833925d7 (patch)
treee6b6eed1d7d39836578b9a9824088d1064bdbdbb /drivers/net/ethernet/ti/icssg/icssg_prueth.c
parentdt-bindings: soc: ti: pruss: Add documentation for PA_STATS support (diff)
downloadlinux-550ee90ac61c1f0cd987c68a9ac6c4c9833925d7.tar.xz
linux-550ee90ac61c1f0cd987c68a9ac6c4c9833925d7.zip
net: ti: icssg-prueth: Add support for PA Stats
Add support for dumping PA stats registers via ethtool. Firmware maintained stats are stored at PA Stats registers. Also modify emac_get_strings() API to use ethtool_puts(). This commit also maintains consistency between miig_stats and pa_stats by - renaming the array icssg_all_stats to icssg_all_miig_stats - renaming the structure icssg_stats to icssg_miig_stats - renaming ICSSG_STATS() to ICSSG_MIIG_STATS() - changing order of stats related data structures and arrays so that data structures of a certain stats type is clubbed together. Signed-off-by: MD Danish Anwar <danishanwar@ti.com> Link: https://patch.msgid.link/20240822122652.1071801-3-danishanwar@ti.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/ti/icssg/icssg_prueth.c')
-rw-r--r--drivers/net/ethernet/ti/icssg/icssg_prueth.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth.c b/drivers/net/ethernet/ti/icssg/icssg_prueth.c
index 53a3e44b99a2..f623a0f603fc 100644
--- a/drivers/net/ethernet/ti/icssg/icssg_prueth.c
+++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.c
@@ -1182,6 +1182,12 @@ static int prueth_probe(struct platform_device *pdev)
return -ENODEV;
}
+ prueth->pa_stats = syscon_regmap_lookup_by_phandle(np, "ti,pa-stats");
+ if (IS_ERR(prueth->pa_stats)) {
+ dev_err(dev, "couldn't get ti,pa-stats syscon regmap\n");
+ return -ENODEV;
+ }
+
if (eth0_node) {
ret = prueth_get_cores(prueth, ICSS_SLICE0, false);
if (ret)