The TBIPA register is part of gianfar's full register set. When starting from the MII registers, the start address of struct gfar needs to be determined via container_of(). Experienced with mpc8313 and "fsl,gianfar-mdio" device tree entries.
Signed-off-by: Lutz Jaenicke <ljaeni...@innominate.com> --- drivers/net/ethernet/freescale/fsl_pq_mdio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fsl_pq_mdio.c b/drivers/net/ethernet/freescale/fsl_pq_mdio.c index c93a056..9485fdb 100644 --- a/drivers/net/ethernet/freescale/fsl_pq_mdio.c +++ b/drivers/net/ethernet/freescale/fsl_pq_mdio.c @@ -193,7 +193,8 @@ static int fsl_pq_mdio_reset(struct mii_bus *bus) */ static uint32_t __iomem *get_gfar_tbipa(void __iomem *p) { - struct gfar __iomem *enet_regs = p; + struct gfar __iomem *enet_regs = + container_of(p, struct gfar, gfar_mii_regs); return &enet_regs->tbipa; } -- 1.7.10.4 _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev