powerpc/fm: fix TBI PHY address settings
PATCH 1/1 powerpc/fm: fix TBI PHY address settings
From: shaohui xie <[email protected]>
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 at DTSEC1 in case of FM1 at 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);
--- drivers/net/fm/eth.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/fm/eth.c +1 -1
@@ -65,7 +65,7 @@ void dtsec_configure_serdes(struct fm_eth *priv)static void dtsec_init_phy (struct eth_device *dev) {struct fm_eth *fm_eth = dev->priv; -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 );
Signature · 1 line
1.6.4
PATCH 1/1 powerpc/fm: fix TBI PHY address settings
Quoted 8 lines · Shaohui Xie
From: shaohui xie <[email protected]>
TBI PHY address (TBIPA) register is set in general frame manager phy init funciton
dtsec_init_phy()indrivers/net/fm/eth.c, and it is supposed to set TBIPA on FM1 at DTSEC1 in case of FM1 at 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.
Is this still true with Fman v3?
Does this patch fix any known bugs?
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
PATCH 1/1 powerpc/fm: fix TBI PHY address settings
Quoted 11 lines
-----Original Message-----
From: Tabi Timur-B04825
Sent: Saturday, October 13, 2012 3:25 AM
To: Xie Shaohui-B21989
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH] powerpc/fm: fix TBI PHY address settingsQuoted 2 lines · Shaohui Xie
From: shaohui xie <[email protected]>
Quoted 7 lines
Quoted 5 lines
TBI PHY address (TBIPA) register is set in general frame manager phy init funciton
dtsec_init_phy()indrivers/net/fm/eth.c, and it is supposed to set TBIPA on FM1 at DTSEC1 in case of FM1 at 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.Is this still true with Fman v3?
[S.H] No. Fman V3 does not need to set TBIPA on FM1 at DTSEC1.
Quoted 2 lines
Does this patch fix any known bugs?
[S.H] Yes, it fixed a bug internally (ENGR224292: p4080ds FM2 at DTSEC4 can't ping), and I sent it upstream as Kumar suggested.
Best Regards,
Shaohui Xie
PATCH 1/1 powerpc/fm: fix TBI PHY address settings
Quoted 2 lines · Xie Shaohui-B21989 wrote:
Quoted 1 line
Is this still true with Fman v3?
[S.H] No. Fman V3 does not need to set TBIPA on FM1 at DTSEC1.
Does this patch break Fman V3?
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
PATCH 1/1 powerpc/fm: fix TBI PHY address settings
Quoted 6 lines
Quoted 2 lines · Xie Shaohui-B21989 wrote:
Quoted 1 line
Is this still true with Fman v3?
[S.H] No. Fman V3 does not need to set TBIPA on FM1 at DTSEC1.
Does this patch break Fman V3?
[S.H] No. Fman V3 uses following code:
static void dtsec_init_phy(struct eth_device *dev)
{
struct fm_eth *fm_eth = dev->priv;
- struct dtsec *regs = (struct dtsec *)fm_eth->mac->base;
+#ifndef CONFIG_SYS_FMAN_V3
+ struct dtsec *regs = (struct dtsec *)fm_eth->mac->base;
/* Assign a Physical address to the TBI */ out_be32(®s->tbipa, CONFIG_SYS_TBIPA_VALUE);
+#endif
if (fm_eth->enet_if == PHY_INTERFACE_MODE_SGMII)
dtsec_configure_serdes(fm_eth);
The whole patch which introduced Fman V3 is at link:
http://patchwork.ozlabs.org/patch/190087/
Andy will need to merge the codes when he pick the two patches.
Best Regards,
Shaohui Xie