diff mbox

[05/04] *** NOT FOR RELEASE *** HACK *** Work around MII clock issue ***

Message ID 4b73d43f0906061527p7ca1b301ybcfc576870a168d5@mail.gmail.com (mailing list archive)
State Not Applicable, archived
Delegated to: Kumar Gala
Headers show

Commit Message

John Rigby June 6, 2009, 10:27 p.m. UTC
I noticed the latest BSP from Freescale has this patch:

From: Chen Hongjun <Hong-jun.chen@freecale.com>
Date: Thu, 16 Apr 2009 20:22:52 +0800
Subject: [PATCH] Fixed FEC bug for bluestone board.

Signed-off-by: Chen Hongjun <Hong-jun.chen@freecale.com>
---
 drivers/net/fs_enet/mii-fec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

        setbits32(&fec->fecp->fec_r_cntrl, FEC_RCNTRL_MII_MODE);
        setbits32(&fec->fecp->fec_ecntrl, FEC_ECNTRL_PINMUX |
diff mbox

Patch

diff --git a/drivers/net/fs_enet/mii-fec.c b/drivers/net/fs_enet/mii-fec.c
index 13a7d66..53d01a8 100644
--- a/drivers/net/fs_enet/mii-fec.c
+++ b/drivers/net/fs_enet/mii-fec.c
@@ -208,7 +208,7 @@  static int __devinit fs_enet_mdio_probe(struct of_device
*ofdev,
        if (!fec->fecp)
                goto out_fec;

-       fec->mii_speed = ((ppc_proc_freq + 4999999) / 5000000) << 1;
+       fec->mii_speed = ((((ppc_proc_freq + 4999999) / 2500000) / 2) &
0x3F) << 1;