• Eric Bénard's avatar
    mx25: fix clock's calculation · e482b3be
    Eric Bénard authored
    * get_rate_arm : when 400MHz clock is selected (cctl & 1<<14),
    ARM clock is 400MHz (MPLL * 3 / 4) and not 800MHz
    * get_rate_per : peripherals's clock is derived from AHB and not
    from IPG (ref manual : figure 5-1)
    * can2_clk : use the correct ID
    
    * without this patch, peripherals getting their clock from PER
    clocks work fine because of the 2 errors which fix themselves
    (ARM clock x 2 and per clock actually based on IPG which is AHB/2)
    but flexcan can't work as it gets its clock from IPG and thus
    calculates its bitrate using a reference value which is twice
    what it really is.
    Signed-off-by: default avatarEric Bénard <eric@eukrea.com>
    e482b3be
clock.c 10.1 KB