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

In the case periph_clk comes from periph_apm_clk, the latter is selected by the
CCM.CBCMR.periph_apm_sel mux, which can source the lp_apm clock from its
input ♯2. get_periph_clk() returned 0 instead of the lp_apm clock frequency in
this case.

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