]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ARM: i.MX5: Allow DT clock providers
authorMartin Fuzzey <mfuzzey@parkeon.com>
Tue, 23 Apr 2013 12:16:59 +0000 (20:16 +0800)
committerJason Liu <r64343@freescale.com>
Wed, 30 Oct 2013 01:53:36 +0000 (09:53 +0800)
commitee26e54778756abbcf20439af9aa8b9a686925f6
treeaba1fb331f839894c8638d6108cd37e6f5235179
parent0a099ea78071c16541988450b44952d0dc6a6dc3
ARM: i.MX5: Allow DT clock providers

Commit 75f83d06c3305e0f0a00e7d141acf8ceef608fe9 upstream.

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: Martin Fuzzey <mfuzzey@parkeon.com>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
arch/arm/mach-imx/clk-imx51-imx53.c
arch/arm/mach-imx/clk.c
arch/arm/mach-imx/clk.h