diff options
author | Marian Balakowicz <m8@semihalf.com> | 2005-10-28 20:30:33 (GMT) |
---|---|---|
committer | Marian Balakowicz <m8@semihalf.com> | 2005-10-28 20:30:33 (GMT) |
commit | 63ff004c4fcad9f690bf44dbd15d568bb47aac2d (patch) | |
tree | 7b64074a85da8118b6c862f14de1171b36ade0f7 /drivers/ns7520_eth.c | |
parent | fe93483a0ab9dcbf7794ffbf0b029ba138380e81 (diff) | |
download | u-boot-63ff004c4fcad9f690bf44dbd15d568bb47aac2d.tar.xz |
Add support for multiple PHYs.
Diffstat (limited to 'drivers/ns7520_eth.c')
-rw-r--r-- | drivers/ns7520_eth.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/ns7520_eth.c b/drivers/ns7520_eth.c index bcdc27f..a5a20df 100644 --- a/drivers/ns7520_eth.c +++ b/drivers/ns7520_eth.c @@ -767,8 +767,8 @@ enum mii_status { /** * Read a 16-bit value from an MII register. */ -extern int miiphy_read(unsigned char const addr, unsigned char const reg, - unsigned short *const value) +extern int ns7520_miiphy_read(char *devname, unsigned char const addr, + unsigned char const reg, unsigned short *const value) { int ret = MII_STATUS_FAILURE; @@ -813,8 +813,8 @@ extern int miiphy_read(unsigned char const addr, unsigned char const reg, /** * Write a 16-bit value to an MII register. */ -extern int miiphy_write(unsigned char const addr, unsigned char const reg, - unsigned short const value) +extern int ns7520_miiphy_write(char *devname, unsigned char const addr, + unsigned char const reg, unsigned short const value) { int ret = MII_STATUS_FAILURE; @@ -847,3 +847,13 @@ extern int miiphy_write(unsigned char const addr, unsigned char const reg, } #endif /* defined(CONFIG_MII) */ #endif /* CONFIG_DRIVER_NS7520_ETHERNET */ + +int ns7520_miiphy_initialize(bd_t *bis) +{ +#if defined(CONFIG_DRIVER_NS7520_ETHERNET) +#if defined(CONFIG_MII) + miiphy_register("ns7520phy", ns7520_miiphy_read, ns7520_miiphy_write); +#endif +#endif + return 0; +} |