summaryrefslogtreecommitdiff
path: root/include/miiphy.h
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-10-12 23:40:27 +0200
committerWolfgang Denk <wd@denx.de>2009-10-12 23:40:27 +0200
commit14abfe361b3ed23b02f564e2f5d663e158cd5799 (patch)
tree76ccf4f0ce3bb2d8c0fda116ee3d0e10de262af5 /include/miiphy.h
parent285870f75378aca41c5063e4358ad93bf3014fd8 (diff)
parentbe2254423b86572841aa70ff05d20933d1b49823 (diff)
downloadu-boot-imx-14abfe361b3ed23b02f564e2f5d663e158cd5799.zip
u-boot-imx-14abfe361b3ed23b02f564e2f5d663e158cd5799.tar.gz
u-boot-imx-14abfe361b3ed23b02f564e2f5d663e158cd5799.tar.bz2
Merge branch 'master' of /home/wd/git/u-boot/custodians
Diffstat (limited to 'include/miiphy.h')
-rw-r--r--include/miiphy.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/include/miiphy.h b/include/miiphy.h
index fa33ec7..5362125 100644
--- a/include/miiphy.h
+++ b/include/miiphy.h
@@ -19,6 +19,8 @@
|
| COPYRIGHT I B M CORPORATION 1999
| LICENSED MATERIAL - PROGRAM PROPERTY OF I B M
+|
+| Additions (C) Copyright 2009 Industrie Dial Face S.p.A.
+----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------+
|
@@ -61,12 +63,33 @@ char *miiphy_get_current_dev (void);
void miiphy_listdev (void);
-#define BB_MII_DEVNAME "bbmii"
+#ifdef CONFIG_BITBANGMII
+
+#define BB_MII_DEVNAME "bb_miiphy"
+
+struct bb_miiphy_bus {
+ char name[NAMESIZE];
+ int (*init)(struct bb_miiphy_bus *bus);
+ int (*mdio_active)(struct bb_miiphy_bus *bus);
+ int (*mdio_tristate)(struct bb_miiphy_bus *bus);
+ int (*set_mdio)(struct bb_miiphy_bus *bus, int v);
+ int (*get_mdio)(struct bb_miiphy_bus *bus, int *v);
+ int (*set_mdc)(struct bb_miiphy_bus *bus, int v);
+ int (*delay)(struct bb_miiphy_bus *bus);
+#ifdef CONFIG_BITBANGMII_MULTI
+ void *priv;
+#endif
+};
+
+extern struct bb_miiphy_bus bb_miiphy_buses[];
+extern int bb_miiphy_buses_num;
+void bb_miiphy_init (void);
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);
+#endif
/* phy seed setup */
#define AUTO 99