summaryrefslogtreecommitdiff
path: root/include/miiphy.h
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 /include/miiphy.h
parentfe93483a0ab9dcbf7794ffbf0b029ba138380e81 (diff)
downloadu-boot-imx-63ff004c4fcad9f690bf44dbd15d568bb47aac2d.zip
u-boot-imx-63ff004c4fcad9f690bf44dbd15d568bb47aac2d.tar.gz
u-boot-imx-63ff004c4fcad9f690bf44dbd15d568bb47aac2d.tar.bz2
Add support for multiple PHYs.
Diffstat (limited to 'include/miiphy.h')
-rw-r--r--include/miiphy.h36
1 files changed, 28 insertions, 8 deletions
diff --git a/include/miiphy.h b/include/miiphy.h
index afdd5a7..3c6ee77 100644
--- a/include/miiphy.h
+++ b/include/miiphy.h
@@ -38,18 +38,38 @@
#ifndef _miiphy_h_
#define _miiphy_h_
+#include <net.h>
-int miiphy_read(unsigned char addr, unsigned char reg, unsigned short * value);
-int miiphy_write(unsigned char addr, unsigned char reg, unsigned short value);
-int miiphy_info(unsigned char addr, unsigned int *oui, unsigned char *model,
- unsigned char *rev);
-int miiphy_reset(unsigned char addr);
-int miiphy_speed(unsigned char addr);
-int miiphy_duplex(unsigned char addr);
+int miiphy_read(char *devname, unsigned char addr, unsigned char reg,
+ unsigned short *value);
+int miiphy_write(char *devname, unsigned char addr, unsigned char reg,
+ unsigned short value);
+int miiphy_info(char *devname, unsigned char addr, unsigned int *oui,
+ unsigned char *model, unsigned char *rev);
+int miiphy_reset(char *devname, unsigned char addr);
+int miiphy_speed(char *devname, unsigned char addr);
+int miiphy_duplex(char *devname, unsigned char addr);
#ifdef CFG_FAULT_ECHO_LINK_DOWN
-int miiphy_link(unsigned char addr);
+int miiphy_link(char *devname, unsigned char addr);
#endif
+void miiphy_register(char *devname,
+ int (* read)(char *devname, unsigned char addr,
+ unsigned char reg, unsigned short *value),
+ int (* write)(char *devname, unsigned char addr,
+ unsigned char reg, unsigned short value));
+
+int miiphy_set_current_dev(char *devname);
+char *miiphy_get_current_dev(void);
+
+void miiphy_listdev(void);
+
+#define BB_MII_DEVNAME "bbmii"
+
+int bb_miiphy_read (char *devname, unsigned char addr,
+ unsigned char reg, unsigned short *value);
+int bb_miiphy_write (char *devname, unsigned char addr,
+ unsigned char reg, unsigned short value);
/* phy seed setup */
#define AUTO 99