[PATCH 13/41] net: dm9000x: Remove non-DM_ETH code
Tom Rini
trini at konsulko.com
Sun Nov 27 16:25:08 CET 2022
As DM_ETH is required for all network drivers, it's now safe to remove
the non-DM_ETH support code.
Signed-off-by: Tom Rini <trini at konsulko.com>
---
drivers/net/dm9000x.c | 66 -------------------------------------------
1 file changed, 66 deletions(-)
diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c
index 07733df533e2..b46bdeb23bee 100644
--- a/drivers/net/dm9000x.c
+++ b/drivers/net/dm9000x.c
@@ -75,9 +75,6 @@ struct dm9000_priv {
void (*outblk)(struct dm9000_priv *db, void *data_ptr, int count);
void (*inblk)(struct dm9000_priv *db, void *data_ptr, int count);
void (*rx_status)(struct dm9000_priv *db, u16 *rxstatus, u16 *rxlen);
-#ifndef CONFIG_DM_ETH
- struct eth_device dev;
-#endif
void __iomem *base_io;
void __iomem *base_data;
};
@@ -572,68 +569,6 @@ static void dm9000_get_enetaddr(struct dm9000_priv *db, u8 *enetaddr)
static void dm9000_get_enetaddr(struct dm9000_priv *db, u8 *enetaddr) {}
#endif
-#ifndef CONFIG_DM_ETH
-static int dm9000_init(struct eth_device *dev, struct bd_info *bd)
-{
- struct dm9000_priv *db = container_of(dev, struct dm9000_priv, dev);
-
- return dm9000_init_common(db, dev->enetaddr);
-}
-
-static void dm9000_halt(struct eth_device *dev)
-{
- struct dm9000_priv *db = container_of(dev, struct dm9000_priv, dev);
-
- dm9000_halt_common(db);
-}
-
-static int dm9000_send(struct eth_device *dev, void *packet, int length)
-{
- struct dm9000_priv *db = container_of(dev, struct dm9000_priv, dev);
-
- return dm9000_send_common(db, packet, length);
-}
-
-static int dm9000_recv(struct eth_device *dev)
-{
- struct dm9000_priv *db = container_of(dev, struct dm9000_priv, dev);
- int ret;
-
- ret = dm9000_recv_common(db, net_rx_packets[0]);
- if (ret > 0)
- net_process_received_packet(net_rx_packets[0], ret);
-
- return ret;
-}
-
-int dm9000_initialize(struct bd_info *bis)
-{
- struct dm9000_priv *priv;
- struct eth_device *dev;
-
- priv = calloc(1, sizeof(*priv));
- if (!priv)
- return -ENOMEM;
-
- dev = &priv->dev;
-
- priv->base_io = (void __iomem *)DM9000_IO;
- priv->base_data = (void __iomem *)DM9000_DATA;
-
- /* Load MAC address from EEPROM */
- dm9000_get_enetaddr(priv, dev->enetaddr);
-
- dev->init = dm9000_init;
- dev->halt = dm9000_halt;
- dev->send = dm9000_send;
- dev->recv = dm9000_recv;
- strcpy(dev->name, "dm9000");
-
- eth_register(&priv->dev);
-
- return 0;
-}
-#else /* ifdef CONFIG_DM_ETH */
static int dm9000_start(struct udevice *dev)
{
struct dm9000_priv *db = dev_get_priv(dev);
@@ -746,4 +681,3 @@ U_BOOT_DRIVER(dm9000) = {
.plat_auto = sizeof(struct eth_pdata),
.flags = DM_FLAG_ALLOC_PRIV_DMA,
};
-#endif
--
2.25.1
More information about the U-Boot
mailing list