summaryrefslogtreecommitdiff
path: root/drivers/ns7520_eth.c
diff options
context:
space:
mode:
authorMarian Balakowicz <m8@semihalf.com>2005-10-28 22:30:33 +0200
committerMarian Balakowicz <m8@semihalf.com>2005-10-28 22:30:33 +0200
commit63ff004c4fcad9f690bf44dbd15d568bb47aac2d (patch)
tree7b64074a85da8118b6c862f14de1171b36ade0f7 /drivers/ns7520_eth.c
parentfe93483a0ab9dcbf7794ffbf0b029ba138380e81 (diff)
Add support for multiple PHYs.
Diffstat (limited to 'drivers/ns7520_eth.c')
-rw-r--r--drivers/ns7520_eth.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/ns7520_eth.c b/drivers/ns7520_eth.c
index bcdc27fa85..a5a20dfd72 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;
+}