summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-11-27 18:25:11 +0300
committerTom Rini <trini@konsulko.com>2022-12-08 00:04:17 +0300
commitecca44805d9a00e8e9ac6c14d9e7293565900981 (patch)
treea28431cc5bbeaa8ad4200db686d4a1c1887696b0 /drivers
parent4fb814f571e01a3702e9d58497c57e1892070c2e (diff)
downloadu-boot-ecca44805d9a00e8e9ac6c14d9e7293565900981.tar.xz
net: ethoc: Remove non-DM_ETH code
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@konsulko.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethoc.c85
1 files changed, 0 insertions, 85 deletions
diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
index a219affb58..29067e9e94 100644
--- a/drivers/net/ethoc.c
+++ b/drivers/net/ethoc.c
@@ -643,8 +643,6 @@ static inline int ethoc_phy_init(struct ethoc *priv, void *dev)
#endif
-#ifdef CONFIG_DM_ETH
-
static int ethoc_write_hwaddr(struct udevice *dev)
{
struct ethoc_eth_pdata *pdata = dev_get_plat(dev);
@@ -753,86 +751,3 @@ U_BOOT_DRIVER(ethoc) = {
.priv_auto = sizeof(struct ethoc),
.plat_auto = sizeof(struct ethoc_eth_pdata),
};
-
-#else
-
-static int ethoc_init(struct eth_device *dev, struct bd_info *bd)
-{
- struct ethoc *priv = (struct ethoc *)dev->priv;
-
- return ethoc_init_common(priv);
-}
-
-static int ethoc_write_hwaddr(struct eth_device *dev)
-{
- struct ethoc *priv = (struct ethoc *)dev->priv;
- u8 *mac = dev->enetaddr;
-
- return ethoc_write_hwaddr_common(priv, mac);
-}
-
-static int ethoc_send(struct eth_device *dev, void *packet, int length)
-{
- return ethoc_send_common(dev->priv, packet, length);
-}
-
-static void ethoc_halt(struct eth_device *dev)
-{
- ethoc_disable_rx_and_tx(dev->priv);
-}
-
-static int ethoc_recv(struct eth_device *dev)
-{
- struct ethoc *priv = (struct ethoc *)dev->priv;
- int count;
-
- if (!ethoc_is_new_packet_received(priv))
- return 0;
-
- for (count = 0; count < PKTBUFSRX; ++count) {
- uchar *packetp;
- int size = ethoc_rx_common(priv, &packetp);
-
- if (size < 0)
- break;
- if (size > 0)
- net_process_received_packet(packetp, size);
- ethoc_free_pkt_common(priv);
- }
- return 0;
-}
-
-int ethoc_initialize(u8 dev_num, int base_addr)
-{
- struct ethoc *priv;
- struct eth_device *dev;
-
- priv = malloc(sizeof(*priv));
- if (!priv)
- return 0;
- dev = malloc(sizeof(*dev));
- if (!dev) {
- free(priv);
- return 0;
- }
-
- memset(dev, 0, sizeof(*dev));
- dev->priv = priv;
- dev->iobase = base_addr;
- dev->init = ethoc_init;
- dev->halt = ethoc_halt;
- dev->send = ethoc_send;
- dev->recv = ethoc_recv;
- dev->write_hwaddr = ethoc_write_hwaddr;
- sprintf(dev->name, "%s-%hu", "ETHOC", dev_num);
- priv->iobase = ioremap(dev->iobase, ETHOC_IOSIZE);
-
- eth_register(dev);
-
- ethoc_mdio_init(dev->name, priv);
- ethoc_phy_init(priv, dev);
-
- return 1;
-}
-
-#endif