mx5 clocks: Fix get_lp_apm()
authorBenoît Thébaudeau <benoit.thebaudeau@advansee.com>
Thu, 27 Sep 2012 10:22:37 +0000 (10:22 +0000)
committerTom Rini <trini@ti.com>
Mon, 15 Oct 2012 18:54:11 +0000 (11:54 -0700)
commitb94792982f8f5d584f4c032117ecbc8abcec977f
tree379055bc5fc510e5b8bf4ffa3f9598f53d413d0b
parent649dc8abd9be85f6de441c3d4d2b7e0588156a38
mx5 clocks: Fix get_lp_apm()

If CCM.CCSR.lp_apm is set, the lp_apm clock is not necessarily 32768 Hz x 1024.
In that case:
 - on i.MX51, this clock comes from the output of the FPM,
 - on i.MX53, this clock comes from the output of PLL4.

This patch fixes the code accordingly.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
arch/arm/cpu/armv7/mx5/clock.c
arch/arm/include/asm/arch-mx5/crm_regs.h