Thread (5 messages) 5 messages, 3 authors, 2024-07-15

RE: [PATCH v11 17/38] net: cirrus: add DT support for Cirrus EP93xx

From: Sai Krishna Gajula <hidden>
Date: 2024-07-15 16:02:52
Also in: lkml

-----Original Message-----
From: Nikita Shubin via B4 Relay
[off-list ref]
Sent: Monday, July 15, 2024 2:08 PM
To: Hartley Sweeten <hsweeten@visionengravers.com>; David S. Miller
[off-list ref]; Eric Dumazet [off-list ref]; Jakub
Kicinski [off-list ref]; Paolo Abeni [off-list ref]
Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Andrew Lunn
[off-list ref]
Subject:  [PATCH v11 17/38] net: cirrus: add DT support for Cirrus
EP93xx

From: Nikita Shubin <nikita. shubin@ maquefel. me> - add OF ID match table -
get phy_id from the device tree, as part of mdio - copy_addr is now always
used, as there is no SoC/board that aren't - dropped platform header Signed-
off-by: Nikita 
From: Nikita Shubin <nikita.shubin@maquefel.me>

- add OF ID match table
- get phy_id from the device tree, as part of mdio
- copy_addr is now always used, as there is no SoC/board that aren't
- dropped platform header

Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Linus Walleij <redacted>
This patch seemed to be for net-next, in case NET, Fixes tag is required. Please check.
quoted hunk ↗ jump to hunk
---
 drivers/net/ethernet/cirrus/ep93xx_eth.c | 63 ++++++++++++++++--------------
--
 1 file changed, 32 insertions(+), 31 deletions(-)
diff --git a/drivers/net/ethernet/cirrus/ep93xx_eth.c
b/drivers/net/ethernet/cirrus/ep93xx_eth.c
index 1f495cfd7959..2523d9c9d1b8 100644
--- a/drivers/net/ethernet/cirrus/ep93xx_eth.c
+++ b/drivers/net/ethernet/cirrus/ep93xx_eth.c
@@ -16,13 +16,12 @@
 #include <linux/ethtool.h>
 #include <linux/interrupt.h>
 #include <linux/moduleparam.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/delay.h>
 #include <linux/io.h>
 #include <linux/slab.h>

-#include <linux/platform_data/eth-ep93xx.h>
-
 #define DRV_MODULE_NAME		"ep93xx-eth"

 #define RX_QUEUE_ENTRIES	64
@@ -738,25 +737,6 @@ static const struct net_device_ops
ep93xx_netdev_ops = {
 	.ndo_set_mac_address	= eth_mac_addr,
 };

-static struct net_device *ep93xx_dev_alloc(struct ep93xx_eth_data *data) -{
-	struct net_device *dev;
-
-	dev = alloc_etherdev(sizeof(struct ep93xx_priv));
-	if (dev == NULL)
-		return NULL;
-
-	eth_hw_addr_set(dev, data->dev_addr);
-
-	dev->ethtool_ops = &ep93xx_ethtool_ops;
-	dev->netdev_ops = &ep93xx_netdev_ops;
-
-	dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM;
-
-	return dev;
-}
-
-
 static void ep93xx_eth_remove(struct platform_device *pdev)  {
 	struct net_device *dev;
@@ -786,27 +766,47 @@ static void ep93xx_eth_remove(struct
platform_device *pdev)

 static int ep93xx_eth_probe(struct platform_device *pdev)  {
-	struct ep93xx_eth_data *data;
 	struct net_device *dev;
 	struct ep93xx_priv *ep;
 	struct resource *mem;
+	void __iomem *base_addr;
+	struct device_node *np;
Small nit, please check if reverse x-mas tree order need to be follow here.
+	u32 phy_id;
 	int irq;
 	int err;
...
 static struct platform_driver ep93xx_eth_driver = {
 	.probe		= ep93xx_eth_probe,
 	.remove_new	= ep93xx_eth_remove,
 	.driver		= {
 		.name	= "ep93xx-eth",
+		.of_match_table = ep93xx_eth_of_ids,
 	},
 };


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