[ARM] 3303/1: S3C24XX - add clock enable usage counting
Patch from Ben Dooks
Move to using an enable count for the shared clocks
and protect the clock system using a mutex instead
of just disabling IRQs during the clock update.
Since there is little more code in the path for
non-shared clocks, the enable and disable calls
use the same code for each.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
diff --git a/arch/arm/mach-s3c2410/clock.h b/arch/arm/mach-s3c2410/clock.h
index 177d5c8..eb5c95d 100644
--- a/arch/arm/mach-s3c2410/clock.h
+++ b/arch/arm/mach-s3c2410/clock.h
@@ -16,6 +16,7 @@
struct clk *parent;
const char *name;
int id;
+ int usage;
unsigned long rate;
unsigned long ctrlbit;
int (*enable)(struct clk *, int enable);