aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/renesas/ravb.h
diff options
context:
space:
mode:
authorBiju Das <biju.das.jz@bp.renesas.com>2021-08-18 20:07:53 +0100
committerDavid S. Miller <davem@davemloft.net>2021-08-19 12:05:15 +0100
commitebb091461a9e146f8afd750cb7eddc5b4c8d47be (patch)
treeddae2011d2e416b444e8fc62ccb3e66a95e99739 /drivers/net/ethernet/renesas/ravb.h
parentravb: Use unsigned int for num_tx_desc variable in struct ravb_private (diff)
downloadlinux-dev-ebb091461a9e146f8afd750cb7eddc5b4c8d47be.tar.xz
linux-dev-ebb091461a9e146f8afd750cb7eddc5b4c8d47be.zip
ravb: Add struct ravb_hw_info to driver data
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. 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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/renesas/ravb.h')
-rw-r--r--drivers/net/ethernet/renesas/ravb.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/renesas/ravb.h b/drivers/net/ethernet/renesas/ravb.h
index 85ece16134c9..6ff0b2626708 100644
--- a/drivers/net/ethernet/renesas/ravb.h
+++ b/drivers/net/ethernet/renesas/ravb.h
@@ -988,6 +988,10 @@ enum ravb_chip_id {
RCAR_GEN3,
};
+struct ravb_hw_info {
+ enum ravb_chip_id chip_id;
+};
+
struct ravb_private {
struct net_device *ndev;
struct platform_device *pdev;
@@ -1040,6 +1044,8 @@ struct ravb_private {
unsigned txcidm:1; /* TX Clock Internal Delay Mode */
unsigned rgmii_override:1; /* Deprecated rgmii-*id behavior */
unsigned int num_tx_desc; /* TX descriptors per packet */
+
+ const struct ravb_hw_info *info;
};
static inline u32 ravb_read(struct net_device *ndev, enum ravb_reg reg)