Skip to content
Snippets Groups Projects
Commit 17c7cf71 authored by Benoît Thébaudeau's avatar Benoît Thébaudeau Committed by Tom Rini
Browse files

mx25 clocks: Fix MXC_FEC_CLK


mxc_get_clock(MXC_FEC_CLK) should return the IPG clock, not the AHB clock.

Also, imx_get_fecclk() was correct but reimplemented the calculation of the IPG
clock, so remove the duplicated code.

Signed-off-by: default avatarBenoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
parent c3b51890
No related branches found
No related tags found
No related merge requests found
......@@ -129,9 +129,8 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
return imx_get_ahbclk();
case MXC_IPG_CLK:
case MXC_CSPI_CLK:
return imx_get_ipgclk();
case MXC_FEC_CLK:
return imx_get_ahbclk();
return imx_get_ipgclk();
default:
return imx_get_perclk(clk);
}
......
......@@ -71,7 +71,7 @@ ulong imx_get_perclk(int clk);
ulong imx_get_ahbclk(void);
#define imx_get_uartclk() imx_get_perclk(15)
#define imx_get_fecclk() (imx_get_ahbclk()/2)
#define imx_get_fecclk() mxc_get_clock(MXC_FEC_CLK)
unsigned int mxc_get_clock(enum mxc_clock clk);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment