summaryrefslogtreecommitdiff
path: root/cleopatre/linux-2.6.25.10-spc300/drivers/net/phy/fixed.c
diff options
context:
space:
mode:
Diffstat (limited to 'cleopatre/linux-2.6.25.10-spc300/drivers/net/phy/fixed.c')
-rw-r--r--cleopatre/linux-2.6.25.10-spc300/drivers/net/phy/fixed.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/cleopatre/linux-2.6.25.10-spc300/drivers/net/phy/fixed.c b/cleopatre/linux-2.6.25.10-spc300/drivers/net/phy/fixed.c
index 6c79a68edb..5a5e074ff2 100644
--- a/cleopatre/linux-2.6.25.10-spc300/drivers/net/phy/fixed.c
+++ b/cleopatre/linux-2.6.25.10-spc300/drivers/net/phy/fixed.c
@@ -143,6 +143,33 @@ static int fixed_mdio_write(struct mii_bus *bus, int phy_id, int reg_num,
return 0;
}
+/* For ethernet drivers using a phy device, we need to retrieve the
+ * phy_device. */
+struct phy_device *
+fixed_phy_find (int phy_id)
+{
+ struct fixed_mdio_bus *fmb = &platform_fmb;
+ struct fixed_phy *fp;
+
+ list_for_each_entry(fp, &fmb->phys, node) {
+ if (fp->id == phy_id) {
+ return fp->phydev;
+ }
+ }
+
+ return NULL;
+}
+EXPORT_SYMBOL_GPL(fixed_phy_find);
+
+/* For ethernet drivers allowing auto neg or any other operation on the PHY,
+ * we need to retrieve the mii_bus. */
+struct mii_bus *
+fixed_mii_get (void)
+{
+ return &(platform_fmb.mii_bus);
+}
+EXPORT_SYMBOL_GPL(fixed_mii_get);
+
/*
* If something weird is required to be done with link/speed,
* network driver is able to assign a function to implement this.