OSDN Git Service

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)
commitf9f28cdf21679792c30d9f5eebd01b7e04fe658f
tree6a1d608fd6eaeee70eeab2d00100394e0c95fb32
parent94b5c0288299c7b962a7e2cb734293b77b96cffe
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