1 // SPDX-License-Identifier: GPL-2.0+
3 * Micrel KSZ8873 PHY Driver for TI DaVinci
4 * (TMS320DM644x) based boards.
6 * Copyright (C) 2011 Heiko Schocher <hsdenx.de>
9 * National Semiconductor DP83848 PHY Driver for TI DaVinci
10 * (TMS320DM644x) based boards.
12 * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
14 * --------------------------------------------------------
20 #include <asm/arch/emac_defs.h>
22 #include "../../../drivers/net/davinci_emac.h"
24 int ksz8873_is_phy_connected(int phy_addr)
28 return davinci_eth_phy_read(phy_addr, MII_PHYSID1, &dummy);
31 int ksz8873_get_link_speed(int phy_addr)
33 emac_regs *emac = (emac_regs *)EMAC_BASE_ADDR;
35 /* we always have a link to the switch, 100 FD */
36 writel((EMAC_MACCONTROL_MIIEN_ENABLE |
37 EMAC_MACCONTROL_FULLDUPLEX_ENABLE),
43 int ksz8873_init_phy(int phy_addr)
49 int ksz8873_auto_negotiate(int phy_addr)
51 return dp83848_get_link_speed(phy_addr);