netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shawn Guo <shawn.guo@freescale.com>
To: Troy Kisky <troy.kisky@boundarydevices.com>
Cc: Shawn Guo <shawn.guo@linaro.org>, <netdev@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	<linux-arm-kernel@lists.infradead.org>, <patches@linaro.org>
Subject: Re: [PATCH 3/4] net/fec: set phy_speed to the optimal frequency 2.5 MHz
Date: Tue, 20 Sep 2011 10:57:01 +0800	[thread overview]
Message-ID: <20110920025700.GE28084@S2100-06.ap.freescale.net> (raw)
In-Reply-To: <4E77C4A2.1060802@boundarydevices.com>

On Mon, Sep 19, 2011 at 03:39:30PM -0700, Troy Kisky wrote:
> On 9/18/2011 4:54 AM, Shawn Guo wrote:
> >With the unnecessary 1 bit left-shift on fep->phy_speed during the
> >calculation, the phy_speed always runs at the half frequency of the
> >optimal one 2.5 MHz.
> >
> >The patch removes that 1 bit left-shift to get the optimal phy_speed.
> >
> >Signed-off-by: Shawn Guo<shawn.guo@linaro.org>
> >---
> >  drivers/net/fec.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> >diff --git a/drivers/net/fec.c b/drivers/net/fec.c
> >index 5ef0e34..04206e4 100644
> >--- a/drivers/net/fec.c
> >+++ b/drivers/net/fec.c
> >@@ -1007,7 +1007,7 @@ static int fec_enet_mii_init(struct platform_device *pdev)
> >  	/*
> >  	 * Set MII speed to 2.5 MHz (= clk_get_rate() / 2 * phy_speed)
> >  	 */
> >-	fep->phy_speed = DIV_ROUND_UP(clk_get_rate(fep->clk), 5000000)<<  1;
> >+	fep->phy_speed = DIV_ROUND_UP(clk_get_rate(fep->clk), 5000000);
> >  	writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED);
> >
> >  	fep->mii_bus = mdiobus_alloc();
> Do you need to round up to an even value? Is the hardware
> documentation wrong?

The round up is something existed, and the patch does not touch that
part.

> Does this need a quirk? What boards has this been verified to fix?
> 

I tested this on i.mx28, i.mx53 and i.mx6q.  Do you see problem on
your platform?

-- 
Regards,
Shawn

  reply	other threads:[~2011-09-20  2:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-18 11:54 [PATCH 0/4] add fec support for imx6q Shawn Guo
2011-09-18 11:54 ` [PATCH 1/4] net/fec: change phy-reset-gpio request warning to debug message Shawn Guo
2011-09-18 11:54 ` [PATCH 2/4] net/fec: fix fec1 check in fec_enet_mii_init() Shawn Guo
2011-09-18 11:54 ` [PATCH 3/4] net/fec: set phy_speed to the optimal frequency 2.5 MHz Shawn Guo
2011-09-19 22:39   ` Troy Kisky
2011-09-20  2:57     ` Shawn Guo [this message]
2011-09-20 20:05       ` Troy Kisky
2011-09-20 20:10         ` Troy Kisky
2011-09-20  7:50   ` Lothar Waßmann
2011-09-20  8:14     ` Shawn Guo
2011-09-20 19:11       ` David Miller
2011-09-18 11:54 ` [PATCH 4/4] net/fec: add imx6q enet support Shawn Guo
2011-09-18 18:09   ` Francois Romieu
2011-09-19  9:08     ` Shawn Guo
2011-09-20 19:08 ` [PATCH 0/4] add fec support for imx6q David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110920025700.GE28084@S2100-06.ap.freescale.net \
    --to=shawn.guo@freescale.com \
    --cc=davem@davemloft.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=shawn.guo@linaro.org \
    --cc=troy.kisky@boundarydevices.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).