From: shaohui xie Date: Thu, 11 Oct 2012 20:25:36 +0000 (+0000) Subject: powerpc/fm: fix TBI PHY address settings X-Git-Tag: v2013.01-rc1~90^2~4 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1f3bd3e239fb0542128f7c911829c9f0360b0d8f;p=u-boot powerpc/fm: fix TBI PHY address settings TBI PHY address (TBIPA) register is set in general frame manager phy init funciton dtsec_init_phy() in drivers/net/fm/eth.c, and it is supposed to set TBIPA on FM1@DTSEC1 in case of FM1@DTSEC1 isn't used directly, which provides MDIO for other ports. So following code is wrong in case of FM2, which has a different mac base. struct dtsec *regs = (struct dtsec *)fm_eth->mac->base; /* Assign a Physical address to the TBI */ out_be32(®s->tbipa, CONFIG_SYS_TBIPA_VALUE); Signed-off-by: Shaohui Xie Signed-off-by: Andy Fleming --- diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c index ed23fdd4ac..82c787bf38 100644 --- a/drivers/net/fm/eth.c +++ b/drivers/net/fm/eth.c @@ -89,9 +89,9 @@ void dtsec_configure_serdes(struct fm_eth *priv) static void dtsec_init_phy(struct eth_device *dev) { struct fm_eth *fm_eth = dev->priv; - #ifndef CONFIG_SYS_FMAN_V3 - struct dtsec *regs = (struct dtsec *)fm_eth->mac->base; + struct dtsec *regs = (struct dtsec *)CONFIG_SYS_FSL_FM1_DTSEC1_ADDR; + /* Assign a Physical address to the TBI */ out_be32(®s->tbipa, CONFIG_SYS_TBIPA_VALUE); #endif