]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ARM: imx: add shared gate clock support
authorShawn Guo <shawn.guo@freescale.com>
Sat, 19 Apr 2014 02:58:22 +0000 (10:58 +0800)
committerNitin Garg <nitin.garg@freescale.com>
Fri, 16 Jan 2015 03:16:14 +0000 (21:16 -0600)
commit25f4d068620730fe75691dae2bece33dbeb70890
treef72669d5a5ede4a177e06e3f1ae557a81dd5d0cc
parent72fde9fa31b674f0d6819f0a754e254f7fa931c8
ARM: imx: add shared gate clock support

It's quite common on i.MX that one gate bit controls the gating of
multiple clocks, i.e. this is a shared gate.  The patch adds the
function imx_clk_gate2_shared() for such case.  The clocks controlled
by the same gate bits should call this function with a pointer to a
single share count variable, so that the gate bits will only be
operated on the first enabling and the last disabling of these shared
gate clocks.

Thanks to Gerhard Sittig <gsi@denx.de> for this idea.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[shawn.guo: cherry-pick commit f9f28cdf2167 from upstream]
arch/arm/mach-imx/clk-gate2.c
arch/arm/mach-imx/clk.h