All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] powerpc/fm: fix TBI PHY address settings
@ 2012-10-12  6:25 Shaohui Xie
  2012-10-12 19:24 ` Tabi Timur-B04825
  0 siblings, 1 reply; 5+ messages in thread
From: Shaohui Xie @ 2012-10-12  6:25 UTC (permalink / raw)
  To: u-boot

From: shaohui xie <Shaohui.Xie@freescale.com>

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(&regs->tbipa, CONFIG_SYS_TBIPA_VALUE);

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
---
 drivers/net/fm/eth.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c
index 2b616ad..c8dc1d0 100644
--- a/drivers/net/fm/eth.c
+++ b/drivers/net/fm/eth.c
@@ -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(&regs->tbipa, CONFIG_SYS_TBIPA_VALUE);
-- 
1.6.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-10-17  5:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-12  6:25 [U-Boot] [PATCH] powerpc/fm: fix TBI PHY address settings Shaohui Xie
2012-10-12 19:24 ` Tabi Timur-B04825
2012-10-16 11:16   ` Xie Shaohui-B21989
2012-10-16 19:25     ` Timur Tabi
2012-10-17  5:59       ` Xie Shaohui-B21989

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.