mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] mxs: get_fecclk is hclk, not a constant
@ 2012-12-05 11:28 Wolfram Sang
  2012-12-05 11:41 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Wolfram Sang @ 2012-12-05 11:28 UTC (permalink / raw)
  To: barebox; +Cc: jbe, Wolfram Sang

The rate is not constant as the comment said, but is hclk. The result
was that MII clock was often calculated wrong.

Reported-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---
 arch/arm/mach-mxs/speed-imx28.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm/mach-mxs/speed-imx28.c b/arch/arm/mach-mxs/speed-imx28.c
index df55f64..2cab42d 100644
--- a/arch/arm/mach-mxs/speed-imx28.c
+++ b/arch/arm/mach-mxs/speed-imx28.c
@@ -121,8 +121,7 @@ unsigned imx_get_xtalclk(void)
 
 unsigned imx_get_fecclk(void)
 {
-	/* this PLL always runs at 50 MHz */
-	return 50000000;
+	return imx_get_hclk();
 }
 
 
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] mxs: get_fecclk is hclk, not a constant
  2012-12-05 11:28 [PATCH] mxs: get_fecclk is hclk, not a constant Wolfram Sang
@ 2012-12-05 11:41 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2012-12-05 11:41 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: barebox, jbe

On Wed, Dec 05, 2012 at 12:28:45PM +0100, Wolfram Sang wrote:
> The rate is not constant as the comment said, but is hclk. The result
> was that MII clock was often calculated wrong.

Some more prosa would be good here:

The fec has multiple clock inputs:

- 50MHz clock for generating the (R)MII clock
- bus clock

The MDIO clock is derived from the bus clock, not the 50MHz clock,
so pass this into the driver so that it can correctly configure
the MDIO clock divider.

Sascha

> 
> Reported-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> ---
>  arch/arm/mach-mxs/speed-imx28.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-mxs/speed-imx28.c b/arch/arm/mach-mxs/speed-imx28.c
> index df55f64..2cab42d 100644
> --- a/arch/arm/mach-mxs/speed-imx28.c
> +++ b/arch/arm/mach-mxs/speed-imx28.c
> @@ -121,8 +121,7 @@ unsigned imx_get_xtalclk(void)
>  
>  unsigned imx_get_fecclk(void)
>  {
> -	/* this PLL always runs at 50 MHz */
> -	return 50000000;
> +	return imx_get_hclk();
>  }
>  
>  
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2012-12-05 11:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-05 11:28 [PATCH] mxs: get_fecclk is hclk, not a constant Wolfram Sang
2012-12-05 11:41 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox