diff options
author | Renaud Barbier <renaud.barbier@ge.com> | 2013-06-25 14:09:59 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-06-25 22:16:55 +0200 |
commit | eb99c09f7c7edf27188e2d3e70773f9d29b93547 (patch) | |
tree | 43337c6c4bf785b3926ad13fe3dc4d51b9baa6a4 /drivers/net/gianfar.h | |
parent | 0cbb2155193ae04b4b9be501d22339ab80c03fee (diff) | |
download | barebox-eb99c09f7c7edf27188e2d3e70773f9d29b93547.tar.gz barebox-eb99c09f7c7edf27188e2d3e70773f9d29b93547.tar.xz |
ppc: gianfar MDIO buses
This commit creates MDIO bus devices to separate the MDIO bus
abstraction from the Ethernet device initialisation.
It also updates the configuration of the P2020RDB ports.
Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/net/gianfar.h')
-rw-r--r-- | drivers/net/gianfar.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h index b52cc5ab3b..1aac47907a 100644 --- a/drivers/net/gianfar.h +++ b/drivers/net/gianfar.h @@ -205,7 +205,6 @@ struct rxbd8 { #define GFAR_ECNTRL_OFFSET 0x020 /* Ethernet Control */ #define GFAR_MINFLR_OFFSET 0x024 /* Minimum Frame Length */ #define GFAR_DMACTRL_OFFSET 0x02c /* DMA Control */ -#define GFAR_TBIPA_OFFSET 0x030 /* TBI PHY address */ /* eTSEC transmit control and status register */ #define GFAR_TSTAT_OFFSET 0x104 /* transmit status register */ @@ -263,13 +262,19 @@ struct rxbd8 { #define GFAR_ATTR_OFFSET 0xbf8 /* Default Attribute Register */ #define GFAR_ATTRELI_OFFSET 0xbfc /* Default Attribute Extract Len/Idx */ +struct gfar_phy { + void __iomem *regs; + struct device_d *dev; + struct mii_bus miibus; +}; + struct gfar_private { struct eth_device edev; void __iomem *regs; - void __iomem *phyregs; - void __iomem *phyregs_sgmii; + int mdiobus_tbi; + struct gfar_phy *gfar_mdio; + struct gfar_phy *gfar_tbi; struct phy_info *phyinfo; - struct mii_bus miibus; volatile struct txbd8 *txbd; volatile struct rxbd8 *rxbd; uint txidx; |