diff options
author | Benoît Thébaudeau <benoit.thebaudeau@advansee.com> | 2012-09-27 10:27:28 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-10-15 11:54:12 -0700 |
commit | c3b518903192fd1ee346211ed8c7e020ea2fc050 (patch) | |
tree | f8f2dcf43430525929661945c26d7df07973b703 /arch/arm/cpu/arm926ejs/mx25/generic.c | |
parent | fac7c817c31e6c60b2e03e8fcb4b745d0c8d10ab (diff) | |
download | u-boot-imx-c3b518903192fd1ee346211ed8c7e020ea2fc050.zip u-boot-imx-c3b518903192fd1ee346211ed8c7e020ea2fc050.tar.gz u-boot-imx-c3b518903192fd1ee346211ed8c7e020ea2fc050.tar.bz2 |
mx25: Define more standard clocks
Define AHB, IPG and CSPI clocks.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'arch/arm/cpu/arm926ejs/mx25/generic.c')
-rw-r--r-- | arch/arm/cpu/arm926ejs/mx25/generic.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c index e25a695..0d1ae20 100644 --- a/arch/arm/cpu/arm926ejs/mx25/generic.c +++ b/arch/arm/cpu/arm926ejs/mx25/generic.c @@ -101,6 +101,11 @@ ulong imx_get_ahbclk(void) return fref / div; } +static ulong imx_get_ipgclk(void) +{ + return imx_get_ahbclk() / 2; +} + ulong imx_get_perclk(int clk) { struct ccm_regs *ccm = (struct ccm_regs *)IMX_CCM_BASE; @@ -120,6 +125,11 @@ unsigned int mxc_get_clock(enum mxc_clock clk) switch (clk) { case MXC_ARM_CLK: return imx_get_armclk(); + case MXC_AHB_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(); default: |