aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s3c24xx/s3c244x-clock.c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-10-21 14:06:37 +0100
committerBen Dooks <ben-linux@fluff.org>2008-12-15 21:46:07 +0000
commitc3391e36d697c997b6afeb045071e0be95219a3e (patch)
tree8bd9c12dd364519347473277496da3f3f1a54c9c /arch/arm/plat-s3c24xx/s3c244x-clock.c
parent[ARM] CPUFREQ: S3C24XX serial CPU frequency scaling support. (diff)
downloadlinux-dev-c3391e36d697c997b6afeb045071e0be95219a3e.tar.xz
linux-dev-c3391e36d697c997b6afeb045071e0be95219a3e.zip
[ARM] S3C24XX: Change clock locking to use spinlocks.
We cannot sleep if we have cpufreq pm enabled during some of the clock operations, so change to use a spinlock to protect the clock system. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-s3c24xx/s3c244x-clock.c')
-rw-r--r--arch/arm/plat-s3c24xx/s3c244x-clock.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm/plat-s3c24xx/s3c244x-clock.c b/arch/arm/plat-s3c24xx/s3c244x-clock.c
index 7c09773ff9fc..dde41f171aff 100644
--- a/arch/arm/plat-s3c24xx/s3c244x-clock.c
+++ b/arch/arm/plat-s3c24xx/s3c244x-clock.c
@@ -31,7 +31,6 @@
#include <linux/sysdev.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
-#include <linux/mutex.h>
#include <linux/clk.h>
#include <linux/io.h>
@@ -102,13 +101,13 @@ static int s3c244x_clk_add(struct sys_device *sysdev)
if (clk_get_rate(clock_upll) > (94 * MHZ)) {
clk_usb_bus.rate = clk_get_rate(clock_upll) / 2;
- mutex_lock(&clocks_mutex);
+ spin_lock(&clocks_lock);
clkdivn = __raw_readl(S3C2410_CLKDIVN);
clkdivn |= S3C2440_CLKDIVN_UCLK;
__raw_writel(clkdivn, S3C2410_CLKDIVN);
- mutex_unlock(&clocks_mutex);
+ spin_unlock(&clocks_lock);
}
return 0;