Thread (24 messages) 24 messages, 6 authors, 2021-08-23

Re: [PATCH net-next v3 2/9] ravb: Add struct ravb_hw_info to driver data

From: Sergey Shtylyov <hidden>
Date: 2021-08-20 18:16:01
Also in: linux-renesas-soc

On 8/19/21 8:33 PM, Biju Das wrote:

[...]
quoted
quoted
The DMAC and EMAC blocks of Gigabit Ethernet IP found on RZ/G2L SoC
are similar to the R-Car Ethernet AVB IP. With a few changes in the
driver we can support both IPs.

This patch adds the struct ravb_hw_info to hold hw features, driver
data and function pointers to support both the IPs. It also replaces
the driver data chip type with struct ravb_hw_info by moving chip type
to it.
quoted
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
[...]
quoted
quoted
reg) diff --git a/drivers/net/ethernet/renesas/ravb_main.c
b/drivers/net/ethernet/renesas/ravb_main.c
index 94eb9136752d..b6554e5e13af 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
[...]
quoted
@@ -2113,7 +2122,7 @@ static int ravb_probe(struct platform_device
*pdev)
quoted
 		}
 	}

-	priv->chip_id = chip_id;
+	priv->chip_id = info->chip_id;
   Do we still need priv->chip_id?
The patch currently merged is preparation patch, subsequent patch will replace
all the chip_id in ravb_main with hardware features and driver features.
After that both priv->chip_id and info_chipid is not required for ravb_main.c

However ptp driver[1] still uses it, by adding a feature bit we can replace
that as well. So going forward, there won't be any priv->chip_id or info->chip_id.

Does it makes sense?

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/renesas/ravb_ptp.c?h=v5.14-rc6#n200
   OK, seems sane, go ahead. :-)
Regards,
Biju
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