]> 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)
committerShawn Guo <shawn.guo@freescale.com>
Wed, 30 Apr 2014 05:40:29 +0000 (13:40 +0800)
commit66175ee3ac78e9b552647740933142e3f49e4adc
tree79ba9b6f83e9c3a36da3b010af0acb8a5faeac56
parent2cf4651e983211875f9e706f25be31d29a24a447
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