diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2008-04-17 06:08:10 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-29 07:57:57 +0200 |
commit | d0313587547092af7f5ee8a576793e1e5d61be89 (patch) | |
tree | 57b711ba74fe8ed4dc5219a588b17f0bf4ec7239 /drivers/net/gianfar_mii.h | |
parent | Driver for IXP4xx built-in Ethernet ports (diff) | |
download | linux-d0313587547092af7f5ee8a576793e1e5d61be89.tar.xz linux-d0313587547092af7f5ee8a576793e1e5d61be89.zip |
[netdrvr] gianfar: Determine TBIPA value dynamically
TBIPA needs to be set to a value (on connected MDIO buses) that
doesn't conflict with PHYs on the bus. By hardcoding it to 0x1f,
we were preventing boards with PHYs at 0x1f from working properly.
Instead, scan the bus when it comes up, and find an address that
doesn't have a PHY on it. The TBI PHY configuration code then
trusts that the value in TBIPA is either safe, or doesn't matter
(ie - it's not an active bus with other PHYs).
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/gianfar_mii.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/gianfar_mii.h b/drivers/net/gianfar_mii.h index b373091c7031..2af28b16a0e2 100644 --- a/drivers/net/gianfar_mii.h +++ b/drivers/net/gianfar_mii.h @@ -41,6 +41,9 @@ struct gfar_mii { int gfar_mdio_read(struct mii_bus *bus, int mii_id, int regnum); int gfar_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value); +int gfar_local_mdio_write(struct gfar_mii __iomem *regs, int mii_id, + int regnum, u16 value); +int gfar_local_mdio_read(struct gfar_mii __iomem *regs, int mii_id, int regnum); int __init gfar_mdio_init(void); void gfar_mdio_exit(void); #endif /* GIANFAR_PHY_H */ |