Merge "[qca-edma] Add support to get rx/tx ring size from dts"
diff --git a/edma.c b/edma.c
index 0285de3..194128f 100644
--- a/edma.c
+++ b/edma.c
@@ -1903,7 +1903,7 @@
for (i = 0; i < edma_cinfo->num_tx_queues; i++) {
etdr = edma_cinfo->tpd_ring[i];
- for (j = 0; j < EDMA_TX_RING_SIZE; j++) {
+ for (j = 0; j < edma_cinfo->tx_ring_count; j++) {
sw_desc = &etdr->sw_desc[j];
if (sw_desc->flags & (EDMA_SW_DESC_FLAG_SKB_HEAD |
EDMA_SW_DESC_FLAG_SKB_FRAG | EDMA_SW_DESC_FLAG_SKB_FRAGLIST))
@@ -1982,7 +1982,7 @@
for (i = 0, k = 0; i < edma_cinfo->num_rx_queues; i++) {
erdr = edma_cinfo->rfd_ring[k];
- for (j = 0; j < EDMA_RX_RING_SIZE; j++) {
+ for (j = 0; j < edma_cinfo->rx_ring_count; j++) {
/* unmap all descriptors while cleaning */
edma_clean_rfd(pdev, erdr, j, 1);
}
diff --git a/edma_axi.c b/edma_axi.c
index 4a14745..61e0422 100644
--- a/edma_axi.c
+++ b/edma_axi.c
@@ -1187,6 +1187,13 @@
edma_cinfo->num_cores = EDMA_CPU_CORES_SUPPORTED;
}
+ if (of_property_read_bool(np, "qcom,tx-ring-count"))
+ of_property_read_u32(np, "qcom,tx-ring-count",
+ &edma_cinfo->tx_ring_count);
+
+ if (of_property_read_bool(np, "qcom,rx-ring-count"))
+ of_property_read_u32(np, "qcom,rx-ring-count",
+ &edma_cinfo->rx_ring_count);
of_property_read_u32(np, "qcom,page-mode", &edma_cinfo->page_mode);
of_property_read_u32(np, "qcom,rx-head-buf-size",