diff options
author | Wolfgang Denk <wd@pollux.denx.de> | 2005-10-29 23:45:04 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@pollux.denx.de> | 2005-10-29 23:45:04 +0200 |
commit | 5d4ee51061e70118fb598e3aca082dd11a154e87 (patch) | |
tree | b7cddabfe81abe8fa066dd082a9425bee556cd88 /include/miiphy.h | |
parent | 7b5cac0e1958173a390ae6d620a610028cad25f8 (diff) | |
parent | 99eb35dbbfd94d8d4e047952663f92526ae4dfc8 (diff) | |
download | u-boot-imx-5d4ee51061e70118fb598e3aca082dd11a154e87.zip u-boot-imx-5d4ee51061e70118fb598e3aca082dd11a154e87.tar.gz u-boot-imx-5d4ee51061e70118fb598e3aca082dd11a154e87.tar.bz2 |
Merge with /home/m8/git/u-boot
Diffstat (limited to 'include/miiphy.h')
-rw-r--r-- | include/miiphy.h | 36 |
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 |