]> git.baikalelectronics.ru Git - kernel.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)
committerShawn Guo <shawn.guo@freescale.com>
Mon, 12 May 2014 14:58:48 +0000 (22:58 +0800)
commit72fd7b2888f12c8cd8b8b7150a2ed7941af72a85
tree6a1d608fd6eaeee70eeab2d00100394e0c95fb32
parent4b46591cb442e71e51e65b3d3eb2a1f58320a99a
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>
arch/arm/mach-imx/clk-gate2.c
arch/arm/mach-imx/clk.h