diff options
author | Martin Fuzzey <mfuzzey@parkeon.com> | 2013-04-23 14:16:59 +0200 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-06-17 09:45:09 +0200 |
commit | 75f83d06c3305e0f0a00e7d141acf8ceef608fe9 (patch) | |
tree | 6f71c11c803414b0075af8a5b642212cfff7136d /arch/arm/mach-imx/clk.h | |
parent | Linux 3.10-rc6 (diff) | |
download | linux-75f83d06c3305e0f0a00e7d141acf8ceef608fe9.tar.xz linux-75f83d06c3305e0f0a00e7d141acf8ceef608fe9.zip |
ARM: i.MX5: Allow DT clock providers
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>
Diffstat (limited to 'arch/arm/mach-imx/clk.h')
-rw-r--r-- | arch/arm/mach-imx/clk.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/clk.h b/arch/arm/mach-imx/clk.h index d9d9d9c66dff..a2432c6960db 100644 --- a/arch/arm/mach-imx/clk.h +++ b/arch/arm/mach-imx/clk.h @@ -29,6 +29,9 @@ struct clk *clk_register_gate2(struct device *dev, const char *name, void __iomem *reg, u8 bit_idx, u8 clk_gate_flags, spinlock_t *lock); +struct clk * imx_obtain_fixed_clock( + const char *name, unsigned long rate); + static inline struct clk *imx_clk_gate2(const char *name, const char *parent, void __iomem *reg, u8 shift) { |