Thread (38 messages) 38 messages, 5 authors, 2021-10-06

RE: [PATCH 04/10] ravb: Add support for RZ/G2L SoC

From: Biju Das <biju.das.jz@bp.renesas.com>
Date: 2021-10-04 13:30:29
Also in: linux-renesas-soc

Hi Sergei,
Subject: RE: [PATCH 04/10] ravb: Add support for RZ/G2L SoC
quoted
Subject: Re: [PATCH 04/10] ravb: Add support for RZ/G2L SoC

On 10/1/21 6:06 PM, Biju Das wrote:
quoted
RZ/G2L SoC has Gigabit Ethernet IP consisting of Ethernet controller
(E-MAC), Internal TCP/IP Offload Engine (TOE) and Dedicated Direct
memory access controller (DMAC).

This patch adds compatible string for RZ/G2L and fills up the
ravb_hw_info struct. Function stubs are added which will be used by
gbeth_hw_info and will be filled incrementally.
   I've always been against this patch -- we get a support for the
GbEther whihc doesn't work after this patch. I believe we should have
the GbEther support in the last patch. of the overall series.

This is the common practice. We use bricks to build a wall. The function
stubs are just Bricks.

After filling stubs, we will add SoC dt and board DT, after that one will
get GBsupport on RZ/G2L platform.

Regards,
Biju
quoted
quoted
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
RFC->v1:
 * Added compatible string for RZ/G2L.
 * Added feature bits max_rx_len, aligned_tx and tx_counters for
RZ/G2L.
quoted
quoted
---
 drivers/net/ethernet/renesas/ravb.h      |  2 +
 drivers/net/ethernet/renesas/ravb_main.c | 62
++++++++++++++++++++++++
 2 files changed, 64 insertions(+)
diff --git a/drivers/net/ethernet/renesas/ravb.h
b/drivers/net/ethernet/renesas/ravb.h
index c91e93e5590f..f6398fdcead2 100644
--- a/drivers/net/ethernet/renesas/ravb.h
+++ b/drivers/net/ethernet/renesas/ravb.h
[...]
quoted
diff --git a/drivers/net/ethernet/renesas/ravb_main.c
b/drivers/net/ethernet/renesas/ravb_main.c
index 8bf13586e90a..dc817b4d95a1 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
[...]
quoted
@@ -2073,12 +2120,27 @@ static const struct ravb_hw_info
ravb_gen2_hw_info = {
quoted
 	.nc_queue = 1,
 };

+static const struct ravb_hw_info gbeth_hw_info = {
+	.rx_ring_free = ravb_rx_ring_free_gbeth,
+	.rx_ring_format = ravb_rx_ring_format_gbeth,
+	.alloc_rx_desc = ravb_alloc_rx_desc_gbeth,
+	.receive = ravb_rx_gbeth,
+	.set_rate = ravb_set_rate_gbeth,
+	.set_feature = ravb_set_features_gbeth,
+	.dmac_init = ravb_dmac_init_gbeth,
+	.emac_init = ravb_emac_init_gbeth,
+	.max_rx_len = GBETH_RX_BUFF_MAX + RAVB_ALIGN - 1,
   ALIGN(GBETH_RX_BUFF_MAX, RAVB_ALIGN)?
Will send this change as RFC.

Regards,
Biju
quoted
quoted
+	.aligned_tx = 1,
+	.tx_counters = 1,
+};
+
[...]

MBR. Sergey
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help