summaryrefslogtreecommitdiff
path: root/include/miiphy.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/miiphy.h')
-rw-r--r--include/miiphy.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/miiphy.h b/include/miiphy.h
index 34ebce6779d..7e70cf81e4d 100644
--- a/include/miiphy.h
+++ b/include/miiphy.h
@@ -34,8 +34,18 @@
#ifndef _miiphy_h_
#define _miiphy_h_
+#include <common.h>
#include <linux/mii.h>
+#include <linux/list.h>
#include <net.h>
+#include <phy.h>
+
+struct legacy_mii_dev {
+ int (*read)(const char *devname, unsigned char addr,
+ unsigned char reg, unsigned short *value);
+ int (*write)(const char *devname, unsigned char addr,
+ unsigned char reg, unsigned short value);
+};
int miiphy_read(const char *devname, unsigned char addr, unsigned char reg,
unsigned short *value);
@@ -61,9 +71,16 @@ void miiphy_register(const char *devname,
int miiphy_set_current_dev(const char *devname);
const char *miiphy_get_current_dev(void);
+struct mii_dev *mdio_get_current_dev(void);
+struct mii_dev *miiphy_get_dev_by_name(const char *devname);
+struct phy_device *mdio_phydev_for_ethname(const char *devname);
void miiphy_listdev(void);
+struct mii_dev *mdio_alloc(void);
+int mdio_register(struct mii_dev *bus);
+void mdio_list_devices(void);
+
#ifdef CONFIG_BITBANGMII
#define BB_MII_DEVNAME "bb_miiphy"