Skip to contentSkip to conversation

ARM: imx6: fix wrong fec clk

PATCH New Markus Niebel 2 participants 2 messages Feb 5, 2014 – Feb 11, 2014 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: imx6: fix wrong fec clk

From: Markus Niebel <[email protected]>

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

---
 arch/arm/cpu/armv7/mx6/clock.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/cpu/armv7/mx6/clock.c +1 -1
index 5617a41..5cc25d1 100644
@@ -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)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 ARM: imx6: fix wrong fec clk

Quoted 11 lines · Markus Niebel

From: Markus Niebel <[email protected]>

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

---
 arch/arm/cpu/armv7/mx6/clock.c |    2 +-

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================