2 * Micrel KSZ8873 PHY Driver for TI DaVinci
3 * (TMS320DM644x) based boards.
5 * Copyright (C) 2011 Heiko Schocher <hsdenx.de>
8 * National Semiconductor DP83848 PHY Driver for TI DaVinci
9 * (TMS320DM644x) based boards.
11 * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
13 * --------------------------------------------------------
15 * See file CREDITS for list of people who contributed to this
18 * This program is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU General Public License as
20 * published by the Free Software Foundation; either version 2 of
21 * the License, or (at your option) any later version.
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
28 * You should have received a copy of the GNU General Public License
29 * along with this program; if not, write to the Free Software
30 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
37 #include <asm/arch/emac_defs.h>
39 #include "../../../../../drivers/net/davinci_emac.h"
41 int ksz8873_is_phy_connected(int phy_addr)
45 return davinci_eth_phy_read(phy_addr, MII_PHYSID1, &dummy);
48 int ksz8873_get_link_speed(int phy_addr)
50 emac_regs *emac = (emac_regs *)EMAC_BASE_ADDR;
52 /* we always have a link to the switch, 100 FD */
53 writel((EMAC_MACCONTROL_MIIEN_ENABLE |
54 EMAC_MACCONTROL_FULLDUPLEX_ENABLE),
60 int ksz8873_init_phy(int phy_addr)
66 int ksz8873_auto_negotiate(int phy_addr)
68 return dp83848_get_link_speed(phy_addr);