diff mbox

[U-Boot] ARM: imx6: fix wrong fec clk

Message ID 1391593885-4890-1-git-send-email-list-09_u-boot@tqsc.de
State Accepted
Delegated to: Stefano Babic
Headers show

Commit Message

Markus Niebel Feb. 5, 2014, 9:51 a.m. UTC
From: Markus Niebel <Markus.Niebel@tqs.de>

imx_get_fecclk() returns enet_ref instead of ipg.
Since the clock is used to calculate the prescaler
for the MDIO interface wrong values can be calculated.

Tested on a custom MX6S board with 100MBit interface

Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de>
---
 arch/arm/cpu/armv7/mx6/clock.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefano Babic Feb. 11, 2014, 10:32 a.m. UTC | #1
On 05/02/2014 10:51, Markus Niebel wrote:
> From: Markus Niebel <Markus.Niebel@tqs.de>
> 
> imx_get_fecclk() returns enet_ref instead of ipg.
> Since the clock is used to calculate the prescaler
> for the MDIO interface wrong values can be calculated.
> 
> Tested on a custom MX6S board with 100MBit interface
> 
> Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de>
> ---
>  arch/arm/cpu/armv7/mx6/clock.c |    2 +-


Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c
index 5617a41..5cc25d1 100644
--- a/arch/arm/cpu/armv7/mx6/clock.c
+++ b/arch/arm/cpu/armv7/mx6/clock.c
@@ -409,7 +409,7 @@  u32 imx_get_uartclk(void)
 
 u32 imx_get_fecclk(void)
 {
-	return decode_pll(PLL_ENET, MXC_HCLK);
+	return mxc_get_clock(MXC_IPG_CLK);
 }
 
 int enable_sata_clock(void)