• Martin Fuzzey's avatar
    ARM: i.MX5: Allow DT clock providers · 75f83d06
    Martin Fuzzey authored
    Currently clock providers defined in the DT are not registered
    on i.MX5 platforms since of_clk_init() is not called.
    
    This is not a problem for the SOC's own clocks, which are registered
    in code,  but prevents the DT being used to define clocks for external
    hardware.
    
    Fix this by calling of_clk_init() and actually using the DT to obtain
    the 4 SOC fixed clocks.
    These are already defined in the DT but were previously just used to
    manually obtain the rate.
    
    Fall back to the old scheme for non DT platforms.
    
    Since the same method may be useful for other i.MX platforms
    implement the imx_obtain_fixed_clock() function in common code.
    
    Actually changing other i.MX platforms to use this should be done
    later by someone with access to the appropriate hardware.
    Signed-off-by: default avatarMartin Fuzzey <mfuzzey@parkeon.com>
    Tested-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
    Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
    75f83d06
clk.h 3.04 KB