[qca-edma] Add support for interframe delay stats

Add support to display interframe delay for upto 8 flows
each for video traffic.

Change-Id: I9cb3d793442fe4b9150108cf29259b0a4b23ad31
Signed-off-by: Rakesh Nair <ranair@codeaurora.org>
diff --git a/edma_axi.c b/edma_axi.c
index f4ec659..780df1e 100644
--- a/edma_axi.c
+++ b/edma_axi.c
@@ -75,8 +75,13 @@
 struct net_device *edma_netdev[EDMA_MAX_PORTID_SUPPORTED];
 
 extern u8 edma_dscp2ac_tbl[EDMA_PRECEDENCE_MAX];
-extern u8 edma_per_prec_stats_enable;
-extern u8 edma_prec_stats_reset;
+extern u32 edma_per_prec_stats_enable;
+extern u32 edma_prec_stats_reset;
+extern u32 edma_iad_stats_enable;
+extern u32 edma_iad_stats_reset;
+extern u32 edma_max_valid_ifd_usec;
+static u32 edma_print_flow_table __read_mostly = 0;
+extern struct edma_flow_attrib edma_flow_tbl[EDMA_MAX_IAD_FLOW_STATS_SUPPORTED];
 
 static struct phy_device *edma_phydev[EDMA_MAX_PORTID_SUPPORTED];
 static int edma_link_detect_bmp;
@@ -1030,6 +1035,34 @@
 		.mode           = 0644,
 		.proc_handler   = edma_prec_stats_reset_handler,
 	},
+	{
+		.procname       = "iad_stats_enable",
+		.data           = &edma_iad_stats_enable,
+		.maxlen         = sizeof(int),
+		.mode           = 0644,
+		.proc_handler   = edma_iad_stats_enable_handler,
+	},
+	{
+		.procname       = "iad_stats_reset",
+		.data           = &edma_iad_stats_reset,
+		.maxlen         = sizeof(int),
+		.mode           = 0644,
+		.proc_handler   = edma_iad_stats_reset_handler,
+	},
+	{
+		.procname       = "iad_print_flow_table",
+		.data           = &edma_print_flow_table,
+		.maxlen         = sizeof(int),
+		.mode           = 0644,
+		.proc_handler   = edma_print_flow_table_handler,
+	},
+	{
+		.procname       = "max_valid_ifd_usec",
+		.data           = &edma_max_valid_ifd_usec,
+		.maxlen         = sizeof(int),
+		.mode           = 0644,
+		.proc_handler   = edma_max_valid_ifd_usec_handler,
+	},
 	{}
 };
 
@@ -1629,6 +1662,8 @@
 	for (i = 0 ; i < EDMA_PRECEDENCE_MAX ; i++)
 		edma_dscp2ac_tbl[i] = EDMA_AC_BE;
 
+	memset(edma_flow_tbl, 0, sizeof(struct edma_flow_attrib) * EDMA_MAX_IAD_FLOW_STATS_SUPPORTED);
+
 	return 0;
 
 edma_phy_attach_fail: